Merge "Refactoring changes and minor bug fixes for protolayout-renderer." into androidx-main
diff --git a/activity/activity-ktx/api/api_lint.ignore b/activity/activity-ktx/api/api_lint.ignore
deleted file mode 100644
index 7586506..0000000
--- a/activity/activity-ktx/api/api_lint.ignore
+++ /dev/null
@@ -1,7 +0,0 @@
-// Baseline format: 1.0
-MissingNullability: androidx.activity.ActivityViewModelLazyKt#viewModels(androidx.activity.ComponentActivity, kotlin.jvm.functions.Function0<? extends androidx.lifecycle.viewmodel.CreationExtras>, kotlin.jvm.functions.Function0<? extends androidx.lifecycle.ViewModelProvider.Factory>):
- Missing nullability on method `viewModels` return
-
-
-RegistrationName: androidx.activity.OnBackPressedDispatcherKt#addCallback(androidx.activity.OnBackPressedDispatcher, androidx.lifecycle.LifecycleOwner, boolean, kotlin.jvm.functions.Function1<? super androidx.activity.OnBackPressedCallback,kotlin.Unit>):
- Callback methods should be named register/unregister; was addCallback
diff --git a/activity/activity-ktx/lint-baseline.xml b/activity/activity-ktx/lint-baseline.xml
new file mode 100644
index 0000000..f4a0fe0
--- /dev/null
+++ b/activity/activity-ktx/lint-baseline.xml
@@ -0,0 +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">
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1="@RequiresApi(Build.VERSION_CODES.KITKAT)"
+ errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/activity/PipHintTracker.kt"/>
+ </issue>
+
+</issues>
diff --git a/activity/activity/lint-baseline.xml b/activity/activity/lint-baseline.xml
new file mode 100644
index 0000000..bcd3963
--- /dev/null
+++ b/activity/activity/lint-baseline.xml
@@ -0,0 +1,139 @@
+<?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/integration-tests/testapp/lint-baseline.xml b/activity/integration-tests/testapp/lint-baseline.xml
index 2790d4a..b0521cd 100644
--- a/activity/integration-tests/testapp/lint-baseline.xml
+++ b/activity/integration-tests/testapp/lint-baseline.xml
@@ -1,5 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.0.0-alpha05" type="baseline" client="gradle" dependencies="false" name="AGP (8.0.0-alpha05)" variant="all" version="8.0.0-alpha05">
+<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"
diff --git a/annotation/annotation/src/commonMain/kotlin/androidx/annotation/RequiresApi.kt b/annotation/annotation/src/commonMain/kotlin/androidx/annotation/RequiresApi.kt
index 52133a8..54cacc6 100644
--- a/annotation/annotation/src/commonMain/kotlin/androidx/annotation/RequiresApi.kt
+++ b/annotation/annotation/src/commonMain/kotlin/androidx/annotation/RequiresApi.kt
@@ -43,7 +43,7 @@
@OptionalExpectation // Need to use expect due to Java-specific target annotations on the actual.
public expect annotation class RequiresApi(
/** The API level to require. Alias for [.api] which allows you to leave out the `api=` part. */
- @IntRange(from = 1) val value: Int,
+ @IntRange(from = 1) val value: Int = 1,
/** The API level to require */
- @IntRange(from = 1) val api: Int
+ @IntRange(from = 1) val api: Int = 1
)
diff --git a/appcompat/appcompat-resources/api/api_lint.ignore b/appcompat/appcompat-resources/api/api_lint.ignore
index dd0cf8d..0cfa261 100644
--- a/appcompat/appcompat-resources/api/api_lint.ignore
+++ b/appcompat/appcompat-resources/api/api_lint.ignore
@@ -17,8 +17,6 @@
Missing nullability on parameter `tint` in method `setTintList`
MissingNullability: androidx.appcompat.graphics.drawable.DrawableWrapperCompat#DrawableWrapperCompat(android.graphics.drawable.Drawable) parameter #0:
Missing nullability on parameter `drawable` in method `DrawableWrapperCompat`
-MissingNullability: androidx.appcompat.graphics.drawable.DrawableWrapperCompat#draw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `draw`
MissingNullability: androidx.appcompat.graphics.drawable.DrawableWrapperCompat#getCurrent():
Missing nullability on method `getCurrent` return
MissingNullability: androidx.appcompat.graphics.drawable.DrawableWrapperCompat#getPadding(android.graphics.Rect) parameter #0:
diff --git a/appcompat/appcompat-resources/lint-baseline.xml b/appcompat/appcompat-resources/lint-baseline.xml
index 296a941..e8d403b 100644
--- a/appcompat/appcompat-resources/lint-baseline.xml
+++ b/appcompat/appcompat-resources/lint-baseline.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.0.0-beta03" type="baseline" client="cli" dependencies="false" name="AGP (8.0.0-beta03)" variant="all" version="8.0.0-beta03">
+<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 14): `android.graphics.drawable.Drawable#getColorFilter`"
+ message="Call requires API level 21 (current min is 19): `android.graphics.drawable.Drawable#getColorFilter`"
errorLine1=" assertNotNull(ld.getDrawable(0).getColorFilter());"
errorLine2=" ~~~~~~~~~~~~~~">
<location
@@ -101,6 +101,114 @@
</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/api/api_lint.ignore b/appcompat/appcompat/api/api_lint.ignore
index 90541cfd..94f4148 100644
--- a/appcompat/appcompat/api/api_lint.ignore
+++ b/appcompat/appcompat/api/api_lint.ignore
@@ -551,8 +551,6 @@
Missing nullability on parameter `attrs` in method `createView`
MissingNullability: androidx.appcompat.graphics.drawable.DrawerArrowDrawable#DrawerArrowDrawable(android.content.Context) parameter #0:
Missing nullability on parameter `context` in method `DrawerArrowDrawable`
-MissingNullability: androidx.appcompat.graphics.drawable.DrawerArrowDrawable#draw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `draw`
MissingNullability: androidx.appcompat.graphics.drawable.DrawerArrowDrawable#getPaint():
Missing nullability on method `getPaint` return
MissingNullability: androidx.appcompat.graphics.drawable.DrawerArrowDrawable#setColorFilter(android.graphics.ColorFilter) parameter #0:
@@ -725,8 +723,6 @@
Missing nullability on parameter `p` in method `generateLayoutParams`
MissingNullability: androidx.appcompat.widget.LinearLayoutCompat#getDividerDrawable():
Missing nullability on method `getDividerDrawable` return
-MissingNullability: androidx.appcompat.widget.LinearLayoutCompat#onDraw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `onDraw`
MissingNullability: androidx.appcompat.widget.LinearLayoutCompat#onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent) parameter #0:
Missing nullability on parameter `event` in method `onInitializeAccessibilityEvent`
MissingNullability: androidx.appcompat.widget.LinearLayoutCompat#onInitializeAccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo) parameter #0:
@@ -797,8 +793,6 @@
Missing nullability on parameter `source` in method `onShareTargetSelected`
MissingNullability: androidx.appcompat.widget.ShareActionProvider.OnShareTargetSelectedListener#onShareTargetSelected(androidx.appcompat.widget.ShareActionProvider, android.content.Intent) parameter #1:
Missing nullability on parameter `intent` in method `onShareTargetSelected`
-MissingNullability: androidx.appcompat.widget.SwitchCompat#draw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `c` in method `draw`
MissingNullability: androidx.appcompat.widget.SwitchCompat#getTextOff():
Missing nullability on method `getTextOff` return
MissingNullability: androidx.appcompat.widget.SwitchCompat#getTextOn():
@@ -833,8 +827,6 @@
Missing nullability on parameter `thumb` in method `setThumbDrawable`
MissingNullability: androidx.appcompat.widget.SwitchCompat#setTrackDrawable(android.graphics.drawable.Drawable) parameter #0:
Missing nullability on parameter `track` in method `setTrackDrawable`
-MissingNullability: androidx.appcompat.widget.SwitchCompat#verifyDrawable(android.graphics.drawable.Drawable) parameter #0:
- Missing nullability on parameter `who` in method `verifyDrawable`
MissingNullability: androidx.appcompat.widget.Toolbar#checkLayoutParams(android.view.ViewGroup.LayoutParams) parameter #0:
Missing nullability on parameter `p` in method `checkLayoutParams`
MissingNullability: androidx.appcompat.widget.Toolbar#generateDefaultLayoutParams():
@@ -907,6 +899,10 @@
Missing nullability on parameter `out` in method `writeToParcel`
+NotCloseable: androidx.appcompat.view.ActionMode:
+ Classes that release resources (finish()) should implement AutoCloseable and CloseGuard: class androidx.appcompat.view.ActionMode
+
+
ParcelConstructor: androidx.appcompat.widget.Toolbar.SavedState#SavedState(android.os.Parcel):
Parcelable inflation is exposed through CREATOR, not raw constructors, in androidx.appcompat.widget.Toolbar.SavedState
diff --git a/appcompat/appcompat/lint-baseline.xml b/appcompat/appcompat/lint-baseline.xml
index d2600ce..871f6d7 100644
--- a/appcompat/appcompat/lint-baseline.xml
+++ b/appcompat/appcompat/lint-baseline.xml
@@ -1,9 +1,9 @@
<?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-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 14): `android.graphics.drawable.AnimatedStateListDrawable`"
+ message="Class requires API level 21 (current min is 19): `android.graphics.drawable.AnimatedStateListDrawable`"
errorLine1=" || button instanceof AnimatedStateListDrawable);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -12,7 +12,7 @@
<issue
id="NewApi"
- message="Call requires API level 25 (current min is 14): `new android.view.inputmethod.InputContentInfo`"
+ message="Call requires API level 25 (current min is 19): `new android.view.inputmethod.InputContentInfo`"
errorLine1=" final InputContentInfo contentInfo = new InputContentInfo("
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
@@ -21,7 +21,7 @@
<issue
id="NewApi"
- message="Call requires API level 25 (current min is 14): `android.view.inputmethod.InputConnection#commitContent`"
+ message="Call requires API level 25 (current min is 19): `android.view.inputmethod.InputConnection#commitContent`"
errorLine1=" return ic.commitContent(contentInfo, flags, null);"
errorLine2=" ~~~~~~~~~~~~~">
<location
@@ -30,7 +30,7 @@
<issue
id="NewApi"
- message="Class requires API level 26 (current min is 14): `android.view.textclassifier.TextClassifier`"
+ message="Class requires API level 26 (current min is 19): `android.view.textclassifier.TextClassifier`"
errorLine1=" private static class NoOpTextClassifier implements TextClassifier {}"
errorLine2=" ~~~~~~~~~~~~~~">
<location
@@ -39,7 +39,7 @@
<issue
id="NewApi"
- message="Class requires API level 21 (current min is 14): `android.graphics.drawable.AnimatedStateListDrawable`"
+ message="Class requires API level 21 (current min is 19): `android.graphics.drawable.AnimatedStateListDrawable`"
errorLine1=" || button instanceof AnimatedStateListDrawable);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -48,25 +48,7 @@
<issue
id="NewApi"
- message="Call requires API level 17 (current min is 14): `android.view.ContextThemeWrapper#applyOverrideConfiguration`"
- errorLine1=" wrappedBase.applyOverrideConfiguration(overrideConfig);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/appcompat/widget/AppCompatSpinnerRtlActivity.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `android.view.ContextThemeWrapper#applyOverrideConfiguration`"
- errorLine1=" wrappedBase.applyOverrideConfiguration(overrideConfig);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/appcompat/testutils/BaseTestActivity.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 20 (current min is 14): `android.view.WindowInsets#getSystemWindowInsetTop`"
+ message="Call requires API level 20 (current min is 19): `android.view.WindowInsets#getSystemWindowInsetTop`"
errorLine1=" mSystemWindowInsetTop = insets.getSystemWindowInsetTop();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -74,60 +56,6 @@
</issue>
<issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `setLocalNightMode`"
- errorLine1=" delegate.localNightMode = AppCompatDelegate.MODE_NIGHT_YES"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/appcompat/app/NightModeLocalBeforeAttachBaseActivity.kt"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Field requires API level 17 (current min is 14): `setLocalNightMode`"
- errorLine1=" delegate.localNightMode = AppCompatDelegate.MODE_NIGHT_YES"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/appcompat/app/NightModeLocalBeforeAttachBaseActivity.kt"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 16): `android.content.res.Configuration#setLayoutDirection`"
- errorLine1=" configuration.setLayoutDirection(locale)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/appcompat/app/NightModeRtlTestUtilsRegressionTestCase.kt"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 16): `android.content.res.Configuration#setLocale`"
- errorLine1=" configuration.setLocale(locale)"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/appcompat/app/NightModeRtlTestUtilsRegressionTestCase.kt"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 16): `android.content.res.Configuration#getLayoutDirection`"
- errorLine1=" assertEquals(TextUtils.getLayoutDirectionFromLocale(CUSTOM_LOCALE), config.layoutDirection)"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/appcompat/app/NightModeRtlTestUtilsRegressionTestCase.kt"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 16): `android.text.TextUtils#getLayoutDirectionFromLocale`"
- errorLine1=" assertEquals(TextUtils.getLayoutDirectionFromLocale(CUSTOM_LOCALE), config.layoutDirection)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/appcompat/app/NightModeRtlTestUtilsRegressionTestCase.kt"/>
- </issue>
-
- <issue
id="BanSynchronizedMethods"
message="Use of synchronized methods is not recommended"
errorLine1=" public static synchronized void preload() {"
@@ -461,6 +389,639 @@
</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 >= 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
+ 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(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=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <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 >= 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
+ file="src/main/java/androidx/appcompat/app/AppCompatViewInflater.java"/>
+ </issue>
+
+ <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"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="This folder configuration (`v17`) is unnecessary; `minSdkVersion` is 19. Merge all the resources in this folder into `values`.">
+ <location
+ file="src/main/res/values-v17"/>
+ </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"/>
+ </issue>
+
+ <issue
id="KotlinPropertyAccess"
message="The getter return type (`View`) and setter parameter type (`ScrollingTabContainerView`) getter and setter methods for property `tabContainer` 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 View getTabContainer() {"
diff --git a/appcompat/appcompat/src/androidTest/AndroidManifest.xml b/appcompat/appcompat/src/androidTest/AndroidManifest.xml
index aa16fad..71c9ecf 100644
--- a/appcompat/appcompat/src/androidTest/AndroidManifest.xml
+++ b/appcompat/appcompat/src/androidTest/AndroidManifest.xml
@@ -18,7 +18,6 @@
xmlns:tools="http://schemas.android.com/tools">
<uses-sdk
- android:minSdkVersion="14"
tools:overrideLibrary="android_libs.ub_uiautomator, androidx.test.uiautomator" />
<application
diff --git a/appsearch/appsearch-builtin-types/lint-baseline.xml b/appsearch/appsearch-builtin-types/lint-baseline.xml
new file mode 100644
index 0000000..eb18f46
--- /dev/null
+++ b/appsearch/appsearch-builtin-types/lint-baseline.xml
@@ -0,0 +1,85 @@
+<?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/arch/core/core-runtime/lint-baseline.xml b/arch/core/core-runtime/lint-baseline.xml
new file mode 100644
index 0000000..50b2d22
--- /dev/null
+++ b/arch/core/core-runtime/lint-baseline.xml
@@ -0,0 +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">
+
+ <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/autofill/autofill/api/api_lint.ignore b/autofill/autofill/api/api_lint.ignore
index 679a1d3..c963001 100644
--- a/autofill/autofill/api/api_lint.ignore
+++ b/autofill/autofill/api/api_lint.ignore
@@ -1,16 +1,4 @@
// Baseline format: 1.0
-HiddenSuperclass: androidx.autofill.inline.common.ViewStyle:
- Public class androidx.autofill.inline.common.ViewStyle stripped of unavailable superclass androidx.autofill.inline.common.BundledStyle
-HiddenSuperclass: androidx.autofill.inline.v1.InlineSuggestionUi.Content:
- Public class androidx.autofill.inline.v1.InlineSuggestionUi.Content stripped of unavailable superclass androidx.autofill.inline.common.SlicedContent
-HiddenSuperclass: androidx.autofill.inline.v1.InlineSuggestionUi.Content.Builder:
- Public class androidx.autofill.inline.v1.InlineSuggestionUi.Content.Builder stripped of unavailable superclass androidx.autofill.inline.common.SlicedContent.Builder
-HiddenSuperclass: androidx.autofill.inline.v1.InlineSuggestionUi.Style:
- Public class androidx.autofill.inline.v1.InlineSuggestionUi.Style stripped of unavailable superclass androidx.autofill.inline.common.BundledStyle
-HiddenSuperclass: androidx.autofill.inline.v1.InlineSuggestionUi.Style.Builder:
- Public class androidx.autofill.inline.v1.InlineSuggestionUi.Style.Builder stripped of unavailable superclass androidx.autofill.inline.common.BundledStyle.Builder
-
-
MissingGetterMatchingBuilder: androidx.autofill.inline.UiVersions.StylesBuilder#addStyle(androidx.autofill.inline.UiVersions.Style):
android.os.Bundle does not declare a `getStyles()` method matching method androidx.autofill.inline.UiVersions.StylesBuilder.addStyle(androidx.autofill.inline.UiVersions.Style)
MissingGetterMatchingBuilder: androidx.autofill.inline.common.ImageViewStyle.Builder#setBackground(android.graphics.drawable.Icon):
diff --git a/benchmark/benchmark-common/lint-baseline.xml b/benchmark/benchmark-common/lint-baseline.xml
index c56433f..21ab699 100644
--- a/benchmark/benchmark-common/lint-baseline.xml
+++ b/benchmark/benchmark-common/lint-baseline.xml
@@ -1,9 +1,9 @@
<?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-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 23 (current min is 14): `stopAllPerfettoProcesses`"
+ message="Call requires API level 23 (current min is 19): `stopAllPerfettoProcesses`"
errorLine1=" PerfettoHelper.stopAllPerfettoProcesses()"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -12,7 +12,7 @@
<issue
id="NewApi"
- message="Call requires API level 21 (current min is 14): `getPidsForProcess`"
+ message="Call requires API level 21 (current min is 19): `getPidsForProcess`"
errorLine1=" fun getPerfettoPids() = Shell.getPidsForProcess(if (unbundled) "tracebox" else "perfetto")"
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
@@ -21,7 +21,7 @@
<issue
id="NewApi"
- message="Call requires API level 23 (current min is 14): `PerfettoCapture`"
+ message="Call requires API level 23 (current min is 19): `PerfettoCapture`"
errorLine1=" val capture = PerfettoCapture(unbundled)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -30,7 +30,7 @@
<issue
id="NewApi"
- message="Call requires API level 23 (current min is 14): `start`"
+ message="Call requires API level 23 (current min is 19): `start`"
errorLine1=" capture.start("
errorLine2=" ~~~~~">
<location
@@ -39,7 +39,7 @@
<issue
id="NewApi"
- message="Call requires API level 23 (current min is 14): `isRunning`"
+ message="Call requires API level 23 (current min is 19): `isRunning`"
errorLine1=" assertTrue(capture.isRunning())"
errorLine2=" ~~~~~~~~~">
<location
@@ -48,7 +48,7 @@
<issue
id="NewApi"
- message="Call requires API level 23 (current min is 14): `stopAllPerfettoProcesses`"
+ message="Call requires API level 23 (current min is 19): `stopAllPerfettoProcesses`"
errorLine1=" PerfettoHelper.stopAllPerfettoProcesses()"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -57,7 +57,7 @@
<issue
id="NewApi"
- message="Call requires API level 23 (current min is 14): `isRunning`"
+ message="Call requires API level 23 (current min is 19): `isRunning`"
errorLine1=" assertFalse(capture.isRunning())"
errorLine2=" ~~~~~~~~~">
<location
@@ -66,7 +66,7 @@
<issue
id="NewApi"
- message="Call requires API level 23 (current min is 14): `isAbiSupported`"
+ message="Call requires API level 23 (current min is 19): `isAbiSupported`"
errorLine1=" Assume.assumeTrue(PerfettoHelper.isAbiSupported())"
errorLine2=" ~~~~~~~~~~~~~~">
<location
diff --git a/benchmark/benchmark-darwin-samples/build.gradle b/benchmark/benchmark-darwin-samples/build.gradle
index 3684119..ef5f75f 100644
--- a/benchmark/benchmark-darwin-samples/build.gradle
+++ b/benchmark/benchmark-darwin-samples/build.gradle
@@ -1,3 +1,4 @@
+import androidx.build.BuildOnServerKt
import org.jetbrains.kotlin.gradle.plugin.mpp.BitcodeEmbeddingMode
import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFrameworkConfig
@@ -33,17 +34,20 @@
implementation(libs.kotlinTestAnnotationsCommon)
}
}
- iosArm64Main {
+ iosMain {
dependsOn(commonMain)
dependencies {
api(project(":benchmark:benchmark-darwin"))
}
}
+ iosArm64Main {
+ dependsOn(iosMain)
+ }
iosSimulatorArm64Main {
- dependsOn(iosArm64Main)
+ dependsOn(iosMain)
}
iosX64Main {
- dependsOn(iosArm64Main)
+ dependsOn(iosMain)
}
}
}
diff --git a/benchmark/benchmark-darwin-samples/src/iosArm64Main/kotlin/androidx/benchmark/darwin/samples/ArrayListAllocationBenchmark.kt b/benchmark/benchmark-darwin-samples/src/iosMain/kotlin/androidx/benchmark/darwin/samples/ArrayListAllocationBenchmark.kt
similarity index 100%
rename from benchmark/benchmark-darwin-samples/src/iosArm64Main/kotlin/androidx/benchmark/darwin/samples/ArrayListAllocationBenchmark.kt
rename to benchmark/benchmark-darwin-samples/src/iosMain/kotlin/androidx/benchmark/darwin/samples/ArrayListAllocationBenchmark.kt
diff --git a/benchmark/benchmark-darwin-samples/src/iosArm64Main/kotlin/androidx/benchmark/darwin/samples/TestCases.kt b/benchmark/benchmark-darwin-samples/src/iosMain/kotlin/androidx/benchmark/darwin/samples/TestCases.kt
similarity index 100%
rename from benchmark/benchmark-darwin-samples/src/iosArm64Main/kotlin/androidx/benchmark/darwin/samples/TestCases.kt
rename to benchmark/benchmark-darwin-samples/src/iosMain/kotlin/androidx/benchmark/darwin/samples/TestCases.kt
diff --git a/benchmark/benchmark-darwin/build.gradle b/benchmark/benchmark-darwin/build.gradle
index 9cb5a0d..1c6e64cc 100644
--- a/benchmark/benchmark-darwin/build.gradle
+++ b/benchmark/benchmark-darwin/build.gradle
@@ -39,17 +39,20 @@
implementation(libs.kotlinTestAnnotationsCommon)
}
}
- iosArm64Main {
+ iosMain {
dependsOn(darwinMain)
dependencies {
api(project(":benchmark:benchmark-darwin-core"))
}
}
+ iosArm64Main {
+ dependsOn(iosMain)
+ }
iosSimulatorArm64Main {
- dependsOn(iosArm64Main)
+ dependsOn(iosMain)
}
iosX64Main {
- dependsOn(iosArm64Main)
+ dependsOn(iosMain)
}
targets.all { target ->
if (target.platformType == KotlinPlatformType.native) {
diff --git a/benchmark/benchmark-darwin/src/iosArm64Main/kotlin/androidx/benchmark/darwin/MeasureOptions.kt b/benchmark/benchmark-darwin/src/iosMain/kotlin/androidx/benchmark/darwin/MeasureOptions.kt
similarity index 100%
rename from benchmark/benchmark-darwin/src/iosArm64Main/kotlin/androidx/benchmark/darwin/MeasureOptions.kt
rename to benchmark/benchmark-darwin/src/iosMain/kotlin/androidx/benchmark/darwin/MeasureOptions.kt
diff --git a/benchmark/benchmark-darwin/src/iosArm64Main/kotlin/androidx/benchmark/darwin/TestCaseContextWrapper.kt b/benchmark/benchmark-darwin/src/iosMain/kotlin/androidx/benchmark/darwin/TestCaseContextWrapper.kt
similarity index 100%
rename from benchmark/benchmark-darwin/src/iosArm64Main/kotlin/androidx/benchmark/darwin/TestCaseContextWrapper.kt
rename to benchmark/benchmark-darwin/src/iosMain/kotlin/androidx/benchmark/darwin/TestCaseContextWrapper.kt
diff --git a/biometric/biometric/lint-baseline.xml b/biometric/biometric/lint-baseline.xml
index 8836527..b7dd64e 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 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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="WrongConstant"
@@ -28,4 +28,85 @@
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/biometric/src/test/java/androidx/biometric/CancellationSignalProviderTest.java b/biometric/biometric/src/test/java/androidx/biometric/CancellationSignalProviderTest.java
index 69c3f64..ed0441f 100644
--- a/biometric/biometric/src/test/java/androidx/biometric/CancellationSignalProviderTest.java
+++ b/biometric/biometric/src/test/java/androidx/biometric/CancellationSignalProviderTest.java
@@ -22,10 +22,7 @@
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
-import android.os.Build;
-
import androidx.annotation.NonNull;
-import androidx.test.filters.SdkSuppress;
import org.junit.Before;
import org.junit.Test;
@@ -39,7 +36,6 @@
@RunWith(RobolectricTestRunner.class)
@Config(instrumentedPackages = { "androidx.core.os" })
@DoNotInstrument
-@SdkSuppress(minSdkVersion = 16)
public class CancellationSignalProviderTest {
@Mock private android.os.CancellationSignal mBiometricCancellationSignal;
@Mock private androidx.core.os.CancellationSignal mFingerprintCancellationSignal;
@@ -82,7 +78,6 @@
}
@Test
- @Config(minSdk = Build.VERSION_CODES.JELLY_BEAN)
public void testBiometricCancellationSignal_IsCached() {
final CancellationSignalProvider provider = new CancellationSignalProvider();
final android.os.CancellationSignal cancellationSignal =
@@ -91,7 +86,6 @@
}
@Test
- @Config(minSdk = Build.VERSION_CODES.JELLY_BEAN)
public void testBiometricCancellationSignal_ReceivesCancel() {
final CancellationSignalProvider provider =
new CancellationSignalProvider(mFieldMockInjector);
@@ -126,7 +120,6 @@
}
@Test
- @Config(minSdk = Build.VERSION_CODES.JELLY_BEAN)
public void testBothCancellationSignals_ReceiveCancel() {
final CancellationSignalProvider provider =
new CancellationSignalProvider(mFieldMockInjector);
diff --git a/biometric/biometric/src/test/java/androidx/biometric/KeyguardUtilsTest.java b/biometric/biometric/src/test/java/androidx/biometric/KeyguardUtilsTest.java
index 087c330..a1744c1 100644
--- a/biometric/biometric/src/test/java/androidx/biometric/KeyguardUtilsTest.java
+++ b/biometric/biometric/src/test/java/androidx/biometric/KeyguardUtilsTest.java
@@ -99,7 +99,7 @@
}
@Test
- @Config(minSdk = Build.VERSION_CODES.JELLY_BEAN, maxSdk = Build.VERSION_CODES.LOLLIPOP_MR1)
+ @Config(maxSdk = Build.VERSION_CODES.LOLLIPOP_MR1)
public void testIsDeviceSecuredWithCredential_CorrectlyReturnsTrue_OnApi16To22() {
when(mContext.getSystemService(anyString())).thenReturn(mKeyguardManager);
when(mKeyguardManager.isKeyguardSecure()).thenReturn(true);
diff --git a/biometric/integration-tests/testapp/build.gradle b/biometric/integration-tests/testapp/build.gradle
index f0ebfb6..57c0eed 100755
--- a/biometric/integration-tests/testapp/build.gradle
+++ b/biometric/integration-tests/testapp/build.gradle
@@ -23,8 +23,6 @@
android {
defaultConfig {
applicationId "androidx.biometric.integration.testapp"
- minSdkVersion 18
- versionCode 1
testInstrumentationRunnerArgument "listener", "leakcanary.FailTestOnLeakRunListener"
}
diff --git a/browser/browser/build.gradle b/browser/browser/build.gradle
index f069ad0..d42a556 100644
--- a/browser/browser/build.gradle
+++ b/browser/browser/build.gradle
@@ -7,9 +7,6 @@
}
android {
- defaultConfig {
- minSdkVersion 16
- }
buildFeatures {
aidl = true
}
diff --git a/browser/browser/src/test/java/androidx/browser/customtabs/CustomTabsIntentTest.java b/browser/browser/src/test/java/androidx/browser/customtabs/CustomTabsIntentTest.java
index 4978624..4403c2a 100644
--- a/browser/browser/src/test/java/androidx/browser/customtabs/CustomTabsIntentTest.java
+++ b/browser/browser/src/test/java/androidx/browser/customtabs/CustomTabsIntentTest.java
@@ -34,7 +34,6 @@
import android.provider.Browser;
import androidx.annotation.ColorRes;
-import androidx.annotation.RequiresApi;
import androidx.test.core.app.ApplicationProvider;
import org.junit.Test;
@@ -51,9 +50,6 @@
@SuppressWarnings("deprecation")
@RunWith(RobolectricTestRunner.class)
@DoNotInstrument
-// minSdk For Bundle#getBinder
-@RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
-@Config(minSdk = Build.VERSION_CODES.JELLY_BEAN_MR2)
public class CustomTabsIntentTest {
@Test
diff --git a/browser/browser/src/test/java/androidx/browser/trusted/TrustedWebActivityIntentBuilderTest.java b/browser/browser/src/test/java/androidx/browser/trusted/TrustedWebActivityIntentBuilderTest.java
index 3ef37df..33fabb6 100644
--- a/browser/browser/src/test/java/androidx/browser/trusted/TrustedWebActivityIntentBuilderTest.java
+++ b/browser/browser/src/test/java/androidx/browser/trusted/TrustedWebActivityIntentBuilderTest.java
@@ -26,10 +26,8 @@
import android.content.Intent;
import android.net.Uri;
-import android.os.Build;
import android.os.Bundle;
-import androidx.annotation.RequiresApi;
import androidx.browser.customtabs.CustomTabColorSchemeParams;
import androidx.browser.customtabs.CustomTabsIntent;
import androidx.browser.customtabs.CustomTabsSession;
@@ -42,7 +40,6 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
-import org.robolectric.annotation.Config;
import org.robolectric.annotation.internal.DoNotInstrument;
import java.util.Arrays;
@@ -53,9 +50,6 @@
*/
@RunWith(RobolectricTestRunner.class)
@DoNotInstrument
-// minSdk For Bundle#getBinder
-@RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
-@Config(minSdk = Build.VERSION_CODES.JELLY_BEAN_MR2)
public class TrustedWebActivityIntentBuilderTest {
@SuppressWarnings("deprecation")
diff --git a/buildSrc-tests/src/test/java/androidx/build/MavenUploadHelperTest.kt b/buildSrc-tests/src/test/java/androidx/build/MavenUploadHelperTest.kt
index 97de634..da267c6 100644
--- a/buildSrc-tests/src/test/java/androidx/build/MavenUploadHelperTest.kt
+++ b/buildSrc-tests/src/test/java/androidx/build/MavenUploadHelperTest.kt
@@ -135,6 +135,7 @@
<groupId>androidx.compose.ui</groupId>
<artifactId>ui-geometry-android</artifactId>
<version>1.6.0-alpha01</version>
+ <type>aar</type>
<scope>runtime</scope>
</dependency>
</dependencies>
@@ -261,7 +262,7 @@
"""
/* ktlint-enable max-line-length */
- assignAarTypes(pom, androidLibrariesSet)
+ assignAarDependencyTypes(pom, androidLibrariesSet)
val actual = pom.toString()
assertEquals(expected, actual)
diff --git a/buildSrc-tests/src/test/java/androidx/build/clang/KonanBuildServiceTest.kt b/buildSrc-tests/src/test/java/androidx/build/clang/KonanBuildServiceTest.kt
new file mode 100644
index 0000000..b529145
--- /dev/null
+++ b/buildSrc-tests/src/test/java/androidx/build/clang/KonanBuildServiceTest.kt
@@ -0,0 +1,217 @@
+/*
+ * 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.clang
+
+import androidx.testutils.assertThrows
+import androidx.testutils.gradle.ProjectSetupRule
+import com.google.common.truth.Truth.assertThat
+import java.io.ByteArrayOutputStream
+import java.io.File
+import org.gradle.api.GradleException
+import org.gradle.api.Project
+import org.gradle.api.file.DirectoryProperty
+import org.gradle.api.plugins.ExtraPropertiesExtension
+import org.gradle.testfixtures.ProjectBuilder
+import org.jetbrains.kotlin.konan.target.KonanTarget
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.rules.TemporaryFolder
+
+class KonanBuildServiceTest {
+ @get:Rule
+ val projectSetup = ProjectSetupRule()
+ @get:Rule
+ val tmpFolder = TemporaryFolder()
+ private lateinit var project: Project
+ private lateinit var buildService: KonanBuildService
+
+ @Before
+ fun init() {
+ project = ProjectBuilder.builder()
+ .withProjectDir(projectSetup.rootDir)
+ .build()
+ val extension = project.rootProject.property("ext") as ExtraPropertiesExtension
+ // build service needs prebuilts location to "download" clang and targets.
+ extension.set(
+ "prebuiltsRoot",
+ File(projectSetup.props.rootProjectPath).resolve("../../prebuilts")
+ )
+ buildService = KonanBuildService.obtain(project).get()
+ }
+
+ @Test
+ fun compilationFailure() {
+ val compileParams = createCompileParameters(
+ "failedCode.c", """
+ #include <stdio.h>
+ int main() {
+ printf("Hello, World!");
+ return 0 // no ; :)
+ }
+ """.trimIndent()
+ )
+ assertThrows<GradleException> {
+ buildService.compile(compileParams)
+ }.hasMessageThat().contains(
+ "expected ';' after return statement"
+ )
+ }
+
+ @Test
+ fun compile() {
+ val compileParams = createCompileParameters("code.c", C_HELLO_WORLD)
+ buildService.compile(compileParams)
+ val outputFiles = compileParams.output.getRegularFiles()
+ assertThat(outputFiles).hasSize(1)
+ val outputFile = outputFiles.single()
+ assertThat(
+ outputFile.name
+ ).isEqualTo("code.o")
+ val strings = extractStrings(outputFile)
+ assertThat(strings).contains("Hello, World!")
+ // shouldn't link yet
+ assertThat(strings).doesNotContain("libc")
+ }
+
+ @Test
+ fun compileWithInclude() {
+ val compileParameters = createCompileParameters(
+ "code.c",
+ """
+ #include <stdio.h>
+ #include "dependency.h"
+ int my_function() {
+ return dependency_method();
+ }
+ """.trimIndent()
+ )
+ val dependency = tmpFolder.newFolder("depSrc").also {
+ it.resolve("dependency.h").writeText(
+ """
+ int dependency_method();
+ """.trimIndent()
+ )
+ }
+ compileParameters.includes.from(
+ dependency
+ )
+ buildService.compile(compileParameters)
+ val outputFiles = compileParameters.output.getRegularFiles()
+ val strings = extractStrings(outputFiles.single())
+ assertThat(
+ strings
+ ).contains("dependency_method")
+ }
+
+ @Test
+ fun createSharedLibrary() {
+ val compileParameters = createCompileParameters("code.c", C_HELLO_WORLD)
+ buildService.compile(compileParameters)
+ val sharedLibraryParameters = project.objects
+ .newInstance(ClangSharedLibraryParameters::class.java)
+ sharedLibraryParameters.konanTarget.set(compileParameters.konanTarget)
+ sharedLibraryParameters.objectFiles.from(compileParameters.output)
+ val outputFile = tmpFolder.newFile("code.so")
+ sharedLibraryParameters.outputFile.set(outputFile)
+ buildService.createSharedLibrary(sharedLibraryParameters)
+
+ val strings = extractStrings(outputFile)
+ assertThat(strings).contains("Hello, World!")
+ // should link with libc
+ assertThat(strings).contains("libc")
+ }
+
+ @Test
+ fun archive() {
+ val compileParams = createCompileParameters("code.c", C_HELLO_WORLD)
+ buildService.compile(compileParams)
+ val archiveParams = project.objects.newInstance(ClangArchiveParameters::class.java)
+ archiveParams.konanTarget.set(compileParams.konanTarget)
+ archiveParams.objectFiles.from(compileParams.output)
+ val outputFile = tmpFolder.newFile("code.a")
+ archiveParams.outputFile.set(outputFile)
+ buildService.archiveLibrary(archiveParams)
+
+ val strings = extractStrings(outputFile)
+ assertThat(strings).contains("Hello, World!")
+ // should not with libc
+ assertThat(strings).doesNotContain("libc")
+ }
+
+ private fun createCompileParameters(
+ fileName: String,
+ code: String
+ ): ClangCompileParameters {
+ val srcDir = tmpFolder.newFolder("src")
+ srcDir.resolve(fileName).writeText(
+ code
+ )
+ val compileParams = project.objects.newInstance(ClangCompileParameters::class.java)
+ compileParams.konanTarget.set(
+ SerializableKonanTarget(KonanTarget.LINUX_X64)
+ )
+ compileParams.output.set(
+ tmpFolder.newFolder()
+ )
+ compileParams.sources.from(srcDir)
+ return compileParams
+ }
+
+ private fun DirectoryProperty.getRegularFiles() = get().asFile.walkTopDown().filter {
+ it.isFile
+ }.toList()
+
+ /**
+ * Extract strings from a binary file so that we can assert output contents.
+ */
+ private fun extractStrings(
+ file: File
+ ): String {
+ val outputStream = ByteArrayOutputStream()
+ val errorStream = ByteArrayOutputStream()
+ val response = project.exec {
+ it.executable = "strings"
+ it.setErrorOutput(errorStream)
+ it.setStandardOutput(outputStream)
+ it.isIgnoreExitValue = true
+ it.args(file.canonicalPath)
+ }
+ if (response.exitValue != 0) {
+ throw AssertionError(
+ """
+ Couldn't read strings from file.
+ Output:
+ ${outputStream.toString(Charsets.UTF_8)}
+ Error:
+ ${errorStream.toString(Charsets.UTF_8)}
+ """.trimIndent()
+ )
+ }
+ return outputStream.toString(Charsets.UTF_8)
+ }
+
+ companion object {
+ private val C_HELLO_WORLD = """
+ #include <stdio.h>
+ int my_function() {
+ printf("Hello, World!");
+ return 0;
+ }
+ """.trimIndent()
+ }
+}
diff --git a/buildSrc-tests/src/test/java/androidx/build/dependencyTracker/AffectedModuleDetectorImplTest.kt b/buildSrc-tests/src/test/java/androidx/build/dependencyTracker/AffectedModuleDetectorImplTest.kt
index 375126a..b1b65e6 100644
--- a/buildSrc-tests/src/test/java/androidx/build/dependencyTracker/AffectedModuleDetectorImplTest.kt
+++ b/buildSrc-tests/src/test/java/androidx/build/dependencyTracker/AffectedModuleDetectorImplTest.kt
@@ -16,8 +16,13 @@
package androidx.build.dependencyTracker
+import java.io.File
+import java.util.function.BiFunction
+import java.util.function.Predicate
import org.gradle.api.Project
+import org.gradle.api.Transformer
import org.gradle.api.plugins.ExtraPropertiesExtension
+import org.gradle.api.provider.Provider
import org.gradle.testfixtures.ProjectBuilder
import org.hamcrest.CoreMatchers
import org.hamcrest.MatcherAssert
@@ -27,7 +32,6 @@
import org.junit.rules.TemporaryFolder
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-import java.io.File
@RunWith(JUnit4::class)
class AffectedModuleDetectorImplTest {
@@ -164,6 +168,31 @@
.build()
}
+ class TestProvider(private val list: List<String>) : Provider<List<String>> {
+ override fun get(): List<String> = list
+ override fun getOrNull(): List<String> = list
+ override fun isPresent(): Boolean = TODO("used")
+ override fun forUseAtConfigurationTime(): Provider<List<String>> = TODO("used")
+ override fun <U : Any?, R : Any?> zip(
+ right: Provider<U>,
+ combiner: BiFunction<in List<String>, in U, out R?>
+ ): Provider<R> = TODO("used")
+ override fun orElse(provider: Provider<out List<String>>): Provider<List<String>> {
+ TODO("used")
+ }
+ override fun orElse(value: List<String>): Provider<List<String>> = TODO("used")
+ override fun <S : Any?> flatMap(
+ transformer: Transformer<out Provider<out S>?, in List<String>>
+ ): Provider<S> = TODO("used")
+ override fun filter(predicate: Predicate<in List<String>>): Provider<List<String>> {
+ TODO("used")
+ }
+ override fun <S : Any?> map(
+ transformer: Transformer<out S?, in List<String>>
+ ): Provider<S> = TODO("used")
+ override fun getOrElse(defaultValue: List<String>): List<String> = TODO("used")
+ }
+
@Test
fun noChangeCLs() {
val detector = AffectedModuleDetectorImpl(
@@ -172,9 +201,7 @@
logger = logger,
ignoreUnknownProjects = false,
cobuiltTestPaths = cobuiltTestPaths,
- changedFilesProvider = {
- emptyList()
- }
+ changedFilesProvider = TestProvider(emptyList())
)
MatcherAssert.assertThat(
detector.changedProjects,
@@ -204,9 +231,9 @@
logger = logger,
ignoreUnknownProjects = false,
cobuiltTestPaths = cobuiltTestPaths,
- changedFilesProvider = {
+ changedFilesProvider = TestProvider(
listOf(convertToFilePath("p1", "foo.java"))
- }
+ )
)
MatcherAssert.assertThat(
detector.changedProjects,
@@ -230,12 +257,12 @@
logger = logger,
ignoreUnknownProjects = false,
cobuiltTestPaths = cobuiltTestPaths,
- changedFilesProvider = {
+ changedFilesProvider = TestProvider(
listOf(
convertToFilePath("p1", "foo.java"),
convertToFilePath("p2", "bar.java")
)
- }
+ )
)
MatcherAssert.assertThat(
detector.changedProjects,
@@ -259,9 +286,9 @@
logger = logger,
ignoreUnknownProjects = false,
cobuiltTestPaths = cobuiltTestPaths,
- changedFilesProvider = {
+ changedFilesProvider = TestProvider(
listOf("foo.java")
- }
+ )
)
MatcherAssert.assertThat(
detector.changedProjects,
@@ -291,9 +318,9 @@
logger = logger,
ignoreUnknownProjects = false,
cobuiltTestPaths = cobuiltTestPaths,
- changedFilesProvider = {
+ changedFilesProvider = TestProvider(
listOf("foo.java", convertToFilePath("p7", "bar.java"))
- }
+ )
)
MatcherAssert.assertThat(
detector.changedProjects,
@@ -323,13 +350,13 @@
logger = logger,
ignoreUnknownProjects = false,
cobuiltTestPaths = cobuiltTestPaths,
- changedFilesProvider = {
+ changedFilesProvider = TestProvider(
listOf(
convertToFilePath(
"p8", "foo.java"
)
)
- }
+ )
)
MatcherAssert.assertThat(
detector.changedProjects,
@@ -353,13 +380,13 @@
logger = logger,
ignoreUnknownProjects = false,
cobuiltTestPaths = setOf(setOf(":cobuilt1", ":cobuilt2", ":cobuilt3")),
- changedFilesProvider = {
+ changedFilesProvider = TestProvider(
listOf(
convertToFilePath(
"p8", "foo.java"
)
)
- }
+ )
)
// This should trigger IllegalStateException due to missing cobuilt3
detector.changedProjects
@@ -373,13 +400,13 @@
logger = logger,
ignoreUnknownProjects = false,
cobuiltTestPaths = setOf(setOf("cobuilt3", "cobuilt4", "cobuilt5")),
- changedFilesProvider = {
+ changedFilesProvider = TestProvider(
listOf(
convertToFilePath(
"p8", "foo.java"
)
)
- }
+ )
)
// There should be no exception thrown here because *all* cobuilts are missing.
detector.changedProjects
@@ -392,9 +419,9 @@
dependencyTracker = dependencyTracker,
logger = logger,
ignoreUnknownProjects = false,
- changedFilesProvider = {
+ changedFilesProvider = TestProvider(
listOf(convertToFilePath("p1", "foo.java"))
- }
+ )
)
// Verify expectations on affected projects
MatcherAssert.assertThat(
@@ -439,9 +466,7 @@
dependencyTracker = dependencyTracker,
logger = logger,
ignoreUnknownProjects = false,
- changedFilesProvider = {
- emptyList()
- }
+ changedFilesProvider = TestProvider(emptyList())
)
// Verify expectations on affected projects
MatcherAssert.assertThat(
@@ -485,9 +510,9 @@
dependencyTracker = dependencyTracker,
logger = logger,
ignoreUnknownProjects = false,
- changedFilesProvider = {
+ changedFilesProvider = TestProvider(
listOf(convertToFilePath("unknown", "file.java"))
- }
+ )
)
// Verify expectations on affected projects
MatcherAssert.assertThat(
@@ -532,9 +557,9 @@
logger = logger,
ignoreUnknownProjects = false,
cobuiltTestPaths = cobuiltTestPaths,
- changedFilesProvider = {
+ changedFilesProvider = TestProvider(
listOf("playground-common/tmp.kt")
- }
+ )
)
MatcherAssert.assertThat(
detector.changedProjects,
@@ -558,9 +583,9 @@
logger = logger,
ignoreUnknownProjects = false,
cobuiltTestPaths = cobuiltTestPaths,
- changedFilesProvider = {
+ changedFilesProvider = TestProvider(
listOf(".github/workflows/bar.txt")
- }
+ )
)
MatcherAssert.assertThat(
detector.changedProjects,
@@ -584,9 +609,9 @@
logger = logger,
ignoreUnknownProjects = false,
cobuiltTestPaths = cobuiltTestPaths,
- changedFilesProvider = {
+ changedFilesProvider = TestProvider(
listOf("playground-common/tmp.kt", "root.txt")
- }
+ )
)
MatcherAssert.assertThat(
detector.buildAll,
@@ -605,9 +630,9 @@
ignoreUnknownProjects = false,
cobuiltTestPaths = cobuiltTestPaths,
ignoredPaths = ignoredPaths,
- changedFilesProvider = {
+ changedFilesProvider = TestProvider(
listOf(convertToFilePath("ignored", "example.txt"))
- }
+ )
)
MatcherAssert.assertThat(
detector.buildAll,
@@ -626,12 +651,12 @@
ignoreUnknownProjects = false,
cobuiltTestPaths = cobuiltTestPaths,
ignoredPaths = ignoredPaths,
- changedFilesProvider = {
+ changedFilesProvider = TestProvider(
listOf(
convertToFilePath("ignored", "example.txt"),
convertToFilePath("p1", "foo.kt")
)
- }
+ )
)
MatcherAssert.assertThat(
detector.changedProjects,
@@ -656,12 +681,12 @@
ignoreUnknownProjects = false,
cobuiltTestPaths = cobuiltTestPaths,
ignoredPaths = ignoredPaths,
- changedFilesProvider = {
+ changedFilesProvider = TestProvider(
listOf(
convertToFilePath("ignored", "example.txt"),
convertToFilePath("unknown", "foo.kt")
)
- }
+ )
)
MatcherAssert.assertThat(
detector.buildAll,
@@ -680,13 +705,13 @@
ignoreUnknownProjects = false,
cobuiltTestPaths = cobuiltTestPaths,
ignoredPaths = ignoredPaths,
- changedFilesProvider = {
+ changedFilesProvider = TestProvider(
listOf(
"ignored/eg.txt",
convertToFilePath("unknown", "foo.kt"),
convertToFilePath("p1", "bar.kt")
)
- }
+ )
)
MatcherAssert.assertThat(
detector.buildAll,
diff --git a/buildSrc-tests/src/test/java/androidx/build/dependencyTracker/ChangeInfoGitClientTest.kt b/buildSrc-tests/src/test/java/androidx/build/dependencyTracker/ChangeInfoProvidersTest.kt
similarity index 68%
rename from buildSrc-tests/src/test/java/androidx/build/dependencyTracker/ChangeInfoGitClientTest.kt
rename to buildSrc-tests/src/test/java/androidx/build/dependencyTracker/ChangeInfoProvidersTest.kt
index c5c6a59..6b35b15 100644
--- a/buildSrc-tests/src/test/java/androidx/build/dependencyTracker/ChangeInfoGitClientTest.kt
+++ b/buildSrc-tests/src/test/java/androidx/build/dependencyTracker/ChangeInfoProvidersTest.kt
@@ -16,16 +16,24 @@
package androidx.build.dependencyTracker
-import androidx.build.gitclient.ChangeInfoGitClient
+import androidx.build.gitclient.getChangedFilesFromChangeInfoProvider
+import androidx.build.gitclient.getHeadShaFromManifestProvider
import com.google.gson.JsonSyntaxException
-import junit.framework.TestCase.assertEquals
import org.gradle.api.GradleException
+import org.gradle.testfixtures.ProjectBuilder
+import org.junit.Assert.assertEquals
+import org.junit.Assert.assertThrows
+import org.junit.Rule
import org.junit.Test
+import org.junit.rules.TemporaryFolder
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
@RunWith(JUnit4::class)
-class ChangeInfoGitClientTest {
+class ChangeInfoProvidersTest {
+ @get:Rule
+ var folder: TemporaryFolder = TemporaryFolder()
+
@Test
fun findChangedFilesSince_oneChange() {
checkChangedFiles(
@@ -219,55 +227,60 @@
checkChangedFiles("{", listOf())
}
- fun checkChangedFiles(config: String, expectedFiles: List<String>) {
- assertEquals(getChangedFiles(config), expectedFiles)
- }
-
- fun getChangedFiles(config: String): List<String> {
- val client = ChangeInfoGitClient(
- config,
- """
- <manifest>
- <project path="frameworks/support" name="platform/frameworks/support"/>
- </manifest>
- """,
- "frameworks/support")
- return client.findChangedFilesSince("")
- }
-
- @Test
- fun getHeadSha_hasVersion() {
- checkVersion("""
- <manifest>
- <project path="prebuilts/internal" name="platform/prebuilts/internal" revision="prebuiltsVersion1"/>
- <project path="frameworks/support" name="platform/frameworks/support" revision="supportVersion1"/>
- <project path="tools/external/gradle" name="platform/tools/external/gradle" revision="gradleVersion1"/>
- </manifest>
- """,
- "supportVersion1"
+ private fun checkChangedFiles(
+ changeInfoContent: String,
+ expectedChangedFiles: List<String>
+ ) {
+ val manifestFile = folder.newFile()
+ manifestFile.writeText(basicManifest)
+ val changeInfoFile = folder.newFile()
+ changeInfoFile.writeText(changeInfoContent)
+ val project = ProjectBuilder.builder().build()
+ val changedFilesProvider = project.getChangedFilesFromChangeInfoProvider(
+ manifestFile.absolutePath,
+ changeInfoFile.absolutePath,
+ frameworksSupportPath
)
+ val changedFiles = changedFilesProvider.get()
+ assertEquals(expectedChangedFiles, changedFiles)
}
@Test
- fun getHeadSha_noVersion() {
- var threw = false
- try {
- checkVersion("""
- <manifest/>
- """,
- null
- )
- } catch (e: GradleException) {
- threw = true
- }
- assertEquals("Did not detect malformed manifest", threw, true)
+ fun headShaFromManifest() {
+ val manifestFile = folder.newFile()
+ manifestFile.writeText(basicManifest)
+ val project = ProjectBuilder.builder().build()
+ val headShaProvider = project.getHeadShaFromManifestProvider(
+ manifestFile.absolutePath,
+ frameworksSupportPath
+ )
+ assertEquals(frameworksSupportSha, headShaProvider.get())
}
- fun checkVersion(config: String, expectedVersion: String?) {
- assertEquals(expectedVersion, getVersion(config))
- }
- fun getVersion(config: String): String {
- return ChangeInfoGitClient("{}", config, "frameworks/support")
- .getHeadSha()
+ @Test
+ fun missingProjectHeadShaFromManifest() {
+ val manifestFile = folder.newFile()
+ manifestFile.writeText(basicManifest)
+ val project = ProjectBuilder.builder().build()
+ val headShaProvider = project.getHeadShaFromManifestProvider(
+ manifestFile.absolutePath,
+ "missing/project/path"
+ )
+ assertThrows(GradleException::class.java) {
+ headShaProvider.get()
+ }
}
}
+
+private const val frameworksSupportPath = "frameworks/support"
+private const val frameworksSupportSha = "bbcf23f3ee42fc9e59e0cf5fbca71f526f760dba"
+private const val basicManifest = """<?xml version='1.0' encoding='UTF-8'?>
+<manifest>
+ <remote name="aosp" fetch="https://android.googlesource.com/" review="https://android.googlesource.com/" />
+ <default revision="androidx-main" remote="aosp" />
+ <superproject name="platform/superproject" remote="aosp" />
+ <project path="external/icing" name="platform/external/icing" clone-depth="1" revision="ea81bd0613730609fcf3c6ffa7d2e52bcc10a9ac" />
+ <project path="$frameworksSupportPath" name="platform/frameworks/support" revision="$frameworksSupportSha" />
+ <repo-hooks in-project="platform/tools/repohooks" enabled-list="pre-upload" />
+</manifest>
+"""
diff --git a/buildSrc-tests/src/test/java/androidx/build/dependencyTracker/GitRunnerGitClientTest.kt b/buildSrc-tests/src/test/java/androidx/build/dependencyTracker/GitRunnerGitClientTest.kt
deleted file mode 100644
index 7a5b452..0000000
--- a/buildSrc-tests/src/test/java/androidx/build/dependencyTracker/GitRunnerGitClientTest.kt
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright 2018 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.dependencyTracker
-
-import androidx.build.gitclient.GitClient
-import androidx.build.gitclient.GitRunnerGitClient
-import androidx.build.gitclient.GitRunnerGitClient.Companion.CHANGED_FILES_CMD_PREFIX
-import androidx.build.gitclient.GitRunnerGitClient.Companion.PREVIOUS_SUBMITTED_CMD
-import java.io.File
-import junit.framework.TestCase.assertEquals
-import junit.framework.TestCase.assertFalse
-import junit.framework.TestCase.assertNull
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.junit.runners.JUnit4
-
-@RunWith(JUnit4::class)
-class GitRunnerGitClientTest {
- @Rule
- @JvmField
- val attachLogsRule = AttachLogsTestRule()
- private val logger = attachLogsRule.logger
- private val commandRunner = MockCommandRunner(logger)
- /** The [GitRunnerGitClient.workingDir] uses `System.getProperty("user.dir")` because the working
- * directory passed to the [GitRunnerGitClient] constructor needs to contain the a .git
- * directory somewhere in the parent directory tree. @see [GitRunnerGitClient]
- */
- private val workingDir = File(System.getProperty("user.dir")).parentFile
- private val client = GitRunnerGitClient(
- workingDir = workingDir,
- logger = logger,
- commandRunner = commandRunner
- )
-
- @Test
- fun findMerge() {
- commandRunner.addReply(
- PREVIOUS_SUBMITTED_CMD,
- "abcdefghij (m/androidx-md, aosp/androidx-md) Merge blah blah into and"
- )
- assertEquals(
- "abcdefghij",
- client.findPreviousSubmittedChange())
- }
-
- @Test
- fun findMerge_fail() {
- assertNull(client.findPreviousSubmittedChange())
- }
-
- @Test
- fun findChangesSince() {
- var changes = listOf(
- convertToFilePath("a", "b", "c.java"),
- convertToFilePath("d", "e", "f.java"))
- commandRunner.addReply(
- "$CHANGED_FILES_CMD_PREFIX HEAD mySha",
- changes.joinToString(System.lineSeparator())
- )
- assertEquals(
- changes,
- client.findChangedFilesSince(sha = "mySha"))
- }
-
- @Test
- fun findChangesSince_empty() {
- assertEquals(
- emptyList<String>(),
- client.findChangedFilesSince("foo"))
- }
-
- @Test
- fun checkLatestCommitExists() {
- val headCommit: String = GitRunnerGitClient(workingDir, logger).getHeadSha()
- assertFalse(headCommit.isEmpty())
- }
-
- // For both Linux/Windows
- fun convertToFilePath(vararg list: String): String {
- return list.toList().joinToString(File.separator)
- }
-
- private class MockCommandRunner(val logger: ToStringLogger) : GitClient.CommandRunner {
- private val replies = mutableMapOf<String, List<String>>()
-
- fun addReply(command: String, response: String) {
- logger.info("add reply. cmd: $command response: $response")
- replies[command] = response.split(System.lineSeparator())
- }
-
- override fun execute(command: String): String {
- return replies.getOrDefault(command, emptyList())
- .joinToString(System.lineSeparator()).also {
- logger.info("cmd: $command response: $it")
- }
- }
-
- override fun executeAndParse(command: String): List<String> {
- return replies.getOrDefault(command, emptyList()).also {
- logger.info("cmd: $command response: $it")
- }
- }
- }
-}
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/AndroidXExtension.kt b/buildSrc/private/src/main/kotlin/androidx/build/AndroidXExtension.kt
index ccef16b..a7d7478 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/AndroidXExtension.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/AndroidXExtension.kt
@@ -16,8 +16,8 @@
package androidx.build
-import androidx.build.buildInfo.CreateLibraryBuildInfoFileTask.Companion.getFrameworksSupportCommitShaAtHead
import androidx.build.checkapi.shouldConfigureApiTasks
+import androidx.build.gitclient.getHeadShaProvider
import androidx.build.transform.configureAarAsJarForConfiguration
import groovy.lang.Closure
import java.io.File
@@ -410,9 +410,7 @@
configureAarAsJarForConfiguration(project, name)
}
- fun getReferenceSha(): Provider<String> {
- return project.providers.provider { project.getFrameworksSupportCommitShaAtHead() }
- }
+ fun getReferenceSha(): Provider<String> = getHeadShaProvider(project)
/**
* Specify the version for Kotlin API compatibility mode used during Kotlin compilation.
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/AndroidXImplPlugin.kt b/buildSrc/private/src/main/kotlin/androidx/build/AndroidXImplPlugin.kt
index f4c04e2..b594507 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/AndroidXImplPlugin.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/AndroidXImplPlugin.kt
@@ -40,6 +40,7 @@
import com.android.build.api.variant.ApplicationAndroidComponentsExtension
import com.android.build.api.variant.HasAndroidTest
import com.android.build.api.variant.LibraryAndroidComponentsExtension
+import com.android.build.api.variant.ResourcesPackaging
import com.android.build.api.variant.Variant
import com.android.build.gradle.AppExtension
import com.android.build.gradle.AppPlugin
@@ -461,6 +462,7 @@
project.extensions.getByType<AppExtension>().apply {
configureAndroidBaseOptions(project, androidXExtension)
configureAndroidApplicationOptions(project, androidXExtension)
+ excludeVersionFiles(packagingOptions.resources)
}
project.extensions.getByType<ApplicationAndroidComponentsExtension>().apply {
@@ -478,6 +480,7 @@
project.extensions.getByType<TestExtension>().apply {
configureAndroidBaseOptions(project, androidXExtension)
project.addAppApkToTestConfigGeneration(androidXExtension)
+ excludeVersionFiles(packagingOptions.resources)
}
project.configureJavaCompilationWarnings(androidXExtension)
@@ -485,6 +488,22 @@
project.addToProjectMap(androidXExtension)
}
+ /**
+ * Excludes files telling which versions of androidx libraries were used in test apks, to avoid
+ * invalidating caches as often
+ */
+ private fun excludeVersionFiles(packaging: com.android.build.api.variant.ResourcesPackaging) {
+ packaging.excludes.add("/META-INF/androidx*.version")
+ }
+
+ /**
+ * Excludes files telling which versions of androidx libraries were used in test apks, to avoid
+ * invalidating caches as often
+ */
+ private fun excludeVersionFiles(packaging: com.android.build.api.dsl.ResourcesPackaging) {
+ packaging.excludes.add("/META-INF/androidx*.version")
+ }
+
private fun Project.buildOnServerDependsOnAssembleRelease() {
project.addToBuildOnServer("assembleRelease")
}
@@ -511,7 +530,7 @@
private fun HasAndroidTest.configureTests() {
configureLicensePackaging()
- excludeVersionFilesFromTestApks()
+ androidTest?.packaging?.resources?.apply { excludeVersionFiles(this) }
}
@Suppress("UnstableApiUsage") // usage of experimentalProperties
@@ -533,14 +552,6 @@
}
}
- /**
- * Excludes files telling which versions of androidx libraries were used in test apks to avoid
- * invalidating the build cache as often
- */
- private fun HasAndroidTest.excludeVersionFilesFromTestApks() {
- androidTest?.packaging?.resources?.apply { excludes.add("/META-INF/androidx*.version") }
- }
-
@Suppress("DEPRECATION") // AGP DSL APIs
private fun configureWithLibraryPlugin(project: Project, androidXExtension: AndroidXExtension) {
val libraryExtension =
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/MavenUploadHelper.kt b/buildSrc/private/src/main/kotlin/androidx/build/MavenUploadHelper.kt
index f0b4877..abeaaac 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/MavenUploadHelper.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/MavenUploadHelper.kt
@@ -44,6 +44,7 @@
import org.gradle.api.publish.maven.internal.publication.MavenPublicationInternal
import org.gradle.api.publish.maven.tasks.GenerateMavenPom
import org.gradle.api.publish.tasks.GenerateModuleMetadata
+import org.gradle.api.tasks.bundling.Zip
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.create
import org.gradle.kotlin.dsl.findByType
@@ -154,14 +155,41 @@
}
}
publications.withType(MavenPublication::class.java).all { publication ->
+ val isKmpAnchor = (publication.name == KMP_ANCHOR_PUBLICATION_NAME)
+ val pomPlatform = kmpExtension.defaultPlatform
+ // b/297355397 If a kmp project has Android as the default platform, there might
+ // externally be legacy projects depending on its .pom
+ // We advertise a stub .aar in this .pom for backwards compatibility and
+ // add a dependency on the actual .aar
+ val addStubAar = isKmpAnchor && pomPlatform == PlatformIdentifier.ANDROID.id
+ val buildDir = project.layout.buildDirectory
+ if (addStubAar) {
+ // create a unique namespace for this .aar, different from the android artifact
+ val stubNamespace = project.group.toString().replace(':', '.') + ".anchor"
+ val unpackedStubAarTask =
+ tasks.register("unpackedStubAar", UnpackedStubAarTask::class.java) { aarTask ->
+ aarTask.aarPackage.set(stubNamespace)
+ aarTask.outputDir.set(buildDir.dir("intermediates/stub-aar"))
+ }
+ val stubAarTask = tasks.register("stubAar", Zip::class.java) { zipTask ->
+ zipTask.from(unpackedStubAarTask.flatMap { it.outputDir })
+ zipTask.destinationDirectory.set(buildDir.dir("outputs"))
+ zipTask.archiveExtension.set("aar")
+ }
+ publication.artifact(stubAarTask)
+ }
+
publication.pom { pom ->
+ if (addStubAar) {
+ pom.packaging = "aar"
+ }
addInformativeMetadata(extension, pom)
tweakDependenciesMetadata(
androidxGroup,
pom,
androidLibrariesSetProvider,
- publication.name == KMP_ANCHOR_PUBLICATION_NAME,
- kmpExtension.defaultPlatform
+ isKmpAnchor,
+ pomPlatform
)
}
}
@@ -463,7 +491,7 @@
// For more context see:
// https://android-review.googlesource.com/c/platform/frameworks/support/+/1144664/8/buildSrc/src/main/kotlin/androidx/build/MavenUploadHelper.kt#177
assignSingleVersionDependenciesInGroupForPom(xml, mavenGroup)
- assignAarTypes(xml, androidLibrariesSetProvider.get())
+ assignAarDependencyTypes(xml, androidLibrariesSetProvider.get())
ensureConsistentJvmSuffix(xml)
if (kmpAnchor && pomPlatform != null) {
@@ -474,7 +502,7 @@
// TODO(aurimas): remove this when Gradle bug is fixed.
// https://github.com/gradle/gradle/issues/3170
-fun assignAarTypes(xml: XmlProvider, androidLibrariesSet: Set<String>) {
+fun assignAarDependencyTypes(xml: XmlProvider, androidLibrariesSet: Set<String>) {
val xmlElement = xml.asElement()
val dependencies = xmlElement.find { it.nodeName == "dependencies" } as? org.w3c.dom.Element
@@ -511,6 +539,9 @@
appendElement("groupId", groupId)
appendElement("artifactId", "$artifactId-$platformId")
appendElement("version", version)
+ if (platformId == PlatformIdentifier.ANDROID.id) {
+ appendElement("type", "aar")
+ }
appendElement("scope", "runtime")
}
}
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/UnpackedStubAarTask.kt b/buildSrc/private/src/main/kotlin/androidx/build/UnpackedStubAarTask.kt
new file mode 100644
index 0000000..bcc529a
--- /dev/null
+++ b/buildSrc/private/src/main/kotlin/androidx/build/UnpackedStubAarTask.kt
@@ -0,0 +1,49 @@
+/*
+ * 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
+
+import java.io.File
+import org.gradle.api.DefaultTask
+import org.gradle.api.file.DirectoryProperty
+import org.gradle.api.provider.Property
+import org.gradle.api.tasks.Input
+import org.gradle.api.tasks.OutputDirectory
+import org.gradle.api.tasks.TaskAction
+import org.gradle.work.DisableCachingByDefault
+
+/**
+ * Creates a directory representing a stub (essentially empty) .aar
+ * This directory can be zipped to make an actual .aar
+ */
+@DisableCachingByDefault(because = "Doesn't benefit from caching")
+abstract class UnpackedStubAarTask : DefaultTask() {
+ @get:Input abstract val aarPackage: Property<String>
+ @get:OutputDirectory abstract val outputDir: DirectoryProperty
+
+ @TaskAction
+ fun generate() {
+ // setup
+ val outputDir = outputDir.getAsFile().get()
+ outputDir.deleteRecursively()
+ outputDir.mkdirs()
+ // write AndroidManifest.xml
+ val manifestFile = File("$outputDir/AndroidManifest.xml")
+ val aarPackage = aarPackage.get()
+ val manifestText = """<manifest package="$aarPackage"></manifest>"""
+ manifestFile.writeText(manifestText)
+ }
+}
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/buildInfo/CreateLibraryBuildInfoFileTask.kt b/buildSrc/private/src/main/kotlin/androidx/build/buildInfo/CreateLibraryBuildInfoFileTask.kt
index 544e835..1d4e147 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/buildInfo/CreateLibraryBuildInfoFileTask.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/buildInfo/CreateLibraryBuildInfoFileTask.kt
@@ -18,12 +18,11 @@
import androidx.build.AndroidXExtension
import androidx.build.LibraryGroup
-import androidx.build.buildInfo.CreateLibraryBuildInfoFileTask.Companion.getFrameworksSupportCommitShaAtHead
import androidx.build.getBuildInfoDirectory
import androidx.build.getGroupZipPath
import androidx.build.getProjectZipPath
import androidx.build.getSupportRootFolder
-import androidx.build.gitclient.GitClient
+import androidx.build.gitclient.getHeadShaProvider
import androidx.build.jetpad.LibraryBuildInfoFile
import com.google.common.annotations.VisibleForTesting
import com.google.gson.GsonBuilder
@@ -239,14 +238,6 @@
startsWith("androidx.") &&
!startsWith("androidx.test") &&
!startsWith("androidx.databinding")
-
- /* For androidx release notes, the most common use case is to track and publish the last sha
- * of the build that is released. Thus, we use frameworks/support to get the sha
- */
- fun Project.getFrameworksSupportCommitShaAtHead(): String {
- val gitClient = GitClient.forProject(project)
- return gitClient.getHeadSha()
- }
}
}
@@ -282,7 +273,7 @@
pub,
libraryGroup,
artifactId,
- project.provider { project.getFrameworksSupportCommitShaAtHead() }
+ getHeadShaProvider(project)
)
rootProject.tasks.named(CreateLibraryBuildInfoFileTask.TASK_NAME).configure {
it.dependsOn(task)
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/clang/ClangArchiveTask.kt b/buildSrc/private/src/main/kotlin/androidx/build/clang/ClangArchiveTask.kt
new file mode 100644
index 0000000..1f306ea
--- /dev/null
+++ b/buildSrc/private/src/main/kotlin/androidx/build/clang/ClangArchiveTask.kt
@@ -0,0 +1,96 @@
+/*
+ * 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.clang
+
+import javax.inject.Inject
+import org.gradle.api.DefaultTask
+import org.gradle.api.file.ConfigurableFileCollection
+import org.gradle.api.file.RegularFileProperty
+import org.gradle.api.provider.Property
+import org.gradle.api.services.ServiceReference
+import org.gradle.api.tasks.CacheableTask
+import org.gradle.api.tasks.Input
+import org.gradle.api.tasks.InputFiles
+import org.gradle.api.tasks.Nested
+import org.gradle.api.tasks.OutputFile
+import org.gradle.api.tasks.PathSensitive
+import org.gradle.api.tasks.PathSensitivity
+import org.gradle.api.tasks.TaskAction
+import org.gradle.workers.WorkAction
+import org.gradle.workers.WorkParameters
+import org.gradle.workers.WorkerExecutor
+
+@CacheableTask
+abstract class ClangArchiveTask @Inject constructor(
+ private val workerExecutor: WorkerExecutor
+) : DefaultTask() {
+ init {
+ description = "Combines multiple object files (.o) into an archive file (.a)."
+ group = "Build"
+ }
+
+ @Suppress("UnstableApiUsage") // ServiceReference is incubating since 8.0
+ @get:ServiceReference(KonanBuildService.KEY)
+ abstract val konanBuildService: Property<KonanBuildService>
+
+ @get:Nested
+ abstract val llvmArchiveParameters: ClangArchiveParameters
+
+ @TaskAction
+ fun archive() {
+ workerExecutor.noIsolation().submit(
+ ClangArchiveWorker::class.java
+ ) {
+ it.llvmArchiveParameters.set(llvmArchiveParameters)
+ it.buildService.set(konanBuildService)
+ }
+ }
+}
+
+abstract class ClangArchiveParameters {
+ /**
+ * The target platform for the archive file.
+ */
+ @get:Input
+ abstract val konanTarget: Property<SerializableKonanTarget>
+
+ /**
+ * The list of object files that needs to be added to the archive.
+ */
+ @get:InputFiles
+ @get:PathSensitive(PathSensitivity.NAME_ONLY)
+ abstract val objectFiles: ConfigurableFileCollection
+
+ /**
+ * The final output file that will include the archive of the given
+ * [objectFiles].
+ */
+ @get:OutputFile
+ abstract val outputFile: RegularFileProperty
+}
+
+private abstract class ClangArchiveWorker : WorkAction<ClangArchiveWorker.Params> {
+ interface Params : WorkParameters {
+ val llvmArchiveParameters: Property<ClangArchiveParameters>
+ val buildService: Property<KonanBuildService>
+ }
+
+ override fun execute() {
+ val buildService = parameters.buildService.get()
+ buildService.archiveLibrary(parameters.llvmArchiveParameters.get())
+ }
+}
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/clang/ClangCompileTask.kt b/buildSrc/private/src/main/kotlin/androidx/build/clang/ClangCompileTask.kt
new file mode 100644
index 0000000..0a9c391
--- /dev/null
+++ b/buildSrc/private/src/main/kotlin/androidx/build/clang/ClangCompileTask.kt
@@ -0,0 +1,109 @@
+/*
+ * 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.clang
+
+import javax.inject.Inject
+import org.gradle.api.DefaultTask
+import org.gradle.api.file.ConfigurableFileCollection
+import org.gradle.api.file.DirectoryProperty
+import org.gradle.api.provider.ListProperty
+import org.gradle.api.provider.Property
+import org.gradle.api.services.ServiceReference
+import org.gradle.api.tasks.CacheableTask
+import org.gradle.api.tasks.Input
+import org.gradle.api.tasks.InputFiles
+import org.gradle.api.tasks.Nested
+import org.gradle.api.tasks.OutputDirectory
+import org.gradle.api.tasks.PathSensitive
+import org.gradle.api.tasks.PathSensitivity
+import org.gradle.api.tasks.TaskAction
+import org.gradle.workers.WorkAction
+import org.gradle.workers.WorkParameters
+import org.gradle.workers.WorkerExecutor
+
+@CacheableTask
+abstract class ClangCompileTask @Inject constructor(
+ private val workerExecutor: WorkerExecutor
+) : DefaultTask() {
+ init {
+ description = "Compiles C sources into an object file (.o)."
+ group = "Build"
+ }
+
+ @Suppress("UnstableApiUsage") // ServiceReference is incubating since 8.0
+ @get:ServiceReference(KonanBuildService.KEY)
+ abstract val konanBuildService: Property<KonanBuildService>
+
+ @get:Nested
+ abstract val clangParameters: ClangCompileParameters
+
+ @TaskAction
+ fun compile() {
+ workerExecutor.noIsolation().submit(
+ ClangCompileWorker::class.java
+ ) {
+ it.buildService.set(konanBuildService)
+ it.clangParameters.set(clangParameters)
+ }
+ }
+}
+
+abstract class ClangCompileParameters {
+ /**
+ * The compilation target platform for which the given inputs will be compiled.
+ */
+ @get:Input
+ abstract val konanTarget: Property<SerializableKonanTarget>
+
+ /**
+ * List of C source files.
+ */
+ @get:InputFiles
+ @get:PathSensitive(PathSensitivity.NAME_ONLY)
+ abstract val sources: ConfigurableFileCollection
+
+ /**
+ * The output directory where the object files for each source file will be written.
+ */
+ @get:OutputDirectory
+ abstract val output: DirectoryProperty
+
+ /**
+ * List of directories that include the headers used in the compilation.
+ */
+ @get:InputFiles
+ @get:PathSensitive(PathSensitivity.NONE)
+ abstract val includes: ConfigurableFileCollection
+
+ /**
+ * List of arguments that will be passed into clang during compilation.
+ */
+ @get:Input
+ abstract val freeArgs: ListProperty<String>
+}
+
+private abstract class ClangCompileWorker : WorkAction<ClangCompileWorker.Params> {
+ interface Params : WorkParameters {
+ val clangParameters: Property<ClangCompileParameters>
+ val buildService: Property<KonanBuildService>
+ }
+
+ override fun execute() {
+ val buildService = parameters.buildService.get()
+ buildService.compile(parameters.clangParameters.get())
+ }
+}
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/clang/ClangSharedLibraryTask.kt b/buildSrc/private/src/main/kotlin/androidx/build/clang/ClangSharedLibraryTask.kt
new file mode 100644
index 0000000..625eb58
--- /dev/null
+++ b/buildSrc/private/src/main/kotlin/androidx/build/clang/ClangSharedLibraryTask.kt
@@ -0,0 +1,105 @@
+/*
+ * 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.clang
+
+import javax.inject.Inject
+import org.gradle.api.DefaultTask
+import org.gradle.api.file.ConfigurableFileCollection
+import org.gradle.api.file.RegularFileProperty
+import org.gradle.api.provider.Property
+import org.gradle.api.services.ServiceReference
+import org.gradle.api.tasks.CacheableTask
+import org.gradle.api.tasks.Input
+import org.gradle.api.tasks.InputFiles
+import org.gradle.api.tasks.Nested
+import org.gradle.api.tasks.OutputFile
+import org.gradle.api.tasks.PathSensitive
+import org.gradle.api.tasks.PathSensitivity
+import org.gradle.api.tasks.TaskAction
+import org.gradle.workers.WorkAction
+import org.gradle.workers.WorkParameters
+import org.gradle.workers.WorkerExecutor
+
+@CacheableTask
+abstract class ClangSharedLibraryTask @Inject constructor(
+ private val workerExecutor: WorkerExecutor
+) : DefaultTask() {
+ init {
+ description = "Combines multiple object files (.o) into a shared library file" +
+ "(.so / .dylib)."
+ group = "Build"
+ }
+
+ @Suppress("UnstableApiUsage") // ServiceReference is incubating since 8.0
+ @get:ServiceReference(KonanBuildService.KEY)
+ abstract val konanBuildService: Property<KonanBuildService>
+
+ @get:Nested
+ abstract val clangParameters: ClangSharedLibraryParameters
+
+ @TaskAction
+ fun archive() {
+ workerExecutor.noIsolation().submit(
+ ClangSharedLibraryWorker::class.java
+ ) {
+ it.clangParameters.set(clangParameters)
+ it.buildService.set(konanBuildService)
+ }
+ }
+}
+
+abstract class ClangSharedLibraryParameters {
+ /**
+ * The target platform for the shared file.
+ */
+ @get:Input
+ abstract val konanTarget: Property<SerializableKonanTarget>
+
+ /**
+ * List of object files that will be added to the shared file output.
+ */
+ @get:InputFiles
+ @get:PathSensitive(PathSensitivity.NAME_ONLY)
+ abstract val objectFiles: ConfigurableFileCollection
+
+ /**
+ * The final output file that will include the shared library containing the given
+ * [objectFiles].
+ */
+ @get:OutputFile
+ abstract val outputFile: RegularFileProperty
+
+ /**
+ * List of additional objects that will be dynamically linked with the output file. At runtime,
+ * these need to be available for the shared object output to work.
+ */
+ @get:InputFiles
+ @get:PathSensitive(PathSensitivity.NAME_ONLY)
+ abstract val linkedObjects: ConfigurableFileCollection
+}
+
+private abstract class ClangSharedLibraryWorker : WorkAction<ClangSharedLibraryWorker.Params> {
+ interface Params : WorkParameters {
+ val clangParameters: Property<ClangSharedLibraryParameters>
+ val buildService: Property<KonanBuildService>
+ }
+
+ override fun execute() {
+ val buildService = parameters.buildService.get()
+ buildService.createSharedLibrary(parameters.clangParameters.get())
+ }
+}
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/clang/KonanBuildService.kt b/buildSrc/private/src/main/kotlin/androidx/build/clang/KonanBuildService.kt
new file mode 100644
index 0000000..94cb369
--- /dev/null
+++ b/buildSrc/private/src/main/kotlin/androidx/build/clang/KonanBuildService.kt
@@ -0,0 +1,235 @@
+/*
+ * 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.clang
+
+import androidx.build.getKonanPrebuiltsFolder
+import java.io.ByteArrayOutputStream
+import javax.inject.Inject
+import org.gradle.api.GradleException
+import org.gradle.api.Project
+import org.gradle.api.file.DirectoryProperty
+import org.gradle.api.file.FileCollection
+import org.gradle.api.provider.Property
+import org.gradle.api.provider.Provider
+import org.gradle.api.services.BuildService
+import org.gradle.api.services.BuildServiceParameters
+import org.gradle.process.ExecOperations
+import org.gradle.process.ExecSpec
+import org.jetbrains.kotlin.gradle.utils.NativeCompilerDownloader
+import org.jetbrains.kotlin.konan.target.Distribution
+import org.jetbrains.kotlin.konan.target.LinkerOutputKind
+import org.jetbrains.kotlin.konan.target.Platform
+import org.jetbrains.kotlin.konan.target.PlatformManager
+
+/**
+ * A Gradle BuildService that provides access to Konan Compiler (clang, linker, ar etc) to
+ * build native sources for multiple targets.
+ *
+ * You can obtain the instance via [obtain].
+ *
+ * @see ClangArchiveTask
+ * @see ClangCompileTask
+ * @see ClangSharedLibraryTask
+ */
+abstract class KonanBuildService @Inject constructor(
+ private val execOperations: ExecOperations
+) : BuildService<KonanBuildService.Parameters> {
+ private val dist by lazy {
+ Distribution(
+ konanHome = parameters.konanHome.get().asFile.absolutePath,
+ onlyDefaultProfiles = false,
+ propertyOverrides = mapOf(
+ "dependenciesUrl" to "file://${parameters.prebuilts.get().asFile}"
+ )
+ )
+ }
+
+ private val platformManager by lazy {
+ PlatformManager(distribution = dist)
+ }
+
+ /**
+ * @see ClangCompileTask
+ */
+ fun compile(parameters: ClangCompileParameters) {
+ val outputDir = parameters.output.get().asFile
+ outputDir.deleteRecursively()
+ outputDir.mkdirs()
+
+ val platform = getPlatform(parameters.konanTarget)
+ val additionalArgs = buildList {
+ addAll(parameters.freeArgs.get())
+ add("--compile")
+ parameters.includes.files.forEach { includeDirectory ->
+ check(includeDirectory.isDirectory) {
+ "Include parameter for clang must be a directory"
+ }
+ add("-I${includeDirectory.canonicalPath}")
+ }
+ addAll(parameters.sources.regularFilePaths())
+ }
+
+ val clangCommand = platform.clang.clangC(
+ *additionalArgs.toTypedArray()
+ )
+ execOperations.executeSilently { execSpec ->
+ execSpec.executable = clangCommand.first()
+ execSpec.args(clangCommand.drop(1))
+ execSpec.workingDir = parameters.output.get().asFile
+ }
+ }
+
+ /**
+ * @see ClangArchiveTask
+ */
+ fun archiveLibrary(parameters: ClangArchiveParameters) {
+ val outputFile = parameters.outputFile.get().asFile
+ outputFile.delete()
+ outputFile.parentFile.mkdirs()
+
+ val platform = getPlatform(parameters.konanTarget)
+ val llvmArgs = buildList {
+ add("rc")
+ add(parameters.outputFile.get().asFile.canonicalPath)
+ addAll(parameters.objectFiles.regularFilePaths())
+ }
+ val commands = platform.clang.llvmAr(
+ *llvmArgs.toTypedArray()
+ )
+ execOperations.executeSilently { execSpec ->
+ execSpec.executable = commands.first()
+ execSpec.args(commands.drop(1))
+ }
+ }
+
+ /**
+ * @see ClangSharedLibraryTask
+ */
+ fun createSharedLibrary(parameters: ClangSharedLibraryParameters) {
+ val outputFile = parameters.outputFile.get().asFile
+ outputFile.delete()
+ outputFile.parentFile.mkdirs()
+
+ val platform = getPlatform(parameters.konanTarget)
+ val objectFiles = parameters.objectFiles.regularFilePaths()
+ val linkedObjectFiles = parameters.linkedObjects.regularFilePaths()
+ val linkCommands = platform.linker.finalLinkCommands(
+ objectFiles = objectFiles,
+ executable = outputFile.canonicalPath,
+ libraries = linkedObjectFiles,
+ linkerArgs = emptyList(),
+ optimize = true,
+ debug = false,
+ kind = LinkerOutputKind.DYNAMIC_LIBRARY,
+ outputDsymBundle = "unused",
+ needsProfileLibrary = false,
+ mimallocEnabled = false,
+ sanitizer = null
+ )
+ linkCommands.map { it.argsWithExecutable }.forEach { args ->
+ execOperations.executeSilently { execSpec ->
+ execSpec.executable = args.first()
+ args.drop(1).filterNot {
+ // TODO b/305804211 Figure out if we would rather pass all args manually
+ // We use the linker that konan uses to be as similar as possible but that
+ // linker also has konan demangling, which we don't need and not even available
+ // in the default distribution. Hence we remove that parameters.
+ // In the future, we can consider not using the `platform.linker` but then
+ // we would need to parse the konan.properties file to get the relevant
+ // necessary parameters like sysroot etc.
+ // https://github.com/JetBrains/kotlin/blob/master/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/KotlinNativeTest.kt#L536
+ it.contains("--defsym") ||
+ it.contains("Konan_cxa_demangle")
+ }.forEach {
+ execSpec.args(it)
+ }
+ }
+ }
+ }
+
+ private fun FileCollection.regularFilePaths(): List<String> {
+ return files.flatMap {
+ it.walkTopDown().filter {
+ it.isFile
+ }.map { it.canonicalPath }
+ }.distinct()
+ }
+
+ private fun getPlatform(
+ serializableKonanTarget: Property<SerializableKonanTarget>
+ ): Platform {
+ val konanTarget = serializableKonanTarget.get().asKonanTarget
+ check(platformManager.enabled.contains(konanTarget)) {
+ "cannot find enabled target with name ${serializableKonanTarget.get()}"
+ }
+ val platform = platformManager.platform(konanTarget)
+ platform.downloadDependencies()
+ return platform
+ }
+
+ /**
+ * Execute the command without logs unless it fails.
+ */
+ private fun <T> ExecOperations.executeSilently(block: (ExecSpec) -> T) {
+ val outputStream = ByteArrayOutputStream()
+ val errorStream = ByteArrayOutputStream()
+ val execResult = exec {
+ block(it)
+ it.setErrorOutput(errorStream)
+ it.setStandardOutput(outputStream)
+ it.isIgnoreExitValue = true // we'll check it below
+ }
+ if (execResult.exitValue != 0) {
+ throw GradleException(
+ """
+ Compilation failed:
+ ==== output:
+ ${outputStream.toString(Charsets.UTF_8)}
+ ==== error:
+ ${errorStream.toString(Charsets.UTF_8)}
+ """.trimIndent()
+ )
+ }
+ }
+
+ interface Parameters : BuildServiceParameters {
+ val konanHome: DirectoryProperty
+ val prebuilts: DirectoryProperty
+ }
+
+ companion object {
+ internal const val KEY = "konanBuildService"
+ fun obtain(
+ project: Project
+ ): Provider<KonanBuildService> {
+ return project.gradle.sharedServices.registerIfAbsent(
+ KEY,
+ KonanBuildService::class.java
+ ) {
+ val nativeCompilerDownloader = NativeCompilerDownloader(project)
+ nativeCompilerDownloader.downloadIfNeeded()
+
+ it.parameters.konanHome.set(
+ nativeCompilerDownloader.compilerDirectory
+ )
+ it.parameters.prebuilts.set(
+ project.getKonanPrebuiltsFolder()
+ )
+ }
+ }
+ }
+}
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/clang/SerializableKonanTarget.kt b/buildSrc/private/src/main/kotlin/androidx/build/clang/SerializableKonanTarget.kt
new file mode 100644
index 0000000..46fc49b
--- /dev/null
+++ b/buildSrc/private/src/main/kotlin/androidx/build/clang/SerializableKonanTarget.kt
@@ -0,0 +1,46 @@
+/*
+ * 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.clang
+
+import java.io.Serializable
+import org.jetbrains.kotlin.konan.target.KonanTarget
+
+/**
+ * We cannot use KonanTarget as Gradle input/output due to
+ * https://youtrack.jetbrains.com/issue/KT-61657.
+ * Hence, we have this value class which represents it as a string.
+ */
+
+@JvmInline
+value class SerializableKonanTarget(val name: String) : Serializable {
+ init {
+ check(KonanTarget.predefinedTargets.contains(name)) {
+ "Invalid KonanTarget name: $name"
+ }
+ }
+
+ val asKonanTarget
+ get(): KonanTarget {
+ return KonanTarget.predefinedTargets[name] ?: error(
+ "No KonanTarget found with name $name"
+ )
+ }
+
+ override fun toString() = name
+
+ constructor(konanTarget: KonanTarget) : this(konanTarget.name)
+}
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/dependencyTracker/AffectedModuleDetector.kt b/buildSrc/private/src/main/kotlin/androidx/build/dependencyTracker/AffectedModuleDetector.kt
index cc96c2e..2361992 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/dependencyTracker/AffectedModuleDetector.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/dependencyTracker/AffectedModuleDetector.kt
@@ -19,7 +19,7 @@
import androidx.build.dependencyTracker.AffectedModuleDetector.Companion.ENABLE_ARG
import androidx.build.getCheckoutRoot
import androidx.build.getDistributionDirectory
-import androidx.build.gitclient.GitClient
+import androidx.build.gitclient.getChangedFilesProvider
import androidx.build.gradle.isRoot
import java.io.File
import org.gradle.api.Action
@@ -57,14 +57,6 @@
}
/**
- * Provides the list of file paths (relative to the git root) that have changed (can include removed
- * files).
- *
- * Returns `null` if changed files cannot be detected.
- */
-typealias ChangedFilesProvider = () -> List<String>?
-
-/**
* A utility class that can discover which files are changed based on git history.
*
* To enable this, you need to pass [ENABLE_ARG] into the build as a command line parameter
@@ -146,27 +138,25 @@
if (baseCommitOverride != null) {
logger.info("using base commit override $baseCommitOverride")
}
- val changeInfoPath = GitClient.getChangeInfoPath(rootProject)
- val manifestPath = GitClient.getManifestPath(rootProject)
gradle.taskGraph.whenReady {
logger.lifecycle("projects evaluated")
val projectGraph = ProjectGraph(rootProject)
val dependencyTracker = DependencyTracker(rootProject, logger.toLogger())
val provider =
setupWithParams(
- rootProject,
- { spec ->
- val params = spec.parameters
- params.rootDir = rootProject.projectDir
- params.checkoutRoot = rootProject.getCheckoutRoot()
- params.projectGraph = projectGraph
- params.dependencyTracker = dependencyTracker
- params.log = logger
- params.baseCommitOverride = baseCommitOverride
- params.changeInfoPath = changeInfoPath
- params.manifestPath = manifestPath
- }
- )
+ rootProject
+ ) { spec ->
+ val params = spec.parameters
+ params.rootDir = rootProject.projectDir
+ params.checkoutRoot = rootProject.getCheckoutRoot()
+ params.projectGraph = projectGraph
+ params.dependencyTracker = dependencyTracker
+ params.log = logger
+ params.baseCommitOverride = baseCommitOverride
+ params.gitChangedFilesProvider = rootProject.getChangedFilesProvider(
+ baseCommitOverride
+ )
+ }
logger.info("using real detector")
instance.wrapped = provider
}
@@ -268,8 +258,7 @@
var alwaysBuildIfExists: Set<String>?
var ignoredPaths: Set<String>?
var baseCommitOverride: String?
- var changeInfoPath: Provider<String>
- var manifestPath: Provider<String>
+ var gitChangedFilesProvider: Provider<List<String>>
}
val detector: AffectedModuleDetector by lazy {
@@ -277,26 +266,8 @@
if (parameters.acceptAll) {
AcceptAll(null)
} else {
- val baseCommitOverride = parameters.baseCommitOverride
- if (baseCommitOverride != null) {
- logger.info("using base commit override $baseCommitOverride")
- }
- val gitClient =
- GitClient.create(
- projectDir = parameters.rootDir,
- checkoutRoot = parameters.checkoutRoot,
- logger = logger.toLogger(),
- changeInfoPath = parameters.changeInfoPath.get(),
- manifestPath = parameters.manifestPath.get()
- )
- val changedFilesProvider: ChangedFilesProvider = {
- val baseSha = baseCommitOverride ?: gitClient.findPreviousSubmittedChange()
- check(baseSha != null) {
- "gitClient returned null from findPreviousSubmittedChange"
- }
- val changedFiles = gitClient.findChangedFilesSince(baseSha)
- logger.info("changed files: $changedFiles")
- changedFiles
+ if (parameters.baseCommitOverride != null) {
+ logger.info("using base commit override ${parameters.baseCommitOverride}")
}
AffectedModuleDetectorImpl(
@@ -309,7 +280,7 @@
parameters.alwaysBuildIfExists
?: AffectedModuleDetectorImpl.ALWAYS_BUILD_IF_EXISTS,
ignoredPaths = parameters.ignoredPaths ?: AffectedModuleDetectorImpl.IGNORED_PATHS,
- changedFilesProvider = changedFilesProvider
+ changedFilesProvider = parameters.gitChangedFilesProvider
)
}
}
@@ -335,8 +306,7 @@
*
* When a file in a module is changed, all modules that depend on it are considered as changed.
*/
-class AffectedModuleDetectorImpl
-constructor(
+class AffectedModuleDetectorImpl(
private val projectGraph: ProjectGraph,
private val dependencyTracker: DependencyTracker,
logger: Logger?,
@@ -345,7 +315,7 @@
private val cobuiltTestPaths: Set<Set<String>> = COBUILT_TEST_PATHS,
private val alwaysBuildIfExists: Set<String> = ALWAYS_BUILD_IF_EXISTS,
private val ignoredPaths: Set<String> = IGNORED_PATHS,
- private val changedFilesProvider: ChangedFilesProvider
+ private val changedFilesProvider: Provider<List<String>>
) : AffectedModuleDetector(logger) {
private val allProjects by lazy { projectGraph.allProjects }
@@ -356,7 +326,7 @@
val dependentProjects by lazy { findDependentProjects() }
- val alwaysBuild by lazy { alwaysBuildIfExists.filter({ path -> allProjects.contains(path) }) }
+ val alwaysBuild by lazy { alwaysBuildIfExists.filter { path -> allProjects.contains(path) } }
private var unknownFiles: MutableSet<String> = mutableSetOf()
@@ -367,8 +337,6 @@
private val cobuiltTestProjects by lazy { lookupProjectSetsFromPaths(cobuiltTestPaths) }
- private val buildContainsNonProjectFileChanges by lazy { unknownFiles.isNotEmpty() }
-
override fun shouldInclude(project: String): Boolean {
return if (project == ":" || buildAll) {
true
@@ -401,7 +369,7 @@
* Returns allProjects if there are no previous merge CLs, which shouldn't happen.
*/
private fun findChangedProjects(): Set<String> {
- val changedFiles = changedFilesProvider() ?: return allProjects
+ val changedFiles = changedFilesProvider.getOrNull() ?: return allProjects
val changedProjects: MutableSet<String> = alwaysBuild.toMutableSet()
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/gitclient/ChangeInfo.kt b/buildSrc/private/src/main/kotlin/androidx/build/gitclient/ChangeInfo.kt
new file mode 100644
index 0000000..211537d
--- /dev/null
+++ b/buildSrc/private/src/main/kotlin/androidx/build/gitclient/ChangeInfo.kt
@@ -0,0 +1,140 @@
+/*
+ * 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.gitclient
+
+import androidx.build.getCheckoutRoot
+import androidx.build.parseXml
+import com.google.gson.Gson
+import java.io.File
+import org.gradle.api.GradleException
+import org.gradle.api.Project
+import org.gradle.api.provider.Provider
+
+/**
+ * A provider of changed files based on changeinfo files and manifest files created by the build
+ * server.
+ *
+ * For sample changeinfo config files, see: ChangeInfoProvidersTest.kt
+ * https://android-build.googleplex.com/builds/pending/P28356101/androidx_incremental/latest/incremental/P28356101-changeInfo
+ *
+ * For more information, see b/171569941
+ */
+fun Project.getChangedFilesFromChangeInfoProvider(
+ manifestPath: String,
+ changeInfoPath: String,
+ projectDirRelativeToRoot: String = projectDir.relativeTo(getCheckoutRoot()).toString()
+): Provider<List<String>> {
+ val manifestTextProvider = project.providers.fileContents(
+ project.objects.fileProperty().fileValue(File(manifestPath))
+ ).asText
+ return project.providers.fileContents(
+ project.objects.fileProperty().fileValue(File(changeInfoPath))
+ ).asText.zip(manifestTextProvider) { changeInfoText, manifestText ->
+ val fileList = mutableListOf<String>()
+ val fileSet = mutableSetOf<String>()
+ val gson = Gson()
+ val changeInfoEntries =
+ gson.fromJson(changeInfoText, ChangeInfo::class.java)
+ val projectName = computeProjectName(
+ projectDirRelativeToRoot,
+ manifestText
+ )
+ val changes = changeInfoEntries.changes?.filter { it.project == projectName } ?: emptyList()
+ for (change in changes) {
+ val revisions = change.revisions ?: listOf()
+ for (revision in revisions) {
+ val fileInfos = revision.fileInfos ?: listOf()
+ for (fileInfo in fileInfos) {
+ fileInfo.oldPath?.let { path ->
+ if (!fileSet.contains(path)) {
+ fileList.add(path)
+ fileSet.add(path)
+ }
+ }
+ fileInfo.path?.let { path ->
+ if (!fileSet.contains(path)) {
+ fileList.add(path)
+ fileSet.add(path)
+ }
+ }
+ }
+ }
+ }
+ return@zip fileList
+ }
+}
+
+// Data classes uses to parse CHANGE_INFO json files
+internal data class ChangeInfo(val changes: List<ChangeEntry>?)
+internal data class ChangeEntry(val project: String, val revisions: List<Revisions>?)
+internal data class Revisions(val fileInfos: List<FileInfo>?)
+internal data class FileInfo(val path: String?, val oldPath: String?, val status: String)
+
+/**
+ * A provider of HEAD SHA based on manifest file created by the build
+ * server.
+ *
+ * For sample manifest files, see: ChangeInfoProvidersTest.kt
+ *
+ * For more information, see b/171569941
+ */
+fun Project.getHeadShaFromManifestProvider(
+ manifestPath: String,
+ projectDirRelativeToRoot: String = projectDir.relativeTo(getCheckoutRoot()).toString()
+): Provider<String> {
+ val contentsProvider = project.providers.fileContents(
+ project.objects.fileProperty().fileValue(File(manifestPath))
+ )
+ return contentsProvider.asText.map { manifestContent ->
+ val projectName = computeProjectName(projectDirRelativeToRoot, manifestContent)
+ val revisionRegex = Regex("revision=\"([^\"]*)\"")
+ for (line in manifestContent.split("\n")) {
+ if (line.contains("name=\"${projectName}\"")) {
+ val result = revisionRegex.find(line)?.groupValues?.get(1)
+ if (result != null) {
+ return@map result
+ }
+ }
+ }
+ throw GradleException(
+ "Could not identify version of project '$projectName' from config text" +
+ "'$manifestContent'"
+ )
+ }
+}
+
+private fun computeProjectName(projectPath: String, config: String): String {
+ fun pathContains(ancestor: String, child: String): Boolean {
+ return "$child/".startsWith("$ancestor/")
+ }
+ val document = parseXml(config, mapOf())
+ val projectIterator = document.rootElement.elementIterator()
+ while (projectIterator.hasNext()) {
+ val project = projectIterator.next()
+ val repositoryPath = project.attributeValue("path")
+ if (repositoryPath != null) {
+ if (pathContains(repositoryPath, projectPath)) {
+ val name = project.attributeValue("name")
+ check(name != null) { "Could not get name for project $project" }
+ return name
+ }
+ }
+ }
+ throw GradleException(
+ "Could not find project with path '$projectPath' in config"
+ )
+}
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/gitclient/ChangeInfoGitClient.kt b/buildSrc/private/src/main/kotlin/androidx/build/gitclient/ChangeInfoGitClient.kt
deleted file mode 100644
index dba8e59..0000000
--- a/buildSrc/private/src/main/kotlin/androidx/build/gitclient/ChangeInfoGitClient.kt
+++ /dev/null
@@ -1,148 +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.
- */
-
-package androidx.build.gitclient
-
-import androidx.build.parseXml
-import com.google.gson.Gson
-import org.gradle.api.GradleException
-
-/**
- * A git client based on changeinfo files and manifest files created by the build server.
- *
- * For sample changeinfo config files, see: ChangeInfoGitClientTest.kt
- * https://android-build.googleplex.com/builds/pending/P28356101/androidx_incremental/latest/incremental/P28356101-changeInfo
- *
- * For more information, see b/171569941
- */
-class ChangeInfoGitClient(
- /** The file containing the information about which changes are new in this build */
- changeInfoText: String,
- /** The file containing version information */
- private val versionInfo: String,
- /**
- * The project directory relative to the root of the checkout The repository is derived from
- * this value
- */
- private val projectPath: String
-) : GitClient {
-
- /**
- * The name of the current git repository. In many cases this is 'platform/frameworks/support'
- */
- private val projectName: String by lazy { computeProjectName(versionInfo) }
-
- private fun computeProjectName(config: String): String {
- val document = parseXml(config, mapOf())
- val projectIterator = document.rootElement.elementIterator()
- while (projectIterator.hasNext()) {
- val project = projectIterator.next()
- val repositoryPath = project.attributeValue("path")
- if (repositoryPath != null) {
- if (pathContains(repositoryPath, projectPath)) {
- val name = project.attributeValue("name")
- check(name != null) { "Could not get name for project $project" }
- return name
- }
- }
- }
- throw GradleException(
- "Could not find project with path '$projectPath' in config '$versionInfo'"
- )
- }
-
- /** Object representing changes */
- private val changeInfo: ChangeInfo by lazy {
- val gson = Gson()
- gson.fromJson(changeInfoText, ChangeInfo::class.java)
- }
-
- private data class ChangeInfo(val changes: List<ChangeEntry>?)
-
- private data class ChangeEntry(val project: String, val revisions: List<Revisions>?)
-
- private data class Revisions(val fileInfos: List<FileInfo>?)
-
- private data class FileInfo(val path: String?, val oldPath: String?, val status: String)
-
- private val changesInThisRepo: List<ChangeEntry>
- get() {
- return changeInfo.changes?.filter { it.project == projectName } ?: emptyList()
- }
-
- private fun extractVersion(config: String): String {
- val revisionRegex = Regex("revision=\"([^\"]*)\"")
- for (line in config.split("\n")) {
- if (line.contains("name=\"${projectName}\"")) {
- val result = revisionRegex.find(line)?.groupValues?.get(1)
- if (result != null) {
- return result
- }
- }
- }
- throw GradleException(
- "Could not identify version of project '$projectName' from config text '$config'"
- )
- }
-
- /** Finds changed file paths */
- override fun findChangedFilesSince(
- sha: String // unused in this implementation, the data file knows what is new
- ): List<String> {
- val fileList = mutableListOf<String>()
- val fileSet = mutableSetOf<String>()
- for (change in changesInThisRepo) {
- val revisions = change.revisions ?: listOf()
- for (revision in revisions) {
- val fileInfos = revision.fileInfos ?: listOf()
- for (fileInfo in fileInfos) {
- fileInfo.oldPath?.let { path ->
- if (!fileSet.contains(path)) {
- fileList.add(path)
- fileSet.add(path)
- }
- }
- fileInfo.path?.let { path ->
- if (!fileSet.contains(path)) {
- fileList.add(path)
- fileSet.add(path)
- }
- }
- }
- }
- }
- return fileList
- }
-
- /**
- * Unused If this were supported, it would: Finds the most recently submitted change before any
- * pending changes being tested
- */
- override fun findPreviousSubmittedChange(): String {
- // findChangedFilesSince doesn't need this information, so
- // this is unsupported at the moment.
- // For now we just return a non-null string to signify that there was no error
- return ""
- }
-
- override fun getHeadSha(): String {
- return extractVersion(versionInfo)
- }
-}
-
-private fun pathContains(ancestor: String, child: String): Boolean {
- return (child + "/").startsWith(ancestor + "/")
-}
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/gitclient/GitClient.kt b/buildSrc/private/src/main/kotlin/androidx/build/gitclient/GitClient.kt
index 2b883ba..fca8225 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/gitclient/GitClient.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/gitclient/GitClient.kt
@@ -16,117 +16,133 @@
package androidx.build.gitclient
-import androidx.build.getCheckoutRoot
+import androidx.build.gitclient.GitHeadShaSource.Parameters
+import java.io.ByteArrayOutputStream
import java.io.File
-import java.util.concurrent.ConcurrentHashMap
+import java.nio.charset.Charset
+import javax.inject.Inject
import org.gradle.api.GradleException
import org.gradle.api.Project
-import org.gradle.api.logging.Logger
+import org.gradle.api.file.DirectoryProperty
+import org.gradle.api.provider.Property
import org.gradle.api.provider.Provider
+import org.gradle.api.provider.ValueSource
+import org.gradle.api.provider.ValueSourceParameters
+import org.gradle.process.ExecOperations
-interface GitClient {
- fun findChangedFilesSince(sha: String): List<String>
-
- fun findPreviousSubmittedChange(): String?
-
- /** Returns the full commit sha for the HEAD of the git repository */
- fun getHeadSha(): String
-
- /** Abstraction for running execution commands for testability */
- interface CommandRunner {
- /** Executes the given shell command and returns the stdout as a string. */
- fun execute(command: String): String
- /** Executes the given shell command and returns the stdout by lines. */
- fun executeAndParse(command: String): List<String>
- }
-
- companion object {
- fun getChangeInfoPath(project: Project): Provider<String> {
- return project.providers.environmentVariable("CHANGE_INFO").orElse("")
- }
-
- fun getManifestPath(project: Project): Provider<String> {
- return project.providers.environmentVariable("MANIFEST").orElse("")
- }
-
- fun forProject(project: Project): GitClient {
- return create(
- project.projectDir,
- project.getCheckoutRoot(),
- project.logger,
- GitClient.getChangeInfoPath(project).get(),
- GitClient.getManifestPath(project).get()
- )
- }
-
- fun create(
- projectDir: File,
- checkoutRoot: File,
- logger: Logger,
- changeInfoPath: String,
- manifestPath: String
- ): GitClient {
- if (changeInfoPath != "") {
- if (manifestPath == "") {
- throw GradleException("Setting CHANGE_INFO requires also setting MANIFEST")
- }
- val changeInfoFile = File(changeInfoPath)
- val manifestFile = File(manifestPath)
- if (!changeInfoFile.exists()) {
- throw GradleException("changeinfo file $changeInfoFile does not exist")
- }
- if (!manifestFile.exists()) {
- throw GradleException("manifest $manifestFile does not exist")
- }
- val changeInfoText = changeInfoFile.readText()
- val manifestText = manifestFile.readText()
- val projectDirRelativeToRoot = projectDir.relativeTo(checkoutRoot).toString()
- logger.info(
- "Using ChangeInfoGitClient with change info path $changeInfoPath, " +
- "manifest $manifestPath project dir $projectDirRelativeToRoot"
- )
- return ChangeInfoGitClient(changeInfoText, manifestText, projectDirRelativeToRoot)
- }
- val gitRoot = findGitDirInParentFilepath(projectDir)
- check(gitRoot != null) { "Could not find .git dir for $projectDir" }
- logger.info("UsingGitRunnerGitClient")
- return GitRunnerGitClient(gitRoot, logger)
+/**
+ * @return provider that has the changes files since the last merge commit. It will use CHANGE_INFO
+ * and MANIFEST to resolve the files if these environmental variables are set, otherwise it will
+ * default to using git.
+ *
+ * @param baseCommitOverride optional value to use to override last merge commit
+ */
+fun Project.getChangedFilesProvider(
+ baseCommitOverride: String?,
+): Provider<List<String>> {
+ val changeInfoPath = System.getenv("CHANGE_INFO")
+ val manifestPath = System.getenv("MANIFEST")
+ return if (changeInfoPath != null && manifestPath != null) {
+ if (baseCommitOverride != null) throw GradleException(
+ "Overriding base commit is not supported when using CHANGE_INFO and MANIFEST"
+ )
+ getChangedFilesFromChangeInfoProvider(manifestPath, changeInfoPath)
+ } else if (changeInfoPath != null) {
+ throw GradleException("Setting CHANGE_INFO requires also setting MANIFEST")
+ } else if (manifestPath != null) {
+ throw GradleException("Setting MANIFEST requires also setting CHANGE_INFO")
+ } else {
+ providers.of(GitChangedFilesSource::class.java) {
+ it.parameters.workingDir.set(rootProject.layout.projectDirectory)
+ it.parameters.baseCommitOverride.set(baseCommitOverride)
}
}
}
-data class MultiGitClient(
- val checkoutRoot: File,
- val logger: Logger,
- val changeInfoPath: String,
- val manifestPath: String
-) {
- // Map from the root of the git repository to a GitClient for that repository
- // In AndroidX this directory could be frameworks/support, external/noto-fonts, or others
- @Transient // We don't want Gradle to persist GitClient in the configuration cache
- var cache: MutableMap<File, GitClient>? = null
-
- fun getGitClient(projectDir: File): GitClient {
- // If this object was restored from the Configuration cache, this value will be null
- // So, if it is null we have to reinitialize it
- var cache = this.cache
- if (cache == null) {
- cache = ConcurrentHashMap()
- this.cache = cache
- }
- return cache.getOrPut(key = projectDir) {
- GitClient.create(projectDir, checkoutRoot, logger, changeInfoPath, manifestPath)
+/**
+ * @return provider of HEAD SHA. It will use MANIFEST to get the SHA if the environmental variable
+ * is set, otherwise it will default to using git.
+ */
+fun getHeadShaProvider(project: Project): Provider<String> {
+ val manifestPath = System.getenv("MANIFEST")
+ return if (manifestPath != null) { // using manifest xml file for HEAD SHA
+ project.getHeadShaFromManifestProvider(manifestPath)
+ } else { // using git for HEAD SHA
+ project.providers.of(GitHeadShaSource::class.java) {
+ it.parameters.workingDir.set(project.layout.projectDirectory)
}
}
+}
- companion object {
- fun create(project: Project): MultiGitClient {
- return MultiGitClient(
- project.getCheckoutRoot(),
- project.logger,
- GitClient.getChangeInfoPath(project).get(),
- GitClient.getManifestPath(project).get()
- )
- }
+/**
+ * Provides HEAD SHA by calling git in [Parameters.workingDir].
+ */
+internal abstract class GitHeadShaSource : ValueSource<String, GitHeadShaSource.Parameters> {
+ interface Parameters : ValueSourceParameters {
+ val workingDir: DirectoryProperty
}
+
+ @get:Inject
+ abstract val execOperations: ExecOperations
+
+ override fun obtain(): String {
+ val output = ByteArrayOutputStream()
+ execOperations.exec {
+ it.commandLine("git", "rev-parse", "HEAD")
+ it.standardOutput = output
+ it.workingDir = findGitDirInParentFilepath(parameters.workingDir.get().asFile)
+ }
+ return String(output.toByteArray(), Charset.defaultCharset()).trim()
+ }
+}
+
+/**
+ * Provides changed files since the last merge by calling git in [Parameters.workingDir].
+ */
+internal abstract class GitChangedFilesSource :
+ ValueSource<List<String>, GitChangedFilesSource.Parameters> {
+ interface Parameters : ValueSourceParameters {
+ val workingDir: DirectoryProperty
+ val baseCommitOverride: Property<String?>
+ }
+
+ @get:Inject
+ abstract val execOperations: ExecOperations
+
+ override fun obtain(): List<String> {
+ val output = ByteArrayOutputStream()
+ val gitDirInParentFilepath = findGitDirInParentFilepath(parameters.workingDir.get().asFile)
+ val baseCommit = if (parameters.baseCommitOverride.isPresent) {
+ parameters.baseCommitOverride.get()
+ } else {
+ // Call git to get the last merge commit
+ execOperations.exec {
+ it.commandLine("git", "log", "-1", "--merges", "--oneline", "--pretty=format:%H")
+ it.standardOutput = output
+ it.workingDir = gitDirInParentFilepath
+ }
+ String(output.toByteArray(), Charset.defaultCharset()).trim()
+ }
+ // Get the list of changed files since the last git merge commit
+ execOperations.exec {
+ it.commandLine("git", "diff", "--name-only", "HEAD", baseCommit)
+ it.standardOutput = output
+ it.workingDir = gitDirInParentFilepath
+ }
+ return String(output.toByteArray(), Charset.defaultCharset()).split(
+ System.lineSeparator()
+ ).filterNot { it.isEmpty() }
+ }
+}
+
+/** Finds the git directory containing the given File by checking parent directories */
+private fun findGitDirInParentFilepath(filepath: File): File? {
+ var curDirectory: File = filepath
+ while (curDirectory.path != "/") {
+ if (File("$curDirectory/.git").exists()) {
+ return curDirectory
+ }
+ curDirectory = curDirectory.parentFile
+ }
+ return null
}
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/gitclient/GitRunnerGitClient.kt b/buildSrc/private/src/main/kotlin/androidx/build/gitclient/GitRunnerGitClient.kt
deleted file mode 100644
index 85b929d..0000000
--- a/buildSrc/private/src/main/kotlin/androidx/build/gitclient/GitRunnerGitClient.kt
+++ /dev/null
@@ -1,107 +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.build.gitclient
-
-import java.io.File
-import java.util.concurrent.TimeUnit
-import org.gradle.api.logging.Logger
-
-/**
- * A simple git client that uses system process commands to communicate with the git setup in the
- * given working directory.
- */
-class GitRunnerGitClient(
- /** The root location for git */
- private val workingDir: File,
- private val logger: Logger?,
- private val commandRunner: GitClient.CommandRunner =
- RealCommandRunner(workingDir = workingDir, logger = logger)
-) : GitClient {
-
- /** Finds file paths changed in a commit since the given sha */
- override fun findChangedFilesSince(sha: String): List<String> {
- return commandRunner.executeAndParse("$CHANGED_FILES_CMD_PREFIX HEAD $sha")
- }
-
- /** checks the history to find the first merge CL. */
- override fun findPreviousSubmittedChange(): String? {
- return commandRunner
- .executeAndParse(PREVIOUS_SUBMITTED_CMD)
- .firstOrNull()
- ?.split(" ")
- ?.firstOrNull()
- }
-
- override fun getHeadSha(): String {
- val gitLogCmd = "git log --name-only --pretty=format:%H HEAD -n 1 -- ./"
- val gitLogString: String = commandRunner.execute(gitLogCmd)
- if (gitLogString.isEmpty()) {
- logger?.warn(
- "No git commits found! Ran this command: '$gitLogCmd ' and received no output"
- )
- }
- return gitLogString
- }
-
- private class RealCommandRunner(private val workingDir: File, private val logger: Logger?) :
- GitClient.CommandRunner {
- override fun execute(command: String): String {
- val parts = command.split("\\s".toRegex())
- logger?.info("running command $command in $workingDir")
- val proc =
- ProcessBuilder(*parts.toTypedArray())
- .directory(workingDir)
- .redirectOutput(ProcessBuilder.Redirect.PIPE)
- .redirectError(ProcessBuilder.Redirect.PIPE)
- .start()
-
- // Read output, waiting for process to finish, as needed
- val stdout = proc.inputStream.bufferedReader().readText()
- val stderr = proc.errorStream.bufferedReader().readText()
- val message = stdout + stderr
- // wait potentially a little bit longer in case Git was waiting for us to
- // read its response before it exited
- proc.waitFor(10, TimeUnit.SECONDS)
- logger?.info("Response: $message")
- check(proc.exitValue() == 0) {
- "Nonzero exit value running git command. Response: $message"
- }
- return stdout
- }
-
- override fun executeAndParse(command: String): List<String> {
- return execute(command).split(System.lineSeparator()).filterNot { it.isEmpty() }
- }
- }
-
- companion object {
- const val PREVIOUS_SUBMITTED_CMD = "git log -1 --merges --oneline"
- const val CHANGED_FILES_CMD_PREFIX = "git diff --name-only"
- }
-}
-
-/** Finds the git directory containing the given File by checking parent directories */
-internal fun findGitDirInParentFilepath(filepath: File): File? {
- var curDirectory: File = filepath
- while (curDirectory.path != "/") {
- if (File("$curDirectory/.git").exists()) {
- return curDirectory
- }
- curDirectory = curDirectory.parentFile
- }
- return null
-}
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/sbom/Sbom.kt b/buildSrc/private/src/main/kotlin/androidx/build/sbom/Sbom.kt
index 1f346f0..83186c0 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/sbom/Sbom.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/sbom/Sbom.kt
@@ -24,7 +24,7 @@
import androidx.build.getDistributionDirectory
import androidx.build.getPrebuiltsRoot
import androidx.build.getSupportRootFolder
-import androidx.build.gitclient.MultiGitClient
+import androidx.build.gitclient.getHeadShaProvider
import androidx.inspection.gradle.EXPORT_INSPECTOR_DEPENDENCIES
import androidx.inspection.gradle.IMPORT_INSPECTOR_DEPENDENCIES
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
@@ -152,10 +152,14 @@
}
}
+ if (taskName == "stubAar") {
+ return listOf()
+ }
+
throw GradleException(
"Not sure which external dependencies are included in $projectPath:$taskName of type " +
"${task::class.java} (this is used for publishing sboms). Please update " +
- "AndroidXImplPlugin's listSbomConfigurationNamesForArchive and " +
+ "Sbom.kt's listSbomConfigurationNamesForArchive and " +
"shouldSbomIncludeConfigurationName"
)
}
@@ -211,7 +215,7 @@
}
project.apply(plugin = "org.spdx.sbom")
val repos = getRepoPublicUrls()
- val gitsClient = MultiGitClient.create(project)
+ val headShaProvider = getHeadShaProvider(project)
val supportRootDir = getSupportRootFolder()
val allowPublicRepos = System.getenv("ALLOW_PUBLIC_REPOS") != null
@@ -262,10 +266,8 @@
original: ScmInfo,
projectInfo: ProjectInfo
): ScmInfo {
- val gitClient = gitsClient.getGitClient(projectInfo.projectDirectory)
- val commit = gitClient.getHeadSha()
val url = getGitRemoteUrl(projectInfo.projectDirectory, supportRootDir)
- return ScmInfo.from("git", url, commit)
+ return ScmInfo.from("git", url, headShaProvider.get())
}
override fun shouldCreatePackageForProject(projectInfo: ProjectInfo): Boolean {
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/uptodatedness/TaskUpToDateValidator.kt b/buildSrc/private/src/main/kotlin/androidx/build/uptodatedness/TaskUpToDateValidator.kt
index b51596da..a3a8978 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/uptodatedness/TaskUpToDateValidator.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/uptodatedness/TaskUpToDateValidator.kt
@@ -114,8 +114,6 @@
":external:libyuv:buildCMakeRelWithDebInfo[arm64-v8a][yuv]",
":external:libyuv:buildCMakeRelWithDebInfo[x86][yuv]",
":external:libyuv:buildCMakeRelWithDebInfo[x86_64][yuv]",
- ":hilt:hilt-navigation-compose:kaptGenerateStubsDebugKotlin",
- ":hilt:hilt-navigation-compose:kaptGenerateStubsReleaseKotlin",
":lint-checks:integration-tests:copyDebugAndroidLintReports",
// https://youtrack.jetbrains.com/issue/KT-49933
diff --git a/buildSrc/public/src/main/kotlin/androidx/build/AndroidXConfig.kt b/buildSrc/public/src/main/kotlin/androidx/build/AndroidXConfig.kt
index 04a99a9..d92ea49 100644
--- a/buildSrc/public/src/main/kotlin/androidx/build/AndroidXConfig.kt
+++ b/buildSrc/public/src/main/kotlin/androidx/build/AndroidXConfig.kt
@@ -28,7 +28,7 @@
override val compileSdk: String by lazy { project.findProperty(COMPILE_SDK_VERSION).toString() }
- override val minSdk: Int = 14
+ override val minSdk: Int = 19
override val ndkVersion: String = "23.1.7779620"
override val targetSdk: Int by lazy {
diff --git a/busytown/impl/build-studio-and-androidx.sh b/busytown/impl/build-studio-and-androidx.sh
index 420bf5f..eff5aa5 100755
--- a/busytown/impl/build-studio-and-androidx.sh
+++ b/busytown/impl/build-studio-and-androidx.sh
@@ -111,9 +111,9 @@
function buildAndroidx() {
RETURN_CODE=0
- LOG_PROCESSOR="$SCRIPTS_DIR/../development/build_log_processor.sh"
# Remove -Pandroid.overrideVersionCheck=true once we upgrade to Gradle 8.1
- if "$LOG_PROCESSOR" frameworks/support/gradlew -p frameworks/support $androidxArguments --profile \
+ if frameworks/support/gradlew -p frameworks/support $androidxArguments --profile \
+ -Pandroidx.summarizeStderr\
--dependency-verification=off -Pandroid.overrideVersionCheck=true -Pandroidx.highMemory; then
echo build passed
else
diff --git a/busytown/impl/build.sh b/busytown/impl/build.sh
index 7821341..3fba732 100755
--- a/busytown/impl/build.sh
+++ b/busytown/impl/build.sh
@@ -20,9 +20,9 @@
export DIST_DIR="$DIST_DIR"
if [ "$CHANGE_INFO" != "" ]; then
cp "$CHANGE_INFO" "$DIST_DIR/"
-fi
-if [ "$MANIFEST" == "" ]; then
- export MANIFEST="$DIST_DIR/manifest_${BUILD_NUMBER}.xml"
+ if [ "$MANIFEST" == "" ]; then
+ export MANIFEST="$DIST_DIR/manifest_${BUILD_NUMBER}.xml"
+ fi
fi
# parse arguments
diff --git a/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/GuaranteedConfigurationsUtil.kt b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/GuaranteedConfigurationsUtil.kt
index c0fe1de..6765858 100644
--- a/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/GuaranteedConfigurationsUtil.kt
+++ b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/GuaranteedConfigurationsUtil.kt
@@ -17,6 +17,8 @@
package androidx.camera.camera2.pipe.integration.adapter
import android.hardware.camera2.CameraCharacteristics
+import android.hardware.camera2.CameraMetadata
+import android.os.Build
import androidx.annotation.RequiresApi
import androidx.camera.core.impl.SurfaceCombination
import androidx.camera.core.impl.SurfaceConfig
@@ -768,6 +770,235 @@
)
}
+ /**
+ * Returns the entire supported stream combinations for devices with Stream Use Case capability
+ */
+ @RequiresApi(api = Build.VERSION_CODES.TIRAMISU)
+ fun getStreamUseCaseSupportedCombinationList(): List<SurfaceCombination> {
+ return listOf<SurfaceCombination>(
+ // (PRIV, s1440p, PREVIEW_VIDEO_STILL)
+ SurfaceCombination().apply {
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.PRIV,
+ ConfigSize.s1440p,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL
+ .toLong()
+ )
+ )
+ },
+ // (YUV, s1440p, PREVIEW_VIDEO_STILL)
+ SurfaceCombination().apply {
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.YUV, ConfigSize.s1440p,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL
+ .toLong()
+ )
+ )
+ },
+ // (PRIV, RECORD, VIDEO_RECORD)
+ SurfaceCombination().apply {
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.PRIV,
+ ConfigSize.RECORD,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD.toLong()
+ )
+ )
+ },
+ // (YUV, RECORD, VIDEO_RECORD)
+ SurfaceCombination().apply {
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.YUV,
+ ConfigSize.RECORD,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD.toLong()
+ )
+ )
+ },
+ // (JPEG, MAXIMUM, STILL_CAPTURE)
+ SurfaceCombination().apply {
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.JPEG,
+ ConfigSize.MAXIMUM,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE.toLong()
+ )
+ )
+ },
+ // (YUV, MAXIMUM, STILL_CAPTURE)
+ SurfaceCombination().apply {
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.YUV,
+ ConfigSize.MAXIMUM,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE.toLong()
+ )
+ )
+ },
+ // (PRIV, PREVIEW, PREVIEW) + (JPEG, MAXIMUM, STILL_CAPTURE)
+ SurfaceCombination().apply {
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.PRIV,
+ ConfigSize.PREVIEW,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ )
+ )
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.JPEG,
+ ConfigSize.MAXIMUM,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE.toLong()
+ )
+ )
+ },
+ // (PRIV, PREVIEW, PREVIEW) + (YUV, MAXIMUM, STILL_CAPTURE)
+ SurfaceCombination().apply {
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.PRIV,
+ ConfigSize.PREVIEW,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ )
+ )
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.YUV,
+ ConfigSize.MAXIMUM,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE.toLong()
+ )
+ )
+ },
+ // (PRIV, PREVIEW, PREVIEW) + (PRIV, RECORD, VIDEO_RECORD)
+ SurfaceCombination().apply {
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.PRIV,
+ ConfigSize.PREVIEW,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ )
+ )
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.PRIV,
+ ConfigSize.RECORD,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD.toLong()
+ )
+ )
+ },
+ // (PRIV, PREVIEW, PREVIEW) + (YUV, RECORD, VIDEO_RECORD)
+ SurfaceCombination().apply {
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.PRIV,
+ ConfigSize.PREVIEW,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ )
+ )
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.YUV,
+ ConfigSize.RECORD,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD.toLong()
+ )
+ )
+ },
+ // (PRIV, PREVIEW, PREVIEW) + (YUV, PREVIEW, PREVIEW)
+ SurfaceCombination().apply {
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.PRIV,
+ ConfigSize.PREVIEW,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ )
+ )
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.YUV,
+ ConfigSize.PREVIEW,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ )
+ )
+ },
+ // (PRIV, PREVIEW, PREVIEW) + (PRIV, RECORD, VIDEO_RECORD) +
+ // (JPEG, RECORD, STILL_CAPTURE)
+ SurfaceCombination().apply {
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.PRIV,
+ ConfigSize.PREVIEW,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ )
+ )
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.PRIV,
+ ConfigSize.RECORD,
+ CameraMetadata.CONTROL_CAPTURE_INTENT_VIDEO_RECORD.toLong()
+ )
+ )
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.JPEG,
+ ConfigSize.RECORD,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE.toLong()
+ )
+ )
+ },
+ // (PRIV, PREVIEW, PREVIEW) + (YUV, RECORD, VIDEO_RECORD) +
+ // (JPEG, RECORD, STILL_CAPTURE)
+ SurfaceCombination().apply {
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.PRIV,
+ ConfigSize.PREVIEW,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ )
+ )
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.YUV,
+ ConfigSize.RECORD,
+ CameraMetadata.CONTROL_CAPTURE_INTENT_VIDEO_RECORD.toLong()
+ )
+ )
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.JPEG,
+ ConfigSize.RECORD,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE.toLong()
+ )
+ )
+ },
+ // (PRIV, PREVIEW, PREVIEW) + (YUV, PREVIEW, PREVIEW) + (JPEG, MAXIMUM, STILL_CAPTURE)
+ SurfaceCombination().apply {
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.PRIV,
+ ConfigSize.PREVIEW,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ )
+ )
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.YUV,
+ ConfigSize.PREVIEW,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ )
+ )
+ addSurfaceConfig(
+ SurfaceConfig.create(
+ ConfigType.JPEG,
+ ConfigSize.MAXIMUM,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE.toLong()
+ )
+ )
+ },
+ )
+ }
+
@JvmStatic
fun getPreviewStabilizationSupportedCombinationList(): List<SurfaceCombination> {
val combinationList: MutableList<SurfaceCombination> = ArrayList()
diff --git a/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/SessionConfigAdapter.kt b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/SessionConfigAdapter.kt
index 09ea465..ab945d4 100644
--- a/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/SessionConfigAdapter.kt
+++ b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/SessionConfigAdapter.kt
@@ -26,14 +26,15 @@
import androidx.camera.camera2.pipe.core.Log
import androidx.camera.camera2.pipe.core.Log.debug
import androidx.camera.camera2.pipe.integration.impl.Camera2ImplConfig
-import androidx.camera.camera2.pipe.integration.impl.STREAM_USE_CASE_OPTION
import androidx.camera.camera2.pipe.integration.impl.STREAM_USE_HINT_OPTION
+import androidx.camera.camera2.pipe.integration.internal.StreamUseCaseUtil
import androidx.camera.core.ImageAnalysis
import androidx.camera.core.ImageCapture
import androidx.camera.core.Preview
import androidx.camera.core.UseCase
import androidx.camera.core.impl.DeferrableSurface
import androidx.camera.core.impl.SessionConfig
+import androidx.camera.core.impl.UseCaseConfig
import androidx.camera.core.streamsharing.StreamSharing
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
@@ -48,10 +49,12 @@
) {
val surfaceToStreamUseCaseMap: Map<DeferrableSurface, Long> by lazy {
val sessionConfigs = mutableListOf<SessionConfig>()
+ val useCaseConfigs = mutableListOf<UseCaseConfig<*>>()
for (useCase in useCases) {
sessionConfigs.add(useCase.sessionConfig)
+ useCaseConfigs.add(useCase.currentConfig)
}
- getSurfaceToStreamUseCaseMapping(sessionConfigs, shouldSetStreamUseCaseByDefault = false)
+ getSurfaceToStreamUseCaseMapping(sessionConfigs, useCaseConfigs)
}
val surfaceToStreamUseHintMap: Map<DeferrableSurface, Long> by lazy {
val sessionConfigs = useCases.map { it.sessionConfig }
@@ -118,7 +121,7 @@
@VisibleForTesting
fun getSurfaceToStreamUseCaseMapping(
sessionConfigs: Collection<SessionConfig>,
- shouldSetStreamUseCaseByDefault: Boolean
+ useCaseConfigs: Collection<UseCaseConfig<*>>,
): Map<DeferrableSurface, Long> {
if (sessionConfigs.any { it.templateType == CameraDevice.TEMPLATE_ZERO_SHUTTER_LAG }) {
// If is ZSL, do not populate anything.
@@ -127,32 +130,12 @@
}
val mapping = mutableMapOf<DeferrableSurface, Long>()
- for (sessionConfig in sessionConfigs) {
- if (sessionConfig.templateType == CameraDevice.TEMPLATE_ZERO_SHUTTER_LAG) {
- // If is ZSL, stream use case is ignored.
- Log.info { "ZSL in populateSurfaceToStreamUseCaseMapping()" }
- return emptyMap()
- }
+ StreamUseCaseUtil.populateSurfaceToStreamUseCaseMapping(
+ sessionConfigs,
+ useCaseConfigs,
+ mapping
+ )
- for (surface in sessionConfig.surfaces) {
- if (sessionConfig.implementationOptions.containsOption(STREAM_USE_CASE_OPTION) &&
- sessionConfig.implementationOptions.retrieveOption(STREAM_USE_CASE_OPTION)
- != null
- ) {
- mapping[surface] =
- sessionConfig.implementationOptions
- .retrieveOption(STREAM_USE_CASE_OPTION)!!
- continue
- }
-
- if (shouldSetStreamUseCaseByDefault) {
- // TODO(b/266879290) This is currently gated out because of camera device
- // crashing due to unsupported stream useCase combinations.
- val streamUseCase = getStreamUseCaseForContainerClass(surface.containerClass)
- mapping[surface] = streamUseCase
- }
- }
- }
return mapping
}
diff --git a/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/SupportedSurfaceCombination.kt b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/SupportedSurfaceCombination.kt
index 63c187f..c33ecee 100644
--- a/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/SupportedSurfaceCombination.kt
+++ b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/SupportedSurfaceCombination.kt
@@ -41,6 +41,7 @@
import androidx.camera.camera2.pipe.integration.compat.workaround.TargetAspectRatio
import androidx.camera.camera2.pipe.integration.impl.DisplayInfoManager
import androidx.camera.camera2.pipe.integration.internal.DynamicRangeResolver
+import androidx.camera.camera2.pipe.integration.internal.StreamUseCaseUtil
import androidx.camera.core.DynamicRange
import androidx.camera.core.impl.AttachedSurfaceInfo
import androidx.camera.core.impl.CameraMode
@@ -90,6 +91,7 @@
?: CameraCharacteristics.CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES
private val concurrentSurfaceCombinations: MutableList<SurfaceCombination> = mutableListOf()
private val surfaceCombinations: MutableList<SurfaceCombination> = mutableListOf()
+ private val surfaceCombinationsStreamUseCase: MutableList<SurfaceCombination> = mutableListOf()
private val ultraHighSurfaceCombinations: MutableList<SurfaceCombination> = mutableListOf()
private val previewStabilizationSurfaceCombinations: MutableList<SurfaceCombination> =
mutableListOf()
@@ -99,6 +101,7 @@
private var isRawSupported = false
private var isBurstCaptureSupported = false
private var isConcurrentCameraModeSupported = false
+ private var isStreamUseCaseSupported = false
private var isUltraHighResolutionSensorSupported = false
private var isPreviewStabilizationSupported = false
internal lateinit var surfaceSizeDefinition: SurfaceSizeDefinition
@@ -130,6 +133,12 @@
if (isPreviewStabilizationSupported) {
generatePreviewStabilizationSupportedCombinationList()
}
+
+ isStreamUseCaseSupported = StreamUseCaseUtil.isStreamUseCaseSupported(cameraMetadata)
+ if (isStreamUseCaseSupported) {
+ generateStreamUseCaseSupportedCombinationList()
+ }
+
generateSurfaceSizeDefinition()
}
@@ -151,6 +160,24 @@
}
}
+ private fun getOrderedSupportedStreamUseCaseSurfaceConfigList(
+ featureSettings: FeatureSettings,
+ surfaceConfigList: List<SurfaceConfig?>?
+ ): List<SurfaceConfig>? {
+ if (!StreamUseCaseUtil.shouldUseStreamUseCase(featureSettings)) {
+ return null
+ }
+ for (surfaceCombination in surfaceCombinationsStreamUseCase) {
+ val orderedSurfaceConfigList = surfaceCombination.getOrderedSupportedSurfaceConfigList(
+ surfaceConfigList!!
+ )
+ if (orderedSurfaceConfigList != null) {
+ return orderedSurfaceConfigList
+ }
+ }
+ return null
+ }
+
/**
* Returns the supported surface combinations according to the specified feature
* settings.
@@ -244,8 +271,10 @@
newUseCaseConfigs, useCasesPriorityOrder
)
val requiredMaxBitDepth: Int = getRequiredMaxBitDepth(resolvedDynamicRanges)
- val featureSettings = FeatureSettings(cameraMode, requiredMaxBitDepth,
- isPreviewStabilizationOn)
+ val featureSettings = FeatureSettings(
+ cameraMode, requiredMaxBitDepth,
+ isPreviewStabilizationOn
+ )
require(
!(cameraMode != CameraMode.DEFAULT &&
requiredMaxBitDepth == DynamicRange.BIT_DEPTH_10_BIT)
@@ -268,38 +297,199 @@
)
}
- if (!checkSupported(featureSettings, surfaceConfigs)) {
- throw java.lang.IllegalArgumentException(
- "No supported surface combination is found for camera device - Id : " + cameraId +
- ". May be attempting to bind too many use cases. " + "Existing surfaces: " +
- attachedSurfaces + " New configs: " + newUseCaseConfigs
+ val containsZsl: Boolean = StreamUseCaseUtil.containsZslUseCase(
+ attachedSurfaces,
+ newUseCaseConfigs
+ )
+ var orderedSurfaceConfigListForStreamUseCase: List<SurfaceConfig>? =
+ if (isStreamUseCaseSupported && !containsZsl)
+ getOrderedSupportedStreamUseCaseSurfaceConfigList(
+ featureSettings,
+ surfaceConfigs
+ ) else null
+
+ val isSurfaceCombinationSupported = checkSupported(featureSettings, surfaceConfigs)
+
+ require(
+ !(orderedSurfaceConfigListForStreamUseCase == null &&
+ !isSurfaceCombinationSupported)
+ ) {
+ "No supported surface combination is found for camera device - Id : $cameraId. " +
+ "May be attempting to bind too many use cases. Existing surfaces: " +
+ "$attachedSurfaces. New configs: $newUseCaseConfigs."
+ }
+ // The two maps are used to keep track of the attachedSurfaceInfo or useCaseConfigs the
+ // surfaceConfigs are made from. They are populated in getSurfaceConfigListAndFpsCeiling().
+ // The keys are the position of their corresponding surfaceConfigs in the list. We can
+ // them map streamUseCases in orderedSurfaceConfigListForStreamUseCase, which is in the
+ // same order as surfaceConfigs list, to the original useCases to determine the
+ // captureTypes are correct.
+ val surfaceConfigIndexAttachedSurfaceInfoMap: MutableMap<Int, AttachedSurfaceInfo> =
+ mutableMapOf()
+ val surfaceConfigIndexUseCaseConfigMap: MutableMap<Int, UseCaseConfig<*>> = mutableMapOf()
+ val allPossibleSizeArrangements = getAllPossibleSizeArrangements(
+ getSupportedOutputSizesList(
+ newUseCaseConfigsSupportedSizeMap,
+ newUseCaseConfigs,
+ useCasesPriorityOrder
+ )
+ )
+
+ if (orderedSurfaceConfigListForStreamUseCase != null) {
+ orderedSurfaceConfigListForStreamUseCase = getOrderedSurfaceConfigListForStreamUseCase(
+ allPossibleSizeArrangements,
+ attachedSurfaces,
+ newUseCaseConfigs,
+ useCasesPriorityOrder,
+ featureSettings,
+ isSurfaceCombinationSupported,
+ surfaceConfigIndexAttachedSurfaceInfoMap,
+ surfaceConfigIndexUseCaseConfigMap
)
}
val targetFpsRange =
getTargetFpsRange(attachedSurfaces, newUseCaseConfigs, useCasesPriorityOrder)
val maxSupportedFps = getMaxSupportedFps(attachedSurfaces)
-
val bestSizesAndFps = findBestSizesAndFps(
- newUseCaseConfigsSupportedSizeMap,
+ allPossibleSizeArrangements,
attachedSurfaces,
newUseCaseConfigs,
maxSupportedFps,
useCasesPriorityOrder,
targetFpsRange,
- featureSettings
+ featureSettings,
+ orderedSurfaceConfigListForStreamUseCase
)
val suggestedStreamSpecMap = generateSuggestedStreamSpecMap(
- bestSizesAndFps.first,
+ bestSizesAndFps,
targetFpsRange,
- bestSizesAndFps.second,
newUseCaseConfigs,
useCasesPriorityOrder,
resolvedDynamicRanges,
)
+ val attachedSurfaceStreamSpecMap = mutableMapOf<AttachedSurfaceInfo, StreamSpec>()
- return Pair.create(suggestedStreamSpecMap, mapOf<AttachedSurfaceInfo, StreamSpec>())
+ populateStreamUseCaseIfSameSavedSizes(
+ bestSizesAndFps,
+ orderedSurfaceConfigListForStreamUseCase,
+ attachedSurfaces,
+ attachedSurfaceStreamSpecMap,
+ suggestedStreamSpecMap,
+ surfaceConfigIndexAttachedSurfaceInfoMap,
+ surfaceConfigIndexUseCaseConfigMap
+ )
+
+ return Pair.create(suggestedStreamSpecMap, attachedSurfaceStreamSpecMap)
+ }
+
+ /**
+ * Iterate through all possible size arrangement and returns a surfaceConfig list for stream
+ * use case. This list is ordered and the indices of its items are stored into
+ * surfaceConfigIndexAttachedSurfaceInfoMap and surfaceConfigIndexUseCaseConfigMap.
+ */
+ private fun getOrderedSurfaceConfigListForStreamUseCase(
+ allPossibleSizeArrangements: List<MutableList<Size>>,
+ attachedSurfaces: List<AttachedSurfaceInfo>,
+ newUseCaseConfigs: List<UseCaseConfig<*>>,
+ useCasesPriorityOrder: List<Int>,
+ featureSettings: FeatureSettings,
+ isSurfaceCombinationSupported: Boolean,
+ surfaceConfigIndexAttachedSurfaceInfoMap: MutableMap<Int, AttachedSurfaceInfo>,
+ surfaceConfigIndexUseCaseConfigMap: MutableMap<Int, UseCaseConfig<*>>
+ ): List<SurfaceConfig>? {
+ var orderedSurfaceConfigListForStreamUseCase: List<SurfaceConfig>? = null
+ // Check if any possible size arrangement is supported for stream use case.
+ for (possibleSizeList in allPossibleSizeArrangements) {
+ val surfaceConfigs = getSurfaceConfigList(
+ featureSettings.cameraMode,
+ attachedSurfaces, possibleSizeList, newUseCaseConfigs,
+ useCasesPriorityOrder,
+ surfaceConfigIndexAttachedSurfaceInfoMap,
+ surfaceConfigIndexUseCaseConfigMap
+ )
+ orderedSurfaceConfigListForStreamUseCase =
+ getOrderedSupportedStreamUseCaseSurfaceConfigList(
+ featureSettings,
+ surfaceConfigs
+ )
+ if (orderedSurfaceConfigListForStreamUseCase != null &&
+ !StreamUseCaseUtil.areCaptureTypesEligible(
+ surfaceConfigIndexAttachedSurfaceInfoMap,
+ surfaceConfigIndexUseCaseConfigMap,
+ orderedSurfaceConfigListForStreamUseCase
+ )
+ ) {
+ orderedSurfaceConfigListForStreamUseCase = null
+ }
+ if (orderedSurfaceConfigListForStreamUseCase != null) {
+ orderedSurfaceConfigListForStreamUseCase =
+ if (StreamUseCaseUtil.areStreamUseCasesAvailableForSurfaceConfigs(
+ cameraMetadata, orderedSurfaceConfigListForStreamUseCase
+ )
+ ) {
+ break
+ } else {
+ null
+ }
+ }
+ surfaceConfigIndexAttachedSurfaceInfoMap.clear()
+ surfaceConfigIndexUseCaseConfigMap.clear()
+ }
+
+ // We can terminate early if surface combination is not supported and none of the
+ // possible size arrangement supports stream use case either.
+ require(
+ !(orderedSurfaceConfigListForStreamUseCase == null &&
+ !isSurfaceCombinationSupported)
+ ) {
+ "No supported surface combination is found for camera device - Id : $cameraId. " +
+ "May be attempting to bind too many use cases. Existing surfaces: " +
+ "$attachedSurfaces. New configs: $newUseCaseConfigs."
+ }
+ return orderedSurfaceConfigListForStreamUseCase
+ }
+
+ /**
+ * If the saved max FPS and sizes are the same for non-streamUseCase and streamUseCase, populate
+ * stream use case values into the output streamSpecs in attachedSurfaceStreamSpecMap and
+ * suggestedStreamSpecMap.
+ */
+ private fun populateStreamUseCaseIfSameSavedSizes(
+ bestSizesAndMaxFps: BestSizesAndMaxFpsForConfigs,
+ orderedSurfaceConfigListForStreamUseCase: List<SurfaceConfig>?,
+ attachedSurfaces: List<AttachedSurfaceInfo>,
+ attachedSurfaceStreamSpecMap: MutableMap<AttachedSurfaceInfo, StreamSpec>,
+ suggestedStreamSpecMap: MutableMap<UseCaseConfig<*>, StreamSpec>,
+ surfaceConfigIndexAttachedSurfaceInfoMap: MutableMap<Int, AttachedSurfaceInfo>,
+ surfaceConfigIndexUseCaseConfigMap: MutableMap<Int, UseCaseConfig<*>>
+ ) {
+ // Only perform stream use case operations if the saved max FPS and sizes are the same
+ if (orderedSurfaceConfigListForStreamUseCase != null &&
+ bestSizesAndMaxFps.maxFps == bestSizesAndMaxFps.maxFpsForStreamUseCase &&
+ bestSizesAndMaxFps.bestSizes.size == bestSizesAndMaxFps.bestSizesForStreamUseCase!!.size
+ ) {
+ var hasDifferentSavedSizes =
+ bestSizesAndMaxFps.bestSizes.zip(bestSizesAndMaxFps.bestSizesForStreamUseCase)
+ .any { it.first != it.second }
+ if (!hasDifferentSavedSizes) {
+ val hasStreamUseCaseOverride: Boolean =
+ StreamUseCaseUtil.populateStreamUseCaseStreamSpecOptionWithInteropOverride(
+ cameraMetadata, attachedSurfaces, suggestedStreamSpecMap,
+ attachedSurfaceStreamSpecMap
+ )
+ if (!hasStreamUseCaseOverride) {
+ StreamUseCaseUtil
+ .populateStreamUseCaseStreamSpecOptionWithSupportedSurfaceConfigs(
+ suggestedStreamSpecMap, attachedSurfaceStreamSpecMap,
+ surfaceConfigIndexAttachedSurfaceInfoMap,
+ surfaceConfigIndexUseCaseConfigMap,
+ orderedSurfaceConfigListForStreamUseCase
+ )
+ }
+ }
+ }
}
private fun getSupportedOutputSizesList(
@@ -359,30 +549,29 @@
}
private fun findBestSizesAndFps(
- newUseCaseConfigsSupportedSizeMap: Map<UseCaseConfig<*>, List<Size>>,
+ allPossibleSizeArrangements: List<MutableList<Size>>,
attachedSurfaces: List<AttachedSurfaceInfo>,
newUseCaseConfigs: List<UseCaseConfig<*>>,
existingSurfaceFrameRateCeiling: Int,
useCasesPriorityOrder: List<Int>,
targetFrameRateForConfig: Range<Int>?,
- featureSettings: FeatureSettings
- ): Pair<List<Size>, Int> {
+ featureSettings: FeatureSettings,
+ orderedSurfaceConfigListForStreamUseCase: List<SurfaceConfig>?
+ ): BestSizesAndMaxFpsForConfigs {
var bestSizes: List<Size>? = null
- var bestConfigMaxFps = Int.MAX_VALUE
- val allPossibleSizeArrangements = getAllPossibleSizeArrangements(
- getSupportedOutputSizesList(
- newUseCaseConfigsSupportedSizeMap,
- newUseCaseConfigs,
- useCasesPriorityOrder
- )
- )
+ var maxFps = Int.MAX_VALUE
+ var bestSizesForStreamUseCase: List<Size>? = null
+ var maxFpsForStreamUseCase = Int.MAX_VALUE
+ var supportedSizesFound = false
+ var supportedSizesForStreamUseCaseFound = false
+
// Transform use cases to SurfaceConfig list and find the first (best) workable combination
for (possibleSizeList in allPossibleSizeArrangements) {
// Attach SurfaceConfig of original use cases since it will impact the new use cases
val surfaceConfigList = getSurfaceConfigList(
featureSettings.cameraMode,
attachedSurfaces, possibleSizeList, newUseCaseConfigs,
- useCasesPriorityOrder
+ useCasesPriorityOrder, null, null
)
val currentConfigFrameRateCeiling = getCurrentConfigFrameRateCeiling(
possibleSizeList, newUseCaseConfigs,
@@ -401,24 +590,57 @@
}
}
+ // Find the same possible size arrangement that is supported by stream use case again
+ // if we found one earlier.
+
// only change the saved config if you get another that has a better max fps
- if (checkSupported(featureSettings, surfaceConfigList)) {
- // if we have a configuration where the max fps is acceptable for our target, break
- if (isConfigFrameRateAcceptable) {
- bestConfigMaxFps = currentConfigFrameRateCeiling
- bestSizes = possibleSizeList
- break
- }
+ if (!supportedSizesFound && checkSupported(featureSettings, surfaceConfigList)) {
// if the config is supported by the device but doesn't meet the target frame rate,
// save the config
- if (bestConfigMaxFps == Int.MAX_VALUE) {
- bestConfigMaxFps = currentConfigFrameRateCeiling
+ if (maxFps == Int.MAX_VALUE) {
+ maxFps = currentConfigFrameRateCeiling
bestSizes = possibleSizeList
- } else if (bestConfigMaxFps < currentConfigFrameRateCeiling) {
+ } else if (maxFps < currentConfigFrameRateCeiling) {
// only change the saved config if the max fps is better
- bestConfigMaxFps = currentConfigFrameRateCeiling
+ maxFps = currentConfigFrameRateCeiling
bestSizes = possibleSizeList
}
+
+ // if we have a configuration where the max fps is acceptable for our target, break
+ if (isConfigFrameRateAcceptable) {
+ maxFps = currentConfigFrameRateCeiling
+ bestSizes = possibleSizeList
+ supportedSizesFound = true
+ if (supportedSizesForStreamUseCaseFound) {
+ break
+ }
+ }
+ }
+ // If we already know that there is a supported surface combination from the stream
+ // use case table, keep an independent tracking on the saved sizes and max FPS. Only
+ // use stream use case if the save sizes for the normal case and for stream use case
+ // are the same.
+ if (orderedSurfaceConfigListForStreamUseCase != null &&
+ !supportedSizesForStreamUseCaseFound &&
+ getOrderedSupportedStreamUseCaseSurfaceConfigList(
+ featureSettings, surfaceConfigList
+ ) != null
+ ) {
+ if (maxFpsForStreamUseCase == Int.MAX_VALUE) {
+ maxFpsForStreamUseCase = currentConfigFrameRateCeiling
+ bestSizesForStreamUseCase = possibleSizeList
+ } else if (maxFpsForStreamUseCase < currentConfigFrameRateCeiling) {
+ maxFpsForStreamUseCase = currentConfigFrameRateCeiling
+ bestSizesForStreamUseCase = possibleSizeList
+ }
+ if (isConfigFrameRateAcceptable) {
+ maxFpsForStreamUseCase = currentConfigFrameRateCeiling
+ bestSizesForStreamUseCase = possibleSizeList
+ supportedSizesForStreamUseCaseFound = true
+ if (supportedSizesFound) {
+ break
+ }
+ }
}
}
require(bestSizes != null) {
@@ -427,33 +649,43 @@
"May be the specified resolution is too large and not supported. " +
"Existing surfaces: $attachedSurfaces. New configs: $newUseCaseConfigs."
}
- return Pair(bestSizes, bestConfigMaxFps)
+ return BestSizesAndMaxFpsForConfigs(
+ bestSizes,
+ bestSizesForStreamUseCase,
+ maxFps,
+ maxFpsForStreamUseCase
+ )
}
private fun generateSuggestedStreamSpecMap(
- bestSizes: List<Size>,
+ bestSizesAndMaxFps: BestSizesAndMaxFpsForConfigs,
targetFpsRange: Range<Int>?,
- bestConfigMaxFps: Int,
newUseCaseConfigs: List<UseCaseConfig<*>>,
useCasesPriorityOrder: List<Int>,
resolvedDynamicRanges: Map<UseCaseConfig<*>, DynamicRange>,
- ): Map<UseCaseConfig<*>, StreamSpec> {
+ ): MutableMap<UseCaseConfig<*>, StreamSpec> {
val suggestedStreamSpecMap = mutableMapOf<UseCaseConfig<*>, StreamSpec>()
var targetFrameRateForDevice: Range<Int>? = null
if (targetFpsRange != null) {
targetFrameRateForDevice = getClosestSupportedDeviceFrameRate(
targetFpsRange,
- bestConfigMaxFps
+ bestSizesAndMaxFps.maxFps
)
}
for ((index, useCaseConfig) in newUseCaseConfigs.withIndex()) {
val resolutionForUseCase =
- bestSizes[
+ bestSizesAndMaxFps.bestSizes[
useCasesPriorityOrder.indexOf(index)]
val streamSpecBuilder = StreamSpec.builder(resolutionForUseCase)
.setDynamicRange(
checkNotNull(resolvedDynamicRanges[useCaseConfig])
)
+ .setImplementationOptions(
+ StreamUseCaseUtil.getStreamSpecImplementationOptions(
+ useCaseConfig
+ )
+ )
+
if (targetFrameRateForDevice != null) {
streamSpecBuilder.setExpectedFrameRateRange(targetFrameRateForDevice)
}
@@ -479,10 +711,16 @@
possibleSizeList: List<Size>,
newUseCaseConfigs: List<UseCaseConfig<*>>,
useCasesPriorityOrder: List<Int>,
- ): List<SurfaceConfig> {
+ surfaceConfigIndexAttachedSurfaceInfoMap: MutableMap<Int, AttachedSurfaceInfo>?,
+ surfaceConfigIndexUseCaseConfigMap: MutableMap<Int, UseCaseConfig<*>>?
+ ): MutableList<SurfaceConfig> {
val surfaceConfigList: MutableList<SurfaceConfig> = mutableListOf()
for (attachedSurfaceInfo in attachedSurfaces) {
surfaceConfigList.add(attachedSurfaceInfo.surfaceConfig)
+ if (surfaceConfigIndexAttachedSurfaceInfoMap != null) {
+ surfaceConfigIndexAttachedSurfaceInfoMap[surfaceConfigList.size - 1] =
+ attachedSurfaceInfo
+ }
}
// Attach SurfaceConfig of new use cases
@@ -497,6 +735,9 @@
getUpdatedSurfaceSizeDefinitionByFormat(imageFormat)
)
surfaceConfigList.add(surfaceConfig)
+ if (surfaceConfigIndexUseCaseConfigMap != null) {
+ surfaceConfigIndexUseCaseConfigMap[surfaceConfigList.size - 1] = newUseCase
+ }
}
return surfaceConfigList
}
@@ -842,11 +1083,13 @@
// Preview Stabilization
val availablePreviewStabilizationModes: IntArray? =
cameraMetadata.get<IntArray>(
- CameraCharacteristics.CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES)
+ CameraCharacteristics.CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES
+ )
availablePreviewStabilizationModes?.apply {
isPreviewStabilizationSupported = contains(
- CameraCharacteristics.CONTROL_VIDEO_STABILIZATION_MODE_PREVIEW_STABILIZATION)
+ CameraCharacteristics.CONTROL_VIDEO_STABILIZATION_MODE_PREVIEW_STABILIZATION
+ )
}
}
@@ -889,6 +1132,14 @@
)
}
+ private fun generateStreamUseCaseSupportedCombinationList() {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
+ surfaceCombinationsStreamUseCase.addAll(
+ GuaranteedConfigurationsUtil.getStreamUseCaseSupportedCombinationList()
+ )
+ }
+ }
+
/**
* Generation the size definition for VGA, s720p, PREVIEW, s1440p, RECORD, MAXIMUM and
* ULTRA_MAXIMUM.
@@ -1224,4 +1475,11 @@
val requiredMaxBitDepth: Int,
val isPreviewStabilizationOn: Boolean = false
)
+
+ data class BestSizesAndMaxFpsForConfigs(
+ val bestSizes: List<Size>,
+ val bestSizesForStreamUseCase: List<Size>?,
+ val maxFps: Int,
+ val maxFpsForStreamUseCase: Int
+ )
}
diff --git a/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/impl/MeteringRepeating.kt b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/impl/MeteringRepeating.kt
index 116a504..df93eea 100644
--- a/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/impl/MeteringRepeating.kt
+++ b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/impl/MeteringRepeating.kt
@@ -43,8 +43,10 @@
import androidx.camera.core.impl.SessionConfig
import androidx.camera.core.impl.StreamSpec
import androidx.camera.core.impl.UseCaseConfig
+import androidx.camera.core.impl.UseCaseConfig.OPTION_CAPTURE_TYPE
import androidx.camera.core.impl.UseCaseConfig.OPTION_SESSION_CONFIG_UNPACKER
import androidx.camera.core.impl.UseCaseConfigFactory
+import androidx.camera.core.impl.UseCaseConfigFactory.CaptureType
import androidx.camera.core.impl.utils.executor.CameraXExecutors
import kotlin.math.min
@@ -191,6 +193,7 @@
OPTION_SESSION_CONFIG_UNPACKER,
CameraUseCaseAdapter.DefaultSessionOptionsUnpacker
)
+ insertOption(OPTION_CAPTURE_TYPE, CaptureType.METERING_REPEATING)
}
override fun getCaptureType() = UseCaseConfigFactory.CaptureType.METERING_REPEATING
diff --git a/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/internal/StreamUseCaseUtil.kt b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/internal/StreamUseCaseUtil.kt
new file mode 100644
index 0000000..fb81b10
--- /dev/null
+++ b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/internal/StreamUseCaseUtil.kt
@@ -0,0 +1,629 @@
+/*
+ * 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.camera2.pipe.integration.internal
+
+import android.hardware.camera2.CameraCharacteristics
+import android.hardware.camera2.CameraDevice
+import android.hardware.camera2.CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT
+import android.hardware.camera2.CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW
+import android.hardware.camera2.CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL
+import android.hardware.camera2.CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE
+import android.hardware.camera2.CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD
+import android.os.Build
+import androidx.annotation.RequiresApi
+import androidx.annotation.VisibleForTesting
+import androidx.camera.camera2.pipe.CameraMetadata
+import androidx.camera.camera2.pipe.core.Log
+import androidx.camera.camera2.pipe.integration.adapter.SupportedSurfaceCombination
+import androidx.camera.camera2.pipe.integration.impl.Camera2ImplConfig
+import androidx.camera.camera2.pipe.integration.impl.STREAM_USE_CASE_OPTION
+import androidx.camera.core.DynamicRange
+import androidx.camera.core.ExperimentalZeroShutterLag
+import androidx.camera.core.ImageCapture
+import androidx.camera.core.ImageCapture.CaptureMode
+import androidx.camera.core.impl.AttachedSurfaceInfo
+import androidx.camera.core.impl.CameraMode
+import androidx.camera.core.impl.Config
+import androidx.camera.core.impl.DeferrableSurface
+import androidx.camera.core.impl.ImageCaptureConfig
+import androidx.camera.core.impl.MutableOptionsBundle
+import androidx.camera.core.impl.SessionConfig
+import androidx.camera.core.impl.StreamSpec
+import androidx.camera.core.impl.SurfaceConfig
+import androidx.camera.core.impl.UseCaseConfig
+import androidx.camera.core.impl.UseCaseConfigFactory.CaptureType
+import androidx.camera.core.streamsharing.StreamSharingConfig
+
+@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
+object StreamUseCaseUtil {
+
+ @VisibleForTesting
+ val STREAM_USE_CASE_STREAM_SPEC_OPTION: Config.Option<Long> = Config.Option.create(
+ "camera2.streamSpec.streamUseCase",
+ Long::class.javaPrimitiveType!!
+ )
+ private val STREAM_USE_CASE_TO_ELIGIBLE_CAPTURE_TYPES_MAP:
+ Map<Long, Set<CaptureType>> = buildMap {
+ if (Build.VERSION.SDK_INT >= 33) {
+ put(
+ SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL.toLong(),
+ setOf(CaptureType.PREVIEW)
+ )
+ put(
+ SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong(),
+ setOf(CaptureType.PREVIEW, CaptureType.IMAGE_ANALYSIS)
+ )
+ put(
+ SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE.toLong(),
+ setOf(CaptureType.IMAGE_CAPTURE)
+ )
+ put(
+ SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD.toLong(),
+ setOf(CaptureType.VIDEO_CAPTURE)
+ )
+ }
+ }
+
+ private val STREAM_USE_CASE_TO_ELIGIBLE_STREAM_SHARING_CHILDREN_TYPES_MAP:
+ Map<Long, Set<CaptureType>> = buildMap {
+ if (Build.VERSION.SDK_INT >= 33) {
+ put(
+ SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL.toLong(),
+ setOf(CaptureType.PREVIEW, CaptureType.IMAGE_CAPTURE, CaptureType.VIDEO_CAPTURE)
+ )
+ put(
+ SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD.toLong(),
+ setOf(CaptureType.PREVIEW, CaptureType.VIDEO_CAPTURE)
+ )
+ }
+ }
+
+ /**
+ * Populates the mapping between surfaces of a capture session and the Stream Use Case of their
+ * associated stream.
+ *
+ * @param sessionConfigs collection of all session configs for this capture session
+ * @param streamUseCaseMap the mapping between surfaces and Stream Use Case flag
+ */
+ fun populateSurfaceToStreamUseCaseMapping(
+ sessionConfigs: Collection<SessionConfig>,
+ useCaseConfigs: Collection<UseCaseConfig<*>>,
+ streamUseCaseMap: MutableMap<DeferrableSurface, Long>
+ ) {
+ var position = 0
+ var hasStreamUseCase = false
+ val useCaseConfigArrayList = ArrayList(useCaseConfigs)
+ for (sessionConfig: SessionConfig in sessionConfigs) {
+ if (sessionConfig.implementationOptions.containsOption(
+ STREAM_USE_CASE_STREAM_SPEC_OPTION
+ ) && sessionConfig.surfaces.size != 1
+ ) {
+ Log.error {
+ "StreamUseCaseUtil: SessionConfig has stream use case but also contains " +
+ "${sessionConfig.surfaces.size} surfaces, " +
+ "abort populateSurfaceToStreamUseCaseMapping()."
+ }
+ return
+ }
+ if (sessionConfig.implementationOptions.containsOption(
+ STREAM_USE_CASE_STREAM_SPEC_OPTION
+ )
+ ) {
+ hasStreamUseCase = true
+ break
+ }
+ }
+ if (hasStreamUseCase) {
+ for (sessionConfig: SessionConfig in sessionConfigs) {
+ if ((useCaseConfigArrayList[position].captureType
+ == CaptureType.METERING_REPEATING)
+ ) {
+ // MeteringRepeating is attached after the StreamUseCase population logic and
+ // therefore won't have the StreamUseCase option. It should always have
+ // SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW
+ streamUseCaseMap[sessionConfig.surfaces[0]] =
+ SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ } else if (sessionConfig.implementationOptions.containsOption(
+ STREAM_USE_CASE_STREAM_SPEC_OPTION
+ )
+ ) {
+ streamUseCaseMap[sessionConfig.surfaces[0]] =
+ sessionConfig.implementationOptions.retrieveOption(
+ STREAM_USE_CASE_STREAM_SPEC_OPTION
+ )!!
+ }
+ position++
+ }
+ }
+ }
+
+ /**
+ * Populate all implementation options needed to determine the StreamUseCase option in the
+ * StreamSpec for this UseCaseConfig
+ */
+ fun getStreamSpecImplementationOptions(
+ useCaseConfig: UseCaseConfig<*>
+ ): Camera2ImplConfig {
+ val optionsBundle = MutableOptionsBundle.create()
+ if (useCaseConfig.containsOption(STREAM_USE_CASE_OPTION)) {
+ optionsBundle.insertOption(
+ STREAM_USE_CASE_OPTION,
+ useCaseConfig.retrieveOption(STREAM_USE_CASE_OPTION)
+ )
+ }
+ if (useCaseConfig.containsOption(UseCaseConfig.OPTION_ZSL_DISABLED)) {
+ optionsBundle.insertOption(
+ UseCaseConfig.OPTION_ZSL_DISABLED,
+ useCaseConfig.retrieveOption(UseCaseConfig.OPTION_ZSL_DISABLED)
+ )
+ }
+ if (useCaseConfig.containsOption(ImageCaptureConfig.OPTION_IMAGE_CAPTURE_MODE)) {
+ optionsBundle.insertOption(
+ ImageCaptureConfig.OPTION_IMAGE_CAPTURE_MODE,
+ useCaseConfig
+ .retrieveOption(ImageCaptureConfig.OPTION_IMAGE_CAPTURE_MODE)
+ )
+ }
+ if (useCaseConfig.containsOption(UseCaseConfig.OPTION_INPUT_FORMAT)) {
+ optionsBundle.insertOption(
+ UseCaseConfig.OPTION_INPUT_FORMAT,
+ useCaseConfig
+ .retrieveOption(UseCaseConfig.OPTION_INPUT_FORMAT)
+ )
+ }
+ return Camera2ImplConfig(optionsBundle)
+ }
+
+ /**
+ * Return true if the given camera characteristics support stream use case
+ */
+ fun isStreamUseCaseSupported(
+ cameraMetadata: CameraMetadata
+ ): Boolean {
+ if (Build.VERSION.SDK_INT < 33) {
+ return false
+ }
+ val availableStreamUseCases: LongArray? =
+ cameraMetadata[CameraCharacteristics.SCALER_AVAILABLE_STREAM_USE_CASES]
+ return !(availableStreamUseCases == null || availableStreamUseCases.isEmpty())
+ }
+
+ /**
+ * Return true if the given feature settings is appropriate for stream use case usage.
+ */
+ fun shouldUseStreamUseCase(
+ featureSettings: SupportedSurfaceCombination.FeatureSettings
+ ): Boolean {
+ return (featureSettings.cameraMode == CameraMode.DEFAULT &&
+ featureSettings.requiredMaxBitDepth == DynamicRange.BIT_DEPTH_8_BIT)
+ }
+
+ /**
+ * Populate the [STREAM_USE_CASE_STREAM_SPEC_OPTION] option in StreamSpecs for both
+ * existing UseCases and new UseCases to be attached. This option will be written into the
+ * session configurations of the UseCases. When creating a new capture session during
+ * downstream, it will be used to set the StreamUseCase flag via
+ * [android.hardware.camera2.params.OutputConfiguration.setStreamUseCase]
+ *
+ * @param cameraMetadata the camera characteristics of the device
+ * @param attachedSurfaces surface info of the already attached use cases
+ * @param suggestedStreamSpecMap the UseCaseConfig-to-StreamSpec map for new use cases
+ * @param attachedSurfaceStreamSpecMap the SurfaceInfo-to-StreamSpec map for attached use cases
+ * whose StreamSpecs needs to be updated
+ * @return true if StreamSpec options are populated. False if not.
+ */
+ fun populateStreamUseCaseStreamSpecOptionWithInteropOverride(
+ cameraMetadata: CameraMetadata,
+ attachedSurfaces: List<AttachedSurfaceInfo>,
+ suggestedStreamSpecMap: MutableMap<UseCaseConfig<*>, StreamSpec>,
+ attachedSurfaceStreamSpecMap: MutableMap<AttachedSurfaceInfo, StreamSpec>
+ ): Boolean {
+ if (Build.VERSION.SDK_INT < 33) {
+ return false
+ }
+ val newUseCaseConfigs: List<UseCaseConfig<*>> =
+ java.util.ArrayList(suggestedStreamSpecMap.keys)
+ // All AttachedSurfaceInfo should have implementation options
+ for (attachedSurfaceInfo in attachedSurfaces) {
+ checkNotNull(attachedSurfaceInfo.implementationOptions)
+ }
+ // All StreamSpecs in the map should have implementation options
+ for (useCaseConfig in newUseCaseConfigs) {
+ checkNotNull(
+ checkNotNull(
+ suggestedStreamSpecMap[useCaseConfig]
+ ).implementationOptions
+ )
+ }
+ val availableStreamUseCases: LongArray? =
+ cameraMetadata[CameraCharacteristics.SCALER_AVAILABLE_STREAM_USE_CASES]
+ if (availableStreamUseCases == null || availableStreamUseCases.isEmpty()) {
+ return false
+ }
+ val availableStreamUseCaseSet: MutableSet<Long> = HashSet()
+ for (availableStreamUseCase in availableStreamUseCases) {
+ availableStreamUseCaseSet.add(availableStreamUseCase)
+ }
+ if (isValidCamera2InteropOverride(
+ attachedSurfaces, newUseCaseConfigs,
+ availableStreamUseCaseSet
+ )
+ ) {
+ for (attachedSurfaceInfo in attachedSurfaces) {
+ val oldImplementationOptions = attachedSurfaceInfo.implementationOptions
+ getUpdatedImplementationOptionsWithUseCaseStreamSpecOption(
+ oldImplementationOptions!!,
+ oldImplementationOptions.retrieveOption(STREAM_USE_CASE_OPTION)
+ )?.also {
+ attachedSurfaceStreamSpecMap[attachedSurfaceInfo] =
+ attachedSurfaceInfo.toStreamSpec(it)
+ }
+ }
+ for (newUseCaseConfig in newUseCaseConfigs) {
+ val oldStreamSpec = suggestedStreamSpecMap[newUseCaseConfig]
+ val oldImplementationOptions = oldStreamSpec!!.implementationOptions
+ getUpdatedImplementationOptionsWithUseCaseStreamSpecOption(
+ oldImplementationOptions!!,
+ oldImplementationOptions.retrieveOption(STREAM_USE_CASE_OPTION)
+ )?.also {
+ suggestedStreamSpecMap[newUseCaseConfig] =
+ oldStreamSpec.toBuilder().setImplementationOptions(it).build()
+ }
+ }
+ return true
+ }
+ return false
+ }
+
+ /**
+ * Return true if the stream use cases in the given surface configurations are available for
+ * the device.
+ */
+ fun areStreamUseCasesAvailableForSurfaceConfigs(
+ cameraMetadata: CameraMetadata,
+ surfaceConfigs: List<SurfaceConfig>
+ ): Boolean {
+ if (Build.VERSION.SDK_INT < 33) {
+ return false
+ }
+ val availableStreamUseCases: LongArray? =
+ cameraMetadata[CameraCharacteristics.SCALER_AVAILABLE_STREAM_USE_CASES]
+ if (availableStreamUseCases == null || availableStreamUseCases.isEmpty()) {
+ return false
+ }
+ val availableStreamUseCaseSet: MutableSet<Long> = java.util.HashSet()
+ for (availableStreamUseCase in availableStreamUseCases) {
+ availableStreamUseCaseSet.add(availableStreamUseCase)
+ }
+ for (surfaceConfig in surfaceConfigs) {
+ if (!availableStreamUseCaseSet.contains(surfaceConfig.streamUseCase)) {
+ return false
+ }
+ }
+ return true
+ }
+
+ /**
+ * Return true if the given capture type and stream use case are a eligible pair. If the
+ * given captureType is STREAM_SHARING, checks the streamSharingTypes, which are the capture
+ * types of the children, are eligible with the stream use case.
+ */
+ private fun isEligibleCaptureType(
+ captureType: CaptureType,
+ streamUseCase: Long,
+ streamSharingTypes: List<CaptureType>
+ ): Boolean {
+ if (Build.VERSION.SDK_INT < 33) {
+ return false
+ }
+ return if (captureType == CaptureType.STREAM_SHARING) {
+ if (!STREAM_USE_CASE_TO_ELIGIBLE_STREAM_SHARING_CHILDREN_TYPES_MAP.containsKey(
+ streamUseCase
+ )
+ ) {
+ return false
+ }
+ val captureTypes: Set<CaptureType> =
+ STREAM_USE_CASE_TO_ELIGIBLE_STREAM_SHARING_CHILDREN_TYPES_MAP[streamUseCase]!!
+ if (streamSharingTypes.size != captureTypes.size) {
+ return false
+ }
+ for (childType in streamSharingTypes) {
+ if (!captureTypes.contains(childType)) {
+ return false
+ }
+ }
+ true
+ } else {
+ STREAM_USE_CASE_TO_ELIGIBLE_CAPTURE_TYPES_MAP.containsKey(streamUseCase) &&
+ STREAM_USE_CASE_TO_ELIGIBLE_CAPTURE_TYPES_MAP[streamUseCase]!!.contains(
+ captureType
+ )
+ }
+ }
+
+ /**
+ * Return true if the stream use cases contained in surfaceConfigsWithStreamUseCases all have
+ * eligible capture type pairing with the use cases that these surfaceConfigs are constructed
+ * from.
+ *
+ * @param surfaceConfigIndexAttachedSurfaceInfoMap mapping between an surfaceConfig's index
+ * in the list and the attachedSurfaceInfo it
+ * is constructed from
+ * @param surfaceConfigIndexUseCaseConfigMap mapping between an surfaceConfig's index
+ * in the list and the useCaseConfig it is
+ * constructed from
+ * @param surfaceConfigsWithStreamUseCase the supported surfaceConfigs that contains
+ * accurate streamUseCases
+ */
+ fun areCaptureTypesEligible(
+ surfaceConfigIndexAttachedSurfaceInfoMap: Map<Int, AttachedSurfaceInfo?>,
+ surfaceConfigIndexUseCaseConfigMap: Map<Int, UseCaseConfig<*>>,
+ surfaceConfigsWithStreamUseCase: List<SurfaceConfig>
+ ): Boolean {
+ for (i in surfaceConfigsWithStreamUseCase.indices) {
+ // Verify that the use case has the eligible capture type the given stream use case.
+ val streamUseCase = surfaceConfigsWithStreamUseCase[i].streamUseCase
+ if (surfaceConfigIndexAttachedSurfaceInfoMap.containsKey(i)) {
+ val attachedSurfaceInfo = surfaceConfigIndexAttachedSurfaceInfoMap[i]
+ if (!isEligibleCaptureType(
+ if (attachedSurfaceInfo!!.captureTypes.size == 1)
+ attachedSurfaceInfo.captureTypes[0] else CaptureType.STREAM_SHARING,
+ streamUseCase,
+ attachedSurfaceInfo.captureTypes
+ )
+ ) {
+ return false
+ }
+ } else if (surfaceConfigIndexUseCaseConfigMap.containsKey(i)) {
+ val newUseCaseConfig = surfaceConfigIndexUseCaseConfigMap[i]!!
+ if (!isEligibleCaptureType(
+ newUseCaseConfig.captureType, streamUseCase,
+ if (newUseCaseConfig.captureType
+ == CaptureType.STREAM_SHARING
+ ) (newUseCaseConfig as StreamSharingConfig).captureTypes else emptyList()
+ )
+ ) {
+ return false
+ }
+ } else {
+ throw AssertionError("SurfaceConfig does not map to any use case")
+ }
+ }
+ return true
+ }
+
+ /**
+ * @param suggestedStreamSpecMap mapping between useCaseConfig and its
+ * streamSpecs
+ * @param attachedSurfaceStreamSpecMap mapping between attachedSurfaceInfo and its
+ * streamSpecs that contains streamUseCases.
+ * All streamSpecs in this map has
+ * streamUseCases
+ * @param surfaceConfigIndexAttachedSurfaceInfoMap mapping between an surfaceConfig's index
+ * in the list and the
+ * attachedSurfaceInfo it
+ * is constructed from
+ * @param surfaceConfigIndexUseCaseConfigMap mapping between an surfaceConfig's
+ * index in the list and the useCaseConfig
+ * it is constructed from
+ * @param surfaceConfigsWithStreamUseCase the supported surfaceConfigs that contains
+ * accurate streamUseCases
+ */
+ fun populateStreamUseCaseStreamSpecOptionWithSupportedSurfaceConfigs(
+ suggestedStreamSpecMap: MutableMap<UseCaseConfig<*>, StreamSpec>,
+ attachedSurfaceStreamSpecMap: MutableMap<AttachedSurfaceInfo, StreamSpec>,
+ surfaceConfigIndexAttachedSurfaceInfoMap: Map<Int, AttachedSurfaceInfo>,
+ surfaceConfigIndexUseCaseConfigMap: Map<Int, UseCaseConfig<*>>,
+ surfaceConfigsWithStreamUseCase: List<SurfaceConfig>
+ ) {
+ // Populate StreamSpecs with stream use cases.
+ for (i in surfaceConfigsWithStreamUseCase.indices) {
+ val streamUseCase = surfaceConfigsWithStreamUseCase[i].streamUseCase
+ if (surfaceConfigIndexAttachedSurfaceInfoMap.containsKey(i)) {
+ val attachedSurfaceInfo = surfaceConfigIndexAttachedSurfaceInfoMap[i]
+ val oldImplementationOptions = attachedSurfaceInfo!!.implementationOptions
+ val newImplementationOptions: Config? =
+ getUpdatedImplementationOptionsWithUseCaseStreamSpecOption(
+ oldImplementationOptions!!, streamUseCase
+ )
+ if (newImplementationOptions != null) {
+ attachedSurfaceStreamSpecMap[attachedSurfaceInfo] =
+ attachedSurfaceInfo.toStreamSpec(newImplementationOptions)
+ }
+ } else if (surfaceConfigIndexUseCaseConfigMap.containsKey(i)) {
+ val newUseCaseConfig: UseCaseConfig<*> = surfaceConfigIndexUseCaseConfigMap[i]!!
+ val oldStreamSpec = suggestedStreamSpecMap[newUseCaseConfig]
+ val oldImplementationOptions = oldStreamSpec!!.implementationOptions
+ val newImplementationOptions: Config? =
+ getUpdatedImplementationOptionsWithUseCaseStreamSpecOption(
+ oldImplementationOptions!!, streamUseCase
+ )
+ if (newImplementationOptions != null) {
+ val newStreamSpec = oldStreamSpec.toBuilder().setImplementationOptions(
+ newImplementationOptions
+ ).build()
+ suggestedStreamSpecMap[newUseCaseConfig] = newStreamSpec
+ }
+ } else {
+ throw AssertionError("SurfaceConfig does not map to any use case")
+ }
+ }
+ }
+
+ /**
+ * Given an old options, return a new option with stream use case stream spec option inserted
+ */
+ private fun getUpdatedImplementationOptionsWithUseCaseStreamSpecOption(
+ oldImplementationOptions: Config,
+ streamUseCase: Long?
+ ): Config? {
+ if (oldImplementationOptions.containsOption(STREAM_USE_CASE_STREAM_SPEC_OPTION) &&
+ oldImplementationOptions.retrieveOption(STREAM_USE_CASE_STREAM_SPEC_OPTION) ==
+ streamUseCase
+ ) {
+ // The old options already has the same stream use case. No need to update
+ return null
+ }
+ val optionsBundle = MutableOptionsBundle.from(oldImplementationOptions)
+ optionsBundle.insertOption(STREAM_USE_CASE_STREAM_SPEC_OPTION, streamUseCase)
+ return Camera2ImplConfig(optionsBundle)
+ }
+
+ /**
+ * Return true if any one of the existing or new UseCases is ZSL.
+ */
+ fun containsZslUseCase(
+ attachedSurfaces: List<AttachedSurfaceInfo>,
+ newUseCaseConfigs: List<UseCaseConfig<*>>
+ ): Boolean {
+ for (attachedSurfaceInfo: AttachedSurfaceInfo in attachedSurfaces) {
+ val captureTypes = attachedSurfaceInfo.captureTypes
+ val captureType = captureTypes[0]
+ if (isZslUseCase(
+ attachedSurfaceInfo.implementationOptions!!,
+ captureType
+ )
+ ) {
+ return true
+ }
+ }
+ for (useCaseConfig: UseCaseConfig<*> in newUseCaseConfigs) {
+ if (isZslUseCase(useCaseConfig, useCaseConfig.captureType)) {
+ return true
+ }
+ }
+ return false
+ }
+
+ /**
+ * Check whether a UseCase is ZSL.
+ */
+ private fun isZslUseCase(
+ config: Config,
+ captureType: CaptureType
+ ): Boolean {
+ if (config.retrieveOption(UseCaseConfig.OPTION_ZSL_DISABLED, false)!!) {
+ return false
+ }
+ // Skip if capture mode doesn't exist in the options
+ if (!config.containsOption(ImageCaptureConfig.OPTION_IMAGE_CAPTURE_MODE)) {
+ return false
+ }
+ @CaptureMode val captureMode: Int =
+ config.retrieveOption(ImageCaptureConfig.OPTION_IMAGE_CAPTURE_MODE)!!
+ return (getSessionConfigTemplateType(captureType, captureMode)
+ == CameraDevice.TEMPLATE_ZERO_SHUTTER_LAG)
+ }
+
+ /**
+ * Check whether the given StreamUseCases are available to the device.
+ */
+ private fun areStreamUseCasesAvailable(
+ availableStreamUseCasesSet: Set<Long>,
+ streamUseCases: Set<Long>
+ ): Boolean {
+ for (streamUseCase: Long in streamUseCases) {
+ if (!availableStreamUseCasesSet.contains(streamUseCase)) {
+ return false
+ }
+ }
+ return true
+ }
+
+ private fun throwInvalidCamera2InteropOverrideException() {
+ throw IllegalArgumentException(
+ "Either all use cases must have non-default stream use " +
+ "case assigned or none should have it"
+ )
+ }
+
+ /**
+ * Return true if all existing UseCases and new UseCases have Camera2Interop override and
+ * these StreamUseCases are all available to the device.
+ */
+ private fun isValidCamera2InteropOverride(
+ attachedSurfaces: List<AttachedSurfaceInfo>,
+ newUseCaseConfigs: List<UseCaseConfig<*>>,
+ availableStreamUseCases: Set<Long>
+ ): Boolean {
+ val streamUseCases: MutableSet<Long> = mutableSetOf()
+ var hasNonDefaultStreamUseCase = false
+ var hasDefaultOrNullStreamUseCase = false
+ for (attachedSurfaceInfo: AttachedSurfaceInfo in attachedSurfaces) {
+ if (!attachedSurfaceInfo.implementationOptions!!.containsOption(
+ STREAM_USE_CASE_OPTION
+ )
+ ) {
+ hasDefaultOrNullStreamUseCase = true
+ break
+ }
+ val streamUseCaseOverride: Long = (attachedSurfaceInfo.implementationOptions!!
+ .retrieveOption(STREAM_USE_CASE_OPTION))!!
+ if ((streamUseCaseOverride == SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT.toLong())) {
+ hasDefaultOrNullStreamUseCase = true
+ break
+ }
+ hasNonDefaultStreamUseCase = true
+ break
+ }
+ for (useCaseConfig: UseCaseConfig<*> in newUseCaseConfigs) {
+ if (!useCaseConfig.containsOption(STREAM_USE_CASE_OPTION)) {
+ hasDefaultOrNullStreamUseCase = true
+ if (hasNonDefaultStreamUseCase) {
+ throwInvalidCamera2InteropOverrideException()
+ }
+ } else {
+ val streamUseCaseOverride: Long =
+ useCaseConfig.retrieveOption(STREAM_USE_CASE_OPTION)!!
+ if ((streamUseCaseOverride == SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT.toLong())
+ ) {
+ hasDefaultOrNullStreamUseCase = true
+ if (hasNonDefaultStreamUseCase) {
+ throwInvalidCamera2InteropOverrideException()
+ }
+ } else {
+ hasNonDefaultStreamUseCase = true
+ if (hasDefaultOrNullStreamUseCase) {
+ throwInvalidCamera2InteropOverrideException()
+ }
+ streamUseCases.add(streamUseCaseOverride)
+ }
+ }
+ }
+ return !hasDefaultOrNullStreamUseCase && areStreamUseCasesAvailable(
+ availableStreamUseCases,
+ streamUseCases
+ )
+ }
+
+ @androidx.annotation.OptIn(markerClass = [ExperimentalZeroShutterLag::class])
+ private fun getSessionConfigTemplateType(
+ captureType: CaptureType,
+ @CaptureMode captureMode: Int
+ ): Int {
+ return when (captureType) {
+ CaptureType.IMAGE_CAPTURE ->
+ if (captureMode == ImageCapture.CAPTURE_MODE_ZERO_SHUTTER_LAG)
+ CameraDevice.TEMPLATE_ZERO_SHUTTER_LAG else CameraDevice.TEMPLATE_PREVIEW
+
+ CaptureType.VIDEO_CAPTURE, CaptureType.STREAM_SHARING -> CameraDevice.TEMPLATE_RECORD
+ CaptureType.PREVIEW, CaptureType.IMAGE_ANALYSIS -> CameraDevice.TEMPLATE_PREVIEW
+ else -> CameraDevice.TEMPLATE_PREVIEW
+ }
+ }
+}
diff --git a/camera/camera-camera2-pipe-integration/src/test/java/androidx/camera/camera2/pipe/integration/adapter/SessionConfigAdapterTest.kt b/camera/camera-camera2-pipe-integration/src/test/java/androidx/camera/camera2/pipe/integration/adapter/SessionConfigAdapterTest.kt
index 1b550d6..7e3c3a6 100644
--- a/camera/camera-camera2-pipe-integration/src/test/java/androidx/camera/camera2/pipe/integration/adapter/SessionConfigAdapterTest.kt
+++ b/camera/camera-camera2-pipe-integration/src/test/java/androidx/camera/camera2/pipe/integration/adapter/SessionConfigAdapterTest.kt
@@ -20,18 +20,12 @@
import android.graphics.SurfaceTexture
import android.hardware.camera2.CameraDevice
-import android.media.MediaCodec
import android.os.Build
import android.view.Surface
import androidx.annotation.RequiresApi
-import androidx.camera.camera2.pipe.integration.impl.STREAM_USE_CASE_OPTION
-import androidx.camera.core.ImageAnalysis
-import androidx.camera.core.ImageCapture
-import androidx.camera.core.Preview
import androidx.camera.core.impl.DeferrableSurface
import androidx.camera.core.impl.SessionConfig
import androidx.camera.core.impl.utils.futures.Futures
-import androidx.camera.core.streamsharing.StreamSharing
import androidx.camera.testing.impl.fakes.FakeUseCase
import androidx.camera.testing.impl.fakes.FakeUseCaseConfig
import androidx.testutils.MainDispatcherRule
@@ -43,7 +37,6 @@
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
-import org.mockito.Mockito
import org.robolectric.annotation.Config
import org.robolectric.annotation.internal.DoNotInstrument
@@ -52,10 +45,6 @@
@DoNotInstrument
class SessionConfigAdapterTest {
- private val mockSurface = Mockito.mock(DeferrableSurface::class.java)
- private val mockSessionConfig = Mockito.mock(SessionConfig::class.java)
- private val mockImplementationOption =
- Mockito.mock(androidx.camera.core.impl.Config::class.java)
private val sessionConfigAdapter = SessionConfigAdapter(listOf())
@get:Rule
@@ -134,7 +123,7 @@
@Test
fun populateSurfaceToStreamUseCaseMappingEmptyUseCase() {
- val mapping = sessionConfigAdapter.getSurfaceToStreamUseCaseMapping(listOf(), true)
+ val mapping = sessionConfigAdapter.getSurfaceToStreamUseCaseMapping(listOf(), listOf())
TestCase.assertTrue(mapping.isEmpty())
}
@@ -144,109 +133,6 @@
TestCase.assertTrue(mapping.isEmpty())
}
- @Test
- fun populateSurfaceToStreamUseCaseMappingNoAppropriateContainerClass() {
- Mockito.`when`(mockSurface.containerClass).thenReturn(FakeUseCase::class.java)
- Mockito.`when`(mockSessionConfig.surfaces).thenReturn(listOf(mockSurface))
- Mockito.`when`(mockSessionConfig.implementationOptions).thenReturn(mockImplementationOption)
- val sessionConfigs: MutableCollection<SessionConfig> = ArrayList()
- sessionConfigs.add(mockSessionConfig)
- val mapping = sessionConfigAdapter.getSurfaceToStreamUseCaseMapping(sessionConfigs, true)
- TestCase.assertTrue(mapping[mockSurface] == 0L)
- }
-
- @Test
- fun populateSurfaceToStreamUseCaseMappingPreview() {
- Mockito.`when`(mockSurface.containerClass).thenReturn(Preview::class.java)
- Mockito.`when`(mockSessionConfig.surfaces).thenReturn(listOf(mockSurface))
- Mockito.`when`(mockSessionConfig.implementationOptions).thenReturn(mockImplementationOption)
- val sessionConfigs: MutableCollection<SessionConfig> = ArrayList()
- sessionConfigs.add(mockSessionConfig)
- val mapping = sessionConfigAdapter.getSurfaceToStreamUseCaseMapping(sessionConfigs, true)
- TestCase.assertTrue(mapping.isNotEmpty())
- TestCase.assertTrue(mapping[mockSurface] == 1L)
- }
-
- @Test
- fun populateSurfaceToStreamUseCaseMappingZSL() {
- Mockito.`when`(mockSurface.containerClass).thenReturn(Preview::class.java)
- Mockito.`when`(mockSessionConfig.surfaces).thenReturn(listOf(mockSurface))
- Mockito.`when`(mockSessionConfig.implementationOptions)
- .thenReturn(mockImplementationOption)
- Mockito.`when`(mockSessionConfig.templateType)
- .thenReturn(CameraDevice.TEMPLATE_ZERO_SHUTTER_LAG)
- val sessionConfigs: MutableCollection<SessionConfig> = ArrayList()
- sessionConfigs.add(mockSessionConfig)
- val mapping = sessionConfigAdapter.getSurfaceToStreamUseCaseMapping(sessionConfigs, true)
- TestCase.assertTrue(mapping.isEmpty())
- }
-
- @Test
- fun populateSurfaceToStreamUseCaseMappingImageAnalysis() {
- Mockito.`when`(mockSurface.containerClass).thenReturn(ImageAnalysis::class.java)
- Mockito.`when`(mockSessionConfig.surfaces).thenReturn(listOf(mockSurface))
- Mockito.`when`(mockSessionConfig.implementationOptions)
- .thenReturn(mockImplementationOption)
- val sessionConfigs: MutableCollection<SessionConfig> = ArrayList()
- sessionConfigs.add(mockSessionConfig)
- val mapping = sessionConfigAdapter.getSurfaceToStreamUseCaseMapping(sessionConfigs, true)
- TestCase.assertTrue(mapping.isNotEmpty())
- TestCase.assertTrue(mapping[mockSurface] == 1L)
- }
-
- @Test
- fun populateSurfaceToStreamUseCaseMappingImageCapture() {
- Mockito.`when`(mockSurface.containerClass).thenReturn(ImageCapture::class.java)
- Mockito.`when`(mockSessionConfig.surfaces).thenReturn(listOf(mockSurface))
- Mockito.`when`(mockSessionConfig.implementationOptions).thenReturn(mockImplementationOption)
- val sessionConfigs: MutableCollection<SessionConfig> = ArrayList()
- sessionConfigs.add(mockSessionConfig)
- val mapping = sessionConfigAdapter.getSurfaceToStreamUseCaseMapping(sessionConfigs, true)
- TestCase.assertTrue(mapping.isNotEmpty())
- TestCase.assertTrue(mapping[mockSurface] == 2L)
- }
-
- @Test
- fun populateSurfaceToStreamUseCaseMappingVideoCapture() {
- Mockito.`when`(mockSurface.containerClass).thenReturn(MediaCodec::class.java)
- Mockito.`when`(mockSessionConfig.surfaces).thenReturn(listOf(mockSurface))
- Mockito.`when`(mockSessionConfig.implementationOptions).thenReturn(mockImplementationOption)
- val sessionConfigs: MutableCollection<SessionConfig> = ArrayList()
- sessionConfigs.add(mockSessionConfig)
- val mapping = sessionConfigAdapter.getSurfaceToStreamUseCaseMapping(sessionConfigs, true)
- TestCase.assertTrue(mapping.isNotEmpty())
- TestCase.assertTrue(mapping[mockSurface] == 3L)
- }
-
- @Test
- fun populateSurfaceToStreamUseCaseMappingStreamSharing() {
- Mockito.`when`(mockSurface.containerClass).thenReturn(StreamSharing::class.java)
- Mockito.`when`(mockSessionConfig.surfaces).thenReturn(listOf(mockSurface))
- Mockito.`when`(mockSessionConfig.implementationOptions).thenReturn(mockImplementationOption)
- val sessionConfigs: MutableCollection<SessionConfig> = ArrayList()
- sessionConfigs.add(mockSessionConfig)
- val mapping = sessionConfigAdapter.getSurfaceToStreamUseCaseMapping(sessionConfigs, true)
- TestCase.assertTrue(mapping.isNotEmpty())
- TestCase.assertTrue(mapping[mockSurface] == 3L)
- }
-
- @Test
- fun populateSurfaceToStreamUseCaseMappingCustomized() {
- Mockito.`when`(mockSurface.containerClass).thenReturn(MediaCodec::class.java)
- Mockito.`when`(mockSessionConfig.surfaces).thenReturn(listOf(mockSurface))
- Mockito.`when`(mockSessionConfig.implementationOptions)
- .thenReturn(mockImplementationOption)
- Mockito.`when`(mockImplementationOption.containsOption(STREAM_USE_CASE_OPTION))
- .thenReturn(true)
- Mockito.`when`(mockImplementationOption.retrieveOption(STREAM_USE_CASE_OPTION))
- .thenReturn(0L)
- val sessionConfigs: MutableCollection<SessionConfig> = ArrayList()
- sessionConfigs.add(mockSessionConfig)
- val mapping = sessionConfigAdapter.getSurfaceToStreamUseCaseMapping(sessionConfigs, true)
- TestCase.assertTrue(mapping.isNotEmpty())
- TestCase.assertTrue(mapping[mockSurface] == 0L)
- }
-
private fun createFakeTestUseCase(block: (FakeTestUseCase) -> Unit): FakeTestUseCase = run {
val configBuilder = FakeUseCaseConfig.Builder().setTargetName("UseCase")
FakeTestUseCase(configBuilder.useCaseConfig).also {
diff --git a/camera/camera-camera2-pipe-integration/src/test/java/androidx/camera/camera2/pipe/integration/adapter/SupportedSurfaceCombinationTest.kt b/camera/camera-camera2-pipe-integration/src/test/java/androidx/camera/camera2/pipe/integration/adapter/SupportedSurfaceCombinationTest.kt
index 6b4e41a..0908a7d 100644
--- a/camera/camera-camera2-pipe-integration/src/test/java/androidx/camera/camera2/pipe/integration/adapter/SupportedSurfaceCombinationTest.kt
+++ b/camera/camera-camera2-pipe-integration/src/test/java/androidx/camera/camera2/pipe/integration/adapter/SupportedSurfaceCombinationTest.kt
@@ -32,6 +32,7 @@
import android.media.CamcorderProfile.QUALITY_720P
import android.media.MediaRecorder
import android.os.Build
+import android.util.Pair
import android.util.Range
import android.util.Size
import android.view.WindowManager
@@ -56,6 +57,7 @@
import androidx.camera.camera2.pipe.integration.internal.HLG10_SDR_CONSTRAINED
import androidx.camera.camera2.pipe.integration.internal.HLG10_UNCONSTRAINED
import androidx.camera.camera2.pipe.integration.internal.LATENCY_NONE
+import androidx.camera.camera2.pipe.integration.internal.StreamUseCaseUtil
import androidx.camera.camera2.pipe.testing.FakeCameraBackend
import androidx.camera.camera2.pipe.testing.FakeCameraDevices
import androidx.camera.camera2.pipe.testing.FakeCameraMetadata
@@ -119,6 +121,11 @@
@DoNotInstrument
@Config(minSdk = Build.VERSION_CODES.LOLLIPOP)
class SupportedSurfaceCombinationTest {
+ private val streamUseCaseOption: androidx.camera.core.impl.Config.Option<Long> =
+ androidx.camera.core.impl.Config.Option.create(
+ "camera2.cameraCaptureSession.streamUseCase",
+ Long::class.javaPrimitiveType!!
+ )
private val sensorOrientation90 = 90
private val landscapePixelArraySize = Size(4032, 3024)
private val displaySize = Size(720, 1280)
@@ -165,6 +172,8 @@
private val maximumResolutionHighResolutionSupportedSizes = arrayOf(
Size(8000, 6000)
)
+
+ private val streamUseCaseOverrideValue = 3L
private val context = InstrumentationRegistry.getInstrumentation().context
private var cameraFactory: FakeCameraFactory? = null
private var useCaseConfigFactory: UseCaseConfigFactory = mock()
@@ -1532,7 +1541,7 @@
useCasesExpectedDynamicRangeMap: Map<UseCase, DynamicRange> = emptyMap(),
dynamicRangeProfiles: DynamicRangeProfiles? = null,
default10BitProfile: Long? = null,
- ) {
+ ): Pair<Map<UseCaseConfig<*>, StreamSpec>, Map<AttachedSurfaceInfo, StreamSpec>> {
setupCamera(
hardwareLevel = hardwareLevel,
capabilities = capabilities,
@@ -1547,14 +1556,16 @@
val useCaseConfigMap = getUseCaseToConfigMap(useCasesExpectedResultMap.keys.toList())
val useCaseConfigToOutputSizesMap =
getUseCaseConfigToOutputSizesMap(useCaseConfigMap.values.toList())
- val suggestedStreamSpecs = supportedSurfaceCombination.getSuggestedStreamSpecifications(
+ val resultPair = supportedSurfaceCombination.getSuggestedStreamSpecifications(
cameraMode,
attachedSurfaceInfoList,
useCaseConfigToOutputSizesMap
- ).first
+ )
+ val suggestedStreamSpecsForNewUseCases = resultPair.first
+ val suggestedStreamSpecsForOldSurfaces = resultPair.second
useCasesExpectedResultMap.keys.forEach {
- val resultSize = suggestedStreamSpecs[useCaseConfigMap[it]]!!.resolution
+ val resultSize = suggestedStreamSpecsForNewUseCases[useCaseConfigMap[it]]!!.resolution
val expectedSize = useCasesExpectedResultMap[it]!!
if (!compareWithAtMost) {
assertThat(resultSize).isEqualTo(expectedSize)
@@ -1564,17 +1575,53 @@
compareExpectedFps?.let { _ ->
assertThat(
- suggestedStreamSpecs[useCaseConfigMap[it]]!!.expectedFrameRateRange
+ suggestedStreamSpecsForNewUseCases[
+ useCaseConfigMap[it]]!!.expectedFrameRateRange
).isEqualTo(compareExpectedFps)
}
}
useCasesExpectedDynamicRangeMap.keys.forEach {
- val resultDynamicRange = suggestedStreamSpecs[useCaseConfigMap[it]]!!.dynamicRange
+ val resultDynamicRange =
+ suggestedStreamSpecsForNewUseCases[useCaseConfigMap[it]]!!.dynamicRange
val expectedDynamicRange = useCasesExpectedDynamicRangeMap[it]
assertThat(resultDynamicRange).isEqualTo(expectedDynamicRange)
}
+
+ // Assert that if one stream specification has stream use case options, all other
+ // stream specifications also have it.
+ var hasStreamUseCaseStreamSpecOption: Boolean? = null
+ suggestedStreamSpecsForNewUseCases.entries.forEach {
+ // Gets the first entry to determine whether StreamUseCaseStreamSpecOption
+ // should exist or not.
+ if (hasStreamUseCaseStreamSpecOption == null) {
+ hasStreamUseCaseStreamSpecOption =
+ it.value.implementationOptions?.containsOption(
+ StreamUseCaseUtil.STREAM_USE_CASE_STREAM_SPEC_OPTION
+ )
+ }
+
+ // All the other entries should align with the first entry
+ assertThat(
+ it.value.implementationOptions?.containsOption(
+ StreamUseCaseUtil.STREAM_USE_CASE_STREAM_SPEC_OPTION
+ )
+ ).isEqualTo(
+ hasStreamUseCaseStreamSpecOption
+ )
+ }
+ suggestedStreamSpecsForOldSurfaces.entries.forEach {
+ // All entries should align with the first entry
+ assertThat(
+ it.value.implementationOptions?.containsOption(
+ StreamUseCaseUtil.STREAM_USE_CASE_STREAM_SPEC_OPTION
+ )
+ ).isEqualTo(
+ hasStreamUseCaseStreamSpecOption
+ )
+ }
+ return resultPair
}
private fun getUseCaseToConfigMap(useCases: List<UseCase>): Map<UseCase, UseCaseConfig<*>> {
@@ -2966,6 +3013,104 @@
assertThat(resultList).containsExactlyElementsIn(expectedResultList).inOrder()
}
+ @Config(minSdk = Build.VERSION_CODES.TIRAMISU)
+ @Test
+ fun canPopulateStreamUseCaseStreamSpecOption_jpeg() {
+ val jpegUseCase =
+ createUseCase(
+ UseCaseConfigFactory.CaptureType.IMAGE_CAPTURE,
+ streamUseCaseOverride = true
+ ) // JPEG
+ val useCaseExpectedResultMap = mutableMapOf<UseCase, Size>().apply {
+ put(jpegUseCase, landscapePixelArraySize)
+ }
+ val resultPair = getSuggestedSpecsAndVerify(useCaseExpectedResultMap)
+ assertThat(resultPair.first.size).isEqualTo(1)
+ assertThat(
+ resultPair.first[jpegUseCase.currentConfig]!!.implementationOptions!!.retrieveOption(
+ StreamUseCaseUtil.STREAM_USE_CASE_STREAM_SPEC_OPTION
+ )
+ ).isEqualTo(streamUseCaseOverrideValue)
+ }
+
+ @Config(minSdk = Build.VERSION_CODES.TIRAMISU)
+ @Test
+ fun throwException_PopulateStreamUseCaseStreamSpecOption_notFullyOverride() {
+ val jpegUseCase =
+ createUseCase(
+ UseCaseConfigFactory.CaptureType.IMAGE_CAPTURE,
+ streamUseCaseOverride = true
+ ) // JPEG
+ val yuvUseCase =
+ createUseCase(
+ UseCaseConfigFactory.CaptureType.PREVIEW,
+ streamUseCaseOverride = false
+ ) // PREVIEW
+ val useCaseExpectedResultMap = mutableMapOf<UseCase, Size>().apply {
+ put(jpegUseCase, landscapePixelArraySize)
+ put(yuvUseCase, previewSize)
+ }
+ assertThrows(IllegalArgumentException::class.java) {
+ getSuggestedSpecsAndVerify(useCaseExpectedResultMap)
+ }
+ }
+
+ @Config(minSdk = Build.VERSION_CODES.TIRAMISU)
+ @Test
+ fun skipPopulateStreamUseCaseStreamSpecOption_unsupportedCombination() {
+ val useCase1 =
+ createUseCase(
+ UseCaseConfigFactory.CaptureType.PREVIEW,
+ streamUseCaseOverride = true
+ ) // PREVIEW
+ val useCase2 =
+ createUseCase(
+ UseCaseConfigFactory.CaptureType.PREVIEW,
+ streamUseCaseOverride = true
+ ) // PREVIEW
+ val useCaseExpectedResultMap = mutableMapOf<UseCase, Size>().apply {
+ put(useCase1, previewSize)
+ put(useCase2, previewSize)
+ }
+ // PRIV + PRIV is supported by the Ultra-high table but not Stream use case
+ val resultPair = getSuggestedSpecsAndVerify(
+ useCaseExpectedResultMap, cameraMode = CameraMode.ULTRA_HIGH_RESOLUTION_CAMERA,
+ )
+ assertThat(resultPair.first.size).isEqualTo(2)
+ assertThat(
+ resultPair.first[useCase1.currentConfig]!!.implementationOptions!!.containsOption(
+ StreamUseCaseUtil.STREAM_USE_CASE_STREAM_SPEC_OPTION
+ )
+ ).isFalse()
+ assertThat(
+ resultPair.first[useCase2.currentConfig]!!.implementationOptions!!.containsOption(
+ StreamUseCaseUtil.STREAM_USE_CASE_STREAM_SPEC_OPTION
+ )
+ ).isFalse()
+ }
+
+ @Config(minSdk = 21, maxSdk = 32)
+ @Test
+ fun skipPopulateStreamUseCaseStreamSpecOption_unsupportedOs() {
+ val jpegUseCase =
+ createUseCase(
+ UseCaseConfigFactory.CaptureType.IMAGE_CAPTURE,
+ streamUseCaseOverride = true
+ ) // JPEG
+ val useCaseExpectedResultMap = mutableMapOf<UseCase, Size>().apply {
+ put(jpegUseCase, landscapePixelArraySize)
+ }
+ val resultPair = getSuggestedSpecsAndVerify(
+ useCaseExpectedResultMap,
+ )
+ assertThat(resultPair.first.size).isEqualTo(1)
+ assertThat(
+ resultPair.first[jpegUseCase.currentConfig]!!.implementationOptions!!.containsOption(
+ StreamUseCaseUtil.STREAM_USE_CASE_STREAM_SPEC_OPTION
+ )
+ ).isFalse()
+ }
+
private fun setupCamera(
hardwareLevel: Int = CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY,
sensorOrientation: Int = sensorOrientation90,
@@ -3048,6 +3193,20 @@
}
}
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU
+ ) {
+ val uc = longArrayOf(
+ CameraCharacteristics.SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT.toLong(),
+ CameraCharacteristics.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong(),
+ CameraCharacteristics.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL
+ .toLong(),
+ CameraCharacteristics.SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE.toLong(),
+ CameraCharacteristics.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL.toLong(),
+ CameraCharacteristics.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD.toLong()
+ )
+ characteristicsMap[CameraCharacteristics.SCALER_AVAILABLE_STREAM_USE_CASES] = uc
+ }
+
// set up FakeCafakeCameraMetadatameraMetadata
fakeCameraMetadata = FakeCameraMetadata(
cameraId = cameraId,
@@ -3238,7 +3397,16 @@
private fun createUseCase(
captureType: UseCaseConfigFactory.CaptureType,
targetFrameRate: Range<Int>? = null,
- dynamicRange: DynamicRange? = DynamicRange.UNSPECIFIED
+ dynamicRange: DynamicRange = DynamicRange.UNSPECIFIED
+ ): UseCase {
+ return createUseCase(captureType, targetFrameRate, dynamicRange, false)
+ }
+
+ private fun createUseCase(
+ captureType: UseCaseConfigFactory.CaptureType,
+ targetFrameRate: Range<Int>? = null,
+ dynamicRange: DynamicRange? = DynamicRange.UNSPECIFIED,
+ streamUseCaseOverride: Boolean
): UseCase {
val builder = FakeUseCaseConfig.Builder(
captureType, when (captureType) {
@@ -3254,6 +3422,12 @@
ImageInputConfig.OPTION_INPUT_DYNAMIC_RANGE,
dynamicRange
)
+ if (streamUseCaseOverride) {
+ builder.mutableConfig.insertOption(
+ streamUseCaseOption,
+ streamUseCaseOverrideValue
+ )
+ }
return builder.build()
}
diff --git a/camera/camera-camera2-pipe-integration/src/test/java/androidx/camera/camera2/pipe/integration/internal/StreamUseCaseTest.kt b/camera/camera-camera2-pipe-integration/src/test/java/androidx/camera/camera2/pipe/integration/internal/StreamUseCaseTest.kt
new file mode 100644
index 0000000..67937d5
--- /dev/null
+++ b/camera/camera-camera2-pipe-integration/src/test/java/androidx/camera/camera2/pipe/integration/internal/StreamUseCaseTest.kt
@@ -0,0 +1,771 @@
+/*
+ * 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.camera2.pipe.integration.internal
+
+import android.graphics.ImageFormat
+import android.hardware.camera2.CameraCharacteristics
+import android.hardware.camera2.CameraMetadata
+import android.hardware.camera2.CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL
+import android.os.Build
+import android.view.Surface
+import androidx.camera.camera2.pipe.CameraId
+import androidx.camera.camera2.pipe.integration.adapter.SupportedSurfaceCombination
+import androidx.camera.camera2.pipe.integration.impl.Camera2ImplConfig
+import androidx.camera.camera2.pipe.testing.FakeCameraMetadata
+import androidx.camera.core.DynamicRange
+import androidx.camera.core.ImageCapture
+import androidx.camera.core.ImageCapture.CaptureMode
+import androidx.camera.core.UseCase
+import androidx.camera.core.impl.AttachedSurfaceInfo
+import androidx.camera.core.impl.CameraMode
+import androidx.camera.core.impl.DeferrableSurface
+import androidx.camera.core.impl.ImageCaptureConfig
+import androidx.camera.core.impl.MutableOptionsBundle
+import androidx.camera.core.impl.SessionConfig
+import androidx.camera.core.impl.StreamSpec
+import androidx.camera.core.impl.SurfaceConfig
+import androidx.camera.core.impl.UseCaseConfig
+import androidx.camera.core.impl.UseCaseConfigFactory
+import androidx.camera.core.impl.UseCaseConfigFactory.CaptureType
+import androidx.camera.core.internal.utils.SizeUtil
+import androidx.camera.core.streamsharing.StreamSharing
+import androidx.camera.testing.fakes.FakeCamera
+import androidx.camera.testing.impl.fakes.FakeUseCase
+import androidx.camera.testing.impl.fakes.FakeUseCaseConfig
+import androidx.camera.testing.impl.fakes.FakeUseCaseConfigFactory
+import androidx.concurrent.futures.ResolvableFuture
+import com.google.common.util.concurrent.ListenableFuture
+import junit.framework.TestCase
+import org.junit.After
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.robolectric.RobolectricTestRunner
+import org.robolectric.annotation.Config
+import org.robolectric.annotation.internal.DoNotInstrument
+
+@Config(minSdk = 33)
+@RunWith(RobolectricTestRunner::class)
+@DoNotInstrument
+class StreamUseCaseTest() {
+ private val streamUseCaseOption: androidx.camera.core.impl.Config.Option<Long> =
+ androidx.camera.core.impl.Config.Option.create(
+ "camera2.cameraCaptureSession.streamUseCase",
+ Long::class.javaPrimitiveType!!
+ )
+
+ private var mMockSurface1: DeferrableSurface = object : DeferrableSurface() {
+ private val mSurfaceFuture: ListenableFuture<Surface> = ResolvableFuture.create()
+ override fun provideSurface(): ListenableFuture<Surface> {
+ // Return a never complete future.
+ return mSurfaceFuture
+ }
+ }
+ private var mMockSurface2: DeferrableSurface = object : DeferrableSurface() {
+ private val mSurfaceFuture: ListenableFuture<Surface> = ResolvableFuture.create()
+ override fun provideSurface(): ListenableFuture<Surface> {
+ // Return a never complete future.
+ return mSurfaceFuture
+ }
+ }
+
+ @After
+ fun tearDown() {
+ mMockSurface1.close()
+ mMockSurface2.close()
+ }
+
+ @Test
+ fun populateSurfaceToStreamUseCaseMapping_singlePreview() {
+ val streamUseCaseMap: MutableMap<DeferrableSurface, Long> = mutableMapOf()
+ val optionsBundle = MutableOptionsBundle.create()
+ optionsBundle.insertOption(
+ StreamUseCaseUtil.STREAM_USE_CASE_STREAM_SPEC_OPTION,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ )
+ val sessionConfig = SessionConfig.Builder()
+ .addSurface(mMockSurface1)
+ .addImplementationOptions(Camera2ImplConfig(optionsBundle))
+ .build()
+ val useCaseConfig = getFakeUseCaseConfigWithOptions(
+ camera2InteropOverride = true, isZslDisabled = false, isZslCaptureMode = false,
+ captureType = CaptureType.PREVIEW, imageFormat = ImageFormat.PRIVATE
+ )
+ val sessionConfigs = mutableListOf(sessionConfig)
+ val useCaseConfigs = mutableListOf(useCaseConfig)
+ StreamUseCaseUtil.populateSurfaceToStreamUseCaseMapping(
+ sessionConfigs, useCaseConfigs,
+ streamUseCaseMap
+ )
+ TestCase.assertTrue(
+ streamUseCaseMap[mMockSurface1] ==
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ )
+ }
+
+ @Test
+ fun populateSurfaceToStreamUseCaseMapping_imageCaptureAndMeteringRepeat() {
+ val streamUseCaseMap: MutableMap<DeferrableSurface, Long> = mutableMapOf()
+ val optionsBundle = MutableOptionsBundle.create()
+ optionsBundle.insertOption(
+ StreamUseCaseUtil.STREAM_USE_CASE_STREAM_SPEC_OPTION,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE.toLong()
+ )
+ val imageCaptureSessionConfig = SessionConfig.Builder()
+ .addSurface(mMockSurface1)
+ .addImplementationOptions(Camera2ImplConfig(optionsBundle))
+ .build()
+ val meteringRepeatingSessionConfig = SessionConfig.Builder()
+ .addSurface(mMockSurface2).build()
+ val imageCaptureConfig = getFakeUseCaseConfigWithOptions(
+ camera2InteropOverride = true, isZslDisabled = false, isZslCaptureMode = false,
+ captureType = CaptureType.IMAGE_CAPTURE, imageFormat = ImageFormat.YUV_420_888
+ )
+ val meteringRepeatingConfig = getFakeUseCaseConfigWithOptions(
+ camera2InteropOverride = true,
+ isZslDisabled = false,
+ isZslCaptureMode = false,
+ captureType = CaptureType.METERING_REPEATING,
+ imageFormat = ImageFormat.PRIVATE
+ )
+ val sessionConfigs =
+ mutableListOf(imageCaptureSessionConfig, meteringRepeatingSessionConfig)
+ val useCaseConfigs = mutableListOf(imageCaptureConfig, meteringRepeatingConfig)
+ StreamUseCaseUtil.populateSurfaceToStreamUseCaseMapping(
+ sessionConfigs, useCaseConfigs,
+ streamUseCaseMap
+ )
+ TestCase.assertTrue(
+ streamUseCaseMap[mMockSurface1] ==
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE.toLong()
+ )
+ TestCase.assertTrue(
+ streamUseCaseMap[mMockSurface2] ==
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ )
+ }
+
+ @Test
+ fun getStreamSpecImplementationOptions() {
+ val result: Camera2ImplConfig =
+ StreamUseCaseUtil.getStreamSpecImplementationOptions(
+ getFakeUseCaseConfigWithOptions(
+ camera2InteropOverride = true,
+ isZslDisabled = false,
+ isZslCaptureMode = false,
+ captureType = CaptureType.PREVIEW,
+ imageFormat = ImageFormat.PRIVATE
+ )
+ )
+ TestCase.assertTrue(
+ result.retrieveOption(streamUseCaseOption)
+ == TEST_STREAM_USE_CASE_OPTION_VALUE
+ )
+ result.retrieveOption(UseCaseConfig.OPTION_ZSL_DISABLED)
+ ?.let { TestCase.assertFalse(it) }
+ TestCase.assertTrue(
+ (result.retrieveOption(ImageCaptureConfig.OPTION_IMAGE_CAPTURE_MODE)
+ == TEST_OPTION_IMAGE_CAPTURE_MODE_VALUE)
+ )
+ TestCase.assertTrue(
+ (result.retrieveOption(UseCaseConfig.OPTION_INPUT_FORMAT)
+ == ImageFormat.PRIVATE)
+ )
+ }
+
+ @Test
+ fun isStreamUseCaseSupported_streamUseCaseNotAvailable() {
+ TestCase.assertFalse(
+ StreamUseCaseUtil.isStreamUseCaseSupported(
+ getCameraMetadata(true)
+ )
+ )
+ }
+
+ @Test
+ fun shouldUseStreamUseCase_cameraModeNotSupported() {
+ TestCase.assertFalse(
+ StreamUseCaseUtil.shouldUseStreamUseCase(
+ SupportedSurfaceCombination.FeatureSettings(
+ CameraMode.CONCURRENT_CAMERA,
+ DynamicRange.BIT_DEPTH_8_BIT
+ )
+ )
+ )
+ }
+
+ @Test
+ fun shouldUseStreamUseCase_bitDepthNotSupported() {
+ TestCase.assertFalse(
+ StreamUseCaseUtil.shouldUseStreamUseCase(
+ SupportedSurfaceCombination.FeatureSettings(
+ CameraMode.DEFAULT,
+ DynamicRange.BIT_DEPTH_10_BIT
+ )
+ )
+ )
+ }
+
+ @Test
+ fun containsZslUseCase_isZslUseCase() {
+ val useCaseConfig = getFakeUseCaseConfigWithOptions(
+ camera2InteropOverride = true, isZslDisabled = false, isZslCaptureMode = true,
+ captureType = CaptureType.IMAGE_CAPTURE, imageFormat = ImageFormat.JPEG
+ )
+ val useCaseConfigList = mutableListOf(useCaseConfig)
+ TestCase.assertTrue(
+ StreamUseCaseUtil.containsZslUseCase(
+ listOf(), useCaseConfigList
+ )
+ )
+ }
+
+ @Test
+ fun containsZslUseCase_isZslUseCase_ZslDisabled() {
+ val useCaseConfig = getFakeUseCaseConfigWithOptions(
+ camera2InteropOverride = true, isZslDisabled = true, isZslCaptureMode = true,
+ captureType = CaptureType.IMAGE_CAPTURE, imageFormat = ImageFormat.JPEG
+ )
+ val useCaseConfigList = mutableListOf(useCaseConfig)
+ TestCase.assertFalse(
+ StreamUseCaseUtil.containsZslUseCase(
+ listOf(), useCaseConfigList
+ )
+ )
+ }
+
+ @Test
+ fun containsZslUseCase_isZslSurface() {
+ val attachedSurfaces = mutableListOf(
+ getFakeAttachedSurfaceInfo(
+ camera2InteropOverride = true, isZslDisabled = false, isZslCaptureMode = true,
+ captureType = CaptureType.IMAGE_CAPTURE, imageFormat = ImageFormat.JPEG
+ )
+ )
+ TestCase.assertTrue(
+ StreamUseCaseUtil.containsZslUseCase(
+ attachedSurfaces,
+ listOf()
+ )
+ )
+ }
+
+ @Test
+ fun containsZslUseCase_isZslSurface_ZslDisabled() {
+ val attachedSurfaces = mutableListOf(
+ getFakeAttachedSurfaceInfo(
+ camera2InteropOverride = true, isZslDisabled = true, isZslCaptureMode = true,
+ captureType = CaptureType.IMAGE_CAPTURE, imageFormat = ImageFormat.JPEG
+ )
+ )
+ TestCase.assertFalse(
+ StreamUseCaseUtil.containsZslUseCase(
+ attachedSurfaces,
+ listOf()
+ )
+ )
+ }
+
+ @Test
+ fun populateStreamUseCaseStreamSpecOption_camera2InteropOverride_singleNewUseCase() {
+ val suggestedStreamSpecMap: MutableMap<UseCaseConfig<*>, StreamSpec> = mutableMapOf()
+ val useCaseConfig = getFakeUseCaseConfigWithOptions(
+ camera2InteropOverride = true, isZslDisabled = false, isZslCaptureMode = false,
+ captureType = CaptureType.PREVIEW, imageFormat = ImageFormat.PRIVATE
+ )
+ suggestedStreamSpecMap[useCaseConfig] =
+ getFakeStreamSpecFromFakeUseCaseConfig(useCaseConfig)
+ StreamUseCaseUtil.populateStreamUseCaseStreamSpecOptionWithInteropOverride(
+ getCameraMetadata(false), ArrayList<AttachedSurfaceInfo>(), suggestedStreamSpecMap,
+ mutableMapOf()
+ )
+ TestCase.assertTrue(
+ suggestedStreamSpecMap[useCaseConfig]!!.implementationOptions!!.retrieveOption<Long>(
+ StreamUseCaseUtil.STREAM_USE_CASE_STREAM_SPEC_OPTION
+ ) == TEST_STREAM_USE_CASE_OPTION_VALUE
+ )
+ }
+
+ @Test
+ fun populateStreamUseCaseStreamSpecOption_camera2InteropOverride_singleSurface() {
+ val attachedSurfaces: MutableList<AttachedSurfaceInfo> = mutableListOf(
+ getFakeAttachedSurfaceInfo(
+ camera2InteropOverride = true, isZslDisabled = false, isZslCaptureMode = false,
+ captureType = CaptureType.PREVIEW, imageFormat = ImageFormat.PRIVATE
+ )
+ )
+ val attachedSurfaceStreamSpecMap: MutableMap<AttachedSurfaceInfo, StreamSpec> = HashMap()
+ StreamUseCaseUtil.populateStreamUseCaseStreamSpecOptionWithInteropOverride(
+ getCameraMetadata(false), attachedSurfaces, mutableMapOf(),
+ attachedSurfaceStreamSpecMap
+ )
+ TestCase.assertTrue(
+ attachedSurfaceStreamSpecMap[attachedSurfaces[0]]!!
+ .implementationOptions!!.retrieveOption(
+ StreamUseCaseUtil.STREAM_USE_CASE_STREAM_SPEC_OPTION
+ ) == TEST_STREAM_USE_CASE_OPTION_VALUE
+ )
+ }
+
+ @Test
+ fun populateStreamUseCaseStreamSpecOption_camera2InteropOverride_useCaseAndSurface() {
+ val suggestedStreamSpecMap: MutableMap<UseCaseConfig<*>, StreamSpec> = mutableMapOf()
+ val useCaseConfig = getFakeUseCaseConfigWithOptions(
+ camera2InteropOverride = true, isZslDisabled = false, isZslCaptureMode = false,
+ captureType = CaptureType.PREVIEW, imageFormat = ImageFormat.PRIVATE
+ )
+ suggestedStreamSpecMap[useCaseConfig] =
+ getFakeStreamSpecFromFakeUseCaseConfig(useCaseConfig)
+ val attachedSurfaces: MutableList<AttachedSurfaceInfo> = mutableListOf(
+ getFakeAttachedSurfaceInfo(
+ camera2InteropOverride = true, isZslDisabled = false, isZslCaptureMode = false,
+ captureType = CaptureType.PREVIEW, imageFormat = ImageFormat.PRIVATE
+ )
+ )
+ val attachedSurfaceStreamSpecMap: MutableMap<AttachedSurfaceInfo, StreamSpec> =
+ mutableMapOf()
+ StreamUseCaseUtil.populateStreamUseCaseStreamSpecOptionWithInteropOverride(
+ getCameraMetadata(false),
+ attachedSurfaces,
+ suggestedStreamSpecMap,
+ attachedSurfaceStreamSpecMap
+ )
+ TestCase.assertTrue(
+ suggestedStreamSpecMap[useCaseConfig]!!.implementationOptions!!.retrieveOption(
+ StreamUseCaseUtil.STREAM_USE_CASE_STREAM_SPEC_OPTION
+ ) == TEST_STREAM_USE_CASE_OPTION_VALUE
+ )
+ TestCase.assertTrue(
+ attachedSurfaceStreamSpecMap[attachedSurfaces[0]]!!
+ .implementationOptions!!.retrieveOption(
+ StreamUseCaseUtil.STREAM_USE_CASE_STREAM_SPEC_OPTION
+ ) == TEST_STREAM_USE_CASE_OPTION_VALUE
+ )
+ }
+
+ @Test(expected = IllegalArgumentException::class)
+ fun populateStreamUseCaseStreamSpecOption_camera2InteropOverride_missingOverride() {
+ val suggestedStreamSpecMap: MutableMap<UseCaseConfig<*>, StreamSpec> = mutableMapOf()
+ val useCaseConfig = getFakeUseCaseConfigWithOptions(
+ camera2InteropOverride = false, isZslDisabled = false, isZslCaptureMode = false,
+ captureType = CaptureType.PREVIEW, imageFormat = ImageFormat.PRIVATE
+ )
+ suggestedStreamSpecMap[useCaseConfig] =
+ getFakeStreamSpecFromFakeUseCaseConfig(useCaseConfig)
+ val attachedSurfaces: MutableList<AttachedSurfaceInfo> = mutableListOf(
+ getFakeAttachedSurfaceInfo(
+ camera2InteropOverride = true, isZslDisabled = false, isZslCaptureMode = false,
+ captureType = CaptureType.PREVIEW, imageFormat = ImageFormat.PRIVATE
+ )
+ )
+ val attachedSurfaceStreamSpecMap: MutableMap<AttachedSurfaceInfo, StreamSpec> = HashMap()
+ StreamUseCaseUtil.populateStreamUseCaseStreamSpecOptionWithInteropOverride(
+ getCameraMetadata(false), attachedSurfaces, suggestedStreamSpecMap,
+ attachedSurfaceStreamSpecMap
+ )
+ }
+
+ @Test
+ fun areStreamUseCasesAvailableForSurfaceConfigs_success() {
+ val surfaceConfigList: MutableList<SurfaceConfig> = mutableListOf(
+ SurfaceConfig.create(
+ SurfaceConfig.ConfigType.PRIV, SurfaceConfig.ConfigSize.PREVIEW,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ )
+ )
+ TestCase.assertTrue(
+ StreamUseCaseUtil.areStreamUseCasesAvailableForSurfaceConfigs(
+ getCameraMetadata(false), surfaceConfigList
+ )
+ )
+ }
+
+ @Test
+ fun areStreamUseCasesAvailableForSurfaceConfigs_fail() {
+ val surfaceConfigList: MutableList<SurfaceConfig> = mutableListOf(
+ SurfaceConfig.create(
+ SurfaceConfig.ConfigType.PRIV, SurfaceConfig.ConfigSize.PREVIEW,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ )
+ )
+ TestCase.assertFalse(
+ StreamUseCaseUtil.areStreamUseCasesAvailableForSurfaceConfigs(
+ getCameraMetadata(true), surfaceConfigList
+ )
+ )
+ }
+
+ @Test
+ fun areCaptureTypesEligible_success() {
+ val surfaceConfigsWithStreamUseCase: MutableList<SurfaceConfig> = mutableListOf(
+ SurfaceConfig.create(
+ SurfaceConfig.ConfigType.PRIV, SurfaceConfig.ConfigSize.PREVIEW,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ ), SurfaceConfig.create(
+ SurfaceConfig.ConfigType.PRIV, SurfaceConfig.ConfigSize.RECORD,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD.toLong()
+ )
+ )
+ val surfaceConfigAttachedSurfaceInfoMap: MutableMap<Int, AttachedSurfaceInfo> = HashMap()
+ surfaceConfigAttachedSurfaceInfoMap[0] = getFakeAttachedSurfaceInfo(
+ camera2InteropOverride = false, isZslDisabled = false, isZslCaptureMode = false,
+ captureType = CaptureType.PREVIEW, imageFormat = ImageFormat.PRIVATE
+ )
+ val surfaceConfigUseCaseConfigMap: MutableMap<Int, UseCaseConfig<*>> = HashMap()
+ surfaceConfigUseCaseConfigMap[1] = getFakeUseCaseConfigWithOptions(
+ camera2InteropOverride = false, isZslDisabled = false, isZslCaptureMode = false,
+ captureType = CaptureType.VIDEO_CAPTURE, imageFormat = ImageFormat.PRIVATE
+ )
+ TestCase.assertTrue(
+ StreamUseCaseUtil.areCaptureTypesEligible(
+ surfaceConfigAttachedSurfaceInfoMap,
+ surfaceConfigUseCaseConfigMap, surfaceConfigsWithStreamUseCase
+ )
+ )
+ }
+
+ @Test
+ fun areCaptureTypesEligible_fail() {
+ val surfaceConfigsWithStreamUseCase: MutableList<SurfaceConfig> = mutableListOf(
+ SurfaceConfig.create(
+ SurfaceConfig.ConfigType.PRIV, SurfaceConfig.ConfigSize.PREVIEW,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ ), SurfaceConfig.create(
+ SurfaceConfig.ConfigType.PRIV, SurfaceConfig.ConfigSize.RECORD,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD.toLong()
+ )
+ )
+ val surfaceConfigAttachedSurfaceInfoMap: MutableMap<Int, AttachedSurfaceInfo> = HashMap()
+ surfaceConfigAttachedSurfaceInfoMap[0] = getFakeAttachedSurfaceInfo(
+ camera2InteropOverride = false, isZslDisabled = false, isZslCaptureMode = false,
+ captureType = CaptureType.PREVIEW, imageFormat = ImageFormat.PRIVATE
+ )
+ val surfaceConfigUseCaseConfigMap: MutableMap<Int, UseCaseConfig<*>> = HashMap()
+ surfaceConfigUseCaseConfigMap[1] = getFakeUseCaseConfigWithOptions(
+ camera2InteropOverride = false, isZslDisabled = false, isZslCaptureMode = false,
+ captureType = CaptureType.PREVIEW, imageFormat = ImageFormat.PRIVATE
+ )
+ TestCase.assertFalse(
+ StreamUseCaseUtil.areCaptureTypesEligible(
+ surfaceConfigAttachedSurfaceInfoMap,
+ surfaceConfigUseCaseConfigMap, surfaceConfigsWithStreamUseCase
+ )
+ )
+ }
+
+ @Test(expected = AssertionError::class)
+ fun areCaptureTypesEligible_mappingError() {
+ val surfaceConfigsWithStreamUseCase: MutableList<SurfaceConfig> = mutableListOf(
+ SurfaceConfig.create(
+ SurfaceConfig.ConfigType.PRIV, SurfaceConfig.ConfigSize.PREVIEW,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ ), SurfaceConfig.create(
+ SurfaceConfig.ConfigType.PRIV, SurfaceConfig.ConfigSize.RECORD,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD.toLong()
+ )
+ )
+ val surfaceConfigAttachedSurfaceInfoMap: Map<Int, AttachedSurfaceInfo> = HashMap()
+ val surfaceConfigUseCaseConfigMap: MutableMap<Int, UseCaseConfig<*>> = HashMap()
+ surfaceConfigUseCaseConfigMap[1] = getFakeUseCaseConfigWithOptions(
+ camera2InteropOverride = false, isZslDisabled = false, isZslCaptureMode = false,
+ captureType = CaptureType.VIDEO_CAPTURE, imageFormat = ImageFormat.PRIVATE
+ )
+ StreamUseCaseUtil.areCaptureTypesEligible(
+ surfaceConfigAttachedSurfaceInfoMap,
+ surfaceConfigUseCaseConfigMap, surfaceConfigsWithStreamUseCase
+ )
+ }
+
+ @Test
+ fun areCaptureTypesEligible_streamSharing_previewVideoStill_success() {
+ val surfaceConfigsWithStreamUseCase: MutableList<SurfaceConfig> = mutableListOf(
+ SurfaceConfig.create(
+ SurfaceConfig.ConfigType.PRIV, SurfaceConfig.ConfigSize.PREVIEW,
+ SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL.toLong()
+ )
+ )
+ val useCaseConfigFactory: UseCaseConfigFactory = FakeUseCaseConfigFactory()
+ val children: MutableSet<UseCase> = mutableSetOf(
+ FakeUseCase(
+ FakeUseCaseConfig.Builder().useCaseConfig,
+ CaptureType.PREVIEW
+ ), FakeUseCase(
+ FakeUseCaseConfig.Builder().useCaseConfig,
+ CaptureType.IMAGE_CAPTURE
+ ), FakeUseCase(
+ FakeUseCaseConfig.Builder().useCaseConfig,
+ CaptureType.VIDEO_CAPTURE
+ )
+ )
+ val streamSharing = StreamSharing(
+ FakeCamera(), children,
+ useCaseConfigFactory
+ )
+ val surfaceConfigAttachedSurfaceInfoMap: Map<Int, AttachedSurfaceInfo> = mutableMapOf()
+ val surfaceConfigUseCaseConfigMap: MutableMap<Int, UseCaseConfig<*>> = mutableMapOf()
+ surfaceConfigUseCaseConfigMap[0] =
+ streamSharing.getDefaultConfig(true, useCaseConfigFactory)!!
+ TestCase.assertTrue(
+ StreamUseCaseUtil.areCaptureTypesEligible(
+ surfaceConfigAttachedSurfaceInfoMap,
+ surfaceConfigUseCaseConfigMap, surfaceConfigsWithStreamUseCase
+ )
+ )
+ }
+
+ @Test
+ fun areCaptureTypesEligible_streamSharing_videoRecord_success() {
+ val surfaceConfigsWithStreamUseCase: MutableList<SurfaceConfig> = mutableListOf(
+ SurfaceConfig.create(
+ SurfaceConfig.ConfigType.PRIV, SurfaceConfig.ConfigSize.PREVIEW,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD.toLong()
+ )
+ )
+ val surfaceConfigAttachedSurfaceInfoMap: MutableMap<Int, AttachedSurfaceInfo> =
+ mutableMapOf()
+ val surfaceConfigUseCaseConfigMap: Map<Int, UseCaseConfig<*>> = mutableMapOf()
+ val captureTypes: MutableList<CaptureType> = ArrayList()
+ captureTypes.add(CaptureType.PREVIEW)
+ captureTypes.add(CaptureType.VIDEO_CAPTURE)
+ surfaceConfigAttachedSurfaceInfoMap[0] = AttachedSurfaceInfo.create(
+ SurfaceConfig.create(
+ SurfaceConfig.ConfigType.PRIV,
+ SurfaceConfig.ConfigSize.PREVIEW
+ ),
+ ImageFormat.PRIVATE,
+ SizeUtil.RESOLUTION_720P,
+ DynamicRange.SDR,
+ captureTypes, /*implementationOptions=*/
+ null, /*targetFrameRate=*/
+ null
+ )
+ TestCase.assertTrue(
+ StreamUseCaseUtil.areCaptureTypesEligible(
+ surfaceConfigAttachedSurfaceInfoMap,
+ surfaceConfigUseCaseConfigMap, surfaceConfigsWithStreamUseCase
+ )
+ )
+ }
+
+ @Test
+ fun areCaptureTypesEligible_streamSharing_fail() {
+ val surfaceConfigsWithStreamUseCase: MutableList<SurfaceConfig> = mutableListOf(
+ SurfaceConfig.create(
+ SurfaceConfig.ConfigType.PRIV, SurfaceConfig.ConfigSize.PREVIEW,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD.toLong()
+ )
+ )
+ val surfaceConfigAttachedSurfaceInfoMap: MutableMap<Int, AttachedSurfaceInfo> =
+ mutableMapOf()
+ val surfaceConfigUseCaseConfigMap: Map<Int, UseCaseConfig<*>> = mutableMapOf()
+ val captureTypes: MutableList<CaptureType> =
+ mutableListOf(CaptureType.PREVIEW, CaptureType.IMAGE_CAPTURE, CaptureType.VIDEO_CAPTURE)
+ surfaceConfigAttachedSurfaceInfoMap[0] = AttachedSurfaceInfo.create(
+ SurfaceConfig.create(
+ SurfaceConfig.ConfigType.PRIV,
+ SurfaceConfig.ConfigSize.PREVIEW
+ ),
+ ImageFormat.PRIVATE,
+ SizeUtil.RESOLUTION_720P,
+ DynamicRange.SDR,
+ captureTypes, /*implementationOptions=*/
+ null, /*targetFrameRate=*/
+ null
+ )
+ TestCase.assertFalse(
+ StreamUseCaseUtil.areCaptureTypesEligible(
+ surfaceConfigAttachedSurfaceInfoMap,
+ surfaceConfigUseCaseConfigMap, surfaceConfigsWithStreamUseCase
+ )
+ )
+ }
+
+ @Test
+ fun populateStreamUseCaseStreamSpecOptionWithSupportedSurfaceConfigs_success() {
+ val surfaceConfigsWithStreamUseCase: MutableList<SurfaceConfig> = mutableListOf(
+ SurfaceConfig.create(
+ SurfaceConfig.ConfigType.PRIV, SurfaceConfig.ConfigSize.PREVIEW,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ ), SurfaceConfig.create(
+ SurfaceConfig.ConfigType.PRIV, SurfaceConfig.ConfigSize.RECORD,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD.toLong()
+ )
+ )
+ val surfaceConfigAttachedSurfaceInfoMap: MutableMap<Int, AttachedSurfaceInfo> =
+ mutableMapOf()
+ val attachedSurfaceInfo = getFakeAttachedSurfaceInfo(
+ camera2InteropOverride = false, isZslDisabled = false, isZslCaptureMode = false,
+ captureType = CaptureType.PREVIEW, imageFormat = ImageFormat.PRIVATE
+ )
+ surfaceConfigAttachedSurfaceInfoMap[0] = attachedSurfaceInfo
+ val surfaceConfigUseCaseConfigMap: MutableMap<Int, UseCaseConfig<*>> = mutableMapOf()
+ val useCaseConfig = getFakeUseCaseConfigWithOptions(
+ camera2InteropOverride = false, isZslDisabled = false, isZslCaptureMode = false,
+ captureType = CaptureType.VIDEO_CAPTURE, imageFormat = ImageFormat.PRIVATE
+ )
+ surfaceConfigUseCaseConfigMap[1] = useCaseConfig
+ val attachedSurfaceStreamSpecMap: MutableMap<AttachedSurfaceInfo, StreamSpec> =
+ mutableMapOf()
+ val suggestedStreamSpecMap: MutableMap<UseCaseConfig<*>, StreamSpec> = mutableMapOf()
+ suggestedStreamSpecMap[useCaseConfig] =
+ getFakeStreamSpecFromFakeUseCaseConfig(useCaseConfig)
+ StreamUseCaseUtil.populateStreamUseCaseStreamSpecOptionWithSupportedSurfaceConfigs(
+ suggestedStreamSpecMap, attachedSurfaceStreamSpecMap,
+ surfaceConfigAttachedSurfaceInfoMap,
+ surfaceConfigUseCaseConfigMap, surfaceConfigsWithStreamUseCase
+ )
+ TestCase.assertTrue(
+ (attachedSurfaceStreamSpecMap[attachedSurfaceInfo]!!.implementationOptions!!
+ .retrieveOption(
+ StreamUseCaseUtil.STREAM_USE_CASE_STREAM_SPEC_OPTION
+ )
+ == CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong())
+ )
+ TestCase.assertTrue(
+ (suggestedStreamSpecMap[useCaseConfig]!!.implementationOptions!!.retrieveOption(
+ StreamUseCaseUtil.STREAM_USE_CASE_STREAM_SPEC_OPTION
+ )
+ == CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD.toLong())
+ )
+ }
+
+ @Test(expected = AssertionError::class)
+ fun populateStreamUseCaseStreamSpecOptionWithSupportedSurfaceConfigs_mappingError() {
+ val surfaceConfigsWithStreamUseCase: MutableList<SurfaceConfig> = mutableListOf(
+ SurfaceConfig.create(
+ SurfaceConfig.ConfigType.PRIV, SurfaceConfig.ConfigSize.PREVIEW,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+ ), SurfaceConfig.create(
+ SurfaceConfig.ConfigType.PRIV, SurfaceConfig.ConfigSize.RECORD,
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD.toLong()
+ )
+ )
+ val surfaceConfigAttachedSurfaceInfoMap: Map<Int, AttachedSurfaceInfo> = HashMap()
+ val surfaceConfigUseCaseConfigMap: MutableMap<Int, UseCaseConfig<*>> = HashMap()
+ val useCaseConfig = getFakeUseCaseConfigWithOptions(
+ camera2InteropOverride = false, isZslDisabled = false, isZslCaptureMode = false,
+ captureType = CaptureType.VIDEO_CAPTURE, imageFormat = ImageFormat.PRIVATE
+ )
+ surfaceConfigUseCaseConfigMap[1] = useCaseConfig
+ val attachedSurfaceStreamSpecMap: MutableMap<AttachedSurfaceInfo, StreamSpec> = HashMap()
+ val suggestedStreamSpecMap: MutableMap<UseCaseConfig<*>, StreamSpec> = HashMap()
+ suggestedStreamSpecMap[useCaseConfig] =
+ getFakeStreamSpecFromFakeUseCaseConfig(useCaseConfig)
+ StreamUseCaseUtil.populateStreamUseCaseStreamSpecOptionWithSupportedSurfaceConfigs(
+ suggestedStreamSpecMap, attachedSurfaceStreamSpecMap,
+ surfaceConfigAttachedSurfaceInfoMap,
+ surfaceConfigUseCaseConfigMap, surfaceConfigsWithStreamUseCase
+ )
+ }
+
+ private fun getFakeUseCaseConfigWithOptions(
+ camera2InteropOverride: Boolean,
+ isZslDisabled: Boolean,
+ isZslCaptureMode: Boolean,
+ captureType: CaptureType,
+ imageFormat: Int
+ ): UseCaseConfig<*> {
+ val fakeUseCaseConfigBuilder = FakeUseCaseConfig.Builder(
+ captureType
+ )
+ val fakeConfig = fakeUseCaseConfigBuilder.mutableConfig
+ if (camera2InteropOverride) {
+ fakeConfig.insertOption(
+ streamUseCaseOption,
+ TEST_STREAM_USE_CASE_OPTION_VALUE
+ )
+ }
+ fakeConfig.insertOption(UseCaseConfig.OPTION_ZSL_DISABLED, isZslDisabled)
+ fakeConfig.insertOption(
+ ImageCaptureConfig.OPTION_IMAGE_CAPTURE_MODE,
+ if (isZslCaptureMode) ImageCapture.CAPTURE_MODE_ZERO_SHUTTER_LAG
+ else TEST_OPTION_IMAGE_CAPTURE_MODE_VALUE
+ )
+ fakeConfig.insertOption(ImageCaptureConfig.OPTION_INPUT_FORMAT, imageFormat)
+ return fakeUseCaseConfigBuilder.useCaseConfig
+ }
+
+ private fun getFakeAttachedSurfaceInfo(
+ camera2InteropOverride: Boolean,
+ isZslDisabled: Boolean,
+ isZslCaptureMode: Boolean,
+ captureType: CaptureType,
+ imageFormat: Int
+ ): AttachedSurfaceInfo {
+ val useCaseConfig = getFakeUseCaseConfigWithOptions(
+ camera2InteropOverride,
+ isZslDisabled, isZslCaptureMode, captureType, imageFormat
+ )
+ val captureTypes: MutableList<CaptureType> = ArrayList()
+ captureTypes.add(useCaseConfig.captureType)
+ return AttachedSurfaceInfo.create(
+ SurfaceConfig.create(
+ SurfaceConfig.ConfigType.PRIV,
+ SurfaceConfig.ConfigSize.PREVIEW
+ ),
+ useCaseConfig.inputFormat,
+ SizeUtil.RESOLUTION_720P,
+ DynamicRange.SDR,
+ captureTypes,
+ StreamUseCaseUtil.getStreamSpecImplementationOptions(
+ useCaseConfig
+ ),
+ null /*targetFrameRate=*/
+ )
+ }
+
+ private fun getFakeStreamSpecFromFakeUseCaseConfig(fakeUseCaseConfig: UseCaseConfig<*>):
+ StreamSpec {
+ return StreamSpec.builder(SizeUtil.RESOLUTION_720P)
+ .setDynamicRange(DynamicRange.UNSPECIFIED)
+ .setImplementationOptions(
+ StreamUseCaseUtil.getStreamSpecImplementationOptions(
+ fakeUseCaseConfig
+ )
+ ).build()
+ }
+
+ private fun getCameraMetadata(
+ noAvailableStreamUseCase: Boolean
+ ): androidx.camera.camera2.pipe.CameraMetadata {
+ val characteristicsMap: MutableMap<CameraCharacteristics.Key<*>, Any?> = mutableMapOf()
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU && !noAvailableStreamUseCase) {
+ val uc = longArrayOf(
+ CameraCharacteristics.SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT.toLong(),
+ CameraCharacteristics.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong(),
+ SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL.toLong(),
+ CameraCharacteristics.SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE.toLong(),
+ CameraCharacteristics.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL.toLong(),
+ CameraCharacteristics.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD.toLong()
+ )
+ characteristicsMap[CameraCharacteristics.SCALER_AVAILABLE_STREAM_USE_CASES] = uc
+ }
+ return FakeCameraMetadata(
+ cameraId = CameraId.fromCamera2Id(CAMERA_ID_0),
+ characteristics = characteristicsMap
+ )
+ }
+
+ companion object {
+ private const val CAMERA_ID_0 = "0"
+ private const val TEST_STREAM_USE_CASE_OPTION_VALUE =
+ CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW.toLong()
+
+ @CaptureMode
+ private val TEST_OPTION_IMAGE_CAPTURE_MODE_VALUE =
+ ImageCapture.CAPTURE_MODE_MAXIMIZE_QUALITY
+ }
+}
diff --git a/camera/camera-camera2-pipe-testing/lint-baseline.xml b/camera/camera-camera2-pipe-testing/lint-baseline.xml
new file mode 100644
index 0000000..fd988ca
--- /dev/null
+++ b/camera/camera-camera2-pipe-testing/lint-baseline.xml
@@ -0,0 +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">
+
+ <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
index 296ac95..de258ca 100644
--- a/camera/camera-camera2-pipe/lint-baseline.xml
+++ b/camera/camera-camera2-pipe/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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="NewApi"
@@ -10,4 +10,22 @@
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/src/androidTest/java/androidx/camera/camera2/internal/Camera2CameraControlImplDeviceTest.java b/camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/internal/Camera2CameraControlImplDeviceTest.java
index 1a79267..923e44a 100644
--- a/camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/internal/Camera2CameraControlImplDeviceTest.java
+++ b/camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/internal/Camera2CameraControlImplDeviceTest.java
@@ -20,6 +20,7 @@
import static android.hardware.camera2.CameraMetadata.CONTROL_AE_MODE_ON;
import static android.hardware.camera2.CameraMetadata.CONTROL_AE_MODE_ON_ALWAYS_FLASH;
import static android.hardware.camera2.CameraMetadata.CONTROL_AE_MODE_ON_AUTO_FLASH;
+import static android.hardware.camera2.CameraMetadata.CONTROL_AE_MODE_ON_EXTERNAL_FLASH;
import static android.hardware.camera2.CameraMetadata.CONTROL_AF_MODE_AUTO;
import static android.hardware.camera2.CameraMetadata.CONTROL_AF_MODE_CONTINUOUS_PICTURE;
import static android.hardware.camera2.CameraMetadata.CONTROL_AF_MODE_OFF;
@@ -30,9 +31,11 @@
import static com.google.common.truth.Truth.assertThat;
+import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.junit.Assume.assumeFalse;
+import static org.junit.Assume.assumeThat;
import static org.junit.Assume.assumeTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
@@ -133,25 +136,29 @@
@Before
public void setUp() throws InterruptedException {
- assumeTrue(CameraUtil.hasCameraWithLensFacing(CameraSelector.LENS_FACING_BACK));
+ mHandlerThread = new HandlerThread("ControlThread");
+ mHandlerThread.start();
+ mHandler = HandlerCompat.createAsync(mHandlerThread.getLooper());
Context context = ApplicationProvider.getApplicationContext();
CameraXConfig config = Camera2Config.defaultConfig();
CameraXUtil.initialize(context, config);
- mCameraCharacteristics = CameraUtil.getCameraCharacteristics(
- CameraSelector.LENS_FACING_BACK);
+ setUp(CameraSelector.LENS_FACING_BACK);
+ }
+
+ private void setUp(int lensFacing) throws InterruptedException {
+ assumeTrue(CameraUtil.hasCameraWithLensFacing(lensFacing));
+
+ mCameraCharacteristics = CameraUtil.getCameraCharacteristics(lensFacing);
Boolean hasFlashUnit =
mCameraCharacteristics.get(CameraCharacteristics.FLASH_INFO_AVAILABLE);
mHasFlashUnit = hasFlashUnit != null && hasFlashUnit.booleanValue();
mControlUpdateCallback = mock(CameraControlInternal.ControlUpdateCallback.class);
- mHandlerThread = new HandlerThread("ControlThread");
- mHandlerThread.start();
- mHandler = HandlerCompat.createAsync(mHandlerThread.getLooper());
ScheduledExecutorService executorService = CameraXExecutors.newHandlerExecutor(mHandler);
- String cameraId = CameraUtil.getCameraIdWithLensFacing(CameraSelector.LENS_FACING_BACK);
+ String cameraId = CameraUtil.getCameraIdWithLensFacing(lensFacing);
mCameraCharacteristicsCompat = CameraCharacteristicsCompat.toCameraCharacteristicsCompat(
mCameraCharacteristics, cameraId);
mCamera2CameraControlImpl = new Camera2CameraControlImpl(mCameraCharacteristicsCompat,
@@ -331,6 +338,53 @@
}
@Test
+ @SdkSuppress(minSdkVersion = 28)
+ public void enableExternalFlashAeMode_aeModeSetAndRequestUpdated() throws InterruptedException {
+ setUp(CameraSelector.LENS_FACING_FRONT);
+
+ assumeThat("CONTROL_AE_MODE_ON_EXTERNAL_FLASH not supported",
+ mCamera2CameraControlImpl.getSupportedAeMode(CONTROL_AE_MODE_ON_EXTERNAL_FLASH),
+ equalTo(CONTROL_AE_MODE_ON_EXTERNAL_FLASH));
+
+ mCamera2CameraControlImpl.getFocusMeteringControl().enableExternalFlashAeMode(true);
+
+ HandlerUtil.waitForLooperToIdle(mHandler);
+
+ verify(mControlUpdateCallback, times(1)).onCameraControlUpdateSessionConfig();
+ SessionConfig sessionConfig = mCamera2CameraControlImpl.getSessionConfig();
+ Camera2ImplConfig camera2Config = new Camera2ImplConfig(
+ sessionConfig.getImplementationOptions());
+
+ assertAeMode(camera2Config, CONTROL_AE_MODE_ON_EXTERNAL_FLASH);
+ }
+
+ @Test
+ @SdkSuppress(minSdkVersion = 28)
+ public void disableExternalFlashAeMode_aeModeUnsetAndRequestUpdated()
+ throws InterruptedException {
+ setUp(CameraSelector.LENS_FACING_FRONT);
+
+ assumeThat("CONTROL_AE_MODE_ON_EXTERNAL_FLASH not supported",
+ mCamera2CameraControlImpl.getSupportedAeMode(CONTROL_AE_MODE_ON_EXTERNAL_FLASH),
+ equalTo(CONTROL_AE_MODE_ON_EXTERNAL_FLASH));
+
+ mCamera2CameraControlImpl.getFocusMeteringControl().enableExternalFlashAeMode(true);
+ HandlerUtil.waitForLooperToIdle(mHandler);
+
+ mCamera2CameraControlImpl.getFocusMeteringControl().enableExternalFlashAeMode(false);
+
+ HandlerUtil.waitForLooperToIdle(mHandler);
+
+ verify(mControlUpdateCallback, times(2)).onCameraControlUpdateSessionConfig();
+ SessionConfig sessionConfig = mCamera2CameraControlImpl.getSessionConfig();
+ Camera2ImplConfig camera2Config = new Camera2ImplConfig(
+ sessionConfig.getImplementationOptions());
+
+ assertThat(camera2Config.getCaptureRequestOption(CaptureRequest.CONTROL_AE_MODE,
+ null)).isNotEqualTo(CONTROL_AE_MODE_ON_EXTERNAL_FLASH);
+ }
+
+ @Test
public void enableTorch_aeModeSetAndRequestUpdated() throws InterruptedException {
assumeTrue(mHasFlashUnit);
mCamera2CameraControlImpl.enableTorch(true);
diff --git a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CameraControlImpl.java b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CameraControlImpl.java
index c925ee0..edefc0f 100644
--- a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CameraControlImpl.java
+++ b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CameraControlImpl.java
@@ -48,6 +48,7 @@
import androidx.camera.core.FocusMeteringAction;
import androidx.camera.core.FocusMeteringResult;
import androidx.camera.core.ImageCapture;
+import androidx.camera.core.ImageCapture.ScreenFlashUiControl;
import androidx.camera.core.Logger;
import androidx.camera.core.impl.CameraCaptureCallback;
import androidx.camera.core.impl.CameraCaptureFailure;
@@ -131,6 +132,9 @@
private final Camera2CapturePipeline mCamera2CapturePipeline;
@GuardedBy("mLock")
private int mUseCount = 0;
+
+ private ScreenFlashUiControl mScreenFlashUiControl;
+
// use volatile modifier to make these variables in sync in all threads.
private volatile boolean mIsTorchOn = false;
@ImageCapture.FlashMode
@@ -208,7 +212,7 @@
mAutoFlashAEModeDisabler = new AutoFlashAEModeDisabler(cameraQuirks);
mCamera2CameraControl = new Camera2CameraControl(this, mExecutor);
mCamera2CapturePipeline = new Camera2CapturePipeline(this, mCameraCharacteristics,
- cameraQuirks, mExecutor);
+ cameraQuirks, mExecutor, scheduler);
mExecutor.execute(
() -> addCaptureResultListener(mCamera2CameraControl.getCaptureRequestListener()));
}
@@ -313,6 +317,9 @@
mTorchControl.setActive(isActive);
mExposureControl.setActive(isActive);
mCamera2CameraControl.setActive(isActive);
+ if (!isActive) {
+ mScreenFlashUiControl = null;
+ }
}
@ExecutedBy("mExecutor")
@@ -388,6 +395,17 @@
mFlashModeChangeSessionUpdateFuture = updateSessionConfigAsync();
}
+ /** {@inheritDoc} */
+ @Override
+ public void setScreenFlashUiControl(@Nullable ScreenFlashUiControl screenFlashUiControl) {
+ mScreenFlashUiControl = screenFlashUiControl;
+ }
+
+ @Nullable
+ public ScreenFlashUiControl getScreenFlashUiControl() {
+ return mScreenFlashUiControl;
+ }
+
@Override
public void addZslConfig(@NonNull SessionConfig.Builder sessionConfigBuilder) {
mZslControl.addZslConfig(sessionConfigBuilder);
@@ -652,6 +670,8 @@
if (mIsTorchOn) {
builder.setCaptureRequestOptionWithPriority(CaptureRequest.FLASH_MODE,
CaptureRequest.FLASH_MODE_TORCH, Config.OptionPriority.REQUIRED);
+ } else if (mFocusMeteringControl.isExternalFlashAeModeEnabled()) {
+ aeMode = CaptureRequest.CONTROL_AE_MODE_ON_EXTERNAL_FLASH;
} else {
switch (mFlashMode) {
case FLASH_MODE_OFF:
diff --git a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CapturePipeline.java b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CapturePipeline.java
index 7da2f82..247473c 100644
--- a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CapturePipeline.java
+++ b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CapturePipeline.java
@@ -23,6 +23,7 @@
import static androidx.camera.core.ImageCapture.FLASH_MODE_AUTO;
import static androidx.camera.core.ImageCapture.FLASH_MODE_OFF;
import static androidx.camera.core.ImageCapture.FLASH_MODE_ON;
+import static androidx.camera.core.ImageCapture.FLASH_MODE_SCREEN;
import static androidx.camera.core.ImageCapture.FLASH_TYPE_USE_TORCH_AS_FLASH;
import static androidx.camera.core.ImageCapture.FlashMode;
import static androidx.camera.core.ImageCapture.FlashType;
@@ -34,6 +35,7 @@
import android.hardware.camera2.CaptureRequest;
import android.hardware.camera2.CaptureResult;
import android.hardware.camera2.TotalCaptureResult;
+import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -47,6 +49,7 @@
import androidx.camera.camera2.internal.compat.workaround.OverrideAeModeForStillCapture;
import androidx.camera.camera2.internal.compat.workaround.UseTorchAsFlash;
import androidx.camera.camera2.interop.ExperimentalCamera2Interop;
+import androidx.camera.core.ImageCapture;
import androidx.camera.core.ImageCaptureException;
import androidx.camera.core.ImageProxy;
import androidx.camera.core.Logger;
@@ -70,9 +73,12 @@
import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
+import java.util.Objects;
import java.util.Set;
import java.util.concurrent.Executor;
+import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicReference;
/**
* Implementation detail of the submitStillCaptures method.
@@ -137,6 +143,9 @@
@CameraExecutor
private final Executor mExecutor;
+ @NonNull
+ private final ScheduledExecutorService mScheduler;
+
private final boolean mIsLegacyDevice;
private int mTemplate = CameraDevice.TEMPLATE_PREVIEW;
@@ -147,13 +156,15 @@
Camera2CapturePipeline(@NonNull Camera2CameraControlImpl cameraControl,
@NonNull CameraCharacteristicsCompat cameraCharacteristics,
@NonNull Quirks cameraQuirks,
- @CameraExecutor @NonNull Executor executor) {
+ @CameraExecutor @NonNull Executor executor,
+ @NonNull ScheduledExecutorService scheduler) {
mCameraControl = cameraControl;
Integer level =
cameraCharacteristics.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
mIsLegacyDevice = level != null
&& level == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY;
mExecutor = executor;
+ mScheduler = scheduler;
mCameraQuirk = cameraQuirks;
mUseTorchAsFlash = new UseTorchAsFlash(cameraQuirks);
mHasFlashUnit = FlashAvailabilityChecker.isFlashAvailable(cameraCharacteristics::get);
@@ -187,13 +198,19 @@
pipeline.addTask(new AfTask(mCameraControl));
}
- if (mHasFlashUnit) {
- if (isTorchAsFlash(flashType)) {
- pipeline.addTask(new TorchTask(mCameraControl, flashMode, mExecutor));
- } else {
- pipeline.addTask(new AePreCaptureTask(mCameraControl, flashMode, aeQuirk));
+ if (flashMode == FLASH_MODE_SCREEN) {
+ pipeline.addTask(new ScreenFlashTask(mCameraControl, mExecutor, mScheduler));
+ } else {
+ if (mHasFlashUnit) {
+ if (isTorchAsFlash(flashType)) {
+ pipeline.addTask(new TorchTask(mCameraControl, flashMode, mExecutor));
+ } else {
+ pipeline.addTask(new AePreCaptureTask(mCameraControl, flashMode, aeQuirk));
+ }
}
- } // If there is no flash unit, skip the flash related task instead of failing the pipeline.
+ // If there is no flash unit, skip the flash related task instead of failing the
+ // pipeline.
+ }
return Futures.nonCancellationPropagating(
pipeline.executeCapture(captureConfigs, flashMode));
@@ -657,8 +674,95 @@
}
}
+ /**
+ * Task to trigger ScreenFlashCallback and AePreCapture if screen flash is enabled.
+ */
+ static class ScreenFlashTask implements PipelineTask {
+ private static final long CHECK_3A_WITH_SCREEN_FLASH_TIMEOUT_IN_NS =
+ TimeUnit.SECONDS.toNanos(2);
+
+ private final Camera2CameraControlImpl mCameraControl;
+ private final Executor mExecutor;
+ private final ScheduledExecutorService mScheduler;
+ private final ImageCapture.ScreenFlashUiControl mScreenFlashUiControl;
+
+ ScreenFlashTask(@NonNull Camera2CameraControlImpl cameraControl,
+ @NonNull Executor executor, @NonNull ScheduledExecutorService scheduler) {
+ mCameraControl = cameraControl;
+ mExecutor = executor;
+ mScheduler = scheduler;
+
+ mScreenFlashUiControl =
+ Objects.requireNonNull(mCameraControl.getScreenFlashUiControl());
+ }
+
+ @ExecutedBy("mExecutor")
+ @NonNull
+ @Override
+ public ListenableFuture<Boolean> preCapture(@Nullable TotalCaptureResult captureResult) {
+ Logger.d(TAG, "ScreenFlashTask#preCapture");
+
+ AtomicReference<ImageCapture.ScreenFlashUiCompleter> screenFlashUiCompleter =
+ new AtomicReference<>();
+
+ ListenableFuture<Void> uiAppliedFuture = CallbackToFutureAdapter.getFuture(
+ completer -> {
+ screenFlashUiCompleter.set(() -> {
+ Logger.d(TAG, "ScreenFlashTask#preCapture: UI change applied");
+ completer.set(null);
+ });
+ return "OnScreenFlashUiApplied";
+ });
+
+ ListenableFuture<Void> future = CallbackToFutureAdapter.getFuture(completer -> {
+ CameraXExecutors.mainThreadExecutor().execute(() -> {
+ mScreenFlashUiControl.applyScreenFlashUi(screenFlashUiCompleter.get());
+ completer.set(null);
+ });
+ return "OnScreenFlashStart";
+ });
+
+ return FutureChain.from(future).transformAsync(
+ input -> mCameraControl.getFocusMeteringControl().enableExternalFlashAeMode(
+ true),
+ mExecutor
+ ).transformAsync(
+ input -> Futures.makeTimeoutFuture(TimeUnit.SECONDS.toMillis(
+ ImageCapture.SCREEN_FLASH_UI_APPLY_TIMEOUT_SECONDS),
+ mScheduler, null,
+ uiAppliedFuture),
+ mExecutor
+ ).transformAsync(
+ input -> mCameraControl.getFocusMeteringControl().triggerAePrecapture(),
+ mExecutor
+ ).transformAsync(
+ input -> waitForResult(CHECK_3A_WITH_SCREEN_FLASH_TIMEOUT_IN_NS, mCameraControl,
+ (result) -> is3AConverged(result, false)), mExecutor
+ ).transform(input -> false, CameraXExecutors.directExecutor());
+ }
+
+ @ExecutedBy("mExecutor")
+ @Override
+ public boolean isCaptureResultNeeded() {
+ return false;
+ }
+
+ @ExecutedBy("mExecutor")
+ @Override
+ public void postCapture() {
+ Logger.d(TAG, "ScreenFlashTask#postCapture");
+ mCameraControl.getFocusMeteringControl().enableExternalFlashAeMode(false).addListener(
+ () -> Log.d(TAG, "enableExternalFlashAeMode disabled"), mExecutor
+ );
+ mCameraControl.getFocusMeteringControl().cancelAfAeTrigger(false, true);
+ CameraXExecutors.mainThreadExecutor().execute(
+ mScreenFlashUiControl::clearScreenFlashUi);
+ }
+ }
+
static boolean isFlashRequired(@FlashMode int flashMode, @Nullable TotalCaptureResult result) {
switch (flashMode) {
+ case FLASH_MODE_SCREEN:
case FLASH_MODE_ON:
return true;
case FLASH_MODE_AUTO:
diff --git a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/FocusMeteringControl.java b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/FocusMeteringControl.java
index 3be2577..bce552b 100644
--- a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/FocusMeteringControl.java
+++ b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/FocusMeteringControl.java
@@ -18,11 +18,13 @@
import android.graphics.PointF;
import android.graphics.Rect;
+import android.hardware.camera2.CameraCharacteristics;
import android.hardware.camera2.CameraDevice;
import android.hardware.camera2.CaptureRequest;
import android.hardware.camera2.CaptureResult;
import android.hardware.camera2.params.MeteringRectangle;
import android.os.Build;
+import android.util.Log;
import android.util.Rational;
import androidx.annotation.NonNull;
@@ -37,6 +39,7 @@
import androidx.camera.core.CameraControl;
import androidx.camera.core.FocusMeteringAction;
import androidx.camera.core.FocusMeteringResult;
+import androidx.camera.core.Logger;
import androidx.camera.core.MeteringPoint;
import androidx.camera.core.impl.CameraCaptureCallback;
import androidx.camera.core.impl.CameraCaptureFailure;
@@ -46,6 +49,7 @@
import androidx.camera.core.impl.Config;
import androidx.camera.core.impl.Quirks;
import androidx.camera.core.impl.annotation.ExecutedBy;
+import androidx.camera.core.impl.utils.futures.Futures;
import androidx.concurrent.futures.CallbackToFutureAdapter;
import androidx.concurrent.futures.CallbackToFutureAdapter.Completer;
@@ -82,6 +86,8 @@
@RequiresApi(21) // TODO(b/200306659): Remove and replace with annotation on package-info.java
@OptIn(markerClass = ExperimentalCamera2Interop.class)
class FocusMeteringControl {
+ private static final String TAG = "FocusMeteringControl";
+
static final long AUTO_FOCUS_TIMEOUT_DURATION = 5000;
private final Camera2CameraControlImpl mCameraControl;
@SuppressWarnings("WeakerAccess") /* synthetic accessor */
@@ -116,6 +122,9 @@
private MeteringRectangle[] mAwbRects = EMPTY_RECTANGLES;
CallbackToFutureAdapter.Completer<FocusMeteringResult> mRunningActionCompleter = null;
CallbackToFutureAdapter.Completer<Void> mRunningCancelCompleter = null;
+
+ private boolean mIsExternalFlashAeModeEnabled = false;
+ private Camera2CameraControlImpl.CaptureResultListener mSessionListenerForAeMode = null;
//**************************************************************************************//
@@ -427,6 +436,18 @@
}
/**
+ * Returns a {@link ListenableFuture} as result after triggering AE precapture.
+ */
+ ListenableFuture<Void> triggerAePrecapture() {
+ return CallbackToFutureAdapter.getFuture(completer -> {
+ mExecutor.execute(() -> {
+ triggerAePrecapture(completer);
+ });
+ return "triggerAePrecapture";
+ });
+ }
+
+ /**
* Trigger an AE precapture sequence.
*
* @param completer used to complete the associated {@link ListenableFuture} when the
@@ -453,6 +474,7 @@
@Override
public void onCaptureCompleted(@NonNull CameraCaptureResult cameraCaptureResult) {
if (completer != null) {
+ Logger.d(TAG, "triggerAePrecapture: triggering capture request completed");
completer.set(null);
}
}
@@ -500,6 +522,98 @@
mCameraControl.submitCaptureRequestsInternal(Collections.singletonList(builder.build()));
}
+ /**
+ * Returns whether external flash AE mode is enabled.
+ *
+ * @see #enableExternalFlashAeMode
+ */
+ boolean isExternalFlashAeModeEnabled() {
+ return mIsExternalFlashAeModeEnabled;
+ }
+
+ /**
+ * Enables or disables AE_MODE_ON_EXTERNAL_FLASH.
+ *
+ * <p> It will be enabled only if the AE mode is supported i.e. API >= 28 and available in
+ * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_MODES}.
+ *
+ * @param enable Whether to enable or disable the AE mode.
+ * @return A {@link ListenableFuture} that is completed when the capture request to set the
+ * AE mode has been processed in framework side.
+ */
+ ListenableFuture<Void> enableExternalFlashAeMode(boolean enable) {
+ if (Build.VERSION.SDK_INT < 28) {
+ Log.d(TAG, "CONTROL_AE_MODE_ON_EXTERNAL_FLASH is not supported in API "
+ + Build.VERSION.SDK_INT);
+ return Futures.immediateFuture(null);
+ }
+
+ if (mCameraControl.getSupportedAeMode(CaptureRequest.CONTROL_AE_MODE_ON_EXTERNAL_FLASH)
+ != CaptureRequest.CONTROL_AE_MODE_ON_EXTERNAL_FLASH) {
+ Log.d(TAG, "CONTROL_AE_MODE_ON_EXTERNAL_FLASH is not supported in this device");
+ return Futures.immediateFuture(null);
+ }
+
+ Log.d(TAG, "enableExternalFlashAeMode: CONTROL_AE_MODE_ON_EXTERNAL_FLASH supported");
+
+ return CallbackToFutureAdapter.getFuture(completer -> {
+ mExecutor.execute(() -> {
+ mCameraControl.removeCaptureResultListener(mSessionListenerForAeMode);
+ mIsExternalFlashAeModeEnabled = enable;
+ enableExternalFlashAeMode(completer);
+ });
+ return "enableExternalFlashAeMode";
+ });
+ }
+
+ /**
+ * Enables or disables AE_MODE_ON_EXTERNAL_FLASH.
+ *
+ * @param completer used to complete the associated {@link ListenableFuture} when the
+ * operation succeeds or fails. Passing null to simply ignore the result.
+ *
+ * @see #enableExternalFlashAeMode
+ */
+ @RequiresApi(28)
+ @ExecutedBy("mExecutor")
+ private void enableExternalFlashAeMode(@Nullable Completer<Void> completer) {
+ if (!mIsActive) {
+ if (completer != null) {
+ completer.setException(
+ new CameraControl.OperationCanceledException("Camera is not active."));
+ }
+ return;
+ }
+
+ long sessionUpdateId = mCameraControl.updateSessionConfigSynchronous();
+
+ // Will be called on mExecutor since mSessionCallback was created with mExecutor
+ mSessionListenerForAeMode =
+ result -> {
+ boolean isAeModeExternalFlash = result.get(CaptureResult.CONTROL_AE_MODE)
+ == CaptureRequest.CONTROL_AE_MODE_ON_EXTERNAL_FLASH;
+ Logger.d(TAG, "enableExternalFlashAeMode: "
+ + "isAeModeExternalFlash = " + isAeModeExternalFlash);
+
+ // Check if the lock values are as desired
+ if (isAeModeExternalFlash == mIsExternalFlashAeModeEnabled) {
+ // Ensure the session is actually updated
+ if (Camera2CameraControlImpl.isSessionUpdated(result, sessionUpdateId)) {
+ Logger.d(TAG, "enableExternalFlashAeMode: session updated with "
+ + "isAeModeExternalFlash = " + isAeModeExternalFlash);
+ if (completer != null) {
+ completer.set(null);
+ }
+ return true; // remove this listener
+ }
+ }
+
+ return false; // continue checking
+ };
+
+ mCameraControl.addCaptureResultListener(mSessionListenerForAeMode);
+ }
+
@ExecutedBy("mExecutor")
private void disableAutoCancel() {
if (mAutoCancelHandle != null) {
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 2c17f59..3d5f2e0 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,7 @@
import android.media.Image
import android.media.ImageWriter
import android.os.Build
+import android.os.Looper
import android.view.Surface
import androidx.annotation.RequiresApi
import androidx.camera.camera2.impl.Camera2ImplConfig
@@ -41,6 +42,7 @@
import androidx.camera.core.ImageCapture.FLASH_MODE_AUTO
import androidx.camera.core.ImageCapture.FLASH_MODE_OFF
import androidx.camera.core.ImageCapture.FLASH_MODE_ON
+import androidx.camera.core.ImageCapture.FLASH_MODE_SCREEN
import androidx.camera.core.ImageCaptureException
import androidx.camera.core.impl.CameraCaptureFailure
import androidx.camera.core.impl.CameraCaptureMetaData.AeState
@@ -53,10 +55,12 @@
import androidx.camera.core.impl.ImmediateSurface
import androidx.camera.core.impl.Quirks
import androidx.camera.core.impl.SessionConfig
+import androidx.camera.core.impl.utils.executor.CameraXExecutors
import androidx.camera.core.impl.utils.futures.Futures
import androidx.camera.core.internal.CameraCaptureResultImageInfo
import androidx.camera.testing.impl.fakes.FakeCameraCaptureResult
import androidx.camera.testing.impl.fakes.FakeImageProxy
+import androidx.camera.testing.impl.mocks.MockScreenFlashUiControl
import androidx.concurrent.futures.await
import androidx.test.core.app.ApplicationProvider
import com.google.common.truth.Truth
@@ -64,6 +68,7 @@
import com.google.common.util.concurrent.ListenableFuture
import java.util.concurrent.CountDownLatch
import java.util.concurrent.ExecutionException
+import java.util.concurrent.Executor
import java.util.concurrent.Executors
import java.util.concurrent.ScheduledFuture
import java.util.concurrent.TimeUnit
@@ -79,6 +84,7 @@
import org.mockito.Mockito
import org.mockito.Mockito.mock
import org.robolectric.RobolectricTestRunner
+import org.robolectric.Shadows
import org.robolectric.annotation.Config
import org.robolectric.annotation.internal.DoNotInstrument
import org.robolectric.shadow.api.Shadow
@@ -134,9 +140,12 @@
field = value
}
+ private lateinit var screenFlashControl: MockScreenFlashUiControl
+
@Before
fun setUp() {
initCameras()
+ screenFlashControl = MockScreenFlashUiControl()
}
@After
@@ -341,6 +350,100 @@
}
@Test
+ fun minLatency_screenFlashCapture_screenFlashTaskInvokedProperly() {
+ screenFlash_screenFlashUiControlInvokedProperly(ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY)
+ }
+
+ @Test
+ fun maxQuality_screenFlashCapture_screenFlashTaskInvokedProperly() {
+ screenFlash_screenFlashUiControlInvokedProperly(ImageCapture.CAPTURE_MODE_MAXIMIZE_QUALITY)
+ }
+
+ private fun screenFlash_screenFlashUiControlInvokedProperly(imageCaptureMode: Int) {
+ val cameraControl = createCameraControl().apply {
+ // Arrange.
+ 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
+ // in Camera2CameraControlImpl#submitStillCaptureRequests
+ CountDownLatch(5).let {
+ cameraControl.simulateRepeatingResult(
+ initialDelay = 100,
+ period = 50,
+ requestCountLatch = it,
+ scheduledRunnableExecutor = CameraXExecutors.mainThreadExecutor()
+ )
+ it.await(1, TimeUnit.SECONDS)
+ }
+
+ // Wait for main thread because ScreenFlashTask invokes callbacks in UI thread
+ Shadows.shadowOf(Looper.getMainLooper()).idleFor(1, TimeUnit.SECONDS)
+
+ if (Build.VERSION.SDK_INT >= 28) {
+ // Submit a repeating request for CONTROL_AE_MODE_ON_EXTERNAL_FLASH
+ CountDownLatch(5).let {
+ cameraControl.simulateRepeatingResult(
+ initialDelay = 100,
+ period = 50,
+ resultParameters = mapOf(CaptureResult.CONTROL_AE_MODE
+ to CaptureResult.CONTROL_AE_MODE_ON_EXTERNAL_FLASH),
+ requestCountLatch = it
+ )
+ it.await(1, TimeUnit.SECONDS)
+ }
+ }
+
+ // Assert, verify AE precapture is triggered
+ immediateCompleteCapture.verifyRequestResult {
+ it.requestContains(
+ CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER,
+ CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER_START
+ )
+ }
+
+ // Submit a repeating request for convergence
+ CountDownLatch(5).let {
+ cameraControl.simulateRepeatingResult(
+ initialDelay = 100,
+ period = 50,
+ resultParameters = resultConverged,
+ 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)
+
+ // Assert, verify ScreenFlashUiControls are invoked properly
+ assertThat(screenFlashControl.awaitScreenFlashUiClear(1000)).isTrue()
+ assertThat(screenFlashControl.screenFlashUiEvents).isEqualTo(
+ listOf(
+ MockScreenFlashUiControl.APPLY_SCREEN_FLASH,
+ MockScreenFlashUiControl.CLEAR_SCREEN_FLASH
+ )
+ )
+
+ // Assert, AE precapture is cancelled finally.
+ if (Build.VERSION.SDK_INT >= 23) {
+ immediateCompleteCapture.verifyRequestResult {
+ it.requestContains(
+ CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER,
+ CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL
+ )
+ }
+ }
+ }
+
+ @Test
fun miniLatency_withTorchAsFlashQuirk_shouldOpenTorch() {
withTorchAsFlashQuirk_shouldOpenTorch(ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY)
}
@@ -1026,14 +1129,19 @@
initialDelay: Long = 100,
period: Long = 100, // in milliseconds
resultParameters: Map<CaptureResult.Key<*>, Any> = mutableMapOf(),
+ requestCountLatch: CountDownLatch? = null,
+ scheduledRunnableExecutor: Executor = executorService
) {
runningRepeatingStream = executorService.scheduleAtFixedRate({
- val tagBundle = sessionConfig.repeatingCaptureConfig.tagBundle
- val requestOptions = sessionConfig.repeatingCaptureConfig.implementationOptions
- val resultOptions = baseRepeatingResult.toMutableMap().apply {
- putAll(resultParameters)
+ scheduledRunnableExecutor.execute {
+ val tagBundle = sessionConfig.repeatingCaptureConfig.tagBundle
+ val requestOptions = sessionConfig.repeatingCaptureConfig.implementationOptions
+ val resultOptions = baseRepeatingResult.toMutableMap().apply {
+ putAll(resultParameters)
+ }
+ sendRepeatingResult(tagBundle, requestOptions.toParameters(), resultOptions)
+ requestCountLatch?.countDown()
}
- sendRepeatingResult(tagBundle, requestOptions.toParameters(), resultOptions)
}, initialDelay, period, TimeUnit.MILLISECONDS)
}
@@ -1085,6 +1193,7 @@
).apply {
setActive(true)
incrementUseCount()
+ this.screenFlashUiControl = screenFlashControl
}
}
diff --git a/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/FocusMeteringControlTest.kt b/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/FocusMeteringControlTest.kt
index a5a3f91..e34c0cf3 100644
--- a/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/FocusMeteringControlTest.kt
+++ b/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/FocusMeteringControlTest.kt
@@ -191,6 +191,7 @@
CaptureResult.CONTROL_AE_MODE_ON,
CaptureResult.CONTROL_AE_MODE_ON_ALWAYS_FLASH,
CaptureResult.CONTROL_AE_MODE_ON_AUTO_FLASH,
+ CaptureResult.CONTROL_AE_MODE_ON_EXTERNAL_FLASH,
CaptureResult.CONTROL_AE_MODE_OFF
)
)
@@ -225,6 +226,14 @@
CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL,
CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_3
)
+ set(
+ CameraCharacteristics.CONTROL_AE_AVAILABLE_MODES, intArrayOf(
+ CaptureResult.CONTROL_AE_MODE_ON,
+ CaptureResult.CONTROL_AE_MODE_ON_ALWAYS_FLASH,
+ CaptureResult.CONTROL_AE_MODE_ON_AUTO_FLASH,
+ CaptureResult.CONTROL_AE_MODE_OFF
+ )
+ )
set(CameraCharacteristics.CONTROL_MAX_REGIONS_AF, 1)
set(CameraCharacteristics.CONTROL_MAX_REGIONS_AE, 1)
set(CameraCharacteristics.CONTROL_MAX_REGIONS_AWB, 1)
@@ -1417,4 +1426,34 @@
.addPoint(invalidPoint4).build()
assertThat(focusMeteringControl.isFocusMeteringSupported(action)).isFalse()
}
+
+ @Test
+ @Config(minSdk = 28)
+ fun canEnableExternalFlashAeMode() {
+ focusMeteringControl.enableExternalFlashAeMode(true)
+ assertThat(focusMeteringControl.isExternalFlashAeModeEnabled).isTrue()
+ }
+
+ @Test
+ @Config(minSdk = 28)
+ fun canDisableExternalFlashAeMode_afterEnable() {
+ focusMeteringControl.enableExternalFlashAeMode(true)
+ focusMeteringControl.enableExternalFlashAeMode(false)
+ assertThat(focusMeteringControl.isExternalFlashAeModeEnabled).isFalse()
+ }
+
+ @Test
+ @Config(maxSdk = 27)
+ fun canNotEnableExternalFlashAeMode_whenBelowApi28() {
+ focusMeteringControl.enableExternalFlashAeMode(true)
+ assertThat(focusMeteringControl.isExternalFlashAeModeEnabled).isFalse()
+ }
+
+ @Test
+ @Config(minSdk = 28)
+ fun canNotEnableExternalFlashAeMode_whenAeModeNotAvailable() {
+ focusMeteringControl = initFocusMeteringControl(CAMERA1_ID)
+ focusMeteringControl.enableExternalFlashAeMode(true)
+ assertThat(focusMeteringControl.isExternalFlashAeModeEnabled).isFalse()
+ }
}
diff --git a/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/SupportedSurfaceCombinationTest.kt b/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/SupportedSurfaceCombinationTest.kt
index 2db0d98..a163c26 100644
--- a/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/SupportedSurfaceCombinationTest.kt
+++ b/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/SupportedSurfaceCombinationTest.kt
@@ -1936,7 +1936,8 @@
@Test
fun dynamicRangeResolver_resolvesToSdr8Bit_whenSdrWithUnspecifiedBitDepthProvided() {
// Preview unspecified dynamic range
- val useCase = createUseCase(CaptureType.PREVIEW,
+ val useCase = createUseCase(
+ CaptureType.PREVIEW,
dynamicRange = DynamicRange(ENCODING_SDR, BIT_DEPTH_UNSPECIFIED)
)
diff --git a/camera/camera-core/api/api_lint.ignore b/camera/camera-core/api/api_lint.ignore
index d0f65e0..9f80bac 100644
--- a/camera/camera-core/api/api_lint.ignore
+++ b/camera/camera-core/api/api_lint.ignore
@@ -35,28 +35,16 @@
androidx.camera.core.FocusMeteringAction does not declare a `getPoints()` method matching method androidx.camera.core.FocusMeteringAction.Builder.addPoint(androidx.camera.core.MeteringPoint,int)
MissingGetterMatchingBuilder: androidx.camera.core.FocusMeteringAction.Builder#setAutoCancelDuration(long, java.util.concurrent.TimeUnit):
androidx.camera.core.FocusMeteringAction does not declare a `getAutoCancelDuration()` method matching method androidx.camera.core.FocusMeteringAction.Builder.setAutoCancelDuration(long,java.util.concurrent.TimeUnit)
-MissingGetterMatchingBuilder: androidx.camera.core.ImageAnalysis.Builder#setTargetAspectRatio(int):
- androidx.camera.core.ImageAnalysis does not declare a `getTargetAspectRatio()` method matching method androidx.camera.core.ImageAnalysis.Builder.setTargetAspectRatio(int)
MissingGetterMatchingBuilder: androidx.camera.core.ImageAnalysis.Builder#setTargetName(String):
androidx.camera.core.ImageAnalysis does not declare a `getTargetName()` method matching method androidx.camera.core.ImageAnalysis.Builder.setTargetName(String)
-MissingGetterMatchingBuilder: androidx.camera.core.ImageAnalysis.Builder#setTargetResolution(android.util.Size):
- androidx.camera.core.ImageAnalysis does not declare a `getTargetResolution()` method matching method androidx.camera.core.ImageAnalysis.Builder.setTargetResolution(android.util.Size)
MissingGetterMatchingBuilder: androidx.camera.core.ImageCapture.Builder#setIoExecutor(java.util.concurrent.Executor):
androidx.camera.core.ImageCapture does not declare a `getIoExecutor()` method matching method androidx.camera.core.ImageCapture.Builder.setIoExecutor(java.util.concurrent.Executor)
-MissingGetterMatchingBuilder: androidx.camera.core.ImageCapture.Builder#setTargetAspectRatio(int):
- androidx.camera.core.ImageCapture does not declare a `getTargetAspectRatio()` method matching method androidx.camera.core.ImageCapture.Builder.setTargetAspectRatio(int)
MissingGetterMatchingBuilder: androidx.camera.core.ImageCapture.Builder#setTargetName(String):
androidx.camera.core.ImageCapture does not declare a `getTargetName()` method matching method androidx.camera.core.ImageCapture.Builder.setTargetName(String)
-MissingGetterMatchingBuilder: androidx.camera.core.ImageCapture.Builder#setTargetResolution(android.util.Size):
- androidx.camera.core.ImageCapture does not declare a `getTargetResolution()` method matching method androidx.camera.core.ImageCapture.Builder.setTargetResolution(android.util.Size)
MissingGetterMatchingBuilder: androidx.camera.core.ImageCapture.OutputFileOptions.Builder#setMetadata(androidx.camera.core.ImageCapture.Metadata):
androidx.camera.core.ImageCapture.OutputFileOptions does not declare a `getMetadata()` method matching method androidx.camera.core.ImageCapture.OutputFileOptions.Builder.setMetadata(androidx.camera.core.ImageCapture.Metadata)
-MissingGetterMatchingBuilder: androidx.camera.core.Preview.Builder#setTargetAspectRatio(int):
- androidx.camera.core.Preview does not declare a `getTargetAspectRatio()` method matching method androidx.camera.core.Preview.Builder.setTargetAspectRatio(int)
MissingGetterMatchingBuilder: androidx.camera.core.Preview.Builder#setTargetName(String):
androidx.camera.core.Preview does not declare a `getTargetName()` method matching method androidx.camera.core.Preview.Builder.setTargetName(String)
-MissingGetterMatchingBuilder: androidx.camera.core.Preview.Builder#setTargetResolution(android.util.Size):
- androidx.camera.core.Preview does not declare a `getTargetResolution()` method matching method androidx.camera.core.Preview.Builder.setTargetResolution(android.util.Size)
StaticFinalBuilder: androidx.camera.core.ExtendableBuilder:
diff --git a/camera/camera-core/api/current.txt b/camera/camera-core/api/current.txt
index 85f1ccd..63cbc35 100644
--- a/camera/camera-core/api/current.txt
+++ b/camera/camera-core/api/current.txt
@@ -290,9 +290,11 @@
method @IntRange(from=1, to=100) public int getJpegQuality();
method public androidx.camera.core.ResolutionInfo? getResolutionInfo();
method public androidx.camera.core.resolutionselector.ResolutionSelector? getResolutionSelector();
+ method public androidx.camera.core.ImageCapture.ScreenFlashUiControl? getScreenFlashUiControl();
method public int getTargetRotation();
method public void setCropAspectRatio(android.util.Rational);
method public void setFlashMode(int);
+ method public void setScreenFlashUiControl(androidx.camera.core.ImageCapture.ScreenFlashUiControl?);
method public void setTargetRotation(int);
method public void takePicture(androidx.camera.core.ImageCapture.OutputFileOptions, java.util.concurrent.Executor, androidx.camera.core.ImageCapture.OnImageSavedCallback);
method public void takePicture(java.util.concurrent.Executor, androidx.camera.core.ImageCapture.OnImageCapturedCallback);
@@ -307,6 +309,8 @@
field public static final int FLASH_MODE_AUTO = 0; // 0x0
field public static final int FLASH_MODE_OFF = 2; // 0x2
field public static final int FLASH_MODE_ON = 1; // 0x1
+ field public static final int FLASH_MODE_SCREEN = 3; // 0x3
+ field public static final long SCREEN_FLASH_UI_APPLY_TIMEOUT_SECONDS = 3L; // 0x3L
}
public static final class ImageCapture.Builder implements androidx.camera.core.ExtendableBuilder<androidx.camera.core.ImageCapture> {
@@ -317,6 +321,7 @@
method public androidx.camera.core.ImageCapture.Builder setIoExecutor(java.util.concurrent.Executor);
method public androidx.camera.core.ImageCapture.Builder setJpegQuality(@IntRange(from=1, to=100) int);
method public androidx.camera.core.ImageCapture.Builder setResolutionSelector(androidx.camera.core.resolutionselector.ResolutionSelector);
+ method public androidx.camera.core.ImageCapture.Builder setScreenFlashUiControl(androidx.camera.core.ImageCapture.ScreenFlashUiControl);
method @Deprecated public androidx.camera.core.ImageCapture.Builder setTargetAspectRatio(int);
method public androidx.camera.core.ImageCapture.Builder setTargetName(String);
method @Deprecated public androidx.camera.core.ImageCapture.Builder setTargetResolution(android.util.Size);
@@ -359,6 +364,15 @@
method public android.net.Uri? getSavedUri();
}
+ public static interface ImageCapture.ScreenFlashUiCompleter {
+ method public void complete();
+ }
+
+ public static interface ImageCapture.ScreenFlashUiControl {
+ method @UiThread public void applyScreenFlashUi(androidx.camera.core.ImageCapture.ScreenFlashUiCompleter);
+ method @UiThread public void clearScreenFlashUi();
+ }
+
@RequiresApi(21) public class ImageCaptureException extends java.lang.Exception {
ctor public ImageCaptureException(int, String, Throwable?);
method public int getImageCaptureError();
diff --git a/camera/camera-core/api/restricted_current.txt b/camera/camera-core/api/restricted_current.txt
index 85f1ccd..63cbc35 100644
--- a/camera/camera-core/api/restricted_current.txt
+++ b/camera/camera-core/api/restricted_current.txt
@@ -290,9 +290,11 @@
method @IntRange(from=1, to=100) public int getJpegQuality();
method public androidx.camera.core.ResolutionInfo? getResolutionInfo();
method public androidx.camera.core.resolutionselector.ResolutionSelector? getResolutionSelector();
+ method public androidx.camera.core.ImageCapture.ScreenFlashUiControl? getScreenFlashUiControl();
method public int getTargetRotation();
method public void setCropAspectRatio(android.util.Rational);
method public void setFlashMode(int);
+ method public void setScreenFlashUiControl(androidx.camera.core.ImageCapture.ScreenFlashUiControl?);
method public void setTargetRotation(int);
method public void takePicture(androidx.camera.core.ImageCapture.OutputFileOptions, java.util.concurrent.Executor, androidx.camera.core.ImageCapture.OnImageSavedCallback);
method public void takePicture(java.util.concurrent.Executor, androidx.camera.core.ImageCapture.OnImageCapturedCallback);
@@ -307,6 +309,8 @@
field public static final int FLASH_MODE_AUTO = 0; // 0x0
field public static final int FLASH_MODE_OFF = 2; // 0x2
field public static final int FLASH_MODE_ON = 1; // 0x1
+ field public static final int FLASH_MODE_SCREEN = 3; // 0x3
+ field public static final long SCREEN_FLASH_UI_APPLY_TIMEOUT_SECONDS = 3L; // 0x3L
}
public static final class ImageCapture.Builder implements androidx.camera.core.ExtendableBuilder<androidx.camera.core.ImageCapture> {
@@ -317,6 +321,7 @@
method public androidx.camera.core.ImageCapture.Builder setIoExecutor(java.util.concurrent.Executor);
method public androidx.camera.core.ImageCapture.Builder setJpegQuality(@IntRange(from=1, to=100) int);
method public androidx.camera.core.ImageCapture.Builder setResolutionSelector(androidx.camera.core.resolutionselector.ResolutionSelector);
+ method public androidx.camera.core.ImageCapture.Builder setScreenFlashUiControl(androidx.camera.core.ImageCapture.ScreenFlashUiControl);
method @Deprecated public androidx.camera.core.ImageCapture.Builder setTargetAspectRatio(int);
method public androidx.camera.core.ImageCapture.Builder setTargetName(String);
method @Deprecated public androidx.camera.core.ImageCapture.Builder setTargetResolution(android.util.Size);
@@ -359,6 +364,15 @@
method public android.net.Uri? getSavedUri();
}
+ public static interface ImageCapture.ScreenFlashUiCompleter {
+ method public void complete();
+ }
+
+ public static interface ImageCapture.ScreenFlashUiControl {
+ method @UiThread public void applyScreenFlashUi(androidx.camera.core.ImageCapture.ScreenFlashUiCompleter);
+ method @UiThread public void clearScreenFlashUi();
+ }
+
@RequiresApi(21) public class ImageCaptureException extends java.lang.Exception {
ctor public ImageCaptureException(int, String, Throwable?);
method public int getImageCaptureError();
diff --git a/camera/camera-core/lint-baseline.xml b/camera/camera-core/lint-baseline.xml
index 70dac88..c5c75a3 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.2.0-alpha15" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0-alpha15)" variant="all" version="8.2.0-alpha15">
-
- <issue
- id="RestrictedApiAndroidX"
- message="ExifInterface.TAG_THUMBNAIL_ORIENTATION can only be accessed from within the same library (androidx.exifinterface:exifinterface)"
- errorLine1=" ExifInterface.TAG_THUMBNAIL_ORIENTATION);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/core/impl/utils/Exif.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="ExifInterface.TAG_THUMBNAIL_ORIENTATION can only be accessed from within the same library (androidx.exifinterface:exifinterface)"
- errorLine1=" ExifInterface.TAG_THUMBNAIL_ORIENTATION,"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/core/impl/utils/Exif.java"/>
- </issue>
+<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"
diff --git a/camera/camera-core/src/main/java/androidx/camera/core/ImageCapture.java b/camera/camera-core/src/main/java/androidx/camera/core/ImageCapture.java
index 6003b20..ebaa0a1 100644
--- a/camera/camera-core/src/main/java/androidx/camera/core/ImageCapture.java
+++ b/camera/camera-core/src/main/java/androidx/camera/core/ImageCapture.java
@@ -28,6 +28,7 @@
import static androidx.camera.core.impl.ImageCaptureConfig.OPTION_IO_EXECUTOR;
import static androidx.camera.core.impl.ImageCaptureConfig.OPTION_JPEG_COMPRESSION_QUALITY;
import static androidx.camera.core.impl.ImageCaptureConfig.OPTION_MAX_RESOLUTION;
+import static androidx.camera.core.impl.ImageCaptureConfig.OPTION_SCREEN_FLASH_UI_CONTROL;
import static androidx.camera.core.impl.ImageCaptureConfig.OPTION_SESSION_CONFIG_UNPACKER;
import static androidx.camera.core.impl.ImageCaptureConfig.OPTION_SUPPORTED_RESOLUTIONS;
import static androidx.camera.core.impl.ImageCaptureConfig.OPTION_SURFACE_OCCUPANCY_PRIORITY;
@@ -52,7 +53,6 @@
import static androidx.camera.core.internal.utils.ImageUtil.isAspectRatioValid;
import static androidx.core.util.Preconditions.checkNotNull;
import static androidx.core.util.Preconditions.checkState;
-
import static java.util.Objects.requireNonNull;
import android.content.ContentResolver;
@@ -236,6 +236,42 @@
public static final int FLASH_MODE_ON = 1;
/** No flash. The flash will never be used when taking a picture. */
public static final int FLASH_MODE_OFF = 2;
+ /**
+ * Screen flash. Display screen brightness will be used as alternative to flash when taking
+ * a picture with front camera.
+ *
+ * <p> This flash mode can be set via {@link #setFlashMode(int)} after setting a non-null
+ * {@link ScreenFlashUiControl} with {@link #setScreenFlashUiControl(ScreenFlashUiControl)}.
+ * This mode will always invoke all the necessary operations for a screen flash image capture,
+ * i.e. it is similar to {@link #FLASH_MODE_ON}, not {@link #FLASH_MODE_AUTO}.
+ *
+ * <p> The following code snippet shows an example implementation of how this flash mode can be
+ * set to an {@link ImageCapture} instance.
+ * <pre>{@code
+ * imageCapture.setScreenFlashUiControl(new ImageCapture.ScreenFlashUiControl() {
+ * @Override
+ * public void applyScreenFlashUi(@NonNUll ScreenFlashUiCompleter screenFlashUiCompleter) {
+ * whiteColorOverlayView.setVisibility(View.VISIBLE);
+ * maximizeScreenBrightness();
+ * screenFlashUiCompleter.complete();
+ * }
+ *
+ * @Override
+ * public void clearScreenFlashUi() {
+ * restoreScreenBrightness();
+ * whiteColorOverlayView.setVisibility(View.INVISIBLE);
+ * }
+ * });
+ *
+ * imageCapture.setFlashMode(ImageCapture.FLASH_MODE_SCREEN);
+ * }</pre>
+ *
+ * @see #setFlashMode(int)
+ */
+ public static final int FLASH_MODE_SCREEN = 3;
+
+ /** The timeout in seconds for {@link ScreenFlashUiCompleter} to be completed. */
+ public static final long SCREEN_FLASH_UI_APPLY_TIMEOUT_SECONDS = 3;
/**
* When flash is required for taking a picture, a normal one shot flash will be used.
@@ -295,6 +331,7 @@
@FlashMode
private int mFlashMode = FLASH_MODE_UNKNOWN;
private Rational mCropAspectRatio = null;
+ private ScreenFlashUiControl mScreenFlashUiControl;
////////////////////////////////////////////////////////////////////////////////////////////
// [UseCase attached dynamic] - Can change but is only available when the UseCase is attached.
@@ -326,6 +363,7 @@
}
mFlashType = useCaseConfig.getFlashType(FLASH_TYPE_ONE_SHOT_FLASH);
+ mScreenFlashUiControl = useCaseConfig.getScreenFlashUiControl();
}
private boolean isSessionProcessorEnabledInCurrentCamera() {
@@ -446,6 +484,15 @@
@Override
public void onCameraControlReady() {
trySetFlashModeToCameraControl();
+ setScreenFlashUiControlToCameraControl();
+ }
+
+ private @CameraSelector.LensFacing int getCameraLens() {
+ Camera camera = getCamera();
+ if (camera != null) {
+ return camera.getCameraInfo().getLensFacing();
+ }
+ return CameraSelector.LENS_FACING_UNKNOWN;
}
/**
@@ -467,8 +514,9 @@
*
* <p>The flash control for the subsequent photo capture requests. Applications can check if
* there is a flash unit via {@link CameraInfo#hasFlashUnit()} and update UI component if
- * necessary. If there is no flash unit, then calling this API will take no effect for the
- * subsequent photo capture requests and they will act like {@link #FLASH_MODE_OFF}.
+ * necessary. If there is no flash unit and {@code flashMode} is not {@link #FLASH_MODE_SCREEN},
+ * then calling this API will take no effect for the subsequent photo capture requests and
+ * they will act like {@link #FLASH_MODE_OFF}.
*
* <p>When the torch is enabled via {@link CameraControl#enableTorch(boolean)}, the torch
* will remain enabled during photo capture regardless of flashMode setting. When
@@ -478,13 +526,35 @@
* mode could cause a crash. To workaround this CameraX will disable the auto flash behavior
* internally on devices that have this issue.
*
+ * <p>If {@link #FLASH_MODE_SCREEN} is set, a {@link ScreenFlashUiControl} implementation
+ * must be set via {@link #setScreenFlashUiControl(ScreenFlashUiControl)} before calling this
+ * API. Trying to use {@link #FLASH_MODE_SCREEN} without a ScreenFlashUiControl set or with a
+ * non-front camera will result in an {@link IllegalArgumentException}. It is the application's
+ * responsibility to change flashMode while switching the camera in case it leads to a
+ * non-supported case (e.g. switching to rear camera while FLASH_MODE_SCREEN is still on).
+ *
* @param flashMode the flash mode. Value is {@link #FLASH_MODE_AUTO}, {@link #FLASH_MODE_ON},
- * or {@link #FLASH_MODE_OFF}.
+ * {@link #FLASH_MODE_SCREEN} or {@link #FLASH_MODE_OFF}.
+ *
+ * @throws IllegalArgumentException If flash mode is invalid or FLASH_MODE_SCREEN is used
+ * without a ScreenFlashUiControl or front camera.
*/
public void setFlashMode(@FlashMode int flashMode) {
if (flashMode != FLASH_MODE_AUTO && flashMode != FLASH_MODE_ON
&& flashMode != FLASH_MODE_OFF) {
- throw new IllegalArgumentException("Invalid flash mode: " + flashMode);
+ if (flashMode == FLASH_MODE_SCREEN) {
+ if (mScreenFlashUiControl == null) {
+ throw new IllegalArgumentException(
+ "ScreenFlashUiControl not set for FLASH_MODE_SCREEN");
+ }
+
+ if (getCamera() != null && getCameraLens() != CameraSelector.LENS_FACING_FRONT) {
+ throw new IllegalArgumentException(
+ "Not a front camera despite setting FLASH_MODE_SCREEN");
+ }
+ } else {
+ throw new IllegalArgumentException("Invalid flash mode: " + flashMode);
+ }
}
synchronized (mLockedFlashMode) {
@@ -494,6 +564,39 @@
}
/**
+ * Sets {@link ScreenFlashUiControl} for subsequent photo capture requests.
+ *
+ * <p>The calling of this API will take effect for {@link #FLASH_MODE_SCREEN} only
+ * and the {@code screenFlashUiControl} will be ignored for other flash modes.
+ *
+ * <p>If the implementation provided by the user is no longer valid (e.g. due to any
+ * {@link android.app.Activity} or {@link android.view.View} reference used in the
+ * implementation becoming invalid), user needs to re-set a new valid ScreenFlashUiControl or
+ * clear the previous one with {@code setScreenFlashUiControl(null)}, whichever appropriate.
+ *
+ * @param screenFlashUiControl A {@link ScreenFlashUiControl} implementation that is used to
+ * notify API users when app side changes need to be done. This
+ * will replace the previous {@code ScreenFlashUiControl} set
+ * with this method.
+ */
+ public void setScreenFlashUiControl(@Nullable ScreenFlashUiControl screenFlashUiControl) {
+ mScreenFlashUiControl = screenFlashUiControl;
+ setScreenFlashUiControlToCameraControl();
+ }
+
+ /**
+ * Returns the {@link ScreenFlashUiControl} currently set, null if none.
+ */
+ @Nullable
+ public ScreenFlashUiControl getScreenFlashUiControl() {
+ return mScreenFlashUiControl;
+ }
+
+ private void setScreenFlashUiControlToCameraControl() {
+ getCameraControl().setScreenFlashUiControl(mScreenFlashUiControl);
+ }
+
+ /**
* Sets target cropping aspect ratio for output image.
*
* <p>This aspect ratio is orientation-dependent. It should be expressed in the coordinate
@@ -708,6 +811,9 @@
*
* @param executor The executor in which the callback methods will be run.
* @param callback Callback to be invoked for the newly captured image
+ *
+ * @throws IllegalArgumentException If {@link ImageCapture#FLASH_MODE_SCREEN} is used without a
+ * ScreenFlashUiControl.
*/
public void takePicture(@NonNull Executor executor,
final @NonNull OnImageCapturedCallback callback) {
@@ -732,6 +838,9 @@
* @param outputFileOptions Options to store the newly captured image.
* @param executor The executor in which the callback methods will be run.
* @param imageSavedCallback Callback to be called for the newly captured image.
+ *
+ * @throws IllegalArgumentException If {@link ImageCapture#FLASH_MODE_SCREEN} is used without a
+ * ScreenFlashUiControl.
* @see ViewPort
*/
public void takePicture(
@@ -915,6 +1024,12 @@
public void onBind() {
CameraInternal camera = getCamera();
checkNotNull(camera, "Attached camera cannot be null");
+
+ if (getFlashMode() == FLASH_MODE_SCREEN
+ && getCameraLens() != CameraSelector.LENS_FACING_FRONT) {
+ throw new IllegalArgumentException(
+ "Not a front camera despite setting FLASH_MODE_SCREEN in ImageCapture");
+ }
}
/**
@@ -1028,6 +1143,9 @@
/**
* Takes a picture with the new architecture.
+ *
+ * @throws IllegalArgumentException If {@link ImageCapture#FLASH_MODE_SCREEN} is used without a
+ * ScreenFlashUiControl.
*/
@MainThread
private void takePictureInternal(@NonNull Executor executor,
@@ -1035,6 +1153,10 @@
@Nullable ImageCapture.OnImageSavedCallback onDiskCallback,
@Nullable OutputFileOptions outputFileOptions) {
checkMainThread();
+ if (getFlashMode() == ImageCapture.FLASH_MODE_SCREEN && mScreenFlashUiControl == null) {
+ throw new IllegalArgumentException(
+ "ScreenFlashUiControl not set for FLASH_MODE_SCREEN");
+ }
Log.d(TAG, "takePictureInternal");
CameraInternal camera = getCamera();
if (camera == null) {
@@ -1227,7 +1349,7 @@
* the torch is disabled, flash will function as specified by
* {@link #setFlashMode(int)}.
*/
- @IntDef({FLASH_MODE_UNKNOWN, FLASH_MODE_AUTO, FLASH_MODE_ON, FLASH_MODE_OFF})
+ @IntDef({FLASH_MODE_UNKNOWN, FLASH_MODE_AUTO, FLASH_MODE_ON, FLASH_MODE_SCREEN, FLASH_MODE_OFF})
@Retention(RetentionPolicy.SOURCE)
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public @interface FlashMode {
@@ -1304,6 +1426,68 @@
}
/**
+ * Interface to inform if application UI change has been completed for a screen flash image
+ * capture.
+ */
+ public interface ScreenFlashUiCompleter {
+ /**
+ * Completes this {@link ScreenFlashUiCompleter} instance so that CameraX is no
+ * longer waiting.
+ *
+ * @see ScreenFlashUiControl#applyScreenFlashUi
+ */
+ void complete();
+ }
+
+ /** Interface to do the application UI changes for screen flash operations. */
+ public interface ScreenFlashUiControl {
+ /**
+ * Applies the necessary application UI changes for a screen flash photo capture.
+ *
+ * <p>CameraX will invoke this method when the application UI needs to be changed for a
+ * successful photo capture with screen flash feature. When this callback is invoked, the
+ * application UI should utilize the screen to provide extra light as an alternative to
+ * physical flash. For example, the screen brightness can be maximized and screen color
+ * can be covered with some bright color like white.
+ *
+ * <p>With a timeout of {@link #SCREEN_FLASH_UI_APPLY_TIMEOUT_SECONDS} seconds, CameraX
+ * will wait for the provided {@link ScreenFlashUiCompleter} argument to be completed
+ * before starting any operation that is dependent on the UI change. Applications must call
+ * {@link ScreenFlashUiCompleter#complete()} after their UI changes are done so that
+ * CameraX is not unnecessarily waiting. If the application does not call {@code
+ * ScreenFlashUiCompleter#complete} within the timeout, CameraX will stop waiting and
+ * move forward with the subsequent operations regardless. In such case, it is the
+ * application's responsibility to clear any UI change done after
+ * {@link #clearScreenFlashUi} has been invoked.
+ *
+ * <p>The following code snippet shows an example implementation of this API.
+ * <pre>{@code
+ * @Override
+ * public void applyScreenFlashUi(@NonNull ScreenFlashUiCompleter screenFlashUiCompleter) {
+ * // Enable top overlay to make screen color white
+ * whiteColorOverlay.setVisible(true);
+ * // Maximize screen brightness
+ * maximizeScreenBrightness();
+ * screenFlashUiCompleter.complete();
+ * }}</pre>
+ *
+ * @param screenFlashUiCompleter Used to notify when UI changes have been applied.
+ */
+ @UiThread
+ void applyScreenFlashUi(@NonNull ScreenFlashUiCompleter screenFlashUiCompleter);
+
+ /**
+ * Clears any application UI change done for screen flash, if required.
+ *
+ * <p>CameraX will invoke this method when a screen flash photo capture has been completed
+ * and the application screen can be safely changed to a state not conforming to screen
+ * flash photo capture.
+ */
+ @UiThread
+ void clearScreenFlashUi();
+ }
+
+ /**
* Provides a base static default configuration for the ImageCapture
*
* <p>These values may be overridden by the implementation. They only provide a minimum set of
@@ -1892,7 +2076,9 @@
*
* @return A {@link ImageCapture} populated with the current state.
* @throws IllegalArgumentException if attempting to set both target aspect ratio and
- * target resolution.
+ * target resolution, or attempting to set
+ * {@link ImageCapture#FLASH_MODE_SCREEN} without
+ * setting a non-null {@link ScreenFlashUiControl}.
*/
@Override
@NonNull
@@ -1928,10 +2114,19 @@
Integer flashMode = getMutableConfig().retrieveOption(OPTION_FLASH_MODE);
if (flashMode == null || (flashMode != FLASH_MODE_AUTO && flashMode != FLASH_MODE_ON
- && flashMode != FLASH_MODE_OFF)) {
+ && flashMode != FLASH_MODE_SCREEN && flashMode != FLASH_MODE_OFF)) {
throw new IllegalArgumentException(
"The flash mode is not allowed to set: " + flashMode);
}
+
+ if (flashMode == FLASH_MODE_SCREEN) {
+ if (getMutableConfig().retrieveOption(OPTION_SCREEN_FLASH_UI_CONTROL, null)
+ == null) {
+ throw new IllegalArgumentException(
+ "The flash mode is not allowed to set to FLASH_MODE_SCREEN "
+ + "without setting ScreenFlashUiControl");
+ }
+ }
}
return imageCapture;
@@ -1963,10 +2158,15 @@
*
* <p>If not set, the flash mode will default to {@link #FLASH_MODE_OFF}.
*
+ * <p>If set to {@link #FLASH_MODE_SCREEN}, a non-null {@link ScreenFlashUiControl} must
+ * also be set with {@link #setScreenFlashUiControl(ScreenFlashUiControl)}. Otherwise, an
+ * {@link IllegalArgumentException} will be thrown when {@link #build()} is invoked.
+ *
* <p>See {@link ImageCapture#setFlashMode(int)} for more information.
*
* @param flashMode The requested flash mode. Value is {@link #FLASH_MODE_AUTO},
- * {@link #FLASH_MODE_ON}, or {@link #FLASH_MODE_OFF}.
+ * {@link #FLASH_MODE_ON}, {@link #FLASH_MODE_SCREEN}, or
+ * {@link #FLASH_MODE_OFF}.
* @return The current Builder.
*/
@NonNull
@@ -1976,6 +2176,26 @@
}
/**
+ * Sets the {@link ScreenFlashUiControl} necessary for screen flash operations.
+ *
+ * <p>If not set, the control will be set to null and users will need to set it later
+ * before calling {@link #setFlashMode(int)} with {@link #FLASH_MODE_SCREEN}.
+ *
+ * <p>See {@link ImageCapture#setScreenFlashUiControl(ScreenFlashUiControl)} for more
+ * information.
+ *
+ * @param screenFlashUiControl The {@link ScreenFlashUiControl} to notify caller for the
+ * UI side changes required for photo capture with
+ * {@link #FLASH_MODE_SCREEN}.
+ * @return The current Builder.
+ */
+ @NonNull
+ public Builder setScreenFlashUiControl(@NonNull ScreenFlashUiControl screenFlashUiControl) {
+ getMutableConfig().insertOption(OPTION_SCREEN_FLASH_UI_CONTROL, screenFlashUiControl);
+ return this;
+ }
+
+ /**
* Sets the {@link ImageFormat} of the {@link ImageProxy} returned by the
* {@link ImageCapture.OnImageCapturedCallback}.
*
diff --git a/camera/camera-core/src/main/java/androidx/camera/core/impl/CameraControlInternal.java b/camera/camera-core/src/main/java/androidx/camera/core/impl/CameraControlInternal.java
index c89bb2f..85864cb 100644
--- a/camera/camera-core/src/main/java/androidx/camera/core/impl/CameraControlInternal.java
+++ b/camera/camera-core/src/main/java/androidx/camera/core/impl/CameraControlInternal.java
@@ -21,6 +21,7 @@
import android.graphics.Rect;
import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.camera.core.CameraControl;
import androidx.camera.core.FocusMeteringAction;
@@ -29,6 +30,7 @@
import androidx.camera.core.ImageCapture.CaptureMode;
import androidx.camera.core.ImageCapture.FlashMode;
import androidx.camera.core.ImageCapture.FlashType;
+import androidx.camera.core.ImageCapture.ScreenFlashUiControl;
import androidx.camera.core.impl.utils.futures.Futures;
import com.google.common.util.concurrent.ListenableFuture;
@@ -62,6 +64,14 @@
void setFlashMode(@FlashMode int flashMode);
/**
+ * Sets screen flash UI control.
+ *
+ * @param screenFlashUiControl An {@link ScreenFlashUiControl} used to notify API
+ * users when UI side changes need to be done.
+ */
+ default void setScreenFlashUiControl(@Nullable ScreenFlashUiControl screenFlashUiControl) {}
+
+ /**
* Adds zero-shutter lag config to {@link SessionConfig}.
* @param sessionConfigBuilder session config builder.
*/
diff --git a/camera/camera-core/src/main/java/androidx/camera/core/impl/ForwardingCameraControl.java b/camera/camera-core/src/main/java/androidx/camera/core/impl/ForwardingCameraControl.java
index ea73135..87d7a03 100644
--- a/camera/camera-core/src/main/java/androidx/camera/core/impl/ForwardingCameraControl.java
+++ b/camera/camera-core/src/main/java/androidx/camera/core/impl/ForwardingCameraControl.java
@@ -19,6 +19,7 @@
import android.graphics.Rect;
import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.camera.core.FocusMeteringAction;
import androidx.camera.core.FocusMeteringResult;
@@ -93,6 +94,11 @@
}
@Override
+ public void setScreenFlashUiControl(@Nullable ImageCapture.ScreenFlashUiControl callback) {
+ mCameraControlInternal.setScreenFlashUiControl(callback);
+ }
+
+ @Override
public void addZslConfig(@NonNull SessionConfig.Builder sessionConfigBuilder) {
mCameraControlInternal.addZslConfig(sessionConfigBuilder);
}
diff --git a/camera/camera-core/src/main/java/androidx/camera/core/impl/ImageCaptureConfig.java b/camera/camera-core/src/main/java/androidx/camera/core/impl/ImageCaptureConfig.java
index 0efd37c..1973d9d 100644
--- a/camera/camera-core/src/main/java/androidx/camera/core/impl/ImageCaptureConfig.java
+++ b/camera/camera-core/src/main/java/androidx/camera/core/impl/ImageCaptureConfig.java
@@ -25,6 +25,7 @@
import androidx.annotation.RestrictTo;
import androidx.camera.core.ImageCapture;
import androidx.camera.core.ImageCapture.CaptureMode;
+import androidx.camera.core.ImageCapture.ScreenFlashUiControl;
import androidx.camera.core.ImageReaderProxyProvider;
import androidx.camera.core.internal.IoConfig;
@@ -60,6 +61,9 @@
Option.create("camerax.core.imageCapture.flashType", int.class);
public static final Option<Integer> OPTION_JPEG_COMPRESSION_QUALITY =
Option.create("camerax.core.imageCapture.jpegCompressionQuality", int.class);
+ public static final Option<ScreenFlashUiControl> OPTION_SCREEN_FLASH_UI_CONTROL =
+ Option.create("camerax.core.imageCapture.screenFlashUiControl",
+ ScreenFlashUiControl.class);
// *********************************************************************************************
private final OptionsBundle mConfig;
@@ -260,6 +264,14 @@
return retrieveOption(OPTION_JPEG_COMPRESSION_QUALITY);
}
+ /**
+ * Gets the caller provided {@link ScreenFlashUiControl}.
+ */
+ @Nullable
+ public ScreenFlashUiControl getScreenFlashUiControl() {
+ return retrieveOption(OPTION_SCREEN_FLASH_UI_CONTROL, null);
+ }
+
// Implementations of IO default methods
/**
diff --git a/camera/camera-core/src/main/java/androidx/camera/core/impl/utils/futures/Futures.java b/camera/camera-core/src/main/java/androidx/camera/core/impl/utils/futures/Futures.java
index 4410d11..9f71fff 100644
--- a/camera/camera-core/src/main/java/androidx/camera/core/impl/utils/futures/Futures.java
+++ b/camera/camera-core/src/main/java/androidx/camera/core/impl/utils/futures/Futures.java
@@ -442,6 +442,36 @@
}
/**
+ * Returns a future that delegates to the supplied future but will finish early normally with
+ * the provided default value if the specified duration expires.
+ *
+ * @param timeoutMillis When to time out the future in milliseconds.
+ * @param scheduledExecutor The executor service to enforce the timeout.
+ * @param defaultValue The default value to complete input future with in case of timeout.
+ * @param input The future to delegate to.
+ */
+ @NonNull
+ public static <V> ListenableFuture<V> makeTimeoutFuture(
+ long timeoutMillis,
+ @NonNull ScheduledExecutorService scheduledExecutor,
+ @Nullable V defaultValue,
+ @NonNull ListenableFuture<V> input) {
+ return CallbackToFutureAdapter.getFuture(completer -> {
+ propagate(input, completer);
+ if (!input.isDone()) {
+ ScheduledFuture<?> timeoutFuture = scheduledExecutor.schedule(
+ () -> {
+ completer.set(defaultValue);
+ },
+ timeoutMillis, TimeUnit.MILLISECONDS);
+ input.addListener(
+ () -> timeoutFuture.cancel(true), CameraXExecutors.directExecutor());
+ }
+ return "TimeoutFuture[" + input + "]";
+ });
+ }
+
+ /**
* Should not be instantiated.
*/
private Futures() {}
diff --git a/camera/camera-core/src/test/java/androidx/camera/core/ImageCaptureTest.kt b/camera/camera-core/src/test/java/androidx/camera/core/ImageCaptureTest.kt
index f45ad2d..a839f9c 100644
--- a/camera/camera-core/src/test/java/androidx/camera/core/ImageCaptureTest.kt
+++ b/camera/camera-core/src/test/java/androidx/camera/core/ImageCaptureTest.kt
@@ -56,6 +56,7 @@
import androidx.camera.testing.impl.CameraXUtil
import androidx.camera.testing.impl.fakes.FakeCameraFactory
import androidx.camera.testing.impl.fakes.FakeImageReaderProxy
+import androidx.camera.testing.impl.mocks.MockScreenFlashUiControl
import androidx.test.core.app.ApplicationProvider
import com.google.common.truth.Truth.assertThat
import java.io.File
@@ -91,6 +92,7 @@
private lateinit var callbackThread: HandlerThread
private lateinit var executor: Executor
private lateinit var camera: FakeCamera
+ private lateinit var cameraFront: FakeCamera
private var fakeImageReaderProxy: FakeImageReaderProxy? = null
private var capturedImage: ImageProxy? = null
private lateinit var cameraUseCaseAdapter: CameraUseCaseAdapter
@@ -116,7 +118,9 @@
isPrivateReprocessingSupported = true
}
- camera = FakeCamera(null, cameraInfo)
+ camera = FakeCamera("0", null, cameraInfo)
+ cameraFront =
+ FakeCamera("1", null, FakeCameraInfoInternal("1", CameraSelector.LENS_FACING_FRONT))
val cameraFactoryProvider =
CameraFactory.Provider { _, _, _, _ ->
@@ -124,6 +128,9 @@
cameraFactory.insertDefaultBackCamera(camera.cameraInfoInternal.cameraId) {
camera
}
+ cameraFactory.insertDefaultFrontCamera(cameraFront.cameraInfoInternal.cameraId) {
+ cameraFront
+ }
cameraFactory
}
val cameraXConfig = CameraXConfig.Builder.fromConfig(
@@ -452,13 +459,75 @@
}
}
+ @Test
+ fun throwExceptionWhileBuilding_whenScreenFlashSetWithoutScreenFlashUiControl() {
+ assertThrows(IllegalArgumentException::class.java) {
+ ImageCapture.Builder().setFlashMode(ImageCapture.FLASH_MODE_SCREEN).build()
+ }
+ }
+
+ @Test
+ fun throwException_whenScreenFlashSetWithoutScreenFlashUiControl() {
+ val imageCapture = ImageCapture.Builder().build()
+
+ assertThrows(IllegalArgumentException::class.java) {
+ imageCapture.flashMode = ImageCapture.FLASH_MODE_SCREEN
+ }
+ }
+
+ @Test
+ fun throwException_whenTakePictureWithScreenFlashButNoUiControl() {
+ val imageCapture = ImageCapture.Builder().build()
+ imageCapture.screenFlashUiControl = MockScreenFlashUiControl()
+ imageCapture.flashMode = ImageCapture.FLASH_MODE_SCREEN
+ imageCapture.screenFlashUiControl = null
+
+ assertThrows(IllegalArgumentException::class.java) {
+ imageCapture.takePicture(executor, onImageCapturedCallback)
+ }
+ }
+
+ @Test
+ fun throwException_whenScreenFlashSetToBackCamera() {
+ val imageCapture = bindImageCapture(cameraSelector = CameraSelector.DEFAULT_BACK_CAMERA)
+ imageCapture.screenFlashUiControl = MockScreenFlashUiControl()
+
+ assertThrows(IllegalArgumentException::class.java) {
+ imageCapture.flashMode = ImageCapture.FLASH_MODE_SCREEN
+ }
+ }
+
+ @Test
+ fun canSetScreenFlash_whenFrontCameraAndUiControlSet() {
+ val imageCapture = bindImageCapture(cameraSelector = CameraSelector.DEFAULT_FRONT_CAMERA)
+
+ imageCapture.screenFlashUiControl = MockScreenFlashUiControl()
+ imageCapture.flashMode = ImageCapture.FLASH_MODE_SCREEN
+ }
+
+ @Test
+ fun throwException_whenSwitchToBackCameraAfterScreenFlashSetToFrontCamera() {
+ val imageCapture = bindImageCapture(cameraSelector = CameraSelector.DEFAULT_FRONT_CAMERA)
+ imageCapture.screenFlashUiControl = MockScreenFlashUiControl()
+ imageCapture.flashMode = ImageCapture.FLASH_MODE_SCREEN
+
+ assertThrows(CameraUseCaseAdapter.CameraException::class.java) {
+ val cameraUseCaseAdapter = CameraUtil.createCameraUseCaseAdapter(
+ ApplicationProvider.getApplicationContext(),
+ CameraSelector.DEFAULT_BACK_CAMERA
+ )
+ cameraUseCaseAdapter.addUseCases(Collections.singleton<UseCase>(imageCapture))
+ }
+ }
+
private fun bindImageCapture(
captureMode: Int = ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY,
viewPort: ViewPort? = null,
// Set non jpg format so it doesn't trigger the exif code path.
bufferFormat: Int = ImageFormat.YUV_420_888,
imageReaderProxyProvider: ImageReaderProxyProvider? = null,
- sessionProcessor: SessionProcessor? = null
+ sessionProcessor: SessionProcessor? = null,
+ cameraSelector: CameraSelector = CameraSelector.DEFAULT_BACK_CAMERA,
): ImageCapture {
// Arrange.
val imageCapture = createImageCapture(
@@ -469,7 +538,7 @@
cameraUseCaseAdapter = CameraUtil.createCameraUseCaseAdapter(
ApplicationProvider.getApplicationContext(),
- CameraSelector.DEFAULT_BACK_CAMERA
+ cameraSelector
)
cameraUseCaseAdapter.setViewPort(viewPort)
diff --git a/camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeCameraControl.java b/camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeCameraControl.java
index 6cc162e..892971c 100644
--- a/camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeCameraControl.java
+++ b/camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeCameraControl.java
@@ -27,6 +27,7 @@
import androidx.camera.core.FocusMeteringAction;
import androidx.camera.core.FocusMeteringResult;
import androidx.camera.core.ImageCapture;
+import androidx.camera.core.ImageCapture.ScreenFlashUiControl;
import androidx.camera.core.ImageCaptureException;
import androidx.camera.core.Logger;
import androidx.camera.core.impl.CameraCaptureCallback;
@@ -94,6 +95,7 @@
private float mLinearZoom = -1;
private boolean mTorchEnabled = false;
private int mExposureCompensation = -1;
+ private ScreenFlashUiControl mScreenFlashUiControl;
@Nullable
private FocusMeteringAction mLastSubmittedFocusMeteringAction = null;
@@ -209,6 +211,17 @@
}
@Override
+ public void setScreenFlashUiControl(@Nullable ScreenFlashUiControl screenFlashUiControl) {
+ mScreenFlashUiControl = screenFlashUiControl;
+ Logger.d(TAG, "setScreenFlashUiControl(" + mScreenFlashUiControl + ")");
+ }
+
+ @Nullable
+ public ScreenFlashUiControl getScreenFlashUiControl() {
+ return mScreenFlashUiControl;
+ }
+
+ @Override
public void setZslDisabledByUserCaseConfig(boolean disabled) {
mIsZslDisabledByUseCaseConfig = disabled;
}
diff --git a/camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeCameraInfoInternal.java b/camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeCameraInfoInternal.java
index 8b28e6c..a028ba0 100644
--- a/camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeCameraInfoInternal.java
+++ b/camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeCameraInfoInternal.java
@@ -108,6 +108,11 @@
this(cameraId, 0, CameraSelector.LENS_FACING_BACK);
}
+ public FakeCameraInfoInternal(@NonNull String cameraId,
+ @CameraSelector.LensFacing int lensFacing) {
+ this(cameraId, 0, lensFacing);
+ }
+
public FakeCameraInfoInternal(int sensorRotation, @CameraSelector.LensFacing int lensFacing) {
this("0", sensorRotation, lensFacing);
}
diff --git a/camera/camera-testing/src/main/java/androidx/camera/testing/impl/mocks/MockScreenFlashUiControl.java b/camera/camera-testing/src/main/java/androidx/camera/testing/impl/mocks/MockScreenFlashUiControl.java
new file mode 100644
index 0000000..365c62d
--- /dev/null
+++ b/camera/camera-testing/src/main/java/androidx/camera/testing/impl/mocks/MockScreenFlashUiControl.java
@@ -0,0 +1,104 @@
+/*
+ * 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.testing.impl.mocks;
+
+import androidx.annotation.IntDef;
+import androidx.annotation.NonNull;
+import androidx.annotation.RequiresApi;
+import androidx.camera.core.ImageCapture;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * A mock implementations of {@link ImageCapture.ScreenFlashUiControl} for testing purpose.
+ */
+@RequiresApi(21) // TODO(b/200306659): Remove and replace with annotation on package-info.java
+public class MockScreenFlashUiControl implements ImageCapture.ScreenFlashUiControl {
+ /**
+ * Represents
+ * {@link ImageCapture.ScreenFlashUiControl#applyScreenFlashUi(ImageCapture.ScreenFlashUiCompleter)}
+ * event.
+ */
+ public static final int APPLY_SCREEN_FLASH = 0;
+ /**
+ * Represents {@link ImageCapture.ScreenFlashUiControl#clearScreenFlashUi()} event.
+ */
+ public static final int CLEAR_SCREEN_FLASH = 1;
+
+ /**
+ * The event types in {@link ImageCapture.ScreenFlashUiControl}.
+ */
+ @IntDef({APPLY_SCREEN_FLASH, CLEAR_SCREEN_FLASH})
+ @Retention(RetentionPolicy.SOURCE)
+ @Target({ElementType.TYPE_USE})
+ public @interface ScreenFlashUiEvent {
+ }
+
+ private final Object mLock = new Object();
+ private final List<@ScreenFlashUiEvent Integer> mEventList = new ArrayList<>();
+ private final CountDownLatch mScreenFlashUiClearLatch = new CountDownLatch(1);
+
+ /**
+ * Returns a list of {@link ScreenFlashUiEvent} in the same order as invoked.
+ */
+ @NonNull
+ public List<@ScreenFlashUiEvent Integer> getScreenFlashUiEvents() {
+ synchronized (mLock) {
+ return new ArrayList<>(mEventList);
+ }
+ }
+
+ /**
+ * Waits for {@link #clearScreenFlashUi} to be invoked once.
+ *
+ * @param timeoutInMillis The timeout of waiting in milliseconds.
+ * @return True if {@link #clearScreenFlashUi} was invoked, false if timed out.
+ */
+ public boolean awaitScreenFlashUiClear(long timeoutInMillis) {
+ try {
+ return mScreenFlashUiClearLatch.await(timeoutInMillis, TimeUnit.MILLISECONDS);
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void applyScreenFlashUi(
+ @NonNull ImageCapture.ScreenFlashUiCompleter screenFlashUiCompleter) {
+ synchronized (mLock) {
+ mEventList.add(APPLY_SCREEN_FLASH);
+ screenFlashUiCompleter.complete();
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void clearScreenFlashUi() {
+ synchronized (mLock) {
+ mEventList.add(CLEAR_SCREEN_FLASH);
+ mScreenFlashUiClearLatch.countDown();
+ }
+ }
+}
diff --git a/camera/camera-testing/src/test/java/androidx/camera/testing/fakes/FakeCameraControlTest.java b/camera/camera-testing/src/test/java/androidx/camera/testing/fakes/FakeCameraControlTest.java
index e712626..16ce437 100644
--- a/camera/camera-testing/src/test/java/androidx/camera/testing/fakes/FakeCameraControlTest.java
+++ b/camera/camera-testing/src/test/java/androidx/camera/testing/fakes/FakeCameraControlTest.java
@@ -17,7 +17,6 @@
package androidx.camera.testing.fakes;
import static androidx.camera.testing.impl.fakes.FakeCameraDeviceSurfaceManager.MAX_OUTPUT_SIZE;
-
import static com.google.common.truth.Truth.assertThat;
import android.graphics.Rect;
@@ -38,6 +37,7 @@
import androidx.camera.core.impl.SessionConfig;
import androidx.camera.core.impl.utils.executor.CameraXExecutors;
import androidx.camera.testing.impl.fakes.FakeCameraCaptureResult;
+import androidx.camera.testing.impl.mocks.MockScreenFlashUiControl;
import com.google.common.util.concurrent.ListenableFuture;
@@ -216,6 +216,21 @@
}
@Test
+ public void canSetScreenFlashUiControl() {
+ ImageCapture.ScreenFlashUiControl screenFlashUiControl = new MockScreenFlashUiControl();
+ mCameraControl.setScreenFlashUiControl(screenFlashUiControl);
+ assertThat(mCameraControl.getScreenFlashUiControl()).isEqualTo(screenFlashUiControl);
+ }
+
+ @Test
+ public void canClearScreenFlashUiControl_afterEnable() {
+ ImageCapture.ScreenFlashUiControl screenFlashUiControl = new MockScreenFlashUiControl();
+ mCameraControl.setScreenFlashUiControl(screenFlashUiControl);
+ mCameraControl.setScreenFlashUiControl(null);
+ assertThat(mCameraControl.getScreenFlashUiControl()).isEqualTo(null);
+ }
+
+ @Test
public void futureCompletesImmediately_whenTorchEnabled() {
ListenableFuture<?> future = mCameraControl.enableTorch(true);
assertThat(future.isDone()).isTrue();
diff --git a/camera/camera-testing/src/test/java/androidx/camera/testing/mocks/MockScreenFlashUiControlTest.kt b/camera/camera-testing/src/test/java/androidx/camera/testing/mocks/MockScreenFlashUiControlTest.kt
new file mode 100644
index 0000000..eeac01f
--- /dev/null
+++ b/camera/camera-testing/src/test/java/androidx/camera/testing/mocks/MockScreenFlashUiControlTest.kt
@@ -0,0 +1,95 @@
+/*
+ * 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.testing.mocks
+
+import android.annotation.SuppressLint
+import android.os.Build
+import androidx.camera.core.ImageCapture.ScreenFlashUiCompleter
+import androidx.camera.testing.impl.mocks.MockScreenFlashUiControl
+import androidx.camera.testing.impl.mocks.MockScreenFlashUiControl.APPLY_SCREEN_FLASH
+import androidx.camera.testing.impl.mocks.MockScreenFlashUiControl.CLEAR_SCREEN_FLASH
+import com.google.common.truth.Truth.assertThat
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+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 MockScreenFlashUiControlTest {
+ private val dummyCompleter = ScreenFlashUiCompleter { }
+
+ private lateinit var mMockScreenFlashUiControl: MockScreenFlashUiControl
+
+ @Before
+ fun setUp() {
+ mMockScreenFlashUiControl = MockScreenFlashUiControl()
+ }
+
+ @Test
+ fun getScreenFlashUiEvents_invocationsRecordedExactlyInSameOrder() {
+ mMockScreenFlashUiControl.clearScreenFlashUi()
+ mMockScreenFlashUiControl.applyScreenFlashUi(dummyCompleter)
+ mMockScreenFlashUiControl.clearScreenFlashUi()
+
+ assertThat(mMockScreenFlashUiControl.screenFlashUiEvents).isEqualTo(listOf(
+ CLEAR_SCREEN_FLASH,
+ APPLY_SCREEN_FLASH,
+ CLEAR_SCREEN_FLASH,
+ ))
+ }
+
+ @Test
+ fun awaitScreenFlashUiApply_completerCompletedAutomaticallyByDefault() {
+ var isCompleted = false
+ val completer = ScreenFlashUiCompleter { isCompleted = true }
+ mMockScreenFlashUiControl.applyScreenFlashUi(completer)
+
+ assertThat(isCompleted).isTrue()
+ }
+
+ @Test
+ fun awaitScreenFlashUiClear_returnsFalseWhenClearScreenFlashUiNotInvoked() {
+ assertThat(mMockScreenFlashUiControl.awaitScreenFlashUiClear(3000)).isFalse()
+ }
+
+ @Test
+ fun awaitScreenFlashUiClear_returnsTrueWhenClearScreenFlashUiInvokedEarlier() {
+ mMockScreenFlashUiControl.clearScreenFlashUi()
+ assertThat(mMockScreenFlashUiControl.awaitScreenFlashUiClear(3000)).isTrue()
+ }
+
+ @SuppressLint("BanThreadSleep")
+ @Test
+ fun awaitScreenFlashUiClear_returnsTrueWhenClearScreenFlashUiInvokedLater() {
+ Thread({
+ try {
+ // ensure clearScreenFlashUi is not invoked immediately, but after some delay and
+ // from another thread
+ Thread.sleep(100)
+ } catch (e: InterruptedException) {
+ throw RuntimeException(e)
+ }
+ mMockScreenFlashUiControl.clearScreenFlashUi()
+ }, "test thread").start()
+
+ assertThat(mMockScreenFlashUiControl.awaitScreenFlashUiClear(3000)).isTrue()
+ }
+}
diff --git a/camera/camera-video/lint-baseline.xml b/camera/camera-video/lint-baseline.xml
index 6cb1056..6bb2b1ba 100644
--- a/camera/camera-video/lint-baseline.xml
+++ b/camera/camera-video/lint-baseline.xml
@@ -1,9 +1,9 @@
<?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">
+<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 14): `Status`"
+ message="Class requires API level 21 (current min is 19): `Status`"
errorLine1=" is VideoRecordEvent.Status -> {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
diff --git a/camera/camera-view/api/current.txt b/camera/camera-view/api/current.txt
index 964bc06..2b6a82d 100644
--- a/camera/camera-view/api/current.txt
+++ b/camera/camera-view/api/current.txt
@@ -107,6 +107,7 @@
method @UiThread public void setController(androidx.camera.view.CameraController?);
method @UiThread public void setImplementationMode(androidx.camera.view.PreviewView.ImplementationMode);
method @UiThread public void setScaleType(androidx.camera.view.PreviewView.ScaleType);
+ method @UiThread public void setScreenFlashWindow(android.view.Window?);
}
@RequiresApi(21) public enum PreviewView.ImplementationMode {
@@ -138,6 +139,16 @@
method public void onRotationChanged(int);
}
+ @RequiresApi(21) public final class ScreenFlashView extends android.view.View {
+ ctor @UiThread public ScreenFlashView(android.content.Context);
+ ctor @UiThread public ScreenFlashView(android.content.Context, android.util.AttributeSet?);
+ ctor @UiThread public ScreenFlashView(android.content.Context, android.util.AttributeSet?, int);
+ ctor @UiThread public ScreenFlashView(android.content.Context, android.util.AttributeSet?, int, int);
+ method @UiThread public androidx.camera.core.ImageCapture.ScreenFlashUiControl? getScreenFlashUiControl();
+ method @UiThread public void setController(androidx.camera.view.CameraController?);
+ method @UiThread public void setScreenFlashWindow(android.view.Window?);
+ }
+
}
package androidx.camera.view.transform {
diff --git a/camera/camera-view/api/restricted_current.txt b/camera/camera-view/api/restricted_current.txt
index 964bc06..2b6a82d 100644
--- a/camera/camera-view/api/restricted_current.txt
+++ b/camera/camera-view/api/restricted_current.txt
@@ -107,6 +107,7 @@
method @UiThread public void setController(androidx.camera.view.CameraController?);
method @UiThread public void setImplementationMode(androidx.camera.view.PreviewView.ImplementationMode);
method @UiThread public void setScaleType(androidx.camera.view.PreviewView.ScaleType);
+ method @UiThread public void setScreenFlashWindow(android.view.Window?);
}
@RequiresApi(21) public enum PreviewView.ImplementationMode {
@@ -138,6 +139,16 @@
method public void onRotationChanged(int);
}
+ @RequiresApi(21) public final class ScreenFlashView extends android.view.View {
+ ctor @UiThread public ScreenFlashView(android.content.Context);
+ ctor @UiThread public ScreenFlashView(android.content.Context, android.util.AttributeSet?);
+ ctor @UiThread public ScreenFlashView(android.content.Context, android.util.AttributeSet?, int);
+ ctor @UiThread public ScreenFlashView(android.content.Context, android.util.AttributeSet?, int, int);
+ method @UiThread public androidx.camera.core.ImageCapture.ScreenFlashUiControl? getScreenFlashUiControl();
+ method @UiThread public void setController(androidx.camera.view.CameraController?);
+ method @UiThread public void setScreenFlashWindow(android.view.Window?);
+ }
+
}
package androidx.camera.view.transform {
diff --git a/camera/camera-view/src/main/java/androidx/camera/view/CameraController.java b/camera/camera-view/src/main/java/androidx/camera/view/CameraController.java
index 154c4fd..471e5f0 100644
--- a/camera/camera-view/src/main/java/androidx/camera/view/CameraController.java
+++ b/camera/camera-view/src/main/java/androidx/camera/view/CameraController.java
@@ -20,6 +20,8 @@
import static androidx.camera.core.impl.utils.executor.CameraXExecutors.directExecutor;
import static androidx.camera.core.impl.utils.executor.CameraXExecutors.mainThreadExecutor;
import static androidx.camera.core.impl.utils.futures.Futures.transform;
+import static androidx.camera.view.internal.ScreenFlashUiInfo.ProviderType.PREVIEW_VIEW;
+import static androidx.camera.view.internal.ScreenFlashUiInfo.ProviderType.SCREEN_FLASH_VIEW;
import static androidx.core.content.ContextCompat.getMainExecutor;
import android.Manifest;
@@ -30,6 +32,7 @@
import android.os.Build;
import android.util.Range;
import android.util.Size;
+import android.view.Window;
import androidx.annotation.DoNotInline;
import androidx.annotation.FloatRange;
@@ -55,6 +58,7 @@
import androidx.camera.core.FocusMeteringResult;
import androidx.camera.core.ImageAnalysis;
import androidx.camera.core.ImageCapture;
+import androidx.camera.core.ImageCapture.ScreenFlashUiControl;
import androidx.camera.core.ImageProxy;
import androidx.camera.core.InitializationException;
import androidx.camera.core.Logger;
@@ -85,6 +89,7 @@
import androidx.camera.video.Recording;
import androidx.camera.video.VideoCapture;
import androidx.camera.video.VideoRecordEvent;
+import androidx.camera.view.internal.ScreenFlashUiInfo;
import androidx.camera.view.video.AudioConfig;
import androidx.core.content.PermissionChecker;
import androidx.core.util.Consumer;
@@ -215,6 +220,20 @@
*/
public static final int VIDEO_CAPTURE = 1 << 2;
+ private static final ScreenFlashUiControl NO_OP_SCREEN_FLASH_UI_CONTROL =
+ new ScreenFlashUiControl() {
+ @Override
+ public void applyScreenFlashUi(
+ @NonNull ImageCapture.ScreenFlashUiCompleter screenFlashUiCompleter) {
+ screenFlashUiCompleter.complete();
+ }
+
+ @Override
+ public void clearScreenFlashUi() {
+
+ }
+ };
+
CameraSelector mCameraSelector = CameraSelector.DEFAULT_BACK_CAMERA;
// By default, ImageCapture and ImageAnalysis are enabled. VideoCapture is disabled.
@@ -337,6 +356,8 @@
@NonNull
private final ListenableFuture<Void> mInitializationFuture;
+ private final Map<ScreenFlashUiInfo.ProviderType, ScreenFlashUiInfo>
+ mScreenFlashUiInfoMap = new HashMap<>();
CameraController(@NonNull Context context) {
this(context, transform(ProcessCameraProvider.getInstance(context),
@@ -716,15 +737,96 @@
*
* <p>If not set, the flash mode will default to {@link ImageCapture#FLASH_MODE_OFF}.
*
+ * <p>If {@link ImageCapture#FLASH_MODE_SCREEN} is set, a valid {@link android.view.Window}
+ * instance must be set to a {@link PreviewView} or {@link ScreenFlashView} which this
+ * controller is set to. Trying to use {@link ImageCapture#FLASH_MODE_SCREEN} with a
+ * non-front camera or without setting a non-null window will be no-op. While switching the
+ * camera, it is the application's responsibility to change flash mode to the desired one if
+ * it leads to a no-op case (e.g. switching to rear camera while {@code FLASH_MODE_SCREEN} is
+ * still set). Otherwise, {@code FLASH_MODE_OFF} will be set.
+ *
* @param flashMode the flash mode for {@link ImageCapture}.
+ *
+ * @throws IllegalArgumentException If flash mode is invalid or FLASH_MODE_SCREEN is used
+ * without a front camera.
+ *
+ * @see PreviewView#setScreenFlashWindow(Window)
+ * @see ScreenFlashView#setScreenFlashWindow(Window)
*/
@MainThread
public void setImageCaptureFlashMode(@ImageCapture.FlashMode int flashMode) {
checkMainThread();
+
+ if (flashMode == ImageCapture.FLASH_MODE_SCREEN) {
+ Integer lensFacing = mCameraSelector.getLensFacing();
+ if (lensFacing != null && lensFacing != CameraSelector.LENS_FACING_FRONT) {
+ throw new IllegalArgumentException(
+ "Not a front camera despite setting FLASH_MODE_SCREEN");
+ }
+
+ updateScreenFlashUiControlToImageCapture();
+ }
+
mImageCapture.setFlashMode(flashMode);
}
/**
+ * Internal API used by {@link PreviewView} and {@link ScreenFlashView} to provide a
+ * {@link ScreenFlashUiControl}.
+ */
+ @RestrictTo(RestrictTo.Scope.LIBRARY)
+ public void setScreenFlashUiInfo(@NonNull ScreenFlashUiInfo screenFlashUiInfo) {
+ ScreenFlashUiInfo previousInfo = getScreenFlashUiInfoByPriority();
+ mScreenFlashUiInfoMap.put(screenFlashUiInfo.getProviderType(), screenFlashUiInfo);
+ ScreenFlashUiInfo prioritizedInfo = getScreenFlashUiInfoByPriority();
+ if (prioritizedInfo != null && !prioritizedInfo.equals(previousInfo)) {
+ updateScreenFlashUiControlToImageCapture();
+ }
+ }
+
+ /**
+ * Internal API used by {@link PreviewView} and {@link ScreenFlashView} to update screen
+ * flash mode to ImageCapture in case it's pending.
+ */
+ @RestrictTo(RestrictTo.Scope.LIBRARY)
+ public void updateScreenFlashUiControlToImageCapture() {
+ ScreenFlashUiInfo screenFlashUiInfo = getScreenFlashUiInfoByPriority();
+
+ if (screenFlashUiInfo == null) {
+ // PreviewView/ScreenFlashView may have not been attached yet, so setting a NO-OP
+ // ScreenFlashUiControl until one of the views is attached
+ Logger.d(TAG, "No ScreenFlashUiControl set yet, need to wait for "
+ + "controller to be set to either ScreenFlashView or PreviewView");
+ mImageCapture.setScreenFlashUiControl(NO_OP_SCREEN_FLASH_UI_CONTROL);
+ return;
+ }
+
+ mImageCapture.setScreenFlashUiControl(screenFlashUiInfo.getScreenFlashUiControl());
+ Logger.d(TAG, "Set ScreenFlashUiControl to ImageCapture, provided by "
+ + screenFlashUiInfo.getProviderType().name());
+ }
+
+ /**
+ * Returns a {@link ScreenFlashUiInfo} by prioritizing {@link ScreenFlashView} over
+ * {@link PreviewView}.
+ *
+ * <p> PreviewView always has a ScreenFlashView internally and does not know if user is
+ * using another ScreenFlashView themselves. This API prioritizes user's ScreenFlashView over
+ * the internal one in PreviewView and provides the ScreenFlashUiControlProvider accordingly.
+ */
+ @Nullable
+ @RestrictTo(RestrictTo.Scope.LIBRARY)
+ public ScreenFlashUiInfo getScreenFlashUiInfoByPriority() {
+ if (mScreenFlashUiInfoMap.get(SCREEN_FLASH_VIEW) != null) {
+ return mScreenFlashUiInfoMap.get(SCREEN_FLASH_VIEW);
+ }
+ if (mScreenFlashUiInfoMap.get(PREVIEW_VIEW) != null) {
+ return mScreenFlashUiInfoMap.get(PREVIEW_VIEW);
+ }
+ return null;
+ }
+
+ /**
* Captures a new still image and saves to a file along with application specified metadata.
*
* <p>The callback will be called only once for every invocation of this method.
@@ -741,6 +843,12 @@
* @param outputFileOptions Options to store the newly captured image.
* @param executor The executor in which the callback methods will be run.
* @param imageSavedCallback Callback to be called for the newly captured image.
+ *
+ * @throws IllegalStateException If {@link ImageCapture#FLASH_MODE_SCREEN} is set to the
+ * {@link CameraController}, but a non-null {@link Window}
+ * instance has not been set with
+ * {@link PreviewView#setScreenFlashWindow}.
+ *
* @see ImageCapture#takePicture(
*ImageCapture.OutputFileOptions, Executor, ImageCapture.OnImageSavedCallback)
*/
@@ -753,6 +861,8 @@
Preconditions.checkState(isCameraInitialized(), CAMERA_NOT_INITIALIZED);
Preconditions.checkState(isImageCaptureEnabled(), IMAGE_CAPTURE_DISABLED);
+ throwExceptionForInvalidScreenFlashCapture();
+
updateMirroringFlagInOutputFileOptions(outputFileOptions);
mImageCapture.takePicture(outputFileOptions, executor, imageSavedCallback);
}
@@ -781,6 +891,12 @@
*
* @param executor The executor in which the callback methods will be run.
* @param callback Callback to be invoked for the newly captured image
+ *
+ * @throws IllegalStateException If {@link ImageCapture#FLASH_MODE_SCREEN} is set to the
+ * {@link CameraController}, but a non-null {@link Window}
+ * instance has not been set with
+ * {@link PreviewView#setScreenFlashWindow}.
+ *
* @see ImageCapture#takePicture(Executor, ImageCapture.OnImageCapturedCallback)
*/
@MainThread
@@ -791,9 +907,22 @@
Preconditions.checkState(isCameraInitialized(), CAMERA_NOT_INITIALIZED);
Preconditions.checkState(isImageCaptureEnabled(), IMAGE_CAPTURE_DISABLED);
+ throwExceptionForInvalidScreenFlashCapture();
+
mImageCapture.takePicture(executor, callback);
}
+ private void throwExceptionForInvalidScreenFlashCapture() {
+ if (getImageCaptureFlashMode() == ImageCapture.FLASH_MODE_SCREEN && (
+ getScreenFlashUiInfoByPriority() == null
+ || getScreenFlashUiInfoByPriority().getScreenFlashUiControl() == null)) {
+ // ScreenFlashUiControl won't be found at this point only if a non-null window was not
+ // set to PreviewView.
+ throw new IllegalStateException(
+ "No window set in PreviewView despite setting FLASH_MODE_SCREEN");
+ }
+ }
+
/**
* Sets the image capture mode.
*
@@ -1726,6 +1855,12 @@
return;
}
+ Integer lensFacing = cameraSelector.getLensFacing();
+ if (mImageCapture.getFlashMode() == ImageCapture.FLASH_MODE_SCREEN && lensFacing != null
+ && lensFacing != CameraSelector.LENS_FACING_FRONT) {
+ throw new IllegalStateException("Not a front camera despite setting FLASH_MODE_SCREEN");
+ }
+
CameraSelector oldCameraSelector = mCameraSelector;
mCameraSelector = cameraSelector;
diff --git a/camera/camera-view/src/main/java/androidx/camera/view/PreviewView.java b/camera/camera-view/src/main/java/androidx/camera/view/PreviewView.java
index cb853a1..89574f7 100644
--- a/camera/camera-view/src/main/java/androidx/camera/view/PreviewView.java
+++ b/camera/camera-view/src/main/java/androidx/camera/view/PreviewView.java
@@ -22,6 +22,7 @@
import static androidx.core.content.ContextCompat.getMainExecutor;
import android.annotation.SuppressLint;
+import android.app.Activity;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
@@ -44,9 +45,12 @@
import android.view.TextureView;
import android.view.View;
import android.view.ViewConfiguration;
+import android.view.Window;
import android.widget.FrameLayout;
+import android.widget.LinearLayout;
import androidx.annotation.AnyThread;
+import androidx.annotation.ColorInt;
import androidx.annotation.ColorRes;
import androidx.annotation.MainThread;
import androidx.annotation.NonNull;
@@ -61,6 +65,8 @@
import androidx.camera.core.CameraSelector;
import androidx.camera.core.FocusMeteringAction;
import androidx.camera.core.ImageAnalysis;
+import androidx.camera.core.ImageCapture;
+import androidx.camera.core.ImageCapture.ScreenFlashUiControl;
import androidx.camera.core.Logger;
import androidx.camera.core.MeteringPoint;
import androidx.camera.core.MeteringPointFactory;
@@ -73,6 +79,7 @@
import androidx.camera.core.impl.CameraInternal;
import androidx.camera.core.impl.ImageOutputConfig;
import androidx.camera.core.impl.utils.Threads;
+import androidx.camera.view.internal.ScreenFlashUiInfo;
import androidx.camera.view.internal.compat.quirk.DeviceQuirks;
import androidx.camera.view.internal.compat.quirk.SurfaceViewNotCroppedByParentQuirk;
import androidx.camera.view.internal.compat.quirk.SurfaceViewStretchedQuirk;
@@ -80,6 +87,7 @@
import androidx.camera.view.transform.OutputTransform;
import androidx.core.content.ContextCompat;
import androidx.core.view.ViewCompat;
+import androidx.fragment.app.Fragment;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
@@ -131,6 +139,9 @@
PreviewViewImplementation mImplementation;
@NonNull
+ final ScreenFlashView mScreenFlashView;
+
+ @NonNull
final PreviewTransformation mPreviewTransform = new PreviewTransformation();
boolean mUseDisplayRotation = true;
@@ -261,6 +272,12 @@
camera.getCameraState().removeObserver(streamStateObserver);
});
+ // PreviewViewImplementation#onSurfaceRequested may remove all child views, check if
+ // ScreenFlashView needs to be re-added
+ if (PreviewView.this.indexOfChild(mScreenFlashView) == -1) {
+ PreviewView.this.addView(mScreenFlashView);
+ }
+
if (mOnFrameUpdateListener != null && mOnFrameUpdateListenerExecutor != null) {
mImplementation.setFrameUpdateListener(mOnFrameUpdateListenerExecutor,
mOnFrameUpdateListener);
@@ -315,6 +332,11 @@
if (getBackground() == null) {
setBackgroundColor(ContextCompat.getColor(getContext(), DEFAULT_BACKGROUND_COLOR));
}
+
+ mScreenFlashView = new ScreenFlashView(context);
+ mScreenFlashView.setLayoutParams(new LinearLayout.LayoutParams(
+ LinearLayout.LayoutParams.MATCH_PARENT,
+ LinearLayout.LayoutParams.MATCH_PARENT));
}
@Override
@@ -947,9 +969,11 @@
// If already bound to a different controller, ask the old controller to stop
// using this PreviewView.
mCameraController.clearPreviewSurface();
+ setScreenFlashUiInfo(null);
}
mCameraController = cameraController;
attachToControllerIfReady(/*shouldFailSilently=*/false);
+ setScreenFlashUiInfo(getScreenFlashUiControl());
}
/**
@@ -1055,6 +1079,15 @@
}
}
+ private void setScreenFlashUiInfo(ScreenFlashUiControl control) {
+ if (mCameraController == null) {
+ Logger.d(TAG, "setScreenFlashUiControl: mCameraController is null!");
+ return;
+ }
+ mCameraController.setScreenFlashUiInfo(new ScreenFlashUiInfo(
+ ScreenFlashUiInfo.ProviderType.PREVIEW_VIEW, control));
+ }
+
private void startListeningToDisplayChange() {
DisplayManager displayManager = getDisplayManager();
if (displayManager == null) {
@@ -1083,6 +1116,62 @@
}
/**
+ * Sets a {@link Window} instance for subsequent photo capture requests with
+ * {@link ImageCapture#FLASH_MODE_SCREEN} set.
+ *
+ * <p>The calling of this API will take effect for {@link ImageCapture#FLASH_MODE_SCREEN} only
+ * and the {@code Window} will be ignored for other flash modes. During screen flash photo
+ * capture, the window is used for the purpose of changing brightness.
+ *
+ * <p>If the implementation provided by the user is no longer valid (e.g. due to any
+ * {@link android.app.Activity} or {@link android.view.View} reference used in the
+ * implementation becoming invalid), user needs to re-set a new valid window or
+ * clear the previous one with {@code setScreenFlashWindow(null)}, whichever appropriate.
+ *
+ * <p>For most app scenarios, a {@link Window} instance can be obtained from
+ * {@link Activity#getWindow()}. In case of a fragment, {@link Fragment#getActivity()} can
+ * first be used to get the activity instance.
+ *
+ * @param screenFlashWindow A {@link Window} instance that is used to change the brightness
+ * during screen flash photo capture.
+ */
+ @UiThread
+ public void setScreenFlashWindow(@Nullable Window screenFlashWindow) {
+ checkMainThread();
+ mScreenFlashView.setScreenFlashWindow(screenFlashWindow);
+ setScreenFlashUiInfo(getScreenFlashUiControl());
+ }
+
+ /**
+ * Returns an {@link ScreenFlashUiControl} implementation based
+ * on the {@link Window} instance set via {@link #setScreenFlashWindow(Window)}.
+ *
+ * <p> This API uses an internally managed {@link ScreenFlashView} to provide the
+ * {@link ScreenFlashUiControl} implementation.
+ *
+ * @return An {@link ScreenFlashUiControl} implementation provided by
+ * {@link ScreenFlashView#getScreenFlashUiControl()}.
+ */
+ @UiThread
+ @Nullable
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ public ScreenFlashUiControl getScreenFlashUiControl() {
+ return mScreenFlashView.getScreenFlashUiControl();
+ }
+
+ /**
+ * Sets the color of the top overlay view during screen flash.
+ *
+ * @param color The color value of the top overlay.
+ *
+ * @see #getScreenFlashUiControl()
+ */
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ public void setScreenFlashOverlayColor(@ColorInt int color) {
+ mScreenFlashView.setBackgroundColor(color);
+ }
+
+ /**
* Listener for display rotation changes.
*
* <p> When the device is rotated 180° from side to side, the activity is not
diff --git a/camera/camera-view/src/main/java/androidx/camera/view/ScreenFlashView.java b/camera/camera-view/src/main/java/androidx/camera/view/ScreenFlashView.java
new file mode 100644
index 0000000..a6cf31e
--- /dev/null
+++ b/camera/camera-view/src/main/java/androidx/camera/view/ScreenFlashView.java
@@ -0,0 +1,232 @@
+/*
+ * 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.view;
+
+import static androidx.camera.core.ImageCapture.FLASH_MODE_SCREEN;
+import static androidx.camera.core.impl.utils.Threads.checkMainThread;
+
+import android.app.Activity;
+import android.content.Context;
+import android.graphics.Color;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.RequiresApi;
+import androidx.annotation.UiThread;
+import androidx.camera.core.ImageCapture;
+import androidx.camera.core.ImageCapture.ScreenFlashUiCompleter;
+import androidx.camera.core.ImageCapture.ScreenFlashUiControl;
+import androidx.camera.core.Logger;
+import androidx.camera.view.internal.ScreenFlashUiInfo;
+import androidx.fragment.app.Fragment;
+
+/**
+ * Custom View that implements a basic UI for screen flash photo capture.
+ *
+ * <p> This class provides an {@link ScreenFlashUiControl} implementation with
+ * {@link #getScreenFlashUiControl()} for the
+ * {@link ImageCapture#setScreenFlashUiControl(ScreenFlashUiControl)} API. If a
+ * {@link CameraController} is used for CameraX operations,{@link #setController(CameraController)}
+ * should be used to set the controller to this view. Normally, this view is kept fully
+ * transparent. It becomes fully visible for the duration of screen flash photo capture. The
+ * screen brightness is also maximized for that duration.
+ *
+ * <p> The default color of the view is {@link Color#WHITE}, but it can be changed with
+ * {@link View#setBackgroundColor(int)} API. The elevation of this view is always set to
+ * {@link Float#MAX_VALUE} so that it always appears on top in its view hierarchy during screen
+ * flash.
+ *
+ * <p> This view is also used internally in {@link PreviewView}, so may not be required if user
+ * is already using {@link PreviewView}. However, note that the internal instance of
+ * {@link PreviewView} has the same dimensions as {@link PreviewView}. So if the
+ * {@link PreviewView} does not encompass the full screen, users may want to use this view
+ * separately so that whole screen can be encompassed during screen flash operation.
+ *
+ * @see ImageCapture#FLASH_MODE_SCREEN
+ * @see PreviewView#getScreenFlashUiControl
+ */
+@RequiresApi(21) // TODO(b/200306659): Remove and replace with annotation on package-info.java
+public final class ScreenFlashView extends View {
+ private static final String TAG = "ScreenFlashView";
+ private CameraController mCameraController;
+ private Window mScreenFlashWindow;
+ private ScreenFlashUiControl mScreenFlashUiControl;
+
+ @UiThread
+ public ScreenFlashView(@NonNull Context context) {
+ this(context, null);
+ }
+
+ @UiThread
+ public ScreenFlashView(@NonNull Context context, @Nullable AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ @UiThread
+ public ScreenFlashView(@NonNull Context context, @Nullable AttributeSet attrs,
+ int defStyleAttr) {
+ this(context, attrs, defStyleAttr, 0);
+ }
+
+ @UiThread
+ public ScreenFlashView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr,
+ int defStyleRes) {
+ super(context, attrs, defStyleAttr, defStyleRes);
+
+ setBackgroundColor(Color.WHITE);
+ setAlpha(0f);
+ setElevation(Float.MAX_VALUE);
+ }
+
+ /**
+ * Sets {@link ScreenFlashUiInfo} to a {@link CameraController}.
+ *
+ * <p> Once set, the controller will use {@link ScreenFlashView} for screen flash related UI
+ * operations.
+ *
+ * @throws IllegalStateException If {@link ImageCapture#FLASH_MODE_SCREEN} is set to the
+ * {@link CameraController}, but a non-null {@link Window}
+ * instance has not been set with {@link #setScreenFlashWindow}.
+ * @see CameraController
+ */
+ @UiThread
+ public void setController(@Nullable CameraController cameraController) {
+ checkMainThread();
+
+ if (mCameraController != null && mCameraController != cameraController) {
+ // If already bound to a different controller, remove the ScreenFlashUiControl from the
+ // old controller.
+ setScreenFlashUiInfo(null);
+ }
+ mCameraController = cameraController;
+
+ if (cameraController == null) {
+ return;
+ }
+
+ if (cameraController.getImageCaptureFlashMode() == FLASH_MODE_SCREEN
+ && mScreenFlashWindow == null) {
+ throw new IllegalStateException(
+ "No window set despite setting FLASH_MODE_SCREEN in CameraController");
+ }
+
+ setScreenFlashUiInfo(getScreenFlashUiControl());
+ }
+
+ private void setScreenFlashUiInfo(ScreenFlashUiControl control) {
+ if (mCameraController == null) {
+ Logger.d(TAG, "setScreenFlashUiControl: mCameraController is null!");
+ return;
+ }
+ mCameraController.setScreenFlashUiInfo(new ScreenFlashUiInfo(
+ ScreenFlashUiInfo.ProviderType.SCREEN_FLASH_VIEW, control));
+ }
+
+ /**
+ * Sets a {@link Window} instance for subsequent photo capture requests with
+ * {@link ImageCapture} use case when{@link ImageCapture#FLASH_MODE_SCREEN} is set.
+ *
+ * <p>The calling of this API will take effect for {@code ImageCapture#FLASH_MODE_SCREEN} only
+ * and the {@code Window} will be ignored for other flash modes. During screen flash photo
+ * capture, the window is used for the purpose of changing screen brightness.
+ *
+ * <p> If the implementation provided by the user is no longer valid (e.g. due to any
+ * {@link android.app.Activity} or {@link android.view.View} reference used in the
+ * implementation becoming invalid), user needs to re-set a new valid window or clear the
+ * previous one with {@code setScreenFlashWindow(null)}, whichever appropriate.
+ *
+ * <p>For most app scenarios, a {@code Window} instance can be obtained from
+ * {@link Activity#getWindow()}. In case of a fragment, {@link Fragment#getActivity()} can
+ * first be used to get the activity instance.
+ *
+ * @param screenFlashWindow A {@link Window} instance that is used to change the brightness
+ * during screen flash photo capture.
+ */
+ @UiThread
+ public void setScreenFlashWindow(@Nullable Window screenFlashWindow) {
+ checkMainThread();
+ updateScreenFlashUiControl(screenFlashWindow);
+ mScreenFlashWindow = screenFlashWindow;
+ setScreenFlashUiInfo(getScreenFlashUiControl());
+ }
+
+ /** Update {@link #mScreenFlashUiControl} if required. */
+ private void updateScreenFlashUiControl(Window window) {
+ if (mScreenFlashWindow != window) {
+ mScreenFlashUiControl = window == null ? null : new ScreenFlashUiControl() {
+ private float mPreviousBrightness;
+
+ @Override
+ public void applyScreenFlashUi(
+ @NonNull ScreenFlashUiCompleter screenFlashUiCompleter) {
+ Logger.d(TAG, "ScreenFlashUiControl#applyScreenFlashUi");
+
+ setAlpha(1f);
+
+ // Maximize screen brightness
+ WindowManager.LayoutParams layoutParam = mScreenFlashWindow.getAttributes();
+ mPreviousBrightness = layoutParam.screenBrightness;
+ layoutParam.screenBrightness = 1F;
+ mScreenFlashWindow.setAttributes(layoutParam);
+
+ screenFlashUiCompleter.complete();
+ }
+
+ @Override
+ public void clearScreenFlashUi() {
+ Logger.d(TAG, "ScreenFlashUiControl#clearScreenFlashUi");
+
+ setAlpha(0f);
+
+ // Restore screen brightness
+ WindowManager.LayoutParams layoutParam = mScreenFlashWindow.getAttributes();
+ layoutParam.screenBrightness = mPreviousBrightness;
+ mScreenFlashWindow.setAttributes(layoutParam);
+ }
+ };
+ }
+ }
+
+ /**
+ * Returns an {@link ScreenFlashUiControl} implementation based on the {@link Window} instance
+ * set via {@link #setScreenFlashWindow(Window)}.
+ *
+ * <p> When {@link ScreenFlashUiControl#applyScreenFlashUi(ScreenFlashUiCompleter)} is invoked,
+ * this view becomes fully visible and screen brightness is maximized using the provided
+ * {@code Window}. The default color of the overlay view is {@link Color#WHITE}. To change
+ * the color, use {@link #setBackgroundColor(int)}.
+ *
+ * <p> When {@link ScreenFlashUiControl#clearScreenFlashUi()} is invoked, the view
+ * becomes transparent and screen brightness is restored.
+ *
+ * <p> The {@code Window} instance parameter can usually be provided from the activity using
+ * the {@link PreviewView}, see {@link Activity#getWindow()} for details. If a null {@code
+ * Window} is set or none set at all, a null value will be returned by this method.
+ *
+ * @return A simple {@link ScreenFlashUiControl} implementation, or null value if a non-null
+ * {@code Window} instance hasn't been set.
+ */
+ @UiThread
+ @Nullable
+ public ScreenFlashUiControl getScreenFlashUiControl() {
+ return mScreenFlashUiControl;
+ }
+}
diff --git a/camera/camera-view/src/main/java/androidx/camera/view/internal/ScreenFlashUiInfo.java b/camera/camera-view/src/main/java/androidx/camera/view/internal/ScreenFlashUiInfo.java
new file mode 100644
index 0000000..979dc56
--- /dev/null
+++ b/camera/camera-view/src/main/java/androidx/camera/view/internal/ScreenFlashUiInfo.java
@@ -0,0 +1,79 @@
+/*
+ * 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.view.internal;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.camera.core.ImageCapture;
+import androidx.camera.view.CameraController;
+import androidx.camera.view.PreviewView;
+import androidx.camera.view.ScreenFlashView;
+
+import java.util.Objects;
+
+/**
+ * Internal data class that encapsulates an {@link ImageCapture.ScreenFlashUiControl} and its
+ * provider.
+ */
+public class ScreenFlashUiInfo {
+ /**
+ * Since {@link ImageCapture.ScreenFlashUiControl} can be created from either the
+ * {@link ScreenFlashView} set by user or the one internally used in {@link PreviewView},
+ * {@link CameraController} needs to know where exactly the control is from so that it can
+ * prioritize the user-set one when both are available.
+ */
+ public enum ProviderType {
+ PREVIEW_VIEW,
+ SCREEN_FLASH_VIEW
+ }
+
+ @NonNull
+ private final ProviderType mProviderType;
+
+ @Nullable
+ private final ImageCapture.ScreenFlashUiControl mScreenFlashUiControl;
+
+ public ScreenFlashUiInfo(@NonNull ProviderType providerType,
+ @Nullable ImageCapture.ScreenFlashUiControl screenFlashUiControl) {
+ mProviderType = providerType;
+ mScreenFlashUiControl = screenFlashUiControl;
+ }
+
+ @NonNull
+ public ProviderType getProviderType() {
+ return mProviderType;
+ }
+
+ @Nullable
+ public ImageCapture.ScreenFlashUiControl getScreenFlashUiControl() {
+ return mScreenFlashUiControl;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof ScreenFlashUiInfo)) return false;
+ ScreenFlashUiInfo that = (ScreenFlashUiInfo) o;
+ return mProviderType == that.mProviderType && Objects.equals(mScreenFlashUiControl,
+ that.mScreenFlashUiControl);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(mProviderType, mScreenFlashUiControl);
+ }
+}
diff --git a/camera/camera-view/src/main/java/androidx/camera/view/internal/compat/quirk/package-info.java b/camera/camera-view/src/main/java/androidx/camera/view/internal/package-info.java
similarity index 86%
rename from camera/camera-view/src/main/java/androidx/camera/view/internal/compat/quirk/package-info.java
rename to camera/camera-view/src/main/java/androidx/camera/view/internal/package-info.java
index 990fa54..cb22ed3 100644
--- a/camera/camera-view/src/main/java/androidx/camera/view/internal/compat/quirk/package-info.java
+++ b/camera/camera-view/src/main/java/androidx/camera/view/internal/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The Android Open Source Project
+ * 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.
@@ -17,6 +17,6 @@
/**
*/
@RestrictTo(RestrictTo.Scope.LIBRARY)
-package androidx.camera.view.internal.compat.quirk;
+package androidx.camera.view.internal;
import androidx.annotation.RestrictTo;
diff --git a/camera/camera-view/src/test/java/androidx/camera/view/CameraControllerTest.kt b/camera/camera-view/src/test/java/androidx/camera/view/CameraControllerTest.kt
index a283985..845d9c9 100644
--- a/camera/camera-view/src/test/java/androidx/camera/view/CameraControllerTest.kt
+++ b/camera/camera-view/src/test/java/androidx/camera/view/CameraControllerTest.kt
@@ -30,6 +30,7 @@
import androidx.camera.core.ImageAnalysis
import androidx.camera.core.ImageAnalysis.COORDINATE_SYSTEM_ORIGINAL
import androidx.camera.core.ImageCapture
+import androidx.camera.core.ImageCapture.ScreenFlashUiControl
import androidx.camera.core.ImageProxy
import androidx.camera.core.MirrorMode
import androidx.camera.core.TorchState
@@ -49,11 +50,14 @@
import androidx.camera.video.Quality
import androidx.camera.video.QualitySelector
import androidx.camera.view.CameraController.COORDINATE_SYSTEM_VIEW_REFERENCED
+import androidx.camera.view.internal.ScreenFlashUiInfo
import androidx.concurrent.futures.CallbackToFutureAdapter
import androidx.test.annotation.UiThreadTest
import androidx.test.core.app.ApplicationProvider
import com.google.common.truth.Truth.assertThat
+import com.google.common.util.concurrent.MoreExecutors
import java.util.concurrent.Executors
+import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
@@ -505,4 +509,76 @@
// Assert.
assertThat(controller.cameraSelector.lensFacing).isEqualTo(CameraSelector.LENS_FACING_FRONT)
}
+
+ @Test
+ fun throwsException_whenScreenFlashModeSetWithBackCamera() {
+ controller.cameraSelector = CameraSelector.DEFAULT_BACK_CAMERA
+
+ Assert.assertThrows(IllegalArgumentException::class.java) {
+ controller.imageCaptureFlashMode = ImageCapture.FLASH_MODE_SCREEN
+ }
+ }
+
+ @Test
+ fun canSetScreenFlashMode_whenScreenFlashUiInfoNotSetYet() {
+ controller.cameraSelector = CameraSelector.DEFAULT_FRONT_CAMERA
+ controller.imageCaptureFlashMode = ImageCapture.FLASH_MODE_SCREEN
+
+ assertThat(controller.imageCaptureFlashMode).isEqualTo(ImageCapture.FLASH_MODE_SCREEN)
+ }
+
+ @Test
+ fun canTakePictureWithScreenFlashMode_whenFrontCameraAndScreenFlashUiInfoSet() {
+ controller.cameraSelector = CameraSelector.DEFAULT_FRONT_CAMERA
+ controller.setScreenFlashUiInfo(
+ ScreenFlashUiInfo(
+ ScreenFlashUiInfo.ProviderType.SCREEN_FLASH_VIEW,
+ object : ScreenFlashUiControl {
+ override fun applyScreenFlashUi(
+ screenFlashUiCompleter: ImageCapture.ScreenFlashUiCompleter
+ ) {
+ screenFlashUiCompleter.complete()
+ }
+
+ override fun clearScreenFlashUi() {
+ }
+ }
+ )
+ )
+
+ controller.imageCaptureFlashMode = ImageCapture.FLASH_MODE_SCREEN
+ completeCameraInitialization()
+
+ controller.takePicture(
+ MoreExecutors.directExecutor(),
+ object : ImageCapture.OnImageCapturedCallback() {}
+ )
+
+ // ensure FLASH_MODE_SCREEN was retained
+ assertThat(controller.imageCaptureFlashMode).isEqualTo(ImageCapture.FLASH_MODE_SCREEN)
+ }
+
+ @Test
+ fun throwException_whenTakePictureWithScreenFlashModeButWithoutScreenFlashUiInfo() {
+ controller.cameraSelector = CameraSelector.DEFAULT_FRONT_CAMERA
+ controller.imageCaptureFlashMode = ImageCapture.FLASH_MODE_SCREEN
+ completeCameraInitialization()
+
+ Assert.assertThrows(IllegalStateException::class.java) {
+ controller.takePicture(
+ MoreExecutors.directExecutor(),
+ object : ImageCapture.OnImageCapturedCallback() {}
+ )
+ }
+ }
+
+ @Test
+ fun throwsException_whenSwitchToBackCameraAfterScreenFlashSetToFrontCamera() {
+ controller.cameraSelector = CameraSelector.DEFAULT_FRONT_CAMERA
+ controller.imageCaptureFlashMode = ImageCapture.FLASH_MODE_SCREEN
+
+ Assert.assertThrows(IllegalStateException::class.java) {
+ controller.cameraSelector = CameraSelector.DEFAULT_BACK_CAMERA
+ }
+ }
}
diff --git a/camera/camera-view/src/test/java/androidx/camera/view/PreviewViewTest.java b/camera/camera-view/src/test/java/androidx/camera/view/PreviewViewTest.java
index fb1c45d..34d0b41 100644
--- a/camera/camera-view/src/test/java/androidx/camera/view/PreviewViewTest.java
+++ b/camera/camera-view/src/test/java/androidx/camera/view/PreviewViewTest.java
@@ -18,11 +18,14 @@
import static com.google.common.truth.Truth.assertThat;
+import android.content.Context;
import android.os.Build;
import android.util.Size;
+import android.view.Window;
import android.widget.FrameLayout;
import androidx.camera.core.CameraInfo;
+import androidx.camera.core.ImageCapture.ScreenFlashUiControl;
import androidx.camera.core.SurfaceRequest;
import androidx.camera.core.impl.utils.executor.CameraXExecutors;
import androidx.camera.testing.fakes.FakeCamera;
@@ -33,16 +36,32 @@
import androidx.test.core.app.ApplicationProvider;
import org.junit.After;
+import org.junit.Assume;
+import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;
import org.robolectric.annotation.internal.DoNotInstrument;
+import org.robolectric.shadows.ShadowWindow;
@RunWith(RobolectricTestRunner.class)
@DoNotInstrument
@Config(minSdk = Build.VERSION_CODES.LOLLIPOP)
public class PreviewViewTest {
+ private final Context mAppContext = ApplicationProvider.getApplicationContext();
+ private PreviewView mPreviewView;
+ private Window mWindow;
+
+ @Before
+ public void setUp() {
+ mPreviewView = new PreviewView(mAppContext);
+ try {
+ mWindow = ShadowWindow.create(mAppContext);
+ } catch (ClassNotFoundException e) {
+ Assume.assumeTrue("Failed to create shadow window", false);
+ }
+ }
@After
public void tearDown() {
@@ -135,10 +154,64 @@
previewView.setImplementationMode(PreviewView.ImplementationMode.PERFORMANCE);
}
+ @Test
+ public void canCreateValidScreenFlashUiControlImpl() {
+ ScreenFlashUiControl uiControl = createScreenFlashUiControl(false);
+ assertThat(uiControl).isNotNull();
+ }
+
+ @Test
+ public void validScreenFlashUiControlSetToCameraController_whenWindowSetAndThenControllerSet() {
+ CameraController cameraController = new LifecycleCameraController(mAppContext);
+
+ mPreviewView.setScreenFlashWindow(mWindow);
+ mPreviewView.setController(cameraController);
+
+ assertThat(cameraController.getScreenFlashUiInfoByPriority()).isNotNull();
+ assertThat(
+ cameraController.getScreenFlashUiInfoByPriority().getScreenFlashUiControl()
+ ).isNotNull();
+ }
+
+ @Test
+ public void validScreenFlashUiControlSetToCameraController_whenControllerSetAndThenWindowSet() {
+ CameraController cameraController = new LifecycleCameraController(mAppContext);
+
+ mPreviewView.setController(cameraController);
+ mPreviewView.setScreenFlashWindow(mWindow);
+
+ assertThat(cameraController.getScreenFlashUiInfoByPriority()).isNotNull();
+ assertThat(
+ cameraController.getScreenFlashUiInfoByPriority().getScreenFlashUiControl()
+ ).isNotNull();
+ }
+
+ @Test
+ public void nullScreenFlashUiControlSetToCameraController_whenControllerSetButNoWindowSet() {
+ CameraController cameraController = new LifecycleCameraController(mAppContext);
+
+ mPreviewView.setController(cameraController);
+
+ if (cameraController.getScreenFlashUiInfoByPriority() != null) {
+ assertThat(
+ cameraController.getScreenFlashUiInfoByPriority().getScreenFlashUiControl()
+ ).isNull();
+ }
+ }
+
private SurfaceRequest createSurfaceRequestCompatibleWithSurfaceView() {
FakeCameraInfoInternal cameraInfoInternal = new FakeCameraInfoInternal();
cameraInfoInternal.setImplementationType(CameraInfo.IMPLEMENTATION_TYPE_CAMERA2);
return new SurfaceRequest(new Size(800, 600),
new FakeCamera(null, cameraInfoInternal), () -> {});
}
+
+ private ScreenFlashUiControl createScreenFlashUiControl(boolean assumeNoFailure) {
+ mPreviewView.setScreenFlashWindow(mWindow);
+ ScreenFlashUiControl uiControl = mPreviewView.getScreenFlashUiControl();
+ if (assumeNoFailure) {
+ Assume.assumeTrue("Failed to create ScreenFlashUiControl", uiControl != null);
+ }
+ return uiControl;
+ }
}
diff --git a/camera/camera-view/src/test/java/androidx/camera/view/ScreenFlashViewTest.kt b/camera/camera-view/src/test/java/androidx/camera/view/ScreenFlashViewTest.kt
new file mode 100644
index 0000000..8cdf155
--- /dev/null
+++ b/camera/camera-view/src/test/java/androidx/camera/view/ScreenFlashViewTest.kt
@@ -0,0 +1,172 @@
+/*
+ * 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.view
+
+import android.content.Context
+import android.os.Build
+import android.view.Window
+import androidx.camera.core.CameraSelector
+import androidx.camera.core.ImageCapture
+import androidx.camera.core.ImageCapture.ScreenFlashUiCompleter
+import androidx.camera.core.ImageCapture.ScreenFlashUiControl
+import androidx.test.core.app.ApplicationProvider
+import com.google.common.truth.Truth.assertThat
+import org.junit.Assert
+import org.junit.Assume
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.robolectric.RobolectricTestRunner
+import org.robolectric.annotation.Config
+import org.robolectric.annotation.internal.DoNotInstrument
+import org.robolectric.shadows.ShadowWindow
+
+@RunWith(RobolectricTestRunner::class)
+@DoNotInstrument
+@Config(minSdk = Build.VERSION_CODES.LOLLIPOP)
+class ScreenFlashViewTest {
+ private val noOpUiCompleter = ScreenFlashUiCompleter {}
+
+ private val appContext = ApplicationProvider.getApplicationContext<Context>()
+ private lateinit var screenFlashView: ScreenFlashView
+ private lateinit var window: Window
+
+ @Before
+ fun setUp() {
+ screenFlashView = ScreenFlashView(appContext)
+ createWindow()
+ }
+
+ private fun createWindow() {
+ try {
+ window = ShadowWindow.create(appContext)
+ } catch (e: ClassNotFoundException) {
+ Assume.assumeTrue("Failed to create shadow window", false)
+ }
+ }
+
+ private fun getScreenFlashUiControlAfterSettingWindow(
+ assumeNoFailure: Boolean
+ ): ScreenFlashUiControl? {
+ screenFlashView.setScreenFlashWindow(window)
+ val uiControl = screenFlashView.screenFlashUiControl
+ if (assumeNoFailure) {
+ Assume.assumeTrue("Failed to create ScreenFlashUiControl", uiControl != null)
+ }
+ return uiControl
+ }
+
+ @Test
+ fun isTransparentByDefault() {
+ assertThat(screenFlashView.alpha).isEqualTo(0f)
+ }
+
+ @Test
+ fun canProvideValidScreenFlashUiControl() {
+ val uiControl = getScreenFlashUiControlAfterSettingWindow(false)
+ assertThat(uiControl).isNotNull()
+ }
+
+ @Test
+ fun providesSameScreenFlashUiControlIfSameWindowSetAgain() {
+ val prevUiControl = getScreenFlashUiControlAfterSettingWindow(false)
+ val newUiControl = getScreenFlashUiControlAfterSettingWindow(false)
+ assertThat(newUiControl).isEqualTo(prevUiControl)
+ }
+
+ @Test
+ fun providesNewScreenFlashUiControlIfNewWindowSet() {
+ val prevUiControl = getScreenFlashUiControlAfterSettingWindow(false)
+ createWindow()
+ val newUiControl = getScreenFlashUiControlAfterSettingWindow(false)
+ assertThat(newUiControl).isNotEqualTo(prevUiControl)
+ }
+
+ @Test
+ fun isFullyVisible_whenApplyScreenFlashUiInvoked() {
+ val uiControl = getScreenFlashUiControlAfterSettingWindow(true)
+ uiControl!!.applyScreenFlashUi(noOpUiCompleter)
+ assertThat(screenFlashView.alpha).isEqualTo(1f)
+ }
+
+ @Test
+ fun windowBrightnessMaximized_whenApplyScreenFlashUiInvoked() {
+ val uiControl = getScreenFlashUiControlAfterSettingWindow(true)
+ uiControl!!.applyScreenFlashUi(noOpUiCompleter)
+ assertThat(window.attributes.screenBrightness).isEqualTo(1f)
+ }
+
+ @Test
+ fun isTransparent_whenScreenFlashUiClearedAfterApply() {
+ val uiControl = getScreenFlashUiControlAfterSettingWindow(true)
+ uiControl!!.applyScreenFlashUi(noOpUiCompleter)
+ uiControl.clearScreenFlashUi()
+ assertThat(screenFlashView.alpha).isEqualTo(0f)
+ }
+
+ @Test
+ fun windowBrightnessRestored_whenScreenFlashUiClearedAfterApply() {
+ val initialBrightness = 0.5f
+ val layoutParam = window.attributes
+ layoutParam.screenBrightness = initialBrightness
+ window.setAttributes(layoutParam)
+ val uiControl = getScreenFlashUiControlAfterSettingWindow(true)
+ uiControl!!.applyScreenFlashUi(noOpUiCompleter)
+ uiControl.clearScreenFlashUi()
+ assertThat(window.attributes.screenBrightness).isEqualTo(initialBrightness)
+ }
+
+ @Test
+ fun validScreenFlashUiControlSetToCameraController_whenWindowSetAndThenControllerSet() {
+ val cameraController = LifecycleCameraController(appContext)
+
+ screenFlashView.setScreenFlashWindow(window)
+ screenFlashView.setController(cameraController)
+
+ assertThat(cameraController.screenFlashUiInfoByPriority?.screenFlashUiControl).isNotNull()
+ }
+
+ @Test
+ fun validScreenFlashUiControlSetToCameraController_whenControllerSetAndThenWindowSet() {
+ val cameraController = LifecycleCameraController(appContext)
+
+ screenFlashView.setController(cameraController)
+ screenFlashView.setScreenFlashWindow(window)
+
+ assertThat(cameraController.screenFlashUiInfoByPriority?.screenFlashUiControl).isNotNull()
+ }
+
+ @Test
+ fun nullScreenFlashUiControlSetToCameraController_whenControllerSetButNoWindowSet() {
+ val cameraController = LifecycleCameraController(appContext)
+
+ screenFlashView.setController(cameraController)
+
+ assertThat(cameraController.screenFlashUiInfoByPriority?.screenFlashUiControl).isNull()
+ }
+
+ @Test
+ fun throwException_whenControllerSetWithScreenFlashModeButNoWindowSet() {
+ val cameraController = LifecycleCameraController(appContext)
+ cameraController.cameraSelector = CameraSelector.DEFAULT_FRONT_CAMERA
+ cameraController.imageCaptureFlashMode = ImageCapture.FLASH_MODE_SCREEN
+
+ Assert.assertThrows(IllegalStateException::class.java) {
+ screenFlashView.setController(cameraController)
+ }
+ }
+}
diff --git a/camera/camera-viewfinder/api/api_lint.ignore b/camera/camera-viewfinder/api/api_lint.ignore
new file mode 100644
index 0000000..9f469e4
--- /dev/null
+++ b/camera/camera-viewfinder/api/api_lint.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+NotCloseable: androidx.camera.viewfinder.ViewfinderSurfaceRequest:
+ Classes that release resources (finalize()) should implement AutoCloseable and CloseGuard: class androidx.camera.viewfinder.ViewfinderSurfaceRequest
diff --git a/camera/integration-tests/coretestapp/build.gradle b/camera/integration-tests/coretestapp/build.gradle
index 410eb09..fef8eda 100644
--- a/camera/integration-tests/coretestapp/build.gradle
+++ b/camera/integration-tests/coretestapp/build.gradle
@@ -63,6 +63,7 @@
implementation(project(":camera:camera-core"))
implementation(project(":camera:camera-lifecycle"))
implementation(project(":camera:camera-mlkit-vision"))
+ implementation(project(":camera:camera-view"))
implementation(project(":camera:camera-video"))
// Needed because AGP enforces same version between main and androidTest classpaths
implementation(project(":concurrent:concurrent-futures"))
diff --git a/camera/integration-tests/coretestapp/src/androidTest/java/androidx/camera/integration/core/ImageCaptureTest.kt b/camera/integration-tests/coretestapp/src/androidTest/java/androidx/camera/integration/core/ImageCaptureTest.kt
index 35c5bca..ef15d27 100644
--- a/camera/integration-tests/coretestapp/src/androidTest/java/androidx/camera/integration/core/ImageCaptureTest.kt
+++ b/camera/integration-tests/coretestapp/src/androidTest/java/androidx/camera/integration/core/ImageCaptureTest.kt
@@ -79,6 +79,7 @@
import androidx.camera.testing.impl.WakelockEmptyActivityRule
import androidx.camera.testing.impl.fakes.FakeLifecycleOwner
import androidx.camera.testing.impl.fakes.FakeSessionProcessor
+import androidx.camera.testing.impl.mocks.MockScreenFlashUiControl
import androidx.camera.video.Recorder
import androidx.camera.video.VideoCapture
import androidx.core.content.ContextCompat
@@ -290,6 +291,33 @@
)
}
+ @Test
+ fun canCaptureImageWithFlashModeScreen_frontCamera() {
+ // Front camera usually doesn't have a flash unit. Screen flash will be used in such case.
+ // Otherwise, physical flash will be used. But capture should be successful either way.
+ canTakeImages(
+ defaultBuilder.apply {
+ setScreenFlashUiControl(MockScreenFlashUiControl())
+ setFlashMode(ImageCapture.FLASH_MODE_SCREEN)
+ },
+ cameraSelector = FRONT_SELECTOR
+ )
+ }
+
+ @Test
+ fun canCaptureImageWithFlashModeScreenAndUseTorch_frontCamera() {
+ // Front camera usually doesn't have a flash unit. Screen flash will be used in such case.
+ // Otherwise, physical flash will be used as torch. Either way, capture should be successful
+ canTakeImages(
+ defaultBuilder.apply {
+ setFlashType(ImageCapture.FLASH_TYPE_USE_TORCH_AS_FLASH)
+ setScreenFlashUiControl(MockScreenFlashUiControl())
+ setFlashMode(ImageCapture.FLASH_MODE_SCREEN)
+ },
+ cameraSelector = FRONT_SELECTOR
+ )
+ }
+
private fun canTakeImages(
builder: ImageCapture.Builder,
cameraSelector: CameraSelector = BACK_SELECTOR,
diff --git a/camera/integration-tests/coretestapp/src/main/java/androidx/camera/integration/core/CameraXActivity.java b/camera/integration-tests/coretestapp/src/main/java/androidx/camera/integration/core/CameraXActivity.java
index 70c637a..ea2ce51 100644
--- a/camera/integration-tests/coretestapp/src/main/java/androidx/camera/integration/core/CameraXActivity.java
+++ b/camera/integration-tests/coretestapp/src/main/java/androidx/camera/integration/core/CameraXActivity.java
@@ -24,6 +24,7 @@
import static androidx.camera.core.ImageCapture.FLASH_MODE_AUTO;
import static androidx.camera.core.ImageCapture.FLASH_MODE_OFF;
import static androidx.camera.core.ImageCapture.FLASH_MODE_ON;
+import static androidx.camera.core.ImageCapture.FLASH_MODE_SCREEN;
import static androidx.camera.core.MirrorMode.MIRROR_MODE_ON_FRONT_ONLY;
import static androidx.camera.testing.impl.FileUtil.canDeviceWriteToMediaStore;
import static androidx.camera.testing.impl.FileUtil.createFolder;
@@ -135,6 +136,7 @@
import androidx.camera.video.VideoCapabilities;
import androidx.camera.video.VideoCapture;
import androidx.camera.video.VideoRecordEvent;
+import androidx.camera.view.ScreenFlashView;
import androidx.core.content.ContextCompat;
import androidx.core.math.MathUtils;
import androidx.core.util.Consumer;
@@ -316,6 +318,7 @@
private Button mTakePicture;
private ImageButton mCameraDirectionButton;
private ImageButton mFlashButton;
+ private ScreenFlashView mScreenFlashView;
private TextView mTextView;
private ImageButton mTorchButton;
private ToggleButton mCaptureQualityToggle;
@@ -589,17 +592,36 @@
private void setUpFlashButton() {
mFlashButton.setOnClickListener(v -> {
@ImageCapture.FlashMode int flashMode = getImageCapture().getFlashMode();
- if (flashMode == FLASH_MODE_ON) {
- getImageCapture().setFlashMode(FLASH_MODE_OFF);
- } else if (flashMode == FLASH_MODE_OFF) {
- getImageCapture().setFlashMode(FLASH_MODE_AUTO);
+
+ if (flashMode == FLASH_MODE_OFF) {
+ if (isFlashAvailable()) {
+ getImageCapture().setFlashMode(FLASH_MODE_AUTO);
+ } else {
+ setUpScreenFlash();
+ }
} else if (flashMode == FLASH_MODE_AUTO) {
getImageCapture().setFlashMode(FLASH_MODE_ON);
+ } else if (flashMode == FLASH_MODE_ON) {
+ if (getLensFacing(Objects.requireNonNull(getCameraInfo()))
+ != CameraSelector.LENS_FACING_FRONT) {
+ getImageCapture().setFlashMode(FLASH_MODE_OFF);
+ } else {
+ setUpScreenFlash();
+ }
+ } else if (flashMode == FLASH_MODE_SCREEN) {
+ getImageCapture().setFlashMode(FLASH_MODE_OFF);
}
updateButtonsUi();
});
}
+ private void setUpScreenFlash() {
+ mScreenFlashView.setScreenFlashWindow(getWindow());
+ getImageCapture().setScreenFlashUiControl(
+ mScreenFlashView.getScreenFlashUiControl());
+ getImageCapture().setFlashMode(FLASH_MODE_SCREEN);
+ }
+
@SuppressLint({"MissingPermission", "NullAnnotationGroup"})
@OptIn(markerClass = ExperimentalPersistentRecording.class)
private void setUpRecordButton() {
@@ -1156,7 +1178,7 @@
&& Preview.getPreviewCapabilities(getCameraInfo()).isStabilizationSupported());
mTorchButton.setEnabled(isFlashAvailable());
// Flash button
- mFlashButton.setEnabled(mPhotoToggle.isChecked() && isFlashAvailable());
+ mFlashButton.setEnabled(mPhotoToggle.isChecked());
if (mPhotoToggle.isChecked()) {
int flashMode = getImageCapture().getFlashMode();
if (isFlashTestSupported(flashMode)) {
@@ -1176,6 +1198,9 @@
case FLASH_MODE_AUTO:
mFlashButton.setImageResource(R.drawable.ic_flash_auto);
break;
+ case FLASH_MODE_SCREEN:
+ mFlashButton.setImageResource(R.drawable.ic_flash_screen);
+ break;
}
}
mPlusEV.setEnabled(isExposureCompensationSupported());
@@ -1291,6 +1316,7 @@
mTakePicture = findViewById(R.id.Picture);
mFlashButton = findViewById(R.id.flash_toggle);
+ mScreenFlashView = findViewById(R.id.screen_flash_view);
mCameraDirectionButton = findViewById(R.id.direction_toggle);
mTorchButton = findViewById(R.id.torch_toggle);
mCaptureQualityToggle = findViewById(R.id.capture_quality);
diff --git a/camera/integration-tests/coretestapp/src/main/res/drawable/ic_flash_screen.xml b/camera/integration-tests/coretestapp/src/main/res/drawable/ic_flash_screen.xml
new file mode 100644
index 0000000..6a101bd
--- /dev/null
+++ b/camera/integration-tests/coretestapp/src/main/res/drawable/ic_flash_screen.xml
@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:tint="#000000"
+ android:viewportHeight="24" android:viewportWidth="24"
+ android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M17,1.01L7,1C5.9,1 5,1.9 5,3v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3C19,1.9 18.1,1.01 17,1.01zM17,18H7V6h10V18zM9.5,8.5H12V7H8v4h1.5V8.5zM12,17h4v-4h-1.5v2.5H12V17z"/>
+</vector>
diff --git a/camera/integration-tests/coretestapp/src/main/res/layout/activity_camera_xmain.xml b/camera/integration-tests/coretestapp/src/main/res/layout/activity_camera_xmain.xml
index 53613a2..81eb97a 100644
--- a/camera/integration-tests/coretestapp/src/main/res/layout/activity_camera_xmain.xml
+++ b/camera/integration-tests/coretestapp/src/main/res/layout/activity_camera_xmain.xml
@@ -405,4 +405,8 @@
app:layout_constraintStart_toEndOf="@+id/seekBar"
app:layout_constraintTop_toTopOf="@+id/seekBar" />
+ <androidx.camera.view.ScreenFlashView
+ android:id="@+id/screen_flash_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
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 3176287..a900ea6 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
@@ -52,6 +52,8 @@
import android.widget.Button
import android.widget.FrameLayout
import android.widget.ImageButton
+import android.widget.Switch
+import android.widget.TextView
import android.widget.Toast
import androidx.annotation.RequiresApi
import androidx.annotation.VisibleForTesting
@@ -92,6 +94,7 @@
import java.util.Calendar
import java.util.Locale
import java.util.concurrent.Executors
+import java.util.concurrent.TimeUnit
import java.util.concurrent.atomic.AtomicLong
import kotlin.coroutines.resume
import kotlin.coroutines.resumeWithException
@@ -111,6 +114,7 @@
private const val FRAMES_UNTIL_VIEW_IS_READY = 10
private const val KEY_CAMERA2_LATENCY = "camera2"
private const val KEY_CAMERA_EXTENSION_LATENCY = "camera_extension"
+private const val MAX_EXTENSION_LATENCY_MILLIS = 800
@RequiresApi(31)
class Camera2ExtensionsActivity : AppCompatActivity() {
@@ -176,6 +180,8 @@
private lateinit var containerView: View
private lateinit var textureView: TextureView
+ private lateinit var videoStabilizationToggleView: Switch
+ private lateinit var videoStabilizationModeView: TextView
private var previewSurface: Surface? = null
@@ -208,6 +214,20 @@
) {
previewIdlingResource.decrement()
}
+
+ if (measureStreamConfigurationLatency && lastSurfaceTextureTimestampNanos != 0L) {
+ val duration = TimeUnit.NANOSECONDS.toMillis(
+ surfaceTexture.timestamp - lastSurfaceTextureTimestampNanos)
+ if (duration > 150) {
+ if (cameraCaptureSession is CameraCaptureSession) {
+ streamConfigurationLatency[KEY_CAMERA2_LATENCY]?.add(duration)
+ } else if (cameraCaptureSession is CameraExtensionSession) {
+ streamConfigurationLatency[KEY_CAMERA_EXTENSION_LATENCY]?.add(duration)
+ }
+ measureStreamConfigurationLatency = false
+ }
+ }
+ lastSurfaceTextureTimestampNanos = surfaceTexture.timestamp
}
}
@@ -252,10 +272,17 @@
private var imageSaveTerminationFuture: ListenableFuture<Any?> = Futures.immediateFuture(null)
/**
- * Tracks the starting timestamp of when a stream configuration operation started. This is used
- * to measure the stream configuration latency from openCaptureSession to onConfigured.
+ * Tracks the last timestamp of a surface texture rendered on to the TextureView. This is used
+ * to measure the configuration latency from the last preview frame received from the previous
+ * camera session until the first preview frame received of the new camera session.
*/
- private var streamConfigurationStartMillis: Long = 0
+ private var lastSurfaceTextureTimestampNanos: Long = 0
+
+ /**
+ * A flag which represents when to measure the stream configuration latency. This is triggered
+ * when the user toggles the camera extension mode.
+ */
+ private var measureStreamConfigurationLatency: Boolean = true
/**
* Used to wait for the capture session is configured.
@@ -366,6 +393,7 @@
setupTextureView()
enableUiControl(false)
setupUiControl()
+ setupVideoStabilizationModeView()
}
private fun setupForRequestMode() {
@@ -396,6 +424,7 @@
findViewById<ImageButton>(R.id.ExtensionToggle).apply {
visibility = View.VISIBLE
setOnClickListener {
+ measureStreamConfigurationLatency = true
val cameraId = currentCameraId
val extensionMode = currentExtensionMode
restartPreview = true
@@ -511,6 +540,38 @@
textureView.surfaceTextureListener = surfaceTextureListener
}
+ private fun setupVideoStabilizationModeView() {
+ videoStabilizationToggleView = findViewById(R.id.videoStabilizationToggle)
+ videoStabilizationModeView = findViewById(R.id.videoStabilizationMode)
+
+ val availableModes = cameraManager.getCameraCharacteristics(currentCameraId)
+ .get(CameraCharacteristics.CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES) ?: intArrayOf()
+
+ if (availableModes
+ .contains(CameraMetadata.CONTROL_VIDEO_STABILIZATION_MODE_PREVIEW_STABILIZATION)
+ ) {
+ videoStabilizationToggleView.visibility = View.VISIBLE
+ videoStabilizationModeView.visibility = View.VISIBLE
+
+ videoStabilizationToggleView.setOnCheckedChangeListener { _, isChecked ->
+ val device = cameraDevice ?: return@setOnCheckedChangeListener
+ val session = cameraCaptureSession ?: return@setOnCheckedChangeListener
+
+ val mode = if (isChecked) "Preview" else "Off"
+ videoStabilizationModeView.text = "Video Stabilization Mode: $mode"
+
+ lifecycleScope.launch {
+ suspendCancellableCoroutine<Any> { cont ->
+ setRepeatingRequestWhenCaptureSessionConfigured(cont, device, session)
+ }
+ }
+ }
+ } else {
+ videoStabilizationToggleView.visibility = View.GONE
+ videoStabilizationModeView.visibility = View.GONE
+ }
+ }
+
private fun enableUiControl(enabled: Boolean) {
findViewById<Button>(R.id.PhotoToggle).isEnabled = enabled
findViewById<Button>(R.id.Switch).isEnabled = enabled
@@ -578,6 +639,7 @@
closeCaptureSessionAsync().await()
closeCameraAsync().await()
}
+ lastSurfaceTextureTimestampNanos = 0L
restartOnStart = true
activityStopped = true
Log.d(TAG, "onStop()--")
@@ -613,7 +675,7 @@
val durations = streamConfigurationLatency[KEY_CAMERA_EXTENSION_LATENCY] ?: emptyList()
val testResult = if (durations.isNotEmpty()) {
- if (durations.average() > 300.0) {
+ if (durations.average() > MAX_EXTENSION_LATENCY_MILLIS) {
TEST_RESULT_FAILED
} else {
TEST_RESULT_PASSED
@@ -796,8 +858,6 @@
private suspend fun openCaptureSession(extensionMode: Int): Any =
suspendCancellableCoroutine { cont ->
Log.d(TAG, "openCaptureSession")
- streamConfigurationStartMillis = System.currentTimeMillis()
-
if (stillImageReader != null) {
val imageReaderToClose = stillImageReader!!
imageSaveTerminationFuture.addListener(
@@ -843,9 +903,6 @@
override fun onConfigured(session: CameraCaptureSession) {
Log.d(TAG, "CaptureSession - onConfigured: $session")
- val duration = System.currentTimeMillis() - streamConfigurationStartMillis
- streamConfigurationLatency[KEY_CAMERA2_LATENCY]?.add(duration)
- streamConfigurationStartMillis = 0
setRepeatingRequestWhenCaptureSessionConfigured(cont, session.device, session)
lifecycleScope.launch(Dispatchers.Main) {
enableUiControl(true)
@@ -857,7 +914,6 @@
override fun onConfigureFailed(session: CameraCaptureSession) {
Log.e(TAG, "CaptureSession - onConfigureFailed: $session")
- streamConfigurationStartMillis = 0
cont.resumeWithException(
RuntimeException("Configure failed when creating capture session.")
)
@@ -889,9 +945,6 @@
override fun onConfigured(session: CameraExtensionSession) {
Log.d(TAG, "Extension CaptureSession - onConfigured: $session")
- val duration = System.currentTimeMillis() - streamConfigurationStartMillis
- streamConfigurationLatency[KEY_CAMERA_EXTENSION_LATENCY]?.add(duration)
- streamConfigurationStartMillis = 0
setRepeatingRequestWhenCaptureSessionConfigured(cont, session.device, session)
runOnUiThread {
enableUiControl(true)
@@ -903,7 +956,6 @@
override fun onConfigureFailed(session: CameraExtensionSession) {
Log.e(TAG, "Extension CaptureSession - onConfigureFailed: $session")
- streamConfigurationStartMillis = 0
cont.resumeWithException(
RuntimeException("Configure failed when creating capture session.")
)
@@ -934,11 +986,15 @@
try {
val captureBuilder = device.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW)
captureBuilder.addTarget(previewSurface!!)
- // Some devices enable video stabilization mode by default. For consistent behavior we
- // explicitly disable this.
+ val videoStabilizationMode = if (videoStabilizationToggleView.isChecked) {
+ CameraMetadata.CONTROL_VIDEO_STABILIZATION_MODE_PREVIEW_STABILIZATION
+ } else {
+ CameraMetadata.CONTROL_VIDEO_STABILIZATION_MODE_OFF
+ }
+
captureBuilder.set(
CaptureRequest.CONTROL_VIDEO_STABILIZATION_MODE,
- CameraMetadata.CONTROL_VIDEO_STABILIZATION_MODE_OFF
+ videoStabilizationMode
)
if (captureSession is CameraCaptureSession) {
diff --git a/compose/ui/ui/src/androidInstrumentedTest/res/values/ids.xml b/camera/integration-tests/extensionstestapp/src/main/res/drawable/bg_pill.xml
similarity index 77%
rename from compose/ui/ui/src/androidInstrumentedTest/res/values/ids.xml
rename to camera/integration-tests/extensionstestapp/src/main/res/drawable/bg_pill.xml
index 12d037f..764f728 100644
--- a/compose/ui/ui/src/androidInstrumentedTest/res/values/ids.xml
+++ b/camera/integration-tests/extensionstestapp/src/main/res/drawable/bg_pill.xml
@@ -14,6 +14,8 @@
limitations under the License.
-->
-<resources>
- <item name="testContentViewId" type="id"/>
-</resources>
\ No newline at end of file
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <corners android:radius="8dp" />
+ <solid android:color="#B0FFFFFF" />
+</shape>
\ No newline at end of file
diff --git a/camera/integration-tests/extensionstestapp/src/main/res/layout/activity_camera_extensions.xml b/camera/integration-tests/extensionstestapp/src/main/res/layout/activity_camera_extensions.xml
index 4fd7a30..37ab89e 100644
--- a/camera/integration-tests/extensionstestapp/src/main/res/layout/activity_camera_extensions.xml
+++ b/camera/integration-tests/extensionstestapp/src/main/res/layout/activity_camera_extensions.xml
@@ -97,6 +97,29 @@
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
+ <Switch
+ android:id="@+id/videoStabilizationToggle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="16dp"
+ android:visibility="gone"
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ />
+
+ <TextView
+ android:id="@+id/videoStabilizationMode"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="16dp"
+ android:text="Video Stabilization Mode: Off"
+ android:visibility="gone"
+ android:padding="8dp"
+ android:background="@drawable/bg_pill"
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/videoStabilizationToggle"
+ />
+
<TextView
android:id="@+id/frameInfo"
android:layout_width="wrap_content"
diff --git a/camera/integration-tests/viewtestapp/lint-baseline.xml b/camera/integration-tests/viewtestapp/lint-baseline.xml
index cfacbf5..6168e19 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.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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="RestrictedApiAndroidX"
diff --git a/camera/integration-tests/viewtestapp/src/main/java/androidx/camera/integration/view/CameraControllerFragment.java b/camera/integration-tests/viewtestapp/src/main/java/androidx/camera/integration/view/CameraControllerFragment.java
index 1aabfee8..1f2a77f 100644
--- a/camera/integration-tests/viewtestapp/src/main/java/androidx/camera/integration/view/CameraControllerFragment.java
+++ b/camera/integration-tests/viewtestapp/src/main/java/androidx/camera/integration/view/CameraControllerFragment.java
@@ -75,6 +75,7 @@
import androidx.camera.view.video.AudioConfig;
import androidx.core.util.Consumer;
import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.LiveData;
import com.google.common.util.concurrent.ListenableFuture;
@@ -198,6 +199,7 @@
// Use compatible mode so StreamState is accurate.
mPreviewView.setImplementationMode(PreviewView.ImplementationMode.COMPATIBLE);
mPreviewView.setController(mCameraController);
+ mPreviewView.setScreenFlashWindow(requireActivity().getWindow());
// Set up the button to add and remove the PreviewView
mContainer = view.findViewById(R.id.container);
@@ -220,9 +222,17 @@
mCameraToggle = view.findViewById(R.id.camera_toggle);
mCameraToggle.setOnCheckedChangeListener(
(compoundButton, value) ->
- runSafely(() -> mCameraController.setCameraSelector(value
- ? CameraSelector.DEFAULT_BACK_CAMERA
- : CameraSelector.DEFAULT_FRONT_CAMERA)));
+ runSafely(() -> {
+ if (value) {
+ mCameraController.setImageCaptureFlashMode(
+ ImageCapture.FLASH_MODE_OFF);
+ updateUiText();
+ }
+
+ mCameraController.setCameraSelector(value
+ ? CameraSelector.DEFAULT_BACK_CAMERA
+ : CameraSelector.DEFAULT_FRONT_CAMERA);
+ }));
// Image Capture enable switch.
mCaptureEnabledToggle = view.findViewById(R.id.capture_enabled);
@@ -237,6 +247,13 @@
mCameraController.setImageCaptureFlashMode(ImageCapture.FLASH_MODE_ON);
break;
case ImageCapture.FLASH_MODE_ON:
+ if (!mCameraToggle.isChecked()) {
+ mCameraController.setImageCaptureFlashMode(ImageCapture.FLASH_MODE_SCREEN);
+ } else {
+ mCameraController.setImageCaptureFlashMode(ImageCapture.FLASH_MODE_OFF);
+ }
+ break;
+ case ImageCapture.FLASH_MODE_SCREEN:
mCameraController.setImageCaptureFlashMode(ImageCapture.FLASH_MODE_OFF);
break;
case ImageCapture.FLASH_MODE_OFF:
@@ -371,8 +388,15 @@
// Synthetic access
@SuppressWarnings("WeakerAccess")
void toast(String message) {
- requireActivity().runOnUiThread(
- () -> Toast.makeText(getContext(), message, Toast.LENGTH_SHORT).show());
+ FragmentActivity activity = getActivity();
+ if (activity != null) {
+ activity.runOnUiThread(() -> {
+ if (isAdded()) {
+ Toast.makeText(getContext(), message, Toast.LENGTH_SHORT).show();
+ }
+ });
+ }
+ Log.d(TAG, message);
}
private void updateZoomStateText(@Nullable ZoomState zoomState) {
@@ -444,6 +468,8 @@
return R.string.flash_mode_auto;
case ImageCapture.FLASH_MODE_ON:
return R.string.flash_mode_on;
+ case ImageCapture.FLASH_MODE_SCREEN:
+ return R.string.flash_mode_screen;
case ImageCapture.FLASH_MODE_OFF:
return R.string.flash_mode_off;
default:
diff --git a/camera/integration-tests/viewtestapp/src/main/res/values/donottranslate-strings.xml b/camera/integration-tests/viewtestapp/src/main/res/values/donottranslate-strings.xml
index cae3f3f..e57b93f 100644
--- a/camera/integration-tests/viewtestapp/src/main/res/values/donottranslate-strings.xml
+++ b/camera/integration-tests/viewtestapp/src/main/res/values/donottranslate-strings.xml
@@ -60,6 +60,7 @@
<string name="compose_ui">Compose UI</string>
<string name="flash_mode_auto">flash auto</string>
<string name="flash_mode_on">flash on</string>
+ <string name="flash_mode_screen">screen flash</string>
<string name="flash_mode_off">flash off</string>
<string name="mirror_on">mirror on</string>
<string name="mirror_off">mirror off</string>
diff --git a/cardview/cardview/lint-baseline.xml b/cardview/cardview/lint-baseline.xml
index bc26e05..dbd37d1 100644
--- a/cardview/cardview/lint-baseline.xml
+++ b/cardview/cardview/lint-baseline.xml
@@ -1,13 +1,31 @@
<?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-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 14): `CardViewApi21Impl`"
+ message="Class requires API level 21 (current min is 19): `CardViewApi21Impl`"
errorLine1=" if (!(IMPL instanceof CardViewApi21Impl)) {"
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
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 0d3d191..66c91fb 100644
--- a/collection/collection/api/current.txt
+++ b/collection/collection/api/current.txt
@@ -24,9 +24,9 @@
}
public final class ArraySet<E> implements java.util.Collection<E> kotlin.jvm.internal.markers.KMutableCollection kotlin.jvm.internal.markers.KMutableSet java.util.Set<E> {
- ctor public ArraySet();
ctor public ArraySet(androidx.collection.ArraySet<? extends E>? set);
ctor public ArraySet(E![]? array);
+ ctor public ArraySet();
ctor public ArraySet(optional int capacity);
ctor public ArraySet(java.util.Collection<? extends E>? set);
method public boolean add(E element);
diff --git a/collection/collection/api/restricted_current.txt b/collection/collection/api/restricted_current.txt
index 6595887..2bbe99a 100644
--- a/collection/collection/api/restricted_current.txt
+++ b/collection/collection/api/restricted_current.txt
@@ -24,9 +24,9 @@
}
public final class ArraySet<E> implements java.util.Collection<E> kotlin.jvm.internal.markers.KMutableCollection kotlin.jvm.internal.markers.KMutableSet java.util.Set<E> {
- ctor public ArraySet();
ctor public ArraySet(androidx.collection.ArraySet<? extends E>? set);
ctor public ArraySet(E![]? array);
+ ctor public ArraySet();
ctor public ArraySet(optional int capacity);
ctor public ArraySet(java.util.Collection<? extends E>? set);
method public boolean add(E element);
diff --git a/collection/collection/src/commonMain/kotlin/androidx/collection/LongSparseArray.kt b/collection/collection/src/commonMain/kotlin/androidx/collection/LongSparseArray.kt
index 83ab1d1..e891076 100644
--- a/collection/collection/src/commonMain/kotlin/androidx/collection/LongSparseArray.kt
+++ b/collection/collection/src/commonMain/kotlin/androidx/collection/LongSparseArray.kt
@@ -20,6 +20,7 @@
import androidx.collection.internal.idealLongArraySize
import kotlin.DeprecationLevel.HIDDEN
import kotlin.jvm.JvmField
+import kotlin.jvm.JvmOverloads
import kotlin.jvm.JvmSynthetic
private val DELETED = Any()
@@ -53,7 +54,7 @@
* requiring any additional array allocations.
*/
public expect open class LongSparseArray<E>
-public constructor(initialCapacity: Int = 10) {
+@JvmOverloads public constructor(initialCapacity: Int = 10) {
@JvmSynthetic // Hide from Java callers.
@JvmField
internal var garbage: Boolean
diff --git a/collection/collection/src/commonMain/kotlin/androidx/collection/SparseArrayCompat.kt b/collection/collection/src/commonMain/kotlin/androidx/collection/SparseArrayCompat.kt
index 817f261..118d992 100644
--- a/collection/collection/src/commonMain/kotlin/androidx/collection/SparseArrayCompat.kt
+++ b/collection/collection/src/commonMain/kotlin/androidx/collection/SparseArrayCompat.kt
@@ -19,6 +19,7 @@
import androidx.collection.internal.binarySearch
import androidx.collection.internal.idealIntArraySize
import kotlin.jvm.JvmField
+import kotlin.jvm.JvmOverloads
import kotlin.jvm.JvmSynthetic
import kotlin.math.min
@@ -61,7 +62,8 @@
* 0, the sparse array will be initialized with a light-weight representation not requiring any
* additional array allocations. Default initialCapacity is 10.
*/
-public expect open class SparseArrayCompat<E> public constructor(
+public expect open class SparseArrayCompat<E>
+@JvmOverloads public constructor(
initialCapacity: Int = 10
) {
@JvmSynthetic // Hide from Java callers.
diff --git a/collection/collection/src/jvmMain/kotlin/androidx/collection/ArraySet.jvm.kt b/collection/collection/src/jvmMain/kotlin/androidx/collection/ArraySet.jvm.kt
index e804ff1..207bc5d 100644
--- a/collection/collection/src/jvmMain/kotlin/androidx/collection/ArraySet.jvm.kt
+++ b/collection/collection/src/jvmMain/kotlin/androidx/collection/ArraySet.jvm.kt
@@ -44,12 +44,9 @@
* will grow once items are added to it.
*/
public actual class ArraySet<E>
-// TODO(b/237405792): Default value for optional argument is required here to workaround Metalava's
-// lack of support for expect / actual.
-@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
-// TODO(b/237405286): @JvmOverloads is redundant in this actual, but is necessary here to workaround
-// Metalava's lack of support for expect / actual.
-@JvmOverloads actual constructor(capacity: Int = 0) : MutableCollection<E>, MutableSet<E> {
+@JvmOverloads actual constructor(
+ capacity: Int
+) : MutableCollection<E>, MutableSet<E> {
internal actual var hashes: IntArray = EMPTY_INTS
internal actual var array: Array<Any?> = EMPTY_OBJECTS
diff --git a/collection/collection/src/jvmMain/kotlin/androidx/collection/LongSparseArray.jvm.kt b/collection/collection/src/jvmMain/kotlin/androidx/collection/LongSparseArray.jvm.kt
index 4b8c9d6..7c5d274 100644
--- a/collection/collection/src/jvmMain/kotlin/androidx/collection/LongSparseArray.jvm.kt
+++ b/collection/collection/src/jvmMain/kotlin/androidx/collection/LongSparseArray.jvm.kt
@@ -49,11 +49,9 @@
* requiring any additional array allocations.
*/
public actual open class LongSparseArray<E>
-
-// TODO(b/237405792): Default value for optional argument is required here to workaround Metalava's
-// lack of support for expect / actual.
-@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
-@JvmOverloads public actual constructor(initialCapacity: Int = 10) : Cloneable {
+@JvmOverloads public actual constructor(
+ initialCapacity: Int
+) : Cloneable {
@JvmSynthetic // Hide from Java callers.
@JvmField
internal actual var garbage = false
diff --git a/collection/collection/src/jvmMain/kotlin/androidx/collection/SparseArrayCompat.jvm.kt b/collection/collection/src/jvmMain/kotlin/androidx/collection/SparseArrayCompat.jvm.kt
index 848a851..2bb438c 100644
--- a/collection/collection/src/jvmMain/kotlin/androidx/collection/SparseArrayCompat.jvm.kt
+++ b/collection/collection/src/jvmMain/kotlin/androidx/collection/SparseArrayCompat.jvm.kt
@@ -58,13 +58,8 @@
* additional array allocations. Default initialCapacity is 10.
*/
public actual open class SparseArrayCompat<E>
-// TODO(b/237405792): Default value for optional argument is required here to workaround Metalava's
-// lack of support for expect / actual.
-@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
-// TODO(b/237405286): @JvmOverloads is redundant in this actual, but is necessary here to workaround
-// Metalava's lack of support for expect / actual.
@JvmOverloads public actual constructor(
- initialCapacity: Int = 10
+ initialCapacity: Int
) : Cloneable {
@JvmSynthetic // Hide from Java callers.
@JvmField
diff --git a/compose/animation/animation-core/lint-baseline.xml b/compose/animation/animation-core/lint-baseline.xml
index f02a3f7..66a0edf 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.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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="BanSuppressTag"
@@ -84,24 +84,6 @@
<issue
id="PrimitiveInCollection"
- message="field keyframes with type Map<Integer, KeyframeEntity<T>>: replace with IntObjectMap"
- errorLine1=" internal val keyframes = mutableMapOf<Int, KeyframeEntity<T>>()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/animation/core/AnimationSpec.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type Map<Integer, KeyframeEntity<T>> of getKeyframes$lint_module: replace with IntObjectMap"
- errorLine1=" internal val keyframes = mutableMapOf<Int, KeyframeEntity<T>>()"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/animation/core/AnimationSpec.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
message="constructor VectorizedKeyframesSpec has parameter keyframes with type Map<Integer, ? extends Pair<? extends V, ? extends Easing>>: replace with IntObjectMap"
errorLine1=" private val keyframes: Map<Int, Pair<V, Easing>>,"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/AbstractIrTransformTest.kt b/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/AbstractIrTransformTest.kt
index 26bcf53..fd5eb21 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/AbstractIrTransformTest.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/AbstractIrTransformTest.kt
@@ -248,7 +248,12 @@
) {
val actualTransformed =
transform(source, extra, validator, dumpTree, truncateTracingInfoMode, additionalPaths)
- goldenTransformRule.verifyGolden(GoldenTransformTestInfo(source, actualTransformed))
+ goldenTransformRule.verifyGolden(
+ GoldenTransformTestInfo(
+ source.trimIndent().trim(),
+ actualTransformed.trimIndent().trim()
+ )
+ )
}
private fun MatchResult.isNumber() = groupValues[1].isNotEmpty()
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/GoldenTransformRule.kt b/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/GoldenTransformRule.kt
index 84563e9..8ef8565 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/GoldenTransformRule.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/GoldenTransformRule.kt
@@ -114,20 +114,40 @@
val source: String,
val transformed: String
) {
- fun encodeToString(): String {
- return "$source$DELIMITER$transformed"
- }
+ fun encodeToString(): String =
+ buildString {
+ append(SOURCE_HEADER)
+ appendLine()
+ appendLine()
+ append(source)
+ appendLine()
+ appendLine()
+ append(TRANSFORM_HEADER)
+ appendLine()
+ appendLine()
+ append(transformed)
+ appendLine()
+ }
companion object {
- const val DELIMITER = "\n/********\n * TRANSFORMED\n ********/\n\n"
+ val SOURCE_HEADER = """
+ //
+ // Source
+ // ------------------------------------------
+ """.trimIndent()
+ val TRANSFORM_HEADER = """
+ //
+ // Transformed IR
+ // ------------------------------------------
+ """.trimIndent()
fun fromEncodedString(encoded: String): GoldenTransformTestInfo {
- val split = encoded.split(DELIMITER)
+ val split = encoded.removePrefix(SOURCE_HEADER).split(TRANSFORM_HEADER)
if (split.size != 2) {
error("Could not parse encoded golden string. " +
"Expected 2 sections but was ${split.size}.")
}
- return GoldenTransformTestInfo(split[0], split[1])
+ return GoldenTransformTestInfo(split[0].trim(), split[1].trim())
}
}
}
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testComposableCallWithUnstableFinalClassInSameModule\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testComposableCallWithUnstableFinalClassInSameModule\133useFir = false\135.txt"
index 8b69f4ab..83c98ae 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testComposableCallWithUnstableFinalClassInSameModule\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testComposableCallWithUnstableFinalClassInSameModule\133useFir = false\135.txt"
@@ -1,18 +1,21 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- class Foo(var bar: Int = 0)
- @Composable fun A(y: Int, x: Foo) {
- used(y)
- B(x)
- }
- @Composable fun B(x: Any) {
- used(x)
- }
-
-/********
- * TRANSFORMED
- ********/
+class Foo(var bar: Int = 0)
+@Composable fun A(y: Int, x: Foo) {
+ used(y)
+ B(x)
+}
+@Composable fun B(x: Any) {
+ used(x)
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Foo(var bar: Int = 0) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testComposableCallWithUnstableFinalClassInSameModule\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testComposableCallWithUnstableFinalClassInSameModule\133useFir = true\135.txt"
index 8b69f4ab..83c98ae 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testComposableCallWithUnstableFinalClassInSameModule\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testComposableCallWithUnstableFinalClassInSameModule\133useFir = true\135.txt"
@@ -1,18 +1,21 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- class Foo(var bar: Int = 0)
- @Composable fun A(y: Int, x: Foo) {
- used(y)
- B(x)
- }
- @Composable fun B(x: Any) {
- used(x)
- }
-
-/********
- * TRANSFORMED
- ********/
+class Foo(var bar: Int = 0)
+@Composable fun A(y: Int, x: Foo) {
+ used(y)
+ B(x)
+}
+@Composable fun B(x: Any) {
+ used(x)
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Foo(var bar: Int = 0) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testComposableCall\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testComposableCall\133useFir = false\135.txt"
index 4e1139a..5f19ab4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testComposableCall\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testComposableCall\133useFir = false\135.txt"
@@ -1,18 +1,21 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- class Foo
- @Composable fun A(y: Int, x: Any) {
- used(y)
- B(x)
- }
- @Composable fun B(x: Any) {
- used(x)
- }
-
-/********
- * TRANSFORMED
- ********/
+class Foo
+@Composable fun A(y: Int, x: Any) {
+ used(y)
+ B(x)
+}
+@Composable fun B(x: Any) {
+ used(x)
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testComposableCall\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testComposableCall\133useFir = true\135.txt"
index 4e1139a..5f19ab4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testComposableCall\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testComposableCall\133useFir = true\135.txt"
@@ -1,18 +1,21 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- class Foo
- @Composable fun A(y: Int, x: Any) {
- used(y)
- B(x)
- }
- @Composable fun B(x: Any) {
- used(x)
- }
-
-/********
- * TRANSFORMED
- ********/
+class Foo
+@Composable fun A(y: Int, x: Any) {
+ used(y)
+ B(x)
+}
+@Composable fun B(x: Any) {
+ used(x)
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testEmptyClassAcrossModules\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testEmptyClassAcrossModules\133useFir = false\135.txt"
index c676c8a..1fab519 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testEmptyClassAcrossModules\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testEmptyClassAcrossModules\133useFir = false\135.txt"
@@ -1,15 +1,18 @@
+//
+// Source
+// ------------------------------------------
- import a.*
- import androidx.compose.runtime.Composable
+import a.*
+import androidx.compose.runtime.Composable
- @Composable fun A(y: Any) {
- used(y)
- A(Wrapper(Foo()))
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable fun A(y: Any) {
+ used(y)
+ A(Wrapper(Foo()))
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(y: Any, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testEmptyClassAcrossModules\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testEmptyClassAcrossModules\133useFir = true\135.txt"
index c676c8a..1fab519 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testEmptyClassAcrossModules\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testEmptyClassAcrossModules\133useFir = true\135.txt"
@@ -1,15 +1,18 @@
+//
+// Source
+// ------------------------------------------
- import a.*
- import androidx.compose.runtime.Composable
+import a.*
+import androidx.compose.runtime.Composable
- @Composable fun A(y: Any) {
- used(y)
- A(Wrapper(Foo()))
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable fun A(y: Any) {
+ used(y)
+ A(Wrapper(Foo()))
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(y: Any, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testEmptyClass\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testEmptyClass\133useFir = false\135.txt"
index 873bbc6..9ccd959 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testEmptyClass\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testEmptyClass\133useFir = false\135.txt"
@@ -1,9 +1,12 @@
+//
+// Source
+// ------------------------------------------
- class Foo
-
-/********
- * TRANSFORMED
- ********/
+class Foo
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testEmptyClass\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testEmptyClass\133useFir = true\135.txt"
index 873bbc6..9ccd959 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testEmptyClass\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testEmptyClass\133useFir = true\135.txt"
@@ -1,9 +1,12 @@
+//
+// Source
+// ------------------------------------------
- class Foo
-
-/********
- * TRANSFORMED
- ********/
+class Foo
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testLocalParameterBasedTypeParameterSubstitution\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testLocalParameterBasedTypeParameterSubstitution\133useFir = false\135.txt"
index a950cfc..5ee1039 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testLocalParameterBasedTypeParameterSubstitution\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testLocalParameterBasedTypeParameterSubstitution\133useFir = false\135.txt"
@@ -1,23 +1,26 @@
+//
+// Source
+// ------------------------------------------
- import a.*
- import androidx.compose.runtime.Composable
+import a.*
+import androidx.compose.runtime.Composable
- @Composable fun <V> B(value: V) {
- A(Wrapper(value))
- }
- @Composable fun <T> X(items: List<T>, itemContent: @Composable (T) -> Unit) {
- for (item in items) itemContent(item)
- }
- @Composable fun C(items: List<String>) {
- X(items) { item ->
- A(item)
- A(Wrapper(item))
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable fun <V> B(value: V) {
+ A(Wrapper(value))
+}
+@Composable fun <T> X(items: List<T>, itemContent: @Composable (T) -> Unit) {
+ for (item in items) itemContent(item)
+}
+@Composable fun C(items: List<String>) {
+ X(items) { item ->
+ A(item)
+ A(Wrapper(item))
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun <V> B(value: V, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testLocalParameterBasedTypeParameterSubstitution\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testLocalParameterBasedTypeParameterSubstitution\133useFir = true\135.txt"
index a950cfc..5ee1039 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testLocalParameterBasedTypeParameterSubstitution\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testLocalParameterBasedTypeParameterSubstitution\133useFir = true\135.txt"
@@ -1,23 +1,26 @@
+//
+// Source
+// ------------------------------------------
- import a.*
- import androidx.compose.runtime.Composable
+import a.*
+import androidx.compose.runtime.Composable
- @Composable fun <V> B(value: V) {
- A(Wrapper(value))
- }
- @Composable fun <T> X(items: List<T>, itemContent: @Composable (T) -> Unit) {
- for (item in items) itemContent(item)
- }
- @Composable fun C(items: List<String>) {
- X(items) { item ->
- A(item)
- A(Wrapper(item))
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable fun <V> B(value: V) {
+ A(Wrapper(value))
+}
+@Composable fun <T> X(items: List<T>, itemContent: @Composable (T) -> Unit) {
+ for (item in items) itemContent(item)
+}
+@Composable fun C(items: List<String>) {
+ X(items) { item ->
+ A(item)
+ A(Wrapper(item))
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun <V> B(value: V, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testSingleVarVersusValProperty\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testSingleVarVersusValProperty\133useFir = false\135.txt"
index db3785f..a47c6f8 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testSingleVarVersusValProperty\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testSingleVarVersusValProperty\133useFir = false\135.txt"
@@ -1,10 +1,13 @@
+//
+// Source
+// ------------------------------------------
- class Stable(val bar: Int)
- class Unstable(var bar: Int)
-
-/********
- * TRANSFORMED
- ********/
+class Stable(val bar: Int)
+class Unstable(var bar: Int)
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Stable(val bar: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testSingleVarVersusValProperty\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testSingleVarVersusValProperty\133useFir = true\135.txt"
index db3785f..a47c6f8 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testSingleVarVersusValProperty\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testSingleVarVersusValProperty\133useFir = true\135.txt"
@@ -1,10 +1,13 @@
+//
+// Source
+// ------------------------------------------
- class Stable(val bar: Int)
- class Unstable(var bar: Int)
-
-/********
- * TRANSFORMED
- ********/
+class Stable(val bar: Int)
+class Unstable(var bar: Int)
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Stable(val bar: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityPropagationOfVariousTypesInSameModule\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityPropagationOfVariousTypesInSameModule\133useFir = false\135.txt"
index 415fd25..8a059c2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityPropagationOfVariousTypesInSameModule\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityPropagationOfVariousTypesInSameModule\133useFir = false\135.txt"
@@ -1,24 +1,27 @@
+//
+// Source
+// ------------------------------------------
- import a.*
- import androidx.compose.runtime.Composable
+import a.*
+import androidx.compose.runtime.Composable
- class X<T>(val p1: List<T>)
- class StableDelegateProp {
- var p1 by StableDelegate()
- }
- class UnstableDelegateProp {
- var p1 by UnstableDelegate()
- }
- @Composable fun A(y: Any) {
- used(y)
- A(X(listOf(StableClass())))
- A(StableDelegateProp())
- A(UnstableDelegateProp())
- }
-
-/********
- * TRANSFORMED
- ********/
+class X<T>(val p1: List<T>)
+class StableDelegateProp {
+ var p1 by StableDelegate()
+}
+class UnstableDelegateProp {
+ var p1 by UnstableDelegate()
+}
+@Composable fun A(y: Any) {
+ used(y)
+ A(X(listOf(StableClass())))
+ A(StableDelegateProp())
+ A(UnstableDelegateProp())
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class X<T> (val p1: List<T>) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityPropagationOfVariousTypesInSameModule\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityPropagationOfVariousTypesInSameModule\133useFir = true\135.txt"
index 415fd25..8a059c2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityPropagationOfVariousTypesInSameModule\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityPropagationOfVariousTypesInSameModule\133useFir = true\135.txt"
@@ -1,24 +1,27 @@
+//
+// Source
+// ------------------------------------------
- import a.*
- import androidx.compose.runtime.Composable
+import a.*
+import androidx.compose.runtime.Composable
- class X<T>(val p1: List<T>)
- class StableDelegateProp {
- var p1 by StableDelegate()
- }
- class UnstableDelegateProp {
- var p1 by UnstableDelegate()
- }
- @Composable fun A(y: Any) {
- used(y)
- A(X(listOf(StableClass())))
- A(StableDelegateProp())
- A(UnstableDelegateProp())
- }
-
-/********
- * TRANSFORMED
- ********/
+class X<T>(val p1: List<T>)
+class StableDelegateProp {
+ var p1 by StableDelegate()
+}
+class UnstableDelegateProp {
+ var p1 by UnstableDelegate()
+}
+@Composable fun A(y: Any) {
+ used(y)
+ A(X(listOf(StableClass())))
+ A(StableDelegateProp())
+ A(UnstableDelegateProp())
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class X<T> (val p1: List<T>) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityPropagationOfVariousTypes\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityPropagationOfVariousTypes\133useFir = false\135.txt"
index 245d566..ec1c909 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityPropagationOfVariousTypes\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityPropagationOfVariousTypes\133useFir = false\135.txt"
@@ -1,32 +1,35 @@
+//
+// Source
+// ------------------------------------------
- import a.*
- import androidx.compose.runtime.Composable
+import a.*
+import androidx.compose.runtime.Composable
- @Composable fun A(y: Any? = null) {
- used(y)
- A()
- A(EmptyClass())
- A(SingleStableValInt(123))
- A(SingleStableVal(StableClass()))
- A(SingleParamProp(StableClass()))
- A(SingleParamProp(UnstableClass()))
- A(SingleParamNonProp(StableClass()))
- A(SingleParamNonProp(UnstableClass()))
- A(DoubleParamSingleProp(StableClass(), StableClass()))
- A(DoubleParamSingleProp(UnstableClass(), StableClass()))
- A(DoubleParamSingleProp(StableClass(), UnstableClass()))
- A(DoubleParamSingleProp(UnstableClass(), UnstableClass()))
- A(X(listOf(StableClass())))
- A(X(listOf(StableClass())))
- A(NonBackingFieldUnstableVal())
- A(NonBackingFieldUnstableVar())
- A(StableDelegateProp())
- A(UnstableDelegateProp())
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable fun A(y: Any? = null) {
+ used(y)
+ A()
+ A(EmptyClass())
+ A(SingleStableValInt(123))
+ A(SingleStableVal(StableClass()))
+ A(SingleParamProp(StableClass()))
+ A(SingleParamProp(UnstableClass()))
+ A(SingleParamNonProp(StableClass()))
+ A(SingleParamNonProp(UnstableClass()))
+ A(DoubleParamSingleProp(StableClass(), StableClass()))
+ A(DoubleParamSingleProp(UnstableClass(), StableClass()))
+ A(DoubleParamSingleProp(StableClass(), UnstableClass()))
+ A(DoubleParamSingleProp(UnstableClass(), UnstableClass()))
+ A(X(listOf(StableClass())))
+ A(X(listOf(StableClass())))
+ A(NonBackingFieldUnstableVal())
+ A(NonBackingFieldUnstableVar())
+ A(StableDelegateProp())
+ A(UnstableDelegateProp())
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(y: Any?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityPropagationOfVariousTypes\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityPropagationOfVariousTypes\133useFir = true\135.txt"
index 245d566..ec1c909 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityPropagationOfVariousTypes\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityPropagationOfVariousTypes\133useFir = true\135.txt"
@@ -1,32 +1,35 @@
+//
+// Source
+// ------------------------------------------
- import a.*
- import androidx.compose.runtime.Composable
+import a.*
+import androidx.compose.runtime.Composable
- @Composable fun A(y: Any? = null) {
- used(y)
- A()
- A(EmptyClass())
- A(SingleStableValInt(123))
- A(SingleStableVal(StableClass()))
- A(SingleParamProp(StableClass()))
- A(SingleParamProp(UnstableClass()))
- A(SingleParamNonProp(StableClass()))
- A(SingleParamNonProp(UnstableClass()))
- A(DoubleParamSingleProp(StableClass(), StableClass()))
- A(DoubleParamSingleProp(UnstableClass(), StableClass()))
- A(DoubleParamSingleProp(StableClass(), UnstableClass()))
- A(DoubleParamSingleProp(UnstableClass(), UnstableClass()))
- A(X(listOf(StableClass())))
- A(X(listOf(StableClass())))
- A(NonBackingFieldUnstableVal())
- A(NonBackingFieldUnstableVar())
- A(StableDelegateProp())
- A(UnstableDelegateProp())
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable fun A(y: Any? = null) {
+ used(y)
+ A()
+ A(EmptyClass())
+ A(SingleStableValInt(123))
+ A(SingleStableVal(StableClass()))
+ A(SingleParamProp(StableClass()))
+ A(SingleParamProp(UnstableClass()))
+ A(SingleParamNonProp(StableClass()))
+ A(SingleParamNonProp(UnstableClass()))
+ A(DoubleParamSingleProp(StableClass(), StableClass()))
+ A(DoubleParamSingleProp(UnstableClass(), StableClass()))
+ A(DoubleParamSingleProp(StableClass(), UnstableClass()))
+ A(DoubleParamSingleProp(UnstableClass(), UnstableClass()))
+ A(X(listOf(StableClass())))
+ A(X(listOf(StableClass())))
+ A(NonBackingFieldUnstableVal())
+ A(NonBackingFieldUnstableVar())
+ A(StableDelegateProp())
+ A(UnstableDelegateProp())
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(y: Any?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityTransformOfVariousTypes\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityTransformOfVariousTypes\133useFir = false\135.txt"
index ae187b0..6efd971 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityTransformOfVariousTypes\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityTransformOfVariousTypes\133useFir = false\135.txt"
@@ -1,50 +1,53 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Stable
- import kotlin.reflect.KProperty
+import androidx.compose.runtime.Stable
+import kotlin.reflect.KProperty
- @Stable
- class StableDelegate {
- operator fun setValue(thisObj: Any?, property: KProperty<*>, value: Int) {
- }
- operator fun getValue(thisObj: Any?, property: KProperty<*>): Int {
- return 10
- }
- }
+@Stable
+class StableDelegate {
+ operator fun setValue(thisObj: Any?, property: KProperty<*>, value: Int) {
+ }
+ operator fun getValue(thisObj: Any?, property: KProperty<*>): Int {
+ return 10
+ }
+}
- class UnstableDelegate {
- var value: Int = 0
- operator fun setValue(thisObj: Any?, property: KProperty<*>, value: Int) {
- this.value = value
- }
- operator fun getValue(thisObj: Any?, property: KProperty<*>): Int {
- return 10
- }
- }
- class Unstable { var value: Int = 0 }
- class EmptyClass
- class SingleStableVal(val p1: Int)
- class SingleParamProp<T>(val p1: T)
- class SingleParamNonProp<T>(p1: T) { val p2 = p1.hashCode() }
- class DoubleParamSingleProp<T, V>(val p1: T, p2: V) { val p3 = p2.hashCode() }
- class X<T>(val p1: List<T>)
- class NonBackingFieldUnstableProp {
- val p1: Unstable get() { TODO() }
- }
- class NonBackingFieldUnstableVarProp {
- var p1: Unstable
- get() { TODO() }
- set(value) { }
- }
- class StableDelegateProp {
- var p1 by StableDelegate()
- }
- class UnstableDelegateProp {
- var p1 by UnstableDelegate()
- }
-
-/********
- * TRANSFORMED
- ********/
+class UnstableDelegate {
+ var value: Int = 0
+ operator fun setValue(thisObj: Any?, property: KProperty<*>, value: Int) {
+ this.value = value
+ }
+ operator fun getValue(thisObj: Any?, property: KProperty<*>): Int {
+ return 10
+ }
+}
+class Unstable { var value: Int = 0 }
+class EmptyClass
+class SingleStableVal(val p1: Int)
+class SingleParamProp<T>(val p1: T)
+class SingleParamNonProp<T>(p1: T) { val p2 = p1.hashCode() }
+class DoubleParamSingleProp<T, V>(val p1: T, p2: V) { val p3 = p2.hashCode() }
+class X<T>(val p1: List<T>)
+class NonBackingFieldUnstableProp {
+ val p1: Unstable get() { TODO() }
+}
+class NonBackingFieldUnstableVarProp {
+ var p1: Unstable
+ get() { TODO() }
+ set(value) { }
+}
+class StableDelegateProp {
+ var p1 by StableDelegate()
+}
+class UnstableDelegateProp {
+ var p1 by UnstableDelegate()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Stable
class StableDelegate {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityTransformOfVariousTypes\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityTransformOfVariousTypes\133useFir = true\135.txt"
index ae187b0..6efd971 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityTransformOfVariousTypes\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ClassStabilityTransformTests/testStabilityTransformOfVariousTypes\133useFir = true\135.txt"
@@ -1,50 +1,53 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Stable
- import kotlin.reflect.KProperty
+import androidx.compose.runtime.Stable
+import kotlin.reflect.KProperty
- @Stable
- class StableDelegate {
- operator fun setValue(thisObj: Any?, property: KProperty<*>, value: Int) {
- }
- operator fun getValue(thisObj: Any?, property: KProperty<*>): Int {
- return 10
- }
- }
+@Stable
+class StableDelegate {
+ operator fun setValue(thisObj: Any?, property: KProperty<*>, value: Int) {
+ }
+ operator fun getValue(thisObj: Any?, property: KProperty<*>): Int {
+ return 10
+ }
+}
- class UnstableDelegate {
- var value: Int = 0
- operator fun setValue(thisObj: Any?, property: KProperty<*>, value: Int) {
- this.value = value
- }
- operator fun getValue(thisObj: Any?, property: KProperty<*>): Int {
- return 10
- }
- }
- class Unstable { var value: Int = 0 }
- class EmptyClass
- class SingleStableVal(val p1: Int)
- class SingleParamProp<T>(val p1: T)
- class SingleParamNonProp<T>(p1: T) { val p2 = p1.hashCode() }
- class DoubleParamSingleProp<T, V>(val p1: T, p2: V) { val p3 = p2.hashCode() }
- class X<T>(val p1: List<T>)
- class NonBackingFieldUnstableProp {
- val p1: Unstable get() { TODO() }
- }
- class NonBackingFieldUnstableVarProp {
- var p1: Unstable
- get() { TODO() }
- set(value) { }
- }
- class StableDelegateProp {
- var p1 by StableDelegate()
- }
- class UnstableDelegateProp {
- var p1 by UnstableDelegate()
- }
-
-/********
- * TRANSFORMED
- ********/
+class UnstableDelegate {
+ var value: Int = 0
+ operator fun setValue(thisObj: Any?, property: KProperty<*>, value: Int) {
+ this.value = value
+ }
+ operator fun getValue(thisObj: Any?, property: KProperty<*>): Int {
+ return 10
+ }
+}
+class Unstable { var value: Int = 0 }
+class EmptyClass
+class SingleStableVal(val p1: Int)
+class SingleParamProp<T>(val p1: T)
+class SingleParamNonProp<T>(p1: T) { val p2 = p1.hashCode() }
+class DoubleParamSingleProp<T, V>(val p1: T, p2: V) { val p3 = p2.hashCode() }
+class X<T>(val p1: List<T>)
+class NonBackingFieldUnstableProp {
+ val p1: Unstable get() { TODO() }
+}
+class NonBackingFieldUnstableVarProp {
+ var p1: Unstable
+ get() { TODO() }
+ set(value) { }
+}
+class StableDelegateProp {
+ var p1 by StableDelegate()
+}
+class UnstableDelegateProp {
+ var p1 by UnstableDelegate()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Stable
class StableDelegate {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testAbstractComposable\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testAbstractComposable\133useFir = false\135.txt"
index 2d78c20..8eb9388 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testAbstractComposable\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testAbstractComposable\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -21,9 +25,9 @@
override fun bar() {}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
abstract class BaseFoo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testAbstractComposable\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testAbstractComposable\133useFir = true\135.txt"
index 2d78c20..8eb9388 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testAbstractComposable\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testAbstractComposable\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -21,9 +25,9 @@
override fun bar() {}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
abstract class BaseFoo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testCallingProperties\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testCallingProperties\133useFir = false\135.txt"
index f5fc6fc..28702a3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testCallingProperties\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testCallingProperties\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -15,9 +19,9 @@
bar
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
val bar: Int
@Composable @JvmName(name = "getBar")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testCallingProperties\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testCallingProperties\133useFir = true\135.txt"
index f5fc6fc..28702a3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testCallingProperties\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testCallingProperties\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -15,9 +19,9 @@
bar
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
val bar: Int
@Composable @JvmName(name = "getBar")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testCircularCall\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testCircularCall\133useFir = false\135.txt"
index e5bde81..d352454 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testCircularCall\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testCircularCall\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -14,9 +18,9 @@
Example()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testCircularCall\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testCircularCall\133useFir = true\135.txt"
index e5bde81..d352454 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testCircularCall\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testCircularCall\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -14,9 +18,9 @@
Example()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testComposableNestedCall\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testComposableNestedCall\133useFir = false\135.txt"
index 561d257..00c10f8 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testComposableNestedCall\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testComposableNestedCall\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -24,9 +28,9 @@
composable()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testComposableNestedCall\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testComposableNestedCall\133useFir = true\135.txt"
index 561d257..00c10f8 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testComposableNestedCall\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testComposableNestedCall\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -24,9 +28,9 @@
composable()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testDelegateCall\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testDelegateCall\133useFir = false\135.txt"
index 5c3fcd9..c1c0813 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testDelegateCall\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testDelegateCall\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -35,9 +39,9 @@
println(bar.foo)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testDelegateCall\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testDelegateCall\133useFir = true\135.txt"
index 5c3fcd9..c1c0813 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testDelegateCall\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testDelegateCall\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -35,9 +39,9 @@
println(bar.foo)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testDexNaming\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testDexNaming\133useFir = false\135.txt"
index a843efe..8d77b7a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testDexNaming\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testDexNaming\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -13,9 +17,9 @@
return { }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
val myProperty: Function0<Unit>
@Composable @JvmName(name = "getMyProperty")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testDexNaming\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testDexNaming\133useFir = true\135.txt"
index a843efe..8d77b7a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testDexNaming\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testDexNaming\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -13,9 +17,9 @@
return { }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
val myProperty: Function0<Unit>
@Composable @JvmName(name = "getMyProperty")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testInlineCall\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testInlineCall\133useFir = false\135.txt"
index bad6dff..32e6ba3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testInlineCall\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testInlineCall\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -18,9 +22,9 @@
Example {}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testInlineCall\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testInlineCall\133useFir = true\135.txt"
index bad6dff..32e6ba3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testInlineCall\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testInlineCall\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -18,9 +22,9 @@
Example {}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testInnerClass\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testInnerClass\133useFir = false\135.txt"
index 0e0ce15..d635b07 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testInnerClass\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testInnerClass\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -21,9 +25,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
interface A {
open fun b() { }
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testInnerClass\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testInnerClass\133useFir = true\135.txt"
index 0e0ce15..d635b07 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testInnerClass\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testInnerClass\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -21,9 +25,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
interface A {
open fun b() { }
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testKeyCall\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testKeyCall\133useFir = false\135.txt"
index 01ff0dc..b5fca55 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testKeyCall\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testKeyCall\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -30,9 +34,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testKeyCall\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testKeyCall\133useFir = true\135.txt"
index 01ff0dc..b5fca55 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testKeyCall\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testKeyCall\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -30,9 +34,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testLocalClassAndObjectLiterals\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testLocalClassAndObjectLiterals\133useFir = false\135.txt"
index f1ea1af..1dabca6 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testLocalClassAndObjectLiterals\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testLocalClassAndObjectLiterals\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -27,9 +31,9 @@
Bar().baz()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testLocalClassAndObjectLiterals\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testLocalClassAndObjectLiterals\133useFir = true\135.txt"
index f1ea1af..1dabca6 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testLocalClassAndObjectLiterals\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testLocalClassAndObjectLiterals\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -27,9 +31,9 @@
Bar().baz()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testNonComposableCode\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testNonComposableCode\133useFir = false\135.txt"
index 96d2400..6fc2ecb 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testNonComposableCode\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testNonComposableCode\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -30,9 +34,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
fun A() { }
val b: Int
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testNonComposableCode\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testNonComposableCode\133useFir = true\135.txt"
index 96d2400..6fc2ecb 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testNonComposableCode\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testNonComposableCode\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -30,9 +34,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
fun A() { }
val b: Int
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testStableDelegateCall\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testStableDelegateCall\133useFir = false\135.txt"
index 9f5b6049..cd17285 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testStableDelegateCall\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testStableDelegateCall\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -22,9 +26,9 @@
used(delegated)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testStableDelegateCall\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testStableDelegateCall\133useFir = true\135.txt"
index 9f5b6049..cd17285 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testStableDelegateCall\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testStableDelegateCall\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -22,9 +26,9 @@
used(delegated)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testStableVarargParams\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testStableVarargParams\133useFir = false\135.txt"
index 54ee18b..6d43cd4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testStableVarargParams\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testStableVarargParams\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -20,9 +24,9 @@
B(0, 1, 2, 3)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun B(values: IntArray, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testStableVarargParams\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testStableVarargParams\133useFir = true\135.txt"
index 54ee18b..6d43cd4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testStableVarargParams\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testStableVarargParams\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -20,9 +24,9 @@
B(0, 1, 2, 3)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun B(values: IntArray, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testUnstableDelegateCall\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testUnstableDelegateCall\133useFir = false\135.txt"
index 27a24d9..4013b66 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testUnstableDelegateCall\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testUnstableDelegateCall\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -24,9 +28,9 @@
println(foo)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testUnstableDelegateCall\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testUnstableDelegateCall\133useFir = true\135.txt"
index 27a24d9..4013b66 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testUnstableDelegateCall\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testUnstableDelegateCall\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -24,9 +28,9 @@
println(foo)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testVarargWithNoArgs\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testVarargWithNoArgs\133useFir = false\135.txt"
index 24123a8..428b269 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testVarargWithNoArgs\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testVarargWithNoArgs\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -19,9 +23,9 @@
VarArgsFirst()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun VarArgsFirst(foo: Array<out Any?>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testVarargWithNoArgs\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testVarargWithNoArgs\133useFir = true\135.txt"
index 24123a8..428b269 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testVarargWithNoArgs\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/testVarargWithNoArgs\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
@file:OptIn(
InternalComposeApi::class,
)
@@ -19,9 +23,9 @@
VarArgsFirst()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun VarArgsFirst(foo: Array<out Any?>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionReferencesInCalleeOverriddenSymbols\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionReferencesInCalleeOverriddenSymbols\133useFir = false\135.txt"
index b108fd0..b1c2fbc 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionReferencesInCalleeOverriddenSymbols\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionReferencesInCalleeOverriddenSymbols\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
package test
import androidx.compose.runtime.Composable
@@ -9,9 +13,10 @@
fun Foo() {
ContentImpl().setContent()
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@NonRestartableComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionReferencesInCalleeOverriddenSymbols\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionReferencesInCalleeOverriddenSymbols\133useFir = true\135.txt"
index b108fd0..b1c2fbc 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionReferencesInCalleeOverriddenSymbols\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionReferencesInCalleeOverriddenSymbols\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
package test
import androidx.compose.runtime.Composable
@@ -9,9 +13,10 @@
fun Foo() {
ContentImpl().setContent()
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@NonRestartableComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionReferencesInOverriddenSymbols\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionReferencesInOverriddenSymbols\133useFir = false\135.txt"
index 6184630..44c75bd 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionReferencesInOverriddenSymbols\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionReferencesInOverriddenSymbols\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
package test
import androidx.compose.runtime.Composable
@@ -6,9 +10,10 @@
class ContentImpl : Content {
override fun setContent(c: @Composable () -> Unit) {}
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class ContentImpl : Content {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionReferencesInOverriddenSymbols\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionReferencesInOverriddenSymbols\133useFir = true\135.txt"
index 6184630..44c75bd 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionReferencesInOverriddenSymbols\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionReferencesInOverriddenSymbols\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
package test
import androidx.compose.runtime.Composable
@@ -6,9 +10,10 @@
class ContentImpl : Content {
override fun setContent(c: @Composable () -> Unit) {}
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class ContentImpl : Content {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionSymbolCalls\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionSymbolCalls\133useFir = false\135.txt"
index a5bd709..273921d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionSymbolCalls\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionSymbolCalls\133useFir = false\135.txt"
@@ -1,4 +1,8 @@
- @file:OptIn(
+//
+// Source
+// ------------------------------------------
+
+@file:OptIn(
InternalComposeApi::class,
)
package test
@@ -22,9 +26,10 @@
) {
val hc = l.hashCode()
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
fun abc0(l: Function2<Composer, Int, Unit>) {
val hc = l.hashCode()
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionSymbolCalls\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionSymbolCalls\133useFir = true\135.txt"
index a5bd709..273921d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionSymbolCalls\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ComposerParamTransformTests/validateNoComposableFunctionSymbolCalls\133useFir = true\135.txt"
@@ -1,4 +1,8 @@
- @file:OptIn(
+//
+// Source
+// ------------------------------------------
+
+@file:OptIn(
InternalComposeApi::class,
)
package test
@@ -22,9 +26,10 @@
) {
val hc = l.hashCode()
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
fun abc0(l: Function2<Composer, Int, Unit>) {
val hc = l.hashCode()
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiverAndComposableLambdaParam\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiverAndComposableLambdaParam\133useFir = false\135.txt"
index aa3dd6a..1a77532 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiverAndComposableLambdaParam\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiverAndComposableLambdaParam\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -7,9 +11,9 @@
b("yay")
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiverAndComposableLambdaParam\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiverAndComposableLambdaParam\133useFir = true\135.txt"
index aa3dd6a..1a77532 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiverAndComposableLambdaParam\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiverAndComposableLambdaParam\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -7,9 +11,9 @@
b("yay")
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiverAndDefaultParamsUsage\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiverAndDefaultParamsUsage\133useFir = false\135.txt"
index 1fd6740..c3467e6 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiverAndDefaultParamsUsage\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiverAndDefaultParamsUsage\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -20,9 +24,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Parent(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiverAndDefaultParamsUsage\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiverAndDefaultParamsUsage\133useFir = true\135.txt"
index 1fd6740..c3467e6 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiverAndDefaultParamsUsage\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiverAndDefaultParamsUsage\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -20,9 +24,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Parent(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndDefaultParams\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndDefaultParams\133useFir = false\135.txt"
index c8657b8..c35ca6c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndDefaultParams\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndDefaultParams\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -13,9 +17,9 @@
@Composable
fun C(a: Int, bar: Bar = Bar()) { }
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(%context_receiver_0: Foo, %context_receiver_1: Bar, a: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndDefaultParams\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndDefaultParams\133useFir = true\135.txt"
index c8657b8..c35ca6c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndDefaultParams\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndDefaultParams\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -13,9 +17,9 @@
@Composable
fun C(a: Int, bar: Bar = Bar()) { }
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(%context_receiver_0: Foo, %context_receiver_1: Bar, a: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndExtensionReceiverAndDefaultParams\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndExtensionReceiverAndDefaultParams\133useFir = false\135.txt"
index 474bfe3..8607302 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndExtensionReceiverAndDefaultParams\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndExtensionReceiverAndDefaultParams\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -5,9 +9,9 @@
@Composable
fun String.B(a: Int, b: String = "", c: Int = 1) { }
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun String.B(%context_receiver_0: Foo, %context_receiver_1: Bar, %context_receiver_2: FooBar, a: Int, b: String?, c: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndExtensionReceiverAndDefaultParams\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndExtensionReceiverAndDefaultParams\133useFir = true\135.txt"
index 474bfe3..8607302 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndExtensionReceiverAndDefaultParams\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndExtensionReceiverAndDefaultParams\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -5,9 +9,9 @@
@Composable
fun String.B(a: Int, b: String = "", c: Int = 1) { }
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun String.B(%context_receiver_0: Foo, %context_receiver_1: Bar, %context_receiver_2: FooBar, a: Int, b: String?, c: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndExtensionReceiver\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndExtensionReceiver\133useFir = false\135.txt"
index 5d5677d..42b227c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndExtensionReceiver\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndExtensionReceiver\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -9,9 +13,9 @@
@Composable
fun String.B() { }
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun String.A(%context_receiver_0: Foo, %context_receiver_1: Bar, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndExtensionReceiver\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndExtensionReceiver\133useFir = true\135.txt"
index 5d5677d..42b227c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndExtensionReceiver\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversAndExtensionReceiver\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -9,9 +13,9 @@
@Composable
fun String.B() { }
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun String.A(%context_receiver_0: Foo, %context_receiver_1: Bar, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversNestedWith\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversNestedWith\133useFir = false\135.txt"
index 7866a82..f8c822e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversNestedWith\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversNestedWith\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(foo: Foo, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversNestedWith\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversNestedWith\133useFir = true\135.txt"
index 7866a82..f8c822e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversNestedWith\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversNestedWith\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(foo: Foo, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversWithAndDefaultParam\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversWithAndDefaultParam\133useFir = false\135.txt"
index b8b7a7e..6f29aaf 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversWithAndDefaultParam\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversWithAndDefaultParam\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -8,9 +12,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(foo: Foo, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversWithAndDefaultParam\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversWithAndDefaultParam\133useFir = true\135.txt"
index b8b7a7e..6f29aaf 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversWithAndDefaultParam\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversWithAndDefaultParam\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -8,9 +12,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(foo: Foo, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversWith\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversWith\133useFir = false\135.txt"
index 8b80e0a..079c441 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversWith\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversWith\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -9,9 +13,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(foo: Foo, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversWith\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversWith\133useFir = true\135.txt"
index 8b80e0a..079c441 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversWith\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testContextReceiversWith\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -9,9 +13,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(foo: Foo, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testLotsOfContextReceivers\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testLotsOfContextReceivers\133useFir = false\135.txt"
index e1257e1..481615c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testLotsOfContextReceivers\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testLotsOfContextReceivers\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -6,9 +10,9 @@
fun Test() {
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%context_receiver_0: A, %context_receiver_1: B, %context_receiver_2: C, %context_receiver_3: D, %context_receiver_4: E, %context_receiver_5: F, %context_receiver_6: G, %context_receiver_7: H, %context_receiver_8: I, %context_receiver_9: J, %context_receiver_10: K, %context_receiver_11: L, %composer: Composer?, %changed: Int, %changed1: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testLotsOfContextReceivers\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testLotsOfContextReceivers\133useFir = true\135.txt"
index e1257e1..481615c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testLotsOfContextReceivers\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testLotsOfContextReceivers\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -6,9 +10,9 @@
fun Test() {
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%context_receiver_0: A, %context_receiver_1: B, %context_receiver_2: C, %context_receiver_3: D, %context_receiver_4: E, %context_receiver_5: F, %context_receiver_6: G, %context_receiver_7: H, %context_receiver_8: I, %context_receiver_9: J, %context_receiver_10: K, %context_receiver_11: L, %composer: Composer?, %changed: Int, %changed1: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testMultipleContextReceivers\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testMultipleContextReceivers\133useFir = false\135.txt"
index 9e65970..bccd0e2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testMultipleContextReceivers\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testMultipleContextReceivers\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -9,9 +13,9 @@
@Composable
fun B() { }
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(%context_receiver_0: Foo, %context_receiver_1: Bar, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testMultipleContextReceivers\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testMultipleContextReceivers\133useFir = true\135.txt"
index 9e65970..bccd0e2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testMultipleContextReceivers\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testMultipleContextReceivers\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -9,9 +13,9 @@
@Composable
fun B() { }
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(%context_receiver_0: Foo, %context_receiver_1: Bar, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testTrivialContextReceivers\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testTrivialContextReceivers\133useFir = false\135.txt"
index 23d6b21..b47d948 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testTrivialContextReceivers\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testTrivialContextReceivers\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -5,9 +9,9 @@
@Composable
fun Test() { }
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%context_receiver_0: Foo, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testTrivialContextReceivers\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testTrivialContextReceivers\133useFir = true\135.txt"
index 23d6b21..b47d948 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testTrivialContextReceivers\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ContextReceiversTransformTests/testTrivialContextReceivers\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -5,9 +9,9 @@
@Composable
fun Test() { }
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%context_receiver_0: Foo, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testAND\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testAND\133useFir = false\135.txt"
index b36ca22..b2ca142 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testAND\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testAND\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -10,9 +14,9 @@
B() && B()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testAND\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testAND\133useFir = true\135.txt"
index b36ca22..b2ca142 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testAND\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testAND\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -10,9 +14,9 @@
B() && B()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testApplyOnComposableCallResult\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testApplyOnComposableCallResult\133useFir = false\135.txt"
index 94c4f28..d85e10f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testApplyOnComposableCallResult\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testApplyOnComposableCallResult\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
this.value = value
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun <T> provided(value: T, %composer: Composer?, %changed: Int): State<T> {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testApplyOnComposableCallResult\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testApplyOnComposableCallResult\133useFir = true\135.txt"
index 94c4f28..d85e10f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testApplyOnComposableCallResult\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testApplyOnComposableCallResult\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
this.value = value
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun <T> provided(value: T, %composer: Composer?, %changed: Int): State<T> {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsAfter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsAfter\133useFir = false\135.txt"
index 46e6ad3..c9497b4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsAfter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsAfter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -15,9 +19,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsAfter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsAfter\133useFir = true\135.txt"
index 46e6ad3..c9497b4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsAfter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsAfter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -15,9 +19,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBeforeAndAfterAndCallAfter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBeforeAndAfterAndCallAfter\133useFir = false\135.txt"
index d1cb10b..1df8e47 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBeforeAndAfterAndCallAfter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBeforeAndAfterAndCallAfter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -18,9 +22,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBeforeAndAfterAndCallAfter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBeforeAndAfterAndCallAfter\133useFir = true\135.txt"
index d1cb10b..1df8e47 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBeforeAndAfterAndCallAfter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBeforeAndAfterAndCallAfter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -18,9 +22,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBeforeAndAfter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBeforeAndAfter\133useFir = false\135.txt"
index 4a4c6ed..c548530 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBeforeAndAfter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBeforeAndAfter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -18,9 +22,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBeforeAndAfter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBeforeAndAfter\133useFir = true\135.txt"
index 4a4c6ed..c548530 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBeforeAndAfter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBeforeAndAfter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -18,9 +22,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBefore\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBefore\133useFir = false\135.txt"
index 2f8866f..8044240 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBefore\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBefore\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -15,9 +19,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBefore\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBefore\133useFir = true\135.txt"
index 2f8866f..8044240 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBefore\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testBreakWithCallsBefore\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -15,9 +19,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testCallingAWrapperComposable\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testCallingAWrapperComposable\133useFir = false\135.txt"
index 3bf1e45..436dd3e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testCallingAWrapperComposable\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testCallingAWrapperComposable\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testCallingAWrapperComposable\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testCallingAWrapperComposable\133useFir = true\135.txt"
index 3bf1e45..436dd3e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testCallingAWrapperComposable\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testCallingAWrapperComposable\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testCallingAnInlineWrapperComposable\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testCallingAnInlineWrapperComposable\133useFir = false\135.txt"
index 70cd352..c4462e9 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testCallingAnInlineWrapperComposable\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testCallingAnInlineWrapperComposable\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testCallingAnInlineWrapperComposable\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testCallingAnInlineWrapperComposable\133useFir = true\135.txt"
index 70cd352..c4462e9 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testCallingAnInlineWrapperComposable\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testCallingAnInlineWrapperComposable\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testComposableWithInlineClass\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testComposableWithInlineClass\133useFir = false\135.txt"
index 6e79ac2..1369b3a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testComposableWithInlineClass\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testComposableWithInlineClass\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -10,9 +14,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(value: InlineClass, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testComposableWithInlineClass\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testComposableWithInlineClass\133useFir = true\135.txt"
index 6e79ac2..1369b3a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testComposableWithInlineClass\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testComposableWithInlineClass\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -10,9 +14,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(value: InlineClass, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = false\135.txt"
index 60158b6..0b354f4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.runtime.*
import androidx.compose.foundation.layout.*
@@ -18,9 +22,10 @@
Text("$keyboardActions2")
}
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
object Ui {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = true\135.txt"
index 60158b6..0b354f4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.runtime.*
import androidx.compose.foundation.layout.*
@@ -18,9 +22,10 @@
Text("$keyboardActions2")
}
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
object Ui {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsAfter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsAfter\133useFir = false\135.txt"
index 53a33ac..260958f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsAfter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsAfter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -15,9 +19,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsAfter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsAfter\133useFir = true\135.txt"
index 53a33ac..260958f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsAfter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsAfter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -15,9 +19,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsBeforeAndAfter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsBeforeAndAfter\133useFir = false\135.txt"
index b29891b..5cd2f4c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsBeforeAndAfter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsBeforeAndAfter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsBeforeAndAfter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsBeforeAndAfter\133useFir = true\135.txt"
index b29891b..5cd2f4c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsBeforeAndAfter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsBeforeAndAfter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsBefore\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsBefore\133useFir = false\135.txt"
index 2cd369a..0942632 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsBefore\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsBefore\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsBefore\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsBefore\133useFir = true\135.txt"
index 2cd369a..0942632 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsBefore\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testContinueWithCallsBefore\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testDynamicWrappingGroupWithReturnValue\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testDynamicWrappingGroupWithReturnValue\133useFir = false\135.txt"
index f8d88a5..dc4f462 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testDynamicWrappingGroupWithReturnValue\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testDynamicWrappingGroupWithReturnValue\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
} else 4
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testDynamicWrappingGroupWithReturnValue\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testDynamicWrappingGroupWithReturnValue\133useFir = true\135.txt"
index f8d88a5..dc4f462 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testDynamicWrappingGroupWithReturnValue\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testDynamicWrappingGroupWithReturnValue\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
} else 4
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnCallValue\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnCallValue\133useFir = false\135.txt"
index 221cfbb..a8106b9 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnCallValue\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnCallValue\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -12,9 +16,9 @@
return R()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnCallValue\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnCallValue\133useFir = true\135.txt"
index 221cfbb..a8106b9 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnCallValue\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnCallValue\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -12,9 +16,9 @@
return R()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnFromCrossInlinedLambda\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnFromCrossInlinedLambda\133useFir = false\135.txt"
index b5b0d96..4c4ea1d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnFromCrossInlinedLambda\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnFromCrossInlinedLambda\133useFir = false\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- private fun Test(param: String?) {
- Dialog {
- if (false) Test(param)
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+private fun Test(param: String?) {
+ Dialog {
+ if (false) Test(param)
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
private fun Test(param: String?, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnFromCrossInlinedLambda\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnFromCrossInlinedLambda\133useFir = true\135.txt"
index b5b0d96..4c4ea1d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnFromCrossInlinedLambda\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnFromCrossInlinedLambda\133useFir = true\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- private fun Test(param: String?) {
- Dialog {
- if (false) Test(param)
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+private fun Test(param: String?) {
+ Dialog {
+ if (false) Test(param)
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
private fun Test(param: String?, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnFromWhenStatement\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnFromWhenStatement\133useFir = false\135.txt"
index 30f0e4d..efbf242 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnFromWhenStatement\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnFromWhenStatement\133useFir = false\135.txt"
@@ -1,18 +1,21 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- private fun Test(param: String?) {
- val state = remember { mutableStateOf(false) }
- when (state.value) {
- true -> return Text(text = "true")
- else -> Text(text = "false")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+private fun Test(param: String?) {
+ val state = remember { mutableStateOf(false) }
+ when (state.value) {
+ true -> return Text(text = "true")
+ else -> Text(text = "false")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
private fun Test(param: String?, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnFromWhenStatement\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnFromWhenStatement\133useFir = true\135.txt"
index 30f0e4d..efbf242 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnFromWhenStatement\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnFromWhenStatement\133useFir = true\135.txt"
@@ -1,18 +1,21 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- private fun Test(param: String?) {
- val state = remember { mutableStateOf(false) }
- when (state.value) {
- true -> return Text(text = "true")
- else -> Text(text = "false")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+private fun Test(param: String?) {
+ val state = remember { mutableStateOf(false) }
+ when (state.value) {
+ true -> return Text(text = "true")
+ else -> Text(text = "false")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
private fun Test(param: String?, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnValueWithCallsAfter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnValueWithCallsAfter\133useFir = false\135.txt"
index afe1ab0..6d045c2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnValueWithCallsAfter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnValueWithCallsAfter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
return 2
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnValueWithCallsAfter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnValueWithCallsAfter\133useFir = true\135.txt"
index afe1ab0..6d045c2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnValueWithCallsAfter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnValueWithCallsAfter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
return 2
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnValue\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnValue\133useFir = false\135.txt"
index fa6b0c4..904ae2a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnValue\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnValue\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
return 2
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnValue\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnValue\133useFir = true\135.txt"
index fa6b0c4..904ae2a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnValue\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnValue\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
return 2
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnWithCallsAfterButNotBefore\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnWithCallsAfterButNotBefore\133useFir = false\135.txt"
index 32110e3..66cec40 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnWithCallsAfterButNotBefore\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnWithCallsAfterButNotBefore\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnWithCallsAfterButNotBefore\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnWithCallsAfterButNotBefore\133useFir = true\135.txt"
index 32110e3..66cec40 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnWithCallsAfterButNotBefore\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnWithCallsAfterButNotBefore\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnWithCallsBeforeButNotAfter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnWithCallsBeforeButNotAfter\133useFir = false\135.txt"
index 1d3f837..e698b4b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnWithCallsBeforeButNotAfter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnWithCallsBeforeButNotAfter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
print("hello")
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnWithCallsBeforeButNotAfter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnWithCallsBeforeButNotAfter\133useFir = true\135.txt"
index 1d3f837..e698b4b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnWithCallsBeforeButNotAfter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEarlyReturnWithCallsBeforeButNotAfter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
print("hello")
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testElvis\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testElvis\133useFir = false\135.txt"
index 68a44fd..0910c29 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testElvis\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testElvis\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -12,9 +16,9 @@
val y = x ?: R()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testElvis\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testElvis\133useFir = true\135.txt"
index 68a44fd..0910c29 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testElvis\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testElvis\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -12,9 +16,9 @@
val y = x ?: R()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInInline_Labeled\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInInline_Labeled\133useFir = false\135.txt"
index a624cf6..5deb31b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInInline_Labeled\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInInline_Labeled\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -12,9 +16,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInInline_Labeled\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInInline_Labeled\133useFir = true\135.txt"
index a624cf6..5deb31b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInInline_Labeled\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInInline_Labeled\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -12,9 +16,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInNonInline_NormalComposable\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInNonInline_NormalComposable\133useFir = false\135.txt"
index 3022bb4..6e92214 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInNonInline_NormalComposable\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInNonInline_NormalComposable\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -17,9 +21,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
object obj {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInNonInline_NormalComposable\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInNonInline_NormalComposable\133useFir = true\135.txt"
index 3022bb4..6e92214 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInNonInline_NormalComposable\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInNonInline_NormalComposable\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -17,9 +21,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
object obj {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInNonInline_ReadOnlyComposable\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInNonInline_ReadOnlyComposable\133useFir = false\135.txt"
index ce032b8..7751da1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInNonInline_ReadOnlyComposable\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInNonInline_ReadOnlyComposable\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -21,9 +25,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
object obj {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInNonInline_ReadOnlyComposable\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInNonInline_ReadOnlyComposable\133useFir = true\135.txt"
index ce032b8..7751da1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInNonInline_ReadOnlyComposable\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureEarlyExitInNonInline_ReadOnlyComposable\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -21,9 +25,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
object obj {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureRuntimeTestWillCompile_CG\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureRuntimeTestWillCompile_CG\133useFir = false\135.txt"
index cf5c08b..20013e7 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureRuntimeTestWillCompile_CG\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureRuntimeTestWillCompile_CG\133useFir = false\135.txt"
@@ -1,21 +1,23 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun test_CM1_RetFun(condition: Boolean) {
- Text("Root - before")
- M1 {
- Text("M1 - before")
- if (condition) return
- Text("M1 - after")
- }
- Text("Root - after")
- }
+@Composable
+fun test_CM1_RetFun(condition: Boolean) {
+ Text("Root - before")
+ M1 {
+ Text("M1 - before")
+ if (condition) return
+ Text("M1 - after")
+ }
+ Text("Root - after")
+}
-
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun test_CM1_RetFun(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureRuntimeTestWillCompile_CG\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureRuntimeTestWillCompile_CG\133useFir = true\135.txt"
index cf5c08b..20013e7 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureRuntimeTestWillCompile_CG\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testEnsureRuntimeTestWillCompile_CG\133useFir = true\135.txt"
@@ -1,21 +1,23 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun test_CM1_RetFun(condition: Boolean) {
- Text("Root - before")
- M1 {
- Text("M1 - before")
- if (condition) return
- Text("M1 - after")
- }
- Text("Root - after")
- }
+@Composable
+fun test_CM1_RetFun(condition: Boolean) {
+ Text("Root - before")
+ M1 {
+ Text("M1 - before")
+ if (condition) return
+ Text("M1 - after")
+ }
+ Text("Root - after")
+}
-
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun test_CM1_RetFun(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInBodyAndCallsAfter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInBodyAndCallsAfter\133useFir = false\135.txt"
index 14c0f78..799230f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInBodyAndCallsAfter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInBodyAndCallsAfter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInBodyAndCallsAfter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInBodyAndCallsAfter\133useFir = true\135.txt"
index 14c0f78..799230f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInBodyAndCallsAfter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInBodyAndCallsAfter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInBody\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInBody\133useFir = false\135.txt"
index 2efcf24..73b254f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInBody\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInBody\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInBody\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInBody\133useFir = true\135.txt"
index 2efcf24..73b254f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInBody\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInBody\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInSubject\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInSubject\133useFir = false\135.txt"
index a17dae0..4d2696b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInSubject\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInSubject\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInSubject\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInSubject\133useFir = true\135.txt"
index a17dae0..4d2696b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInSubject\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testForLoopWithCallsInSubject\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testGroupAroundExtensionFunctions\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testGroupAroundExtensionFunctions\133useFir = false\135.txt"
index 76368b5..2bfcc74 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testGroupAroundExtensionFunctions\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testGroupAroundExtensionFunctions\133useFir = false\135.txt"
@@ -1,20 +1,23 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test(start: Int, end: Int) {
- val a = remember { A() }
- for (i in start until end) {
- val b = a.get(bKey)
- if (i == 2) {
- a.get(cKey)
- }
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(start: Int, end: Int) {
+ val a = remember { A() }
+ for (i in start until end) {
+ val b = a.get(bKey)
+ if (i == 2) {
+ a.get(cKey)
+ }
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(start: Int, end: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testGroupAroundExtensionFunctions\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testGroupAroundExtensionFunctions\133useFir = true\135.txt"
index 76368b5..2bfcc74 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testGroupAroundExtensionFunctions\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testGroupAroundExtensionFunctions\133useFir = true\135.txt"
@@ -1,20 +1,23 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test(start: Int, end: Int) {
- val a = remember { A() }
- for (i in start until end) {
- val b = a.get(bKey)
- if (i == 2) {
- a.get(cKey)
- }
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(start: Int, end: Int) {
+ val a = remember { A() }
+ for (i in start until end) {
+ val b = a.get(bKey)
+ if (i == 2) {
+ a.get(cKey)
+ }
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(start: Int, end: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfElseWithCallsInBranch\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfElseWithCallsInBranch\133useFir = false\135.txt"
index 98604ca..2b2e8e1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfElseWithCallsInBranch\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfElseWithCallsInBranch\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfElseWithCallsInBranch\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfElseWithCallsInBranch\133useFir = true\135.txt"
index 98604ca..2b2e8e1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfElseWithCallsInBranch\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfElseWithCallsInBranch\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfElseWithCallsInConditions\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfElseWithCallsInConditions\133useFir = false\135.txt"
index 3486d3e..6d1bf67 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfElseWithCallsInConditions\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfElseWithCallsInConditions\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -20,9 +24,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfElseWithCallsInConditions\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfElseWithCallsInConditions\133useFir = true\135.txt"
index 3486d3e..6d1bf67 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfElseWithCallsInConditions\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfElseWithCallsInConditions\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -20,9 +24,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfNonComposable\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfNonComposable\133useFir = false\135.txt"
index 527a54e..714206d1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfNonComposable\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfNonComposable\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -12,9 +16,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfNonComposable\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfNonComposable\133useFir = true\135.txt"
index 527a54e..714206d1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfNonComposable\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfNonComposable\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -12,9 +16,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithCallInCondition\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithCallInCondition\133useFir = false\135.txt"
index 367d5f8..348c308 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithCallInCondition\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithCallInCondition\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithCallInCondition\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithCallInCondition\133useFir = true\135.txt"
index 367d5f8..348c308 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithCallInCondition\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithCallInCondition\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithCallsInBranch\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithCallsInBranch\133useFir = false\135.txt"
index 89577c5..e1fc89d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithCallsInBranch\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithCallsInBranch\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithCallsInBranch\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithCallsInBranch\133useFir = true\135.txt"
index 89577c5..e1fc89d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithCallsInBranch\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithCallsInBranch\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineArrayConstructor\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineArrayConstructor\133useFir = false\135.txt"
index 2e2b1d7..6912586 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineArrayConstructor\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineArrayConstructor\133useFir = false\135.txt"
@@ -1,22 +1,25 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun ArrayConstructorTest(n: Int) {
- Array(n) { remember { it } }
- ByteArray(n) { remember { it.toByte() } }
- CharArray(n) { remember { it.toChar() } }
- ShortArray(n) { remember { it.toShort() } }
- IntArray(n) { remember { it } }
- LongArray(n) { remember { it.toLong() } }
- FloatArray(n) { remember { it.toFloat() } }
- DoubleArray(n) { remember { it.toDouble() } }
- BooleanArray(n) { remember { false } }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun ArrayConstructorTest(n: Int) {
+ Array(n) { remember { it } }
+ ByteArray(n) { remember { it.toByte() } }
+ CharArray(n) { remember { it.toChar() } }
+ ShortArray(n) { remember { it.toShort() } }
+ IntArray(n) { remember { it } }
+ LongArray(n) { remember { it.toLong() } }
+ FloatArray(n) { remember { it.toFloat() } }
+ DoubleArray(n) { remember { it.toDouble() } }
+ BooleanArray(n) { remember { false } }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun ArrayConstructorTest(n: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineArrayConstructor\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineArrayConstructor\133useFir = true\135.txt"
index 2e2b1d7..6912586 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineArrayConstructor\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineArrayConstructor\133useFir = true\135.txt"
@@ -1,22 +1,25 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun ArrayConstructorTest(n: Int) {
- Array(n) { remember { it } }
- ByteArray(n) { remember { it.toByte() } }
- CharArray(n) { remember { it.toChar() } }
- ShortArray(n) { remember { it.toShort() } }
- IntArray(n) { remember { it } }
- LongArray(n) { remember { it.toLong() } }
- FloatArray(n) { remember { it.toFloat() } }
- DoubleArray(n) { remember { it.toDouble() } }
- BooleanArray(n) { remember { false } }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun ArrayConstructorTest(n: Int) {
+ Array(n) { remember { it } }
+ ByteArray(n) { remember { it.toByte() } }
+ CharArray(n) { remember { it.toChar() } }
+ ShortArray(n) { remember { it.toShort() } }
+ IntArray(n) { remember { it } }
+ LongArray(n) { remember { it.toLong() } }
+ FloatArray(n) { remember { it.toFloat() } }
+ DoubleArray(n) { remember { it.toDouble() } }
+ BooleanArray(n) { remember { false } }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun ArrayConstructorTest(n: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineLambdaBeforeACall\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineLambdaBeforeACall\133useFir = false\135.txt"
index 7cbc5a4..212e96e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineLambdaBeforeACall\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineLambdaBeforeACall\133useFir = false\135.txt"
@@ -1,19 +1,22 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- private fun Test(param: String?): String? {
- InlineNonComposable {
- repeat(10) {
- Test("InsideInline")
- }
- }
- return Test("AfterInline")
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+private fun Test(param: String?): String? {
+ InlineNonComposable {
+ repeat(10) {
+ Test("InsideInline")
+ }
+ }
+ return Test("AfterInline")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
private fun Test(param: String?, %composer: Composer?, %changed: Int): String? {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineLambdaBeforeACall\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineLambdaBeforeACall\133useFir = true\135.txt"
index 7cbc5a4..212e96e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineLambdaBeforeACall\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineLambdaBeforeACall\133useFir = true\135.txt"
@@ -1,19 +1,22 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- private fun Test(param: String?): String? {
- InlineNonComposable {
- repeat(10) {
- Test("InsideInline")
- }
- }
- return Test("AfterInline")
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+private fun Test(param: String?): String? {
+ InlineNonComposable {
+ repeat(10) {
+ Test("InsideInline")
+ }
+ }
+ return Test("AfterInline")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
private fun Test(param: String?, %composer: Composer?, %changed: Int): String? {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineLambda_nonLocalReturn\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineLambda_nonLocalReturn\133useFir = false\135.txt"
index 1b68d9b..b5e8b9d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineLambda_nonLocalReturn\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineLambda_nonLocalReturn\133useFir = false\135.txt"
@@ -1,18 +1,21 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- private fun Test(param: String?) {
- Inline1 {
- Inline2 {
- if (true) return@Inline1
- }
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+private fun Test(param: String?) {
+ Inline1 {
+ Inline2 {
+ if (true) return@Inline1
+ }
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
private fun Test(param: String?, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineLambda_nonLocalReturn\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineLambda_nonLocalReturn\133useFir = true\135.txt"
index 1b68d9b..b5e8b9d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineLambda_nonLocalReturn\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineLambda_nonLocalReturn\133useFir = true\135.txt"
@@ -1,18 +1,21 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- private fun Test(param: String?) {
- Inline1 {
- Inline2 {
- if (true) return@Inline1
- }
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+private fun Test(param: String?) {
+ Inline1 {
+ Inline2 {
+ if (true) return@Inline1
+ }
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
private fun Test(param: String?, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineReadOnlySourceLocations\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineReadOnlySourceLocations\133useFir = false\135.txt"
index 3652892..af124b2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineReadOnlySourceLocations\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineReadOnlySourceLocations\133useFir = false\135.txt"
@@ -1,30 +1,33 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
- import androidx.compose.runtime.ReadOnlyComposable
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.ReadOnlyComposable
- val current
- @Composable
- @ReadOnlyComposable
- get() = 0
+val current
+ @Composable
+ @ReadOnlyComposable
+ get() = 0
- @Composable
- @ReadOnlyComposable
- fun calculateSometing(): Int {
- return 0;
- }
+@Composable
+@ReadOnlyComposable
+fun calculateSometing(): Int {
+ return 0;
+}
- @Composable
- fun Test() {
- val c = current
- val cl = calculateSometing()
- Layout {
- Text("$c $cl")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ val c = current
+ val cl = calculateSometing()
+ Layout {
+ Text("$c $cl")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
val current: Int
@Composable @ReadOnlyComposable @JvmName(name = "getCurrent")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineReadOnlySourceLocations\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineReadOnlySourceLocations\133useFir = true\135.txt"
index 3652892..af124b2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineReadOnlySourceLocations\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineReadOnlySourceLocations\133useFir = true\135.txt"
@@ -1,30 +1,33 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
- import androidx.compose.runtime.ReadOnlyComposable
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.ReadOnlyComposable
- val current
- @Composable
- @ReadOnlyComposable
- get() = 0
+val current
+ @Composable
+ @ReadOnlyComposable
+ get() = 0
- @Composable
- @ReadOnlyComposable
- fun calculateSometing(): Int {
- return 0;
- }
+@Composable
+@ReadOnlyComposable
+fun calculateSometing(): Int {
+ return 0;
+}
- @Composable
- fun Test() {
- val c = current
- val cl = calculateSometing()
- Layout {
- Text("$c $cl")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ val c = current
+ val cl = calculateSometing()
+ Layout {
+ Text("$c $cl")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
val current: Int
@Composable @ReadOnlyComposable @JvmName(name = "getCurrent")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineReturnLabel\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineReturnLabel\133useFir = false\135.txt"
index f7e65c6..b0bbb6d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineReturnLabel\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineReturnLabel\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -19,9 +23,9 @@
content()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@NonRestartableComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineReturnLabel\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineReturnLabel\133useFir = true\135.txt"
index f7e65c6..b0bbb6d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineReturnLabel\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInlineReturnLabel\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -19,9 +23,9 @@
content()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@NonRestartableComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RFun\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RFun\133useFir = false\135.txt"
index 38f8257..9925e02 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RFun\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RFun\133useFir = false\135.txt"
@@ -1,23 +1,25 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun Test(condition: Boolean) {
- A()
- M3 {
- A()
- if (condition) {
- return
- }
- A()
- }
- A()
- }
-
-
-/********
- * TRANSFORMED
- ********/
+import androidx.compose.runtime.Composable
+
+@Composable
+fun Test(condition: Boolean) {
+ A()
+ M3 {
+ A()
+ if (condition) {
+ return
+ }
+ A()
+ }
+ A()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RFun\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RFun\133useFir = true\135.txt"
index 38f8257..9925e02 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RFun\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RFun\133useFir = true\135.txt"
@@ -1,23 +1,25 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun Test(condition: Boolean) {
- A()
- M3 {
- A()
- if (condition) {
- return
- }
- A()
- }
- A()
- }
-
-
-/********
- * TRANSFORMED
- ********/
+import androidx.compose.runtime.Composable
+
+@Composable
+fun Test(condition: Boolean) {
+ A()
+ M3 {
+ A()
+ if (condition) {
+ return
+ }
+ A()
+ }
+ A()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RFun_CM3_RFun\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RFun_CM3_RFun\133useFir = false\135.txt"
index 2405115..04704d1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RFun_CM3_RFun\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RFun_CM3_RFun\133useFir = false\135.txt"
@@ -1,30 +1,32 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun Test(a: Boolean, b: Boolean) {
- A()
- M3 {
- A()
- if (a) {
- return
- }
- A()
- }
- M3 {
- A()
- if (b) {
- return
- }
- A()
- }
- A()
- }
-
-
-/********
- * TRANSFORMED
- ********/
+import androidx.compose.runtime.Composable
+
+@Composable
+fun Test(a: Boolean, b: Boolean) {
+ A()
+ M3 {
+ A()
+ if (a) {
+ return
+ }
+ A()
+ }
+ M3 {
+ A()
+ if (b) {
+ return
+ }
+ A()
+ }
+ A()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Boolean, b: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RFun_CM3_RFun\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RFun_CM3_RFun\133useFir = true\135.txt"
index 2405115..04704d1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RFun_CM3_RFun\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RFun_CM3_RFun\133useFir = true\135.txt"
@@ -1,30 +1,32 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun Test(a: Boolean, b: Boolean) {
- A()
- M3 {
- A()
- if (a) {
- return
- }
- A()
- }
- M3 {
- A()
- if (b) {
- return
- }
- A()
- }
- A()
- }
-
-
-/********
- * TRANSFORMED
- ********/
+import androidx.compose.runtime.Composable
+
+@Composable
+fun Test(a: Boolean, b: Boolean) {
+ A()
+ M3 {
+ A()
+ if (a) {
+ return
+ }
+ A()
+ }
+ M3 {
+ A()
+ if (b) {
+ return
+ }
+ A()
+ }
+ A()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Boolean, b: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RM3\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RM3\133useFir = false\135.txt"
index 1abcad7..54a51fd 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RM3\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RM3\133useFir = false\135.txt"
@@ -1,23 +1,25 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun Test(condition: Boolean) {
- A()
- M3 {
- A()
- if (condition) {
- return@M3
- }
- A()
- }
- A()
- }
-
-
-/********
- * TRANSFORMED
- ********/
+import androidx.compose.runtime.Composable
+
+@Composable
+fun Test(condition: Boolean) {
+ A()
+ M3 {
+ A()
+ if (condition) {
+ return@M3
+ }
+ A()
+ }
+ A()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RM3\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RM3\133useFir = true\135.txt"
index 1abcad7..54a51fd 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RM3\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_RM3\133useFir = true\135.txt"
@@ -1,23 +1,25 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun Test(condition: Boolean) {
- A()
- M3 {
- A()
- if (condition) {
- return@M3
- }
- A()
- }
- A()
- }
-
-
-/********
- * TRANSFORMED
- ********/
+import androidx.compose.runtime.Composable
+
+@Composable
+fun Test(condition: Boolean) {
+ A()
+ M3 {
+ A()
+ if (condition) {
+ return@M3
+ }
+ A()
+ }
+ A()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_Return_M3_CM3_Return_M3\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_Return_M3_CM3_Return_M3\133useFir = false\135.txt"
index 928df19..f8ec1a1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_Return_M3_CM3_Return_M3\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_Return_M3_CM3_Return_M3\133useFir = false\135.txt"
@@ -1,30 +1,32 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun testInline_M1_W_Return_Func(condition: Boolean) {
- A()
- M3 {
- A()
- if (condition) {
- return@M3
- }
- A()
- }
- M3 {
- A()
- if (condition) {
- return@M3
- }
- A()
- }
- A()
- }
-
-
-/********
- * TRANSFORMED
- ********/
+import androidx.compose.runtime.Composable
+
+@Composable
+fun testInline_M1_W_Return_Func(condition: Boolean) {
+ A()
+ M3 {
+ A()
+ if (condition) {
+ return@M3
+ }
+ A()
+ }
+ M3 {
+ A()
+ if (condition) {
+ return@M3
+ }
+ A()
+ }
+ A()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun testInline_M1_W_Return_Func(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_Return_M3_CM3_Return_M3\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_Return_M3_CM3_Return_M3\133useFir = true\135.txt"
index 928df19..f8ec1a1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_Return_M3_CM3_Return_M3\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_CM3_Return_M3_CM3_Return_M3\133useFir = true\135.txt"
@@ -1,30 +1,32 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun testInline_M1_W_Return_Func(condition: Boolean) {
- A()
- M3 {
- A()
- if (condition) {
- return@M3
- }
- A()
- }
- M3 {
- A()
- if (condition) {
- return@M3
- }
- A()
- }
- A()
- }
-
-
-/********
- * TRANSFORMED
- ********/
+import androidx.compose.runtime.Composable
+
+@Composable
+fun testInline_M1_W_Return_Func(condition: Boolean) {
+ A()
+ M3 {
+ A()
+ if (condition) {
+ return@M3
+ }
+ A()
+ }
+ M3 {
+ A()
+ if (condition) {
+ return@M3
+ }
+ A()
+ }
+ A()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun testInline_M1_W_Return_Func(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_Lambda\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_Lambda\133useFir = false\135.txt"
index d7fe3fe..b70c5c4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_Lambda\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_Lambda\133useFir = false\135.txt"
@@ -1,17 +1,20 @@
+//
+// Source
+// ------------------------------------------
- fun Test(condition: Boolean) {
- T {
- compose {
- M1 {
- if (condition) return@compose
- }
- }
- }
+fun Test(condition: Boolean) {
+ T {
+ compose {
+ M1 {
+ if (condition) return@compose
}
-
-/********
- * TRANSFORMED
- ********/
+ }
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
fun Test(condition: Boolean) {
T {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_Lambda\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_Lambda\133useFir = true\135.txt"
index d7fe3fe..b70c5c4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_Lambda\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_Lambda\133useFir = true\135.txt"
@@ -1,17 +1,20 @@
+//
+// Source
+// ------------------------------------------
- fun Test(condition: Boolean) {
- T {
- compose {
- M1 {
- if (condition) return@compose
- }
- }
- }
+fun Test(condition: Boolean) {
+ T {
+ compose {
+ M1 {
+ if (condition) return@compose
}
-
-/********
- * TRANSFORMED
- ********/
+ }
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
fun Test(condition: Boolean) {
T {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M1_W_Return_Func\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M1_W_Return_Func\133useFir = false\135.txt"
index 080194d..3e4b12f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M1_W_Return_Func\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M1_W_Return_Func\133useFir = false\135.txt"
@@ -1,27 +1,29 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun testInline_M1_W_Return_Func(condition: Boolean) {
- A()
- M1 {
- A()
- while(true) {
- A()
- if (condition) {
- return
- }
- A()
- }
- A()
- }
- A()
+import androidx.compose.runtime.Composable
+
+@Composable
+fun testInline_M1_W_Return_Func(condition: Boolean) {
+ A()
+ M1 {
+ A()
+ while(true) {
+ A()
+ if (condition) {
+ return
}
-
-
-/********
- * TRANSFORMED
- ********/
+ A()
+ }
+ A()
+ }
+ A()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun testInline_M1_W_Return_Func(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M1_W_Return_Func\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M1_W_Return_Func\133useFir = true\135.txt"
index 080194d..3e4b12f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M1_W_Return_Func\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M1_W_Return_Func\133useFir = true\135.txt"
@@ -1,27 +1,29 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun testInline_M1_W_Return_Func(condition: Boolean) {
- A()
- M1 {
- A()
- while(true) {
- A()
- if (condition) {
- return
- }
- A()
- }
- A()
- }
- A()
+import androidx.compose.runtime.Composable
+
+@Composable
+fun testInline_M1_W_Return_Func(condition: Boolean) {
+ A()
+ M1 {
+ A()
+ while(true) {
+ A()
+ if (condition) {
+ return
}
-
-
-/********
- * TRANSFORMED
- ********/
+ A()
+ }
+ A()
+ }
+ A()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun testInline_M1_W_Return_Func(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M3_M1_Return_M1\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M3_M1_Return_M1\133useFir = false\135.txt"
index 0fdc8d7..f6b0425 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M3_M1_Return_M1\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M3_M1_Return_M1\133useFir = false\135.txt"
@@ -1,25 +1,27 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun Test_M3_M1_Return_M1(condition: Boolean) {
- A()
- M3 {
- A()
- M1 {
- if (condition) {
- return@M1
- }
- }
- A()
- }
- A()
+import androidx.compose.runtime.Composable
+
+@Composable
+fun Test_M3_M1_Return_M1(condition: Boolean) {
+ A()
+ M3 {
+ A()
+ M1 {
+ if (condition) {
+ return@M1
}
-
-
-/********
- * TRANSFORMED
- ********/
+ }
+ A()
+ }
+ A()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test_M3_M1_Return_M1(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M3_M1_Return_M1\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M3_M1_Return_M1\133useFir = true\135.txt"
index 0fdc8d7..f6b0425 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M3_M1_Return_M1\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M3_M1_Return_M1\133useFir = true\135.txt"
@@ -1,25 +1,27 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun Test_M3_M1_Return_M1(condition: Boolean) {
- A()
- M3 {
- A()
- M1 {
- if (condition) {
- return@M1
- }
- }
- A()
- }
- A()
+import androidx.compose.runtime.Composable
+
+@Composable
+fun Test_M3_M1_Return_M1(condition: Boolean) {
+ A()
+ M3 {
+ A()
+ M1 {
+ if (condition) {
+ return@M1
}
-
-
-/********
- * TRANSFORMED
- ********/
+ }
+ A()
+ }
+ A()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test_M3_M1_Return_M1(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M3_M1_Return_M3\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M3_M1_Return_M3\133useFir = false\135.txt"
index e951106..a2422c0 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M3_M1_Return_M3\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M3_M1_Return_M3\133useFir = false\135.txt"
@@ -1,25 +1,27 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun Test_M3_M1_Return_M3(condition: Boolean) {
- A()
- M3 {
- A()
- M1 {
- if (condition) {
- return@M3
- }
- }
- A()
- }
- A()
+import androidx.compose.runtime.Composable
+
+@Composable
+fun Test_M3_M1_Return_M3(condition: Boolean) {
+ A()
+ M3 {
+ A()
+ M1 {
+ if (condition) {
+ return@M3
}
-
-
-/********
- * TRANSFORMED
- ********/
+ }
+ A()
+ }
+ A()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test_M3_M1_Return_M3(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M3_M1_Return_M3\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M3_M1_Return_M3\133useFir = true\135.txt"
index e951106..a2422c0 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M3_M1_Return_M3\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testInline_M3_M1_Return_M3\133useFir = true\135.txt"
@@ -1,25 +1,27 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun Test_M3_M1_Return_M3(condition: Boolean) {
- A()
- M3 {
- A()
- M1 {
- if (condition) {
- return@M3
- }
- }
- A()
- }
- A()
+import androidx.compose.runtime.Composable
+
+@Composable
+fun Test_M3_M1_Return_M3(condition: Boolean) {
+ A()
+ M3 {
+ A()
+ M1 {
+ if (condition) {
+ return@M3
}
-
-
-/********
- * TRANSFORMED
- ********/
+ }
+ A()
+ }
+ A()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test_M3_M1_Return_M3(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAsAValue\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAsAValue\133useFir = false\135.txt"
index 2a6ebca..b83cafc 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAsAValue\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAsAValue\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -10,9 +14,9 @@
P(y)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAsAValue\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAsAValue\133useFir = true\135.txt"
index 2a6ebca..b83cafc 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAsAValue\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAsAValue\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -10,9 +14,9 @@
P(y)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevelAndCallsAfter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevelAndCallsAfter\133useFir = false\135.txt"
index 05178a9..572fe15 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevelAndCallsAfter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevelAndCallsAfter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -12,9 +16,9 @@
A(b)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevelAndCallsAfter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevelAndCallsAfter\133useFir = true\135.txt"
index 05178a9..572fe15 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevelAndCallsAfter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevelAndCallsAfter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -12,9 +16,9 @@
A(b)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevelAndCallsBefore\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevelAndCallsBefore\133useFir = false\135.txt"
index 70e157f..7df902a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevelAndCallsBefore\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevelAndCallsBefore\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -12,9 +16,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevelAndCallsBefore\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevelAndCallsBefore\133useFir = true\135.txt"
index 70e157f..7df902a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevelAndCallsBefore\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevelAndCallsBefore\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -12,9 +16,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevel\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevel\133useFir = false\135.txt"
index e507af7..849779e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevel\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevel\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevel\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevel\133useFir = true\135.txt"
index e507af7..849779e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevel\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyAtRootLevel\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIfAndCallsAfter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIfAndCallsAfter\133useFir = false\135.txt"
index 369a252..c1aac5b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIfAndCallsAfter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIfAndCallsAfter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIfAndCallsAfter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIfAndCallsAfter\133useFir = true\135.txt"
index 369a252..c1aac5b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIfAndCallsAfter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIfAndCallsAfter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIfAndCallsBefore\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIfAndCallsBefore\133useFir = false\135.txt"
index 3edfa3b..ed1aac1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIfAndCallsBefore\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIfAndCallsBefore\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIfAndCallsBefore\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIfAndCallsBefore\133useFir = true\135.txt"
index 3edfa3b..ed1aac1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIfAndCallsBefore\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIfAndCallsBefore\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIf\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIf\133useFir = false\135.txt"
index 67d3344..9e54adf 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIf\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIf\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIf\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIf\133useFir = true\135.txt"
index 67d3344..9e54adf 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIf\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyInIf\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyWithComposableValue\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyWithComposableValue\133useFir = false\135.txt"
index 53171e8..7cf8568 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyWithComposableValue\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyWithComposableValue\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyWithComposableValue\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyWithComposableValue\133useFir = true\135.txt"
index 53171e8..7cf8568 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyWithComposableValue\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyWithComposableValue\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyWithLotsOfValues\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyWithLotsOfValues\133useFir = false\135.txt"
index b2bbeef..ffe5ab1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyWithLotsOfValues\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyWithLotsOfValues\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyWithLotsOfValues\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyWithLotsOfValues\133useFir = true\135.txt"
index b2bbeef..ffe5ab1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyWithLotsOfValues\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testKeyWithLotsOfValues\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLetWithComposableCalls\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLetWithComposableCalls\133useFir = false\135.txt"
index 6adf0e8..3e107a8 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLetWithComposableCalls\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLetWithComposableCalls\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -15,9 +19,9 @@
A(c)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(x: Int?, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLetWithComposableCalls\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLetWithComposableCalls\133useFir = true\135.txt"
index 6adf0e8..3e107a8 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLetWithComposableCalls\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLetWithComposableCalls\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -15,9 +19,9 @@
A(c)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(x: Int?, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLetWithoutComposableCalls\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLetWithoutComposableCalls\133useFir = false\135.txt"
index 0c58040..7f9961f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLetWithoutComposableCalls\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLetWithoutComposableCalls\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -15,9 +19,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(x: Int?, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLetWithoutComposableCalls\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLetWithoutComposableCalls\133useFir = true\135.txt"
index 0c58040..7f9961f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLetWithoutComposableCalls\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLetWithoutComposableCalls\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -15,9 +19,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(x: Int?, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLoopWithBreak\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLoopWithBreak\133useFir = false\135.txt"
index 57965ea..46ab04c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLoopWithBreak\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLoopWithBreak\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -19,9 +23,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLoopWithBreak\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLoopWithBreak\133useFir = true\135.txt"
index 57965ea..46ab04c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLoopWithBreak\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLoopWithBreak\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -19,9 +23,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLoopWithReturn\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLoopWithReturn\133useFir = false\135.txt"
index 11ca176..1d82d7b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLoopWithReturn\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLoopWithReturn\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -15,9 +19,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLoopWithReturn\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLoopWithReturn\133useFir = true\135.txt"
index 11ca176..1d82d7b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLoopWithReturn\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testLoopWithReturn\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -15,9 +19,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testMultipleNestedInlines\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testMultipleNestedInlines\133useFir = false\135.txt"
index f6e99ea..b048ac1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testMultipleNestedInlines\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testMultipleNestedInlines\133useFir = false\135.txt"
@@ -1,21 +1,24 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun AttemptedToRealizeGroupTwice() {
- Wrapper {
- repeat(1) {
- repeat(1) {
- Leaf(0)
- }
- Leaf(0)
- }
- }
+@Composable
+fun AttemptedToRealizeGroupTwice() {
+ Wrapper {
+ repeat(1) {
+ repeat(1) {
+ Leaf(0)
}
-
-/********
- * TRANSFORMED
- ********/
+ Leaf(0)
+ }
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun AttemptedToRealizeGroupTwice(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testMultipleNestedInlines\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testMultipleNestedInlines\133useFir = true\135.txt"
index f6e99ea..b048ac1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testMultipleNestedInlines\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testMultipleNestedInlines\133useFir = true\135.txt"
@@ -1,21 +1,24 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun AttemptedToRealizeGroupTwice() {
- Wrapper {
- repeat(1) {
- repeat(1) {
- Leaf(0)
- }
- Leaf(0)
- }
- }
+@Composable
+fun AttemptedToRealizeGroupTwice() {
+ Wrapper {
+ repeat(1) {
+ repeat(1) {
+ Leaf(0)
}
-
-/********
- * TRANSFORMED
- ********/
+ Leaf(0)
+ }
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun AttemptedToRealizeGroupTwice(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testNestedLoopsAndBreak\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testNestedLoopsAndBreak\133useFir = false\135.txt"
index d4ef658..728f598 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testNestedLoopsAndBreak\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testNestedLoopsAndBreak\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -28,9 +32,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testNestedLoopsAndBreak\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testNestedLoopsAndBreak\133useFir = true\135.txt"
index 36dec1d..9f4feab 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testNestedLoopsAndBreak\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testNestedLoopsAndBreak\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -28,9 +32,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testNestedLoops\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testNestedLoops\133useFir = false\135.txt"
index a5567af..485b249 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testNestedLoops\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testNestedLoops\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -15,9 +19,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testNestedLoops\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testNestedLoops\133useFir = true\135.txt"
index a5567af..485b249 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testNestedLoops\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testNestedLoops\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -15,9 +19,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testOR\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testOR\133useFir = false\135.txt"
index 0050551..0cdc751 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testOR\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testOR\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -10,9 +14,9 @@
B() || B()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testOR\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testOR\133useFir = true\135.txt"
index 0050551..0cdc751 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testOR\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testOR\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -10,9 +14,9 @@
B() || B()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testOrderingOfPushedEndCallsWithEarlyReturns\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testOrderingOfPushedEndCallsWithEarlyReturns\133useFir = false\135.txt"
index 2def3f8..d4f4620 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testOrderingOfPushedEndCallsWithEarlyReturns\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testOrderingOfPushedEndCallsWithEarlyReturns\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -22,9 +26,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(items: Iterator<Int>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testOrderingOfPushedEndCallsWithEarlyReturns\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testOrderingOfPushedEndCallsWithEarlyReturns\133useFir = true\135.txt"
index 2def3f8..d4f4620 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testOrderingOfPushedEndCallsWithEarlyReturns\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testOrderingOfPushedEndCallsWithEarlyReturns\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -22,9 +26,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(items: Iterator<Int>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testParameterOrderInformation\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testParameterOrderInformation\133useFir = false\135.txt"
index fe25b0e..094dfc9 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testParameterOrderInformation\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testParameterOrderInformation\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -149,9 +153,9 @@
used(p3)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test01(p0: Int, p1: Int, p2: Int, p3: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testParameterOrderInformation\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testParameterOrderInformation\133useFir = true\135.txt"
index fe25b0e..094dfc9 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testParameterOrderInformation\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testParameterOrderInformation\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -149,9 +153,9 @@
used(p3)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test01(p0: Int, p1: Int, p2: Int, p3: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReadOnlyComposableWithEarlyReturn\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReadOnlyComposableWithEarlyReturn\133useFir = false\135.txt"
index b62e565..0eba39f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReadOnlyComposableWithEarlyReturn\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReadOnlyComposableWithEarlyReturn\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -11,9 +15,9 @@
return 1
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@ReadOnlyComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReadOnlyComposableWithEarlyReturn\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReadOnlyComposableWithEarlyReturn\133useFir = true\135.txt"
index b62e565..0eba39f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReadOnlyComposableWithEarlyReturn\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReadOnlyComposableWithEarlyReturn\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -11,9 +15,9 @@
return 1
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@ReadOnlyComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReadOnlyInlineValSourceLocations\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReadOnlyInlineValSourceLocations\133useFir = false\135.txt"
index 9f4adaa..18fb803 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReadOnlyInlineValSourceLocations\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReadOnlyInlineValSourceLocations\133useFir = false\135.txt"
@@ -1,42 +1,45 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
- import androidx.compose.runtime.ReadOnlyComposable
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.ReadOnlyComposable
- class CurrentHolder {
- inline val current: Int
- @ReadOnlyComposable
- @Composable
- get() = 0
- }
+class CurrentHolder {
+ inline val current: Int
+ @ReadOnlyComposable
+ @Composable
+ get() = 0
+}
- class HolderHolder {
- private val _currentHolder = CurrentHolder()
- val current: Int
- @ReadOnlyComposable
- @Composable
- get() = _currentHolder.current
- }
+class HolderHolder {
+ private val _currentHolder = CurrentHolder()
+ val current: Int
+ @ReadOnlyComposable
+ @Composable
+ get() = _currentHolder.current
+}
- val holderHolder = HolderHolder()
+val holderHolder = HolderHolder()
- @Composable
- @ReadOnlyComposable
- fun calculateSomething(): Int {
- return 0;
- }
+@Composable
+@ReadOnlyComposable
+fun calculateSomething(): Int {
+ return 0;
+}
- @Composable
- fun Test() {
- val c = holderHolder.current
- val cl = calculateSomething()
- Layout {
- Text("$c $cl")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ val c = holderHolder.current
+ val cl = calculateSomething()
+ Layout {
+ Text("$c $cl")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class CurrentHolder {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReadOnlyInlineValSourceLocations\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReadOnlyInlineValSourceLocations\133useFir = true\135.txt"
index 9f4adaa..18fb803 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReadOnlyInlineValSourceLocations\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReadOnlyInlineValSourceLocations\133useFir = true\135.txt"
@@ -1,42 +1,45 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
- import androidx.compose.runtime.ReadOnlyComposable
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.ReadOnlyComposable
- class CurrentHolder {
- inline val current: Int
- @ReadOnlyComposable
- @Composable
- get() = 0
- }
+class CurrentHolder {
+ inline val current: Int
+ @ReadOnlyComposable
+ @Composable
+ get() = 0
+}
- class HolderHolder {
- private val _currentHolder = CurrentHolder()
- val current: Int
- @ReadOnlyComposable
- @Composable
- get() = _currentHolder.current
- }
+class HolderHolder {
+ private val _currentHolder = CurrentHolder()
+ val current: Int
+ @ReadOnlyComposable
+ @Composable
+ get() = _currentHolder.current
+}
- val holderHolder = HolderHolder()
+val holderHolder = HolderHolder()
- @Composable
- @ReadOnlyComposable
- fun calculateSomething(): Int {
- return 0;
- }
+@Composable
+@ReadOnlyComposable
+fun calculateSomething(): Int {
+ return 0;
+}
- @Composable
- fun Test() {
- val c = holderHolder.current
- val cl = calculateSomething()
- Layout {
- Text("$c $cl")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ val c = holderHolder.current
+ val cl = calculateSomething()
+ Layout {
+ Text("$c $cl")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class CurrentHolder {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRememberInConditionalCallArgument\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRememberInConditionalCallArgument\133useFir = false\135.txt"
index 807066e..6320122 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRememberInConditionalCallArgument\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRememberInConditionalCallArgument\133useFir = false\135.txt"
@@ -1,20 +1,23 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- private fun Test(param: String?) {
- Test(
- if (param == null) {
- remember { "" }
- } else {
- null
- },
- )
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+private fun Test(param: String?) {
+ Test(
+ if (param == null) {
+ remember { "" }
+ } else {
+ null
+ },
+ )
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
private fun Test(param: String?, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRememberInConditionalCallArgument\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRememberInConditionalCallArgument\133useFir = true\135.txt"
index 807066e..6320122 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRememberInConditionalCallArgument\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRememberInConditionalCallArgument\133useFir = true\135.txt"
@@ -1,20 +1,23 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- private fun Test(param: String?) {
- Test(
- if (param == null) {
- remember { "" }
- } else {
- null
- },
- )
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+private fun Test(param: String?) {
+ Test(
+ if (param == null) {
+ remember { "" }
+ } else {
+ null
+ },
+ )
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
private fun Test(param: String?, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRememberInNestedConditionalCallArgument\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRememberInNestedConditionalCallArgument\133useFir = false\135.txt"
index 81059b1..18d298e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRememberInNestedConditionalCallArgument\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRememberInNestedConditionalCallArgument\133useFir = false\135.txt"
@@ -1,26 +1,29 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- private fun Test(param: String?): String? {
- return Test(
- if (param == null) {
- Test(
- if (param == null) {
- remember { "" }
- } else {
- null
- }
- )
- } else {
- null
- },
- )
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+private fun Test(param: String?): String? {
+ return Test(
+ if (param == null) {
+ Test(
+ if (param == null) {
+ remember { "" }
+ } else {
+ null
+ }
+ )
+ } else {
+ null
+ },
+ )
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
private fun Test(param: String?, %composer: Composer?, %changed: Int): String? {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRememberInNestedConditionalCallArgument\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRememberInNestedConditionalCallArgument\133useFir = true\135.txt"
index 81059b1..18d298e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRememberInNestedConditionalCallArgument\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRememberInNestedConditionalCallArgument\133useFir = true\135.txt"
@@ -1,26 +1,29 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- private fun Test(param: String?): String? {
- return Test(
- if (param == null) {
- Test(
- if (param == null) {
- remember { "" }
- } else {
- null
- }
- )
- } else {
- null
- },
- )
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+private fun Test(param: String?): String? {
+ return Test(
+ if (param == null) {
+ Test(
+ if (param == null) {
+ remember { "" }
+ } else {
+ null
+ }
+ )
+ } else {
+ null
+ },
+ )
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
private fun Test(param: String?, %composer: Composer?, %changed: Int): String? {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRepeatedCallsToEffects\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRepeatedCallsToEffects\133useFir = false\135.txt"
index d04e899..e3f76dc 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRepeatedCallsToEffects\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRepeatedCallsToEffects\133useFir = false\135.txt"
@@ -1,19 +1,22 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test() {
- Wrap {
- repeat(number) {
- effects[it] = effect { 0 }
- }
- outside = effect { "0" }
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ Wrap {
+ repeat(number) {
+ effects[it] = effect { 0 }
+ }
+ outside = effect { "0" }
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRepeatedCallsToEffects\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRepeatedCallsToEffects\133useFir = true\135.txt"
index d04e899..e3f76dc 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRepeatedCallsToEffects\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testRepeatedCallsToEffects\133useFir = true\135.txt"
@@ -1,19 +1,22 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test() {
- Wrap {
- repeat(number) {
- effects[it] = effect { 0 }
- }
- outside = effect { "0" }
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ Wrap {
+ repeat(number) {
+ effects[it] = effect { 0 }
+ }
+ outside = effect { "0" }
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnCallValue\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnCallValue\133useFir = false\135.txt"
index 848e3f3..5fe2a78 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnCallValue\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnCallValue\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -12,9 +16,9 @@
return R()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnCallValue\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnCallValue\133useFir = true\135.txt"
index 848e3f3..5fe2a78 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnCallValue\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnCallValue\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -12,9 +16,9 @@
return R()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnFromLoop\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnFromLoop\133useFir = false\135.txt"
index 8af4e19..5219109 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnFromLoop\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnFromLoop\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -22,9 +26,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnFromLoop\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnFromLoop\133useFir = true\135.txt"
index 8af4e19..5219109 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnFromLoop\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnFromLoop\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -22,9 +26,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnInlinedExpressionWithCall\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnInlinedExpressionWithCall\133useFir = false\135.txt"
index 51ff5c8..4baf241 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnInlinedExpressionWithCall\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnInlinedExpressionWithCall\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Int, %composer: Composer?, %changed: Int): Int {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnInlinedExpressionWithCall\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnInlinedExpressionWithCall\133useFir = true\135.txt"
index 51ff5c8..4baf241 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnInlinedExpressionWithCall\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testReturnInlinedExpressionWithCall\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Int, %composer: Composer?, %changed: Int): Int {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSafeCall\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSafeCall\133useFir = false\135.txt"
index 6edbecb..03e0ce1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSafeCall\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSafeCall\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -12,9 +16,9 @@
x?.A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSafeCall\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSafeCall\133useFir = true\135.txt"
index 6edbecb..03e0ce1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSafeCall\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSafeCall\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -12,9 +16,9 @@
x?.A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceInformationWithPackageName\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceInformationWithPackageName\133useFir = false\135.txt"
index 39301f0..805e55c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceInformationWithPackageName\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceInformationWithPackageName\133useFir = false\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- package androidx.compose.runtime.tests
+package androidx.compose.runtime.tests
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test(value: LocalInlineClass) {
- used(value)
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(value: LocalInlineClass) {
+ used(value)
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(value: LocalInlineClass, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceInformationWithPackageName\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceInformationWithPackageName\133useFir = true\135.txt"
index 39301f0..805e55c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceInformationWithPackageName\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceInformationWithPackageName\133useFir = true\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- package androidx.compose.runtime.tests
+package androidx.compose.runtime.tests
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test(value: LocalInlineClass) {
- used(value)
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(value: LocalInlineClass) {
+ used(value)
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(value: LocalInlineClass, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceLineInformationForNormalInline\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceLineInformationForNormalInline\133useFir = false\135.txt"
index 6a06c3f..7cea7c6 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceLineInformationForNormalInline\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceLineInformationForNormalInline\133useFir = false\135.txt"
@@ -1,22 +1,25 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test() {
- W {
- IW {
- T(2)
- repeat(3) {
- T(3)
- }
- T(4)
- }
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ W {
+ IW {
+ T(2)
+ repeat(3) {
+ T(3)
+ }
+ T(4)
+ }
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceLineInformationForNormalInline\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceLineInformationForNormalInline\133useFir = true\135.txt"
index 6a06c3f..7cea7c6 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceLineInformationForNormalInline\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceLineInformationForNormalInline\133useFir = true\135.txt"
@@ -1,22 +1,25 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test() {
- W {
- IW {
- T(2)
- repeat(3) {
- T(3)
- }
- T(4)
- }
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ W {
+ IW {
+ T(2)
+ repeat(3) {
+ T(3)
+ }
+ T(4)
+ }
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceLocationOfCapturingComposableLambdas\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceLocationOfCapturingComposableLambdas\133useFir = false\135.txt"
index 810f924..a43f469 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceLocationOfCapturingComposableLambdas\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceLocationOfCapturingComposableLambdas\133useFir = false\135.txt"
@@ -1,27 +1,30 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- class SomeClass {
- var a = "Test"
- fun onCreate() {
- setContent {
- B(a)
- B(a)
- }
- }
- }
+class SomeClass {
+ var a = "Test"
+ fun onCreate() {
+ setContent {
+ B(a)
+ B(a)
+ }
+ }
+}
- fun Test() {
- var a = "Test"
- setContent {
- B(a)
- B(a)
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+fun Test() {
+ var a = "Test"
+ setContent {
+ B(a)
+ B(a)
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class SomeClass {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceLocationOfCapturingComposableLambdas\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceLocationOfCapturingComposableLambdas\133useFir = true\135.txt"
index 810f924..a43f469 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceLocationOfCapturingComposableLambdas\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceLocationOfCapturingComposableLambdas\133useFir = true\135.txt"
@@ -1,27 +1,30 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- class SomeClass {
- var a = "Test"
- fun onCreate() {
- setContent {
- B(a)
- B(a)
- }
- }
- }
+class SomeClass {
+ var a = "Test"
+ fun onCreate() {
+ setContent {
+ B(a)
+ B(a)
+ }
+ }
+}
- fun Test() {
- var a = "Test"
- setContent {
- B(a)
- B(a)
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+fun Test() {
+ var a = "Test"
+ setContent {
+ B(a)
+ B(a)
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class SomeClass {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceOffsetOrderForParameterExpressions\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceOffsetOrderForParameterExpressions\133useFir = false\135.txt"
index b8c0397..8ce2a7d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceOffsetOrderForParameterExpressions\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceOffsetOrderForParameterExpressions\133useFir = false\135.txt"
@@ -1,15 +1,18 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test() {
- A(b(), c(), d())
- B()
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ A(b(), c(), d())
+ B()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceOffsetOrderForParameterExpressions\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceOffsetOrderForParameterExpressions\133useFir = true\135.txt"
index b8c0397..8ce2a7d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceOffsetOrderForParameterExpressions\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testSourceOffsetOrderForParameterExpressions\133useFir = true\135.txt"
@@ -1,15 +1,18 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test() {
- A(b(), c(), d())
- B()
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ A(b(), c(), d())
+ B()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testTheThing\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testTheThing\133useFir = false\135.txt"
index a859c70..6627f87 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testTheThing\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testTheThing\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -46,9 +50,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testTheThing\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testTheThing\133useFir = true\135.txt"
index a859c70..6627f87 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testTheThing\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testTheThing\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -46,9 +50,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable\133useFir = false\135.txt"
index 4f019a1..cac30e4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable\133useFir = false\135.txt"
@@ -1,19 +1,21 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun Test(condition: Boolean) {
- Text("Some text")
- Identity {
- if (condition) return@Test
- }
- Text("Some more text")
- }
-
-
-/********
- * TRANSFORMED
- ********/
+import androidx.compose.runtime.Composable
+
+@Composable
+fun Test(condition: Boolean) {
+ Text("Some text")
+ Identity {
+ if (condition) return@Test
+ }
+ Text("Some more text")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable\133useFir = true\135.txt"
index 4f019a1..cac30e4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable\133useFir = true\135.txt"
@@ -1,19 +1,21 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun Test(condition: Boolean) {
- Text("Some text")
- Identity {
- if (condition) return@Test
- }
- Text("Some more text")
- }
-
-
-/********
- * TRANSFORMED
- ********/
+import androidx.compose.runtime.Composable
+
+@Composable
+fun Test(condition: Boolean) {
+ Text("Some text")
+ Identity {
+ if (condition) return@Test
+ }
+ Text("Some more text")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable_M1\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable_M1\133useFir = false\135.txt"
index bf7e026..30c84a6 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable_M1\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable_M1\133useFir = false\135.txt"
@@ -1,21 +1,23 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun Test(condition: Boolean) {
- Text("Some text")
- M1 {
- Identity {
- if (condition) return@Test
- }
- }
- Text("Some more text")
- }
-
-
-/********
- * TRANSFORMED
- ********/
+import androidx.compose.runtime.Composable
+
+@Composable
+fun Test(condition: Boolean) {
+ Text("Some text")
+ M1 {
+ Identity {
+ if (condition) return@Test
+ }
+ }
+ Text("Some more text")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable_M1\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable_M1\133useFir = true\135.txt"
index bf7e026..30c84a6 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable_M1\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable_M1\133useFir = true\135.txt"
@@ -1,21 +1,23 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun Test(condition: Boolean) {
- Text("Some text")
- M1 {
- Identity {
- if (condition) return@Test
- }
- }
- Text("Some more text")
- }
-
-
-/********
- * TRANSFORMED
- ********/
+import androidx.compose.runtime.Composable
+
+@Composable
+fun Test(condition: Boolean) {
+ Text("Some text")
+ M1 {
+ Identity {
+ if (condition) return@Test
+ }
+ }
+ Text("Some more text")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable_M1_RM1\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable_M1_RM1\133useFir = false\135.txt"
index 74c9927..dbbe1f9 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable_M1_RM1\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable_M1_RM1\133useFir = false\135.txt"
@@ -1,21 +1,23 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun Test(condition: Boolean) {
- Text("Some text")
- M1 {
- Identity {
- if (condition) return@M1
- }
- }
- Text("Some more text")
- }
-
-
-/********
- * TRANSFORMED
- ********/
+import androidx.compose.runtime.Composable
+
+@Composable
+fun Test(condition: Boolean) {
+ Text("Some text")
+ M1 {
+ Identity {
+ if (condition) return@M1
+ }
+ }
+ Text("Some more text")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable_M1_RM1\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable_M1_RM1\133useFir = true\135.txt"
index 74c9927..dbbe1f9 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable_M1_RM1\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testVerifyEarlyExitFromNonComposable_M1_RM1\133useFir = true\135.txt"
@@ -1,21 +1,23 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun Test(condition: Boolean) {
- Text("Some text")
- M1 {
- Identity {
- if (condition) return@M1
- }
- }
- Text("Some more text")
- }
-
-
-/********
- * TRANSFORMED
- ********/
+import androidx.compose.runtime.Composable
+
+@Composable
+fun Test(condition: Boolean) {
+ Text("Some text")
+ M1 {
+ Identity {
+ if (condition) return@M1
+ }
+ }
+ Text("Some more text")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInConditionsAndCallAfter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInConditionsAndCallAfter\133useFir = false\135.txt"
index e9bd88a..29ae4df 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInConditionsAndCallAfter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInConditionsAndCallAfter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -17,9 +21,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInConditionsAndCallAfter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInConditionsAndCallAfter\133useFir = true\135.txt"
index e9bd88a..29ae4df 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInConditionsAndCallAfter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInConditionsAndCallAfter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -17,9 +21,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInConditions\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInConditions\133useFir = false\135.txt"
index 6c3225f..e1c01ea 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInConditions\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInConditions\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -17,9 +21,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInConditions\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInConditions\133useFir = true\135.txt"
index 6c3225f..e1c01ea 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInConditions\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInConditions\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -17,9 +21,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInSomeResults\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInSomeResults\133useFir = false\135.txt"
index 70fe8d8..26d3c7b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInSomeResults\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInSomeResults\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInSomeResults\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInSomeResults\133useFir = true\135.txt"
index 70fe8d8..26d3c7b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInSomeResults\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCallsInSomeResults\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCalls\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCalls\133useFir = false\135.txt"
index c994493..b5656eb 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCalls\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCalls\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCalls\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCalls\133useFir = true\135.txt"
index c994493..b5656eb 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCalls\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithCalls\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndCallsWithResult\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndCallsWithResult\133useFir = false\135.txt"
index a68f952..82c50da 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndCallsWithResult\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndCallsWithResult\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndCallsWithResult\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndCallsWithResult\133useFir = true\135.txt"
index a68f952..82c50da 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndCallsWithResult\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndCallsWithResult\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndCalls\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndCalls\133useFir = false\135.txt"
index a1af1a4..68d1ac4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndCalls\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndCalls\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndCalls\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndCalls\133useFir = true\135.txt"
index a1af1a4..68d1ac4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndCalls\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndCalls\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndNoCalls\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndNoCalls\133useFir = false\135.txt"
index edd7fc1..bf646b0 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndNoCalls\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndNoCalls\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndNoCalls\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndNoCalls\133useFir = true\135.txt"
index edd7fc1..bf646b0 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndNoCalls\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhenWithSubjectAndNoCalls\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIfAndCallAfter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIfAndCallAfter\133useFir = false\135.txt"
index fc7be63..5bd1970 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIfAndCallAfter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIfAndCallAfter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIfAndCallAfter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIfAndCallAfter\133useFir = true\135.txt"
index fc7be63..5bd1970 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIfAndCallAfter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIfAndCallAfter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIfAndCallBefore\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIfAndCallBefore\133useFir = false\135.txt"
index abf7387..3479e9e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIfAndCallBefore\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIfAndCallBefore\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIfAndCallBefore\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIfAndCallBefore\133useFir = true\135.txt"
index abf7387..3479e9e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIfAndCallBefore\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIfAndCallBefore\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIf\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIf\133useFir = false\135.txt"
index de9e502..6c9106d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIf\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIf\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIf\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIf\133useFir = true\135.txt"
index de9e502..6c9106d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIf\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileInsideIf\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInBodyAndCallsAfter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInBodyAndCallsAfter\133useFir = false\135.txt"
index 7c41aa3..b1bac84 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInBodyAndCallsAfter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInBodyAndCallsAfter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInBodyAndCallsAfter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInBodyAndCallsAfter\133useFir = true\135.txt"
index 7c41aa3..b1bac84 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInBodyAndCallsAfter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInBodyAndCallsAfter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInBody\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInBody\133useFir = false\135.txt"
index 8d63eea..403cb64 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInBody\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInBody\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInBody\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInBody\133useFir = true\135.txt"
index 8d63eea..403cb64 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInBody\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInBody\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndBodyAndCallsAfter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndBodyAndCallsAfter\133useFir = false\135.txt"
index 6fe41d8..4ac791b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndBodyAndCallsAfter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndBodyAndCallsAfter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -15,9 +19,9 @@
A(b)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndBodyAndCallsAfter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndBodyAndCallsAfter\133useFir = true\135.txt"
index 6fe41d8..4ac791b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndBodyAndCallsAfter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndBodyAndCallsAfter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -15,9 +19,9 @@
A(b)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndBody\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndBody\133useFir = false\135.txt"
index 2a0a851..697f903 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndBody\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndBody\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndBody\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndBody\133useFir = true\135.txt"
index 2a0a851..697f903 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndBody\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndBody\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndCallsAfter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndCallsAfter\133useFir = false\135.txt"
index 080c56f..6c93a81 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndCallsAfter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndCallsAfter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndCallsAfter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndCallsAfter\133useFir = true\135.txt"
index 080c56f..6c93a81 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndCallsAfter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInConditionAndCallsAfter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInCondition\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInCondition\133useFir = false\135.txt"
index 111e151..0c8889e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInCondition\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInCondition\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInCondition\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInCondition\133useFir = true\135.txt"
index 111e151..0c8889e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInCondition\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileLoopWithCallsInCondition\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallAfter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallAfter\133useFir = false\135.txt"
index 35e42ae3..40c58df 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallAfter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallAfter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallAfter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallAfter\133useFir = true\135.txt"
index 35e42ae3..40c58df 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallAfter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallAfter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallBeforeAndAfter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallBeforeAndAfter\133useFir = false\135.txt"
index 3ec9728..d91a877 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallBeforeAndAfter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallBeforeAndAfter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -15,9 +19,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallBeforeAndAfter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallBeforeAndAfter\133useFir = true\135.txt"
index 3ec9728..d91a877 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallBeforeAndAfter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallBeforeAndAfter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -15,9 +19,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallBefore\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallBefore\133useFir = false\135.txt"
index 07832fd..d181f75 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallBefore\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallBefore\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallBefore\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallBefore\133useFir = true\135.txt"
index 07832fd..d181f75 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallBefore\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKeyAndCallBefore\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -14,9 +18,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKey\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKey\133useFir = false\135.txt"
index f1d70ca..523348e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKey\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKey\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKey\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKey\133useFir = true\135.txt"
index f1d70ca..523348e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKey\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithKey\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -13,9 +17,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithTwoKeys\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithTwoKeys\133useFir = false\135.txt"
index 2787dfc..1fcd79d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithTwoKeys\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithTwoKeys\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithTwoKeys\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithTwoKeys\133useFir = true\135.txt"
index 2787dfc..1fcd79d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithTwoKeys\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testWhileWithTwoKeys\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -16,9 +20,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/test_CM1_CCM1_RetFun\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/test_CM1_CCM1_RetFun\133useFir = false\135.txt"
index ae68825..3c72d6c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/test_CM1_CCM1_RetFun\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/test_CM1_CCM1_RetFun\133useFir = false\135.txt"
@@ -1,27 +1,29 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun test_CM1_CCM1_RetFun(condition: Boolean) {
- Text("Root - before")
- M1 {
- Text("M1 - begin")
- if (condition) {
- Text("if - begin")
- M1 {
- Text("In CCM1")
- return@test_CM1_CCM1_RetFun
- }
- }
- Text("M1 - end")
- }
- Text("Root - end")
+import androidx.compose.runtime.Composable
+
+@Composable
+fun test_CM1_CCM1_RetFun(condition: Boolean) {
+ Text("Root - before")
+ M1 {
+ Text("M1 - begin")
+ if (condition) {
+ Text("if - begin")
+ M1 {
+ Text("In CCM1")
+ return@test_CM1_CCM1_RetFun
}
-
-
-/********
- * TRANSFORMED
- ********/
+ }
+ Text("M1 - end")
+ }
+ Text("Root - end")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun test_CM1_CCM1_RetFun(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/test_CM1_CCM1_RetFun\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/test_CM1_CCM1_RetFun\133useFir = true\135.txt"
index ae68825..3c72d6c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/test_CM1_CCM1_RetFun\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/test_CM1_CCM1_RetFun\133useFir = true\135.txt"
@@ -1,27 +1,29 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
-
- @Composable
- fun test_CM1_CCM1_RetFun(condition: Boolean) {
- Text("Root - before")
- M1 {
- Text("M1 - begin")
- if (condition) {
- Text("if - begin")
- M1 {
- Text("In CCM1")
- return@test_CM1_CCM1_RetFun
- }
- }
- Text("M1 - end")
- }
- Text("Root - end")
+import androidx.compose.runtime.Composable
+
+@Composable
+fun test_CM1_CCM1_RetFun(condition: Boolean) {
+ Text("Root - before")
+ M1 {
+ Text("M1 - begin")
+ if (condition) {
+ Text("if - begin")
+ M1 {
+ Text("In CCM1")
+ return@test_CM1_CCM1_RetFun
}
-
-
-/********
- * TRANSFORMED
- ********/
+ }
+ Text("M1 - end")
+ }
+ Text("Root - end")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun test_CM1_CCM1_RetFun(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/verifyEarlyExitFromMultiLevelNestedInlineFunction\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/verifyEarlyExitFromMultiLevelNestedInlineFunction\133useFir = false\135.txt"
index a259aab..f7afbd3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/verifyEarlyExitFromMultiLevelNestedInlineFunction\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/verifyEarlyExitFromMultiLevelNestedInlineFunction\133useFir = false\135.txt"
@@ -1,25 +1,28 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- @NonRestartableComposable
- fun Test(condition: Boolean) {
- Text("Before outer")
- InlineLinearA outer@{
- Text("Before inner")
- InlineLinearB {
- Text("Before return")
- if (condition) return@outer
- Text("After return")
- }
- Text("After inner")
- }
- Text("Before outer")
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+@NonRestartableComposable
+fun Test(condition: Boolean) {
+ Text("Before outer")
+ InlineLinearA outer@{
+ Text("Before inner")
+ InlineLinearB {
+ Text("Before return")
+ if (condition) return@outer
+ Text("After return")
+ }
+ Text("After inner")
+ }
+ Text("Before outer")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@NonRestartableComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/verifyEarlyExitFromMultiLevelNestedInlineFunction\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/verifyEarlyExitFromMultiLevelNestedInlineFunction\133useFir = true\135.txt"
index a259aab..f7afbd3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/verifyEarlyExitFromMultiLevelNestedInlineFunction\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/verifyEarlyExitFromMultiLevelNestedInlineFunction\133useFir = true\135.txt"
@@ -1,25 +1,28 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- @NonRestartableComposable
- fun Test(condition: Boolean) {
- Text("Before outer")
- InlineLinearA outer@{
- Text("Before inner")
- InlineLinearB {
- Text("Before return")
- if (condition) return@outer
- Text("After return")
- }
- Text("After inner")
- }
- Text("Before outer")
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+@NonRestartableComposable
+fun Test(condition: Boolean) {
+ Text("Before outer")
+ InlineLinearA outer@{
+ Text("Before inner")
+ InlineLinearB {
+ Text("Before return")
+ if (condition) return@outer
+ Text("After return")
+ }
+ Text("After inner")
+ }
+ Text("Before outer")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@NonRestartableComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/verifyEarlyExitFromNestedInlineFunction\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/verifyEarlyExitFromNestedInlineFunction\133useFir = false\135.txt"
index dad4f42..fdeba0f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/verifyEarlyExitFromNestedInlineFunction\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/verifyEarlyExitFromNestedInlineFunction\133useFir = false\135.txt"
@@ -1,25 +1,28 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- @NonRestartableComposable
- fun Test(condition: Boolean) {
- Text("Before outer")
- InlineLinearA {
- Text("Before inner")
- InlineLinearB inner@{
- Text("Before return")
- if (condition) return@inner
- Text("After return")
- }
- Text("After inner")
- }
- Text("Before outer")
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+@NonRestartableComposable
+fun Test(condition: Boolean) {
+ Text("Before outer")
+ InlineLinearA {
+ Text("Before inner")
+ InlineLinearB inner@{
+ Text("Before return")
+ if (condition) return@inner
+ Text("After return")
+ }
+ Text("After inner")
+ }
+ Text("Before outer")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@NonRestartableComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/verifyEarlyExitFromNestedInlineFunction\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/verifyEarlyExitFromNestedInlineFunction\133useFir = true\135.txt"
index dad4f42..fdeba0f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/verifyEarlyExitFromNestedInlineFunction\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/verifyEarlyExitFromNestedInlineFunction\133useFir = true\135.txt"
@@ -1,25 +1,28 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- @NonRestartableComposable
- fun Test(condition: Boolean) {
- Text("Before outer")
- InlineLinearA {
- Text("Before inner")
- InlineLinearB inner@{
- Text("Before return")
- if (condition) return@inner
- Text("After return")
- }
- Text("After inner")
- }
- Text("Before outer")
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+@NonRestartableComposable
+fun Test(condition: Boolean) {
+ Text("Before outer")
+ InlineLinearA {
+ Text("Before inner")
+ InlineLinearB inner@{
+ Text("Before return")
+ if (condition) return@inner
+ Text("After return")
+ }
+ Text("After inner")
+ }
+ Text("Before outer")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@NonRestartableComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testCallingAWrapperComposable\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testCallingAWrapperComposable\133useFir = false\135.txt"
index 117e764..5890127 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testCallingAWrapperComposable\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testCallingAWrapperComposable\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testCallingAWrapperComposable\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testCallingAWrapperComposable\133useFir = true\135.txt"
index 117e764..5890127 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testCallingAWrapperComposable\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testCallingAWrapperComposable\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testCallingAnInlineWrapperComposable\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testCallingAnInlineWrapperComposable\133useFir = false\135.txt"
index 60ca4802..98c6e05 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testCallingAnInlineWrapperComposable\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testCallingAnInlineWrapperComposable\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testCallingAnInlineWrapperComposable\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testCallingAnInlineWrapperComposable\133useFir = true\135.txt"
index 60ca4802..98c6e05 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testCallingAnInlineWrapperComposable\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testCallingAnInlineWrapperComposable\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testPrivateFunctionDoNotGetMarkedAsCall\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testPrivateFunctionDoNotGetMarkedAsCall\133useFir = false\135.txt"
index c812fe3..2a59759 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testPrivateFunctionDoNotGetMarkedAsCall\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testPrivateFunctionDoNotGetMarkedAsCall\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -10,9 +14,9 @@
A(b)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
private fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testPrivateFunctionDoNotGetMarkedAsCall\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testPrivateFunctionDoNotGetMarkedAsCall\133useFir = true\135.txt"
index c812fe3..2a59759 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testPrivateFunctionDoNotGetMarkedAsCall\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testPrivateFunctionDoNotGetMarkedAsCall\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -10,9 +14,9 @@
A(b)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
private fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testPublicFunctionAlwaysMarkedAsCall\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testPublicFunctionAlwaysMarkedAsCall\133useFir = false\135.txt"
index 4a98892..b15aaf87 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testPublicFunctionAlwaysMarkedAsCall\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testPublicFunctionAlwaysMarkedAsCall\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -10,9 +14,9 @@
A(b)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testPublicFunctionAlwaysMarkedAsCall\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testPublicFunctionAlwaysMarkedAsCall\133useFir = true\135.txt"
index 4a98892..b15aaf87 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testPublicFunctionAlwaysMarkedAsCall\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/testPublicFunctionAlwaysMarkedAsCall\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
@@ -10,9 +14,9 @@
A(b)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/verifyEarlyExitFromMultiLevelNestedInlineFunction\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/verifyEarlyExitFromMultiLevelNestedInlineFunction\133useFir = false\135.txt"
index 0cba79f..8637fa3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/verifyEarlyExitFromMultiLevelNestedInlineFunction\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/verifyEarlyExitFromMultiLevelNestedInlineFunction\133useFir = false\135.txt"
@@ -1,25 +1,28 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- @NonRestartableComposable
- fun Test(condition: Boolean) {
- Text("Before outer")
- InlineLinearA outer@{
- Text("Before inner")
- InlineLinearB {
- Text("Before return")
- if (condition) return@outer
- Text("After return")
- }
- Text("After inner")
- }
- Text("Before outer")
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+@NonRestartableComposable
+fun Test(condition: Boolean) {
+ Text("Before outer")
+ InlineLinearA outer@{
+ Text("Before inner")
+ InlineLinearB {
+ Text("Before return")
+ if (condition) return@outer
+ Text("After return")
+ }
+ Text("After inner")
+ }
+ Text("Before outer")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@NonRestartableComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/verifyEarlyExitFromMultiLevelNestedInlineFunction\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/verifyEarlyExitFromMultiLevelNestedInlineFunction\133useFir = true\135.txt"
index 0cba79f..8637fa3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/verifyEarlyExitFromMultiLevelNestedInlineFunction\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTestsNoSource/verifyEarlyExitFromMultiLevelNestedInlineFunction\133useFir = true\135.txt"
@@ -1,25 +1,28 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- @NonRestartableComposable
- fun Test(condition: Boolean) {
- Text("Before outer")
- InlineLinearA outer@{
- Text("Before inner")
- InlineLinearB {
- Text("Before return")
- if (condition) return@outer
- Text("After return")
- }
- Text("After inner")
- }
- Text("Before outer")
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+@NonRestartableComposable
+fun Test(condition: Boolean) {
+ Text("Before outer")
+ InlineLinearA outer@{
+ Text("Before inner")
+ InlineLinearB {
+ Text("Before return")
+ if (condition) return@outer
+ Text("After return")
+ }
+ Text("After inner")
+ }
+ Text("Before outer")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@NonRestartableComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test30Parameters\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test30Parameters\133useFir = false\135.txt"
index 3633453..411b3cf 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test30Parameters\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test30Parameters\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -69,9 +73,9 @@
used(a30)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(a00: Int, a01: Int, a02: Int, a03: Int, a04: Int, a05: Int, a06: Int, a07: Int, a08: Int, a09: Int, a10: Int, a11: Int, a12: Int, a13: Int, a14: Int, a15: Int, a16: Int, a17: Int, a18: Int, a19: Int, a20: Int, a21: Int, a22: Int, a23: Int, a24: Int, a25: Int, a26: Int, a27: Int, a28: Int, a29: Int, a30: Int, %composer: Composer?, %changed: Int, %changed1: Int, %changed2: Int, %changed3: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test30Parameters\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test30Parameters\133useFir = true\135.txt"
index 3633453..411b3cf 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test30Parameters\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test30Parameters\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -69,9 +73,9 @@
used(a30)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(a00: Int, a01: Int, a02: Int, a03: Int, a04: Int, a05: Int, a06: Int, a07: Int, a08: Int, a09: Int, a10: Int, a11: Int, a12: Int, a13: Int, a14: Int, a15: Int, a16: Int, a17: Int, a18: Int, a19: Int, a20: Int, a21: Int, a22: Int, a23: Int, a24: Int, a25: Int, a26: Int, a27: Int, a28: Int, a29: Int, a30: Int, %composer: Composer?, %changed: Int, %changed1: Int, %changed2: Int, %changed3: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test31ParametersWithSomeUnstable\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test31ParametersWithSomeUnstable\133useFir = false\135.txt"
index 424b3e7..09d27fa 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test31ParametersWithSomeUnstable\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test31ParametersWithSomeUnstable\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -71,9 +75,9 @@
used(a31)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(a00: Int, a01: Int, a02: Int, a03: Int, a04: Int, a05: Int, a06: Int, a07: Int, a08: Int, a09: Foo?, a10: Int, a11: Int, a12: Int, a13: Int, a14: Int, a15: Int, a16: Int, a17: Int, a18: Int, a19: Int, a20: Int, a21: Int, a22: Int, a23: Int, a24: Int, a25: Int, a26: Int, a27: Int, a28: Int, a29: Int, a30: Int, a31: Foo?, %composer: Composer?, %changed: Int, %changed1: Int, %changed2: Int, %changed3: Int, %default: Int, %default1: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test31ParametersWithSomeUnstable\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test31ParametersWithSomeUnstable\133useFir = true\135.txt"
index 424b3e7..09d27fa 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test31ParametersWithSomeUnstable\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test31ParametersWithSomeUnstable\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -71,9 +75,9 @@
used(a31)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(a00: Int, a01: Int, a02: Int, a03: Int, a04: Int, a05: Int, a06: Int, a07: Int, a08: Int, a09: Foo?, a10: Int, a11: Int, a12: Int, a13: Int, a14: Int, a15: Int, a16: Int, a17: Int, a18: Int, a19: Int, a20: Int, a21: Int, a22: Int, a23: Int, a24: Int, a25: Int, a26: Int, a27: Int, a28: Int, a29: Int, a30: Int, a31: Foo?, %composer: Composer?, %changed: Int, %changed1: Int, %changed2: Int, %changed3: Int, %default: Int, %default1: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test31Parameters\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test31Parameters\133useFir = false\135.txt"
index 571c834..a192882 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test31Parameters\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test31Parameters\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -71,9 +75,9 @@
used(a31)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(a00: Int, a01: Int, a02: Int, a03: Int, a04: Int, a05: Int, a06: Int, a07: Int, a08: Int, a09: Int, a10: Int, a11: Int, a12: Int, a13: Int, a14: Int, a15: Int, a16: Int, a17: Int, a18: Int, a19: Int, a20: Int, a21: Int, a22: Int, a23: Int, a24: Int, a25: Int, a26: Int, a27: Int, a28: Int, a29: Int, a30: Int, a31: Int, %composer: Composer?, %changed: Int, %changed1: Int, %changed2: Int, %changed3: Int, %default: Int, %default1: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test31Parameters\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test31Parameters\133useFir = true\135.txt"
index 571c834..a192882 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test31Parameters\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/test31Parameters\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -71,9 +75,9 @@
used(a31)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(a00: Int, a01: Int, a02: Int, a03: Int, a04: Int, a05: Int, a06: Int, a07: Int, a08: Int, a09: Int, a10: Int, a11: Int, a12: Int, a13: Int, a14: Int, a15: Int, a16: Int, a17: Int, a18: Int, a19: Int, a20: Int, a21: Int, a22: Int, a23: Int, a24: Int, a25: Int, a26: Int, a27: Int, a28: Int, a29: Int, a30: Int, a31: Int, %composer: Composer?, %changed: Int, %changed1: Int, %changed2: Int, %changed3: Int, %default: Int, %default1: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testComposableWithAndWithoutDefaultParams\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testComposableWithAndWithoutDefaultParams\133useFir = false\135.txt"
index 6feee2b..f8184ab 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testComposableWithAndWithoutDefaultParams\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testComposableWithAndWithoutDefaultParams\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -9,9 +13,9 @@
B(2)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testComposableWithAndWithoutDefaultParams\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testComposableWithAndWithoutDefaultParams\133useFir = true\135.txt"
index 6feee2b..f8184ab 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testComposableWithAndWithoutDefaultParams\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testComposableWithAndWithoutDefaultParams\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -9,9 +13,9 @@
B(2)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testDefaultArgsForFakeOverridesSuperMethods\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testDefaultArgsForFakeOverridesSuperMethods\133useFir = false\135.txt"
index 7b4dc87..4e64e5f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testDefaultArgsForFakeOverridesSuperMethods\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testDefaultArgsForFakeOverridesSuperMethods\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
open class Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testDefaultArgsForFakeOverridesSuperMethods\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testDefaultArgsForFakeOverridesSuperMethods\133useFir = true\135.txt"
index 7b4dc87..4e64e5f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testDefaultArgsForFakeOverridesSuperMethods\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testDefaultArgsForFakeOverridesSuperMethods\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
open class Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testDefaultArgsOnInvoke\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testDefaultArgsOnInvoke\133useFir = false\135.txt"
index 3f47974..842346e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testDefaultArgsOnInvoke\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testDefaultArgsOnInvoke\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -10,9 +14,9 @@
MultipleDefault()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testDefaultArgsOnInvoke\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testDefaultArgsOnInvoke\133useFir = true\135.txt"
index 3f47974..842346e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testDefaultArgsOnInvoke\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testDefaultArgsOnInvoke\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -10,9 +14,9 @@
MultipleDefault()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testEarlierParameterReferences\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testEarlierParameterReferences\133useFir = false\135.txt"
index c8c0cfe..c44fe5e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testEarlierParameterReferences\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testEarlierParameterReferences\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -8,9 +12,9 @@
print(b)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(a: Int, b: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testEarlierParameterReferences\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testEarlierParameterReferences\133useFir = true\135.txt"
index c8c0cfe..c44fe5e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testEarlierParameterReferences\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testEarlierParameterReferences\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -8,9 +12,9 @@
print(b)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(a: Int, b: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testInlineClassDefaultParameter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testInlineClassDefaultParameter\133useFir = false\135.txt"
index 9e64290..33764ff 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testInlineClassDefaultParameter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testInlineClassDefaultParameter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -11,9 +15,9 @@
Example()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(foo: Foo, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testInlineClassDefaultParameter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testInlineClassDefaultParameter\133useFir = true\135.txt"
index 9e64290..33764ff 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testInlineClassDefaultParameter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testInlineClassDefaultParameter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -11,9 +15,9 @@
Example()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(foo: Foo, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testNonStaticDefaultExpressions\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testNonStaticDefaultExpressions\133useFir = false\135.txt"
index 9a523e8..07dd552 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testNonStaticDefaultExpressions\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testNonStaticDefaultExpressions\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -7,9 +11,9 @@
used(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testNonStaticDefaultExpressions\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testNonStaticDefaultExpressions\133useFir = true\135.txt"
index 9a523e8..07dd552 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testNonStaticDefaultExpressions\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testNonStaticDefaultExpressions\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -7,9 +11,9 @@
used(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testParameterHoles\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testParameterHoles\133useFir = false\135.txt"
index 84cd7c7..32355cb 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testParameterHoles\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testParameterHoles\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -8,9 +12,9 @@
A(a = 0, c = 2)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testParameterHoles\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testParameterHoles\133useFir = true\135.txt"
index 84cd7c7..32355cb 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testParameterHoles\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testParameterHoles\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -8,9 +12,9 @@
A(a = 0, c = 2)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testUnusedDefaultComposableLambda\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testUnusedDefaultComposableLambda\133useFir = false\135.txt"
index f6280b4..5f59357 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testUnusedDefaultComposableLambda\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testUnusedDefaultComposableLambda\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -5,9 +9,9 @@
inline fun Bar(unused: @Composable () -> Unit = { }) {}
fun Foo() { Bar() }
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
fun Bar(unused: Function2<Composer, Int, Unit> = { %composer: Composer?, %changed: Int ->
sourceInformationMarkerStart(%composer, <>, "C:Test.kt")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testUnusedDefaultComposableLambda\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testUnusedDefaultComposableLambda\133useFir = true\135.txt"
index f6280b4..5f59357 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testUnusedDefaultComposableLambda\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.DefaultParamTransformTests/testUnusedDefaultComposableLambda\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
@@ -5,9 +9,9 @@
inline fun Bar(unused: @Composable () -> Unit = { }) {}
fun Foo() { Bar() }
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
fun Bar(unused: Function2<Composer, Int, Unit> = { %composer: Composer?, %changed: Int ->
sourceInformationMarkerStart(%composer, <>, "C:Test.kt")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test15Parameters\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test15Parameters\133useFir = false\135.txt"
index c0fb329..605a789 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test15Parameters\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test15Parameters\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -59,9 +63,9 @@
)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(a00: Int, a01: Int, a02: Int, a03: Int, a04: Int, a05: Int, a06: Int, a07: Int, a08: Int, a09: Int, a10: Int, a11: Int, a12: Int, a13: Int, a14: Int, %composer: Composer?, %changed: Int, %changed1: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test15Parameters\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test15Parameters\133useFir = true\135.txt"
index c0fb329..605a789 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test15Parameters\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test15Parameters\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -59,9 +63,9 @@
)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(a00: Int, a01: Int, a02: Int, a03: Int, a04: Int, a05: Int, a06: Int, a07: Int, a08: Int, a09: Int, a10: Int, a11: Int, a12: Int, a13: Int, a14: Int, %composer: Composer?, %changed: Int, %changed1: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test16Parameters\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test16Parameters\133useFir = false\135.txt"
index 773cf96..a380a18 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test16Parameters\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test16Parameters\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -62,9 +66,9 @@
)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(a00: Int, a01: Int, a02: Int, a03: Int, a04: Int, a05: Int, a06: Int, a07: Int, a08: Int, a09: Int, a10: Int, a11: Int, a12: Int, a13: Int, a14: Int, a15: Int, %composer: Composer?, %changed: Int, %changed1: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test16Parameters\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test16Parameters\133useFir = true\135.txt"
index 773cf96..a380a18 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test16Parameters\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test16Parameters\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -62,9 +66,9 @@
)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(a00: Int, a01: Int, a02: Int, a03: Int, a04: Int, a05: Int, a06: Int, a07: Int, a08: Int, a09: Int, a10: Int, a11: Int, a12: Int, a13: Int, a14: Int, a15: Int, %composer: Composer?, %changed: Int, %changed1: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testAnnotationChecker\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testAnnotationChecker\133useFir = false\135.txt"
index e5a9a34..9f90663 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testAnnotationChecker\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testAnnotationChecker\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -7,9 +11,9 @@
D {}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testAnnotationChecker\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testAnnotationChecker\133useFir = true\135.txt"
index e5a9a34..9f90663 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testAnnotationChecker\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testAnnotationChecker\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -7,9 +11,9 @@
D {}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testArrangement\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testArrangement\133useFir = false\135.txt"
index f2ae99d..5223ae4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testArrangement\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testArrangement\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -13,9 +17,9 @@
used(arrangement)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(arrangement: Vertical?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testArrangement\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testArrangement\133useFir = true\135.txt"
index f2ae99d..5223ae4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testArrangement\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testArrangement\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -13,9 +17,9 @@
used(arrangement)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(arrangement: Vertical?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testArrayDefaultArgWithState\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testArrayDefaultArgWithState\133useFir = false\135.txt"
index b5ce580..9ea5691 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testArrayDefaultArgWithState\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testArrayDefaultArgWithState\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -10,9 +14,9 @@
state.value
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun VarargComposable(state: MutableState<Int>, values: Array<out String>?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testArrayDefaultArgWithState\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testArrayDefaultArgWithState\133useFir = true\135.txt"
index b5ce580..9ea5691 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testArrayDefaultArgWithState\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testArrayDefaultArgWithState\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -10,9 +14,9 @@
state.value
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun VarargComposable(state: MutableState<Int>, values: Array<out String>?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testBasicText\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testBasicText\133useFir = false\135.txt"
index 27db91b..1bbe6b8 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testBasicText\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testBasicText\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -18,9 +22,9 @@
used(overflow)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun BasicText(style: TextStyle?, onTextLayout: Function1<TextLayoutResult, Unit>?, overflow: TextOverflow, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testBasicText\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testBasicText\133useFir = true\135.txt"
index 27db91b..1bbe6b8 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testBasicText\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testBasicText\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -18,9 +22,9 @@
used(overflow)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun BasicText(style: TextStyle?, onTextLayout: Function1<TextLayoutResult, Unit>?, overflow: TextOverflow, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableFunExprBody\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableFunExprBody\133useFir = false\135.txt"
index e562d91..67cf6c5 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableFunExprBody\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableFunExprBody\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -5,9 +9,9 @@
@Composable fun Test(x: Int) = A()
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Int, %composer: Composer?, %changed: Int): Int {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableFunExprBody\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableFunExprBody\133useFir = true\135.txt"
index e562d91..67cf6c5 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableFunExprBody\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableFunExprBody\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -5,9 +9,9 @@
@Composable fun Test(x: Int) = A()
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Int, %composer: Composer?, %changed: Int): Int {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaInvoke\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaInvoke\133useFir = false\135.txt"
index 535961b..c90f9f7 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaInvoke\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaInvoke\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -7,9 +11,9 @@
content.invoke()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaInvoke\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaInvoke\133useFir = true\135.txt"
index 535961b..c90f9f7 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaInvoke\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaInvoke\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -7,9 +11,9 @@
content.invoke()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithStableParamsAndReturnValue\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithStableParamsAndReturnValue\133useFir = false\135.txt"
index e762aab..03b3be2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithStableParamsAndReturnValue\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithStableParamsAndReturnValue\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -12,9 +16,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithStableParamsAndReturnValue\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithStableParamsAndReturnValue\133useFir = true\135.txt"
index e762aab..03b3be2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithStableParamsAndReturnValue\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithStableParamsAndReturnValue\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -12,9 +16,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithStableParams\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithStableParams\133useFir = false\135.txt"
index 21fc543..278bc68 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithStableParams\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithStableParams\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
B(y)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
val foo: Function4<Int, Foo, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-1
internal object ComposableSingletons%TestKt {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithStableParams\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithStableParams\133useFir = true\135.txt"
index 21fc543..278bc68 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithStableParams\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithStableParams\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
B(y)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
val foo: Function4<Int, Foo, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-1
internal object ComposableSingletons%TestKt {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithUnstableParams\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithUnstableParams\133useFir = false\135.txt"
index 060342a..da112a1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithUnstableParams\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithUnstableParams\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
B(y)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
val foo: Function4<Int, Foo, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-1
internal object ComposableSingletons%TestKt {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithUnstableParams\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithUnstableParams\133useFir = true\135.txt"
index 060342a..da112a1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithUnstableParams\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdaWithUnstableParams\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
B(y)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
val foo: Function4<Int, Foo, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-1
internal object ComposableSingletons%TestKt {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambda\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambda\133useFir = false\135.txt"
index f5e91c8..5cbf9070 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambda\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambda\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -7,9 +11,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
val test: Function3<Int, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-1
internal object ComposableSingletons%TestKt {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambda\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambda\133useFir = true\135.txt"
index f5e91c8..5cbf9070 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambda\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambda\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -7,9 +11,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
val test: Function3<Int, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-1
internal object ComposableSingletons%TestKt {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdasWithReturnGetGroups\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdasWithReturnGetGroups\133useFir = false\135.txt"
index 23e996d..173da83 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdasWithReturnGetGroups\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdasWithReturnGetGroups\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -6,9 +10,9 @@
fun A(factory: @Composable () -> Int): Unit {}
fun B() = A { 123 }
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
fun A(factory: Function2<Composer, Int, Int>) { }
fun B() {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdasWithReturnGetGroups\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdasWithReturnGetGroups\133useFir = true\135.txt"
index 23e996d..173da83 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdasWithReturnGetGroups\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableLambdasWithReturnGetGroups\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -6,9 +10,9 @@
fun A(factory: @Composable () -> Int): Unit {}
fun B() = A { 123 }
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
fun A(factory: Function2<Composer, Int, Int>) { }
fun B() {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableParameter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableParameter\133useFir = false\135.txt"
index accba95..7466bdd 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableParameter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableParameter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -10,9 +14,9 @@
used(c)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(a: Int, b: Int, c: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableParameter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableParameter\133useFir = true\135.txt"
index accba95..7466bdd 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableParameter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableParameter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -10,9 +14,9 @@
used(c)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(a: Int, b: Int, c: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableSingletonsAreStatic\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableSingletonsAreStatic\133useFir = false\135.txt"
index 125733d..f636b43 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableSingletonsAreStatic\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableSingletonsAreStatic\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -10,9 +14,9 @@
content()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableSingletonsAreStatic\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableSingletonsAreStatic\133useFir = true\135.txt"
index 125733d..f636b43 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableSingletonsAreStatic\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableSingletonsAreStatic\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -10,9 +14,9 @@
content()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableWithAndWithoutDefaultParams\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableWithAndWithoutDefaultParams\133useFir = false\135.txt"
index 06ea4e9..2e23013 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableWithAndWithoutDefaultParams\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableWithAndWithoutDefaultParams\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -15,9 +19,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableWithAndWithoutDefaultParams\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableWithAndWithoutDefaultParams\133useFir = true\135.txt"
index 541c7a2..78b2e9e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableWithAndWithoutDefaultParams\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableWithAndWithoutDefaultParams\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -15,9 +19,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableWithReturnValue\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableWithReturnValue\133useFir = false\135.txt"
index 9e6bb45..cbef791 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableWithReturnValue\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableWithReturnValue\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -9,9 +13,9 @@
return x + y
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Int, y: Int, %composer: Composer?, %changed: Int, %default: Int): Int {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableWithReturnValue\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableWithReturnValue\133useFir = true\135.txt"
index 9e6bb45..cbef791 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableWithReturnValue\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testComposableWithReturnValue\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -9,9 +13,9 @@
return x + y
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Int, y: Int, %composer: Composer?, %changed: Int, %default: Int): Int {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDefaultSkipping\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDefaultSkipping\133useFir = false\135.txt"
index 0294db9..b39e593 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDefaultSkipping\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDefaultSkipping\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
print(a)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(a: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDefaultSkipping\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDefaultSkipping\133useFir = true\135.txt"
index 0294db9..b39e593 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDefaultSkipping\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDefaultSkipping\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
print(a)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(a: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDefaultsIssue\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDefaultsIssue\133useFir = false\135.txt"
index 20fe98b..8d2d815 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDefaultsIssue\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDefaultsIssue\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -17,9 +21,9 @@
content()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDefaultsIssue\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDefaultsIssue\133useFir = true\135.txt"
index 20fe98b..8d2d815 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDefaultsIssue\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDefaultsIssue\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -17,9 +21,9 @@
content()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDifferentParameters\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDifferentParameters\133useFir = false\135.txt"
index d4f6cab..cb7af836 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDifferentParameters\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDifferentParameters\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -17,9 +21,9 @@
)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(x: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDifferentParameters\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDifferentParameters\133useFir = true\135.txt"
index d4f6cab..cb7af836 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDifferentParameters\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testDifferentParameters\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -17,9 +21,9 @@
)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(x: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testExtensionReceiver\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testExtensionReceiver\133useFir = false\135.txt"
index 45043571..2f12ff2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testExtensionReceiver\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testExtensionReceiver\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -12,9 +16,9 @@
used(it)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun MaybeStable.example(x: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testExtensionReceiver\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testExtensionReceiver\133useFir = true\135.txt"
index 45043571..2f12ff2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testExtensionReceiver\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testExtensionReceiver\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -12,9 +16,9 @@
used(it)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun MaybeStable.example(x: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testFunInterfaces2\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testFunInterfaces2\133useFir = false\135.txt"
index 74c21df38..ee19210 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testFunInterfaces2\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testFunInterfaces2\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -17,9 +21,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[androidx.compose.ui.UiComposable[androidx.compose.ui.UiComposable]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testFunInterfaces2\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testFunInterfaces2\133useFir = true\135.txt"
index 74c21df38..ee19210 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testFunInterfaces2\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testFunInterfaces2\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -17,9 +21,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[androidx.compose.ui.UiComposable[androidx.compose.ui.UiComposable]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testFunInterfaces\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testFunInterfaces\133useFir = false\135.txt"
index 6848692..f4fd8c3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testFunInterfaces\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testFunInterfaces\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
Example { it -> a.compute(it) }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
fun Example(a: A) {
used(a)
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testFunInterfaces\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testFunInterfaces\133useFir = true\135.txt"
index 6848692..f4fd8c3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testFunInterfaces\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testFunInterfaces\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
Example { it -> a.compute(it) }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
fun Example(a: A) {
used(a)
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testGrouplessProperty\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testGrouplessProperty\133useFir = false\135.txt"
index 72b9c4c..3105d6d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testGrouplessProperty\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testGrouplessProperty\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -19,9 +23,9 @@
@Composable
fun getHashCode(): Int = currentComposer.hashCode()
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
open class Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testGrouplessProperty\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testGrouplessProperty\133useFir = true\135.txt"
index 72b9c4c..3105d6d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testGrouplessProperty\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testGrouplessProperty\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -19,9 +23,9 @@
@Composable
fun getHashCode(): Int = currentComposer.hashCode()
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
open class Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testIfInLambda\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testIfInLambda\133useFir = false\135.txt"
index a046fe5..2ab906d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testIfInLambda\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testIfInLambda\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -15,9 +19,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Int, y: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testIfInLambda\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testIfInLambda\133useFir = true\135.txt"
index a046fe5..2ab906d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testIfInLambda\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testIfInLambda\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -15,9 +19,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Int, y: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testInlineClassDefaultParameter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testInlineClassDefaultParameter\133useFir = false\135.txt"
index 801280e..3298250 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testInlineClassDefaultParameter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testInlineClassDefaultParameter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -14,9 +18,9 @@
used(color)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(text: String, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testInlineClassDefaultParameter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testInlineClassDefaultParameter\133useFir = true\135.txt"
index 801280e..3298250 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testInlineClassDefaultParameter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testInlineClassDefaultParameter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -14,9 +18,9 @@
used(color)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(text: String, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLambdaSkipping\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLambdaSkipping\133useFir = false\135.txt"
index 6eebbeb..83c9a6c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLambdaSkipping\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLambdaSkipping\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -9,9 +13,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
fun LazyListScope.Example(items: LazyPagingItems<User>) {
itemsIndexed(items, ComposableSingletons%TestKt.lambda-1)
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLambdaSkipping\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLambdaSkipping\133useFir = true\135.txt"
index 6eebbeb..83c9a6c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLambdaSkipping\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLambdaSkipping\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -9,9 +13,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
fun LazyListScope.Example(items: LazyPagingItems<User>) {
itemsIndexed(items, ComposableSingletons%TestKt.lambda-1)
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLocalComposableFunctions\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLocalComposableFunctions\133useFir = false\135.txt"
index 97dd3e0..bbd5212 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLocalComposableFunctions\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLocalComposableFunctions\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -11,9 +15,9 @@
Inner()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(a: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLocalComposableFunctions\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLocalComposableFunctions\133useFir = true\135.txt"
index 97dd3e0..bbd5212 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLocalComposableFunctions\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLocalComposableFunctions\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -11,9 +15,9 @@
Inner()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(a: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLocalFunction\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLocalFunction\133useFir = false\135.txt"
index 3f24000..74a928e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLocalFunction\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLocalFunction\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -11,9 +15,9 @@
foo(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(x: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLocalFunction\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLocalFunction\133useFir = true\135.txt"
index 3f24000..74a928e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLocalFunction\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLocalFunction\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -11,9 +15,9 @@
foo(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(x: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLoopWithContinueAndCallAfter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLoopWithContinueAndCallAfter\133useFir = false\135.txt"
index 410a6a2..628d59d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLoopWithContinueAndCallAfter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLoopWithContinueAndCallAfter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -15,9 +19,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@NonRestartableComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLoopWithContinueAndCallAfter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLoopWithContinueAndCallAfter\133useFir = true\135.txt"
index 410a6a2..628d59d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLoopWithContinueAndCallAfter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testLoopWithContinueAndCallAfter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -15,9 +19,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@NonRestartableComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testManyNonOptionalParams\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testManyNonOptionalParams\133useFir = false\135.txt"
index d6cd4f8..ed3c95a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testManyNonOptionalParams\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testManyNonOptionalParams\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(a, b, c, d, e)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, b: Boolean, c: Int, d: Foo?, e: List<Int>?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testManyNonOptionalParams\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testManyNonOptionalParams\133useFir = true\135.txt"
index d6cd4f8..ed3c95a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testManyNonOptionalParams\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testManyNonOptionalParams\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(a, b, c, d, e)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, b: Boolean, c: Int, d: Foo?, e: List<Int>?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testNestedCalls\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testNestedCalls\133useFir = false\135.txt"
index d4ba624..2a745d94 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testNestedCalls\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testNestedCalls\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -14,9 +18,9 @@
B(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(x: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testNestedCalls\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testNestedCalls\133useFir = true\135.txt"
index d4ba624..2a745d94 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testNestedCalls\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testNestedCalls\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -14,9 +18,9 @@
B(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(x: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testNoParams\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testNoParams\133useFir = false\135.txt"
index e71bc17..15e0d3f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testNoParams\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testNoParams\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testNoParams\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testNoParams\133useFir = true\135.txt"
index e71bc17..15e0d3f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testNoParams\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testNoParams\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testOptionalUnstableWithStableExtensionReceiver\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testOptionalUnstableWithStableExtensionReceiver\133useFir = false\135.txt"
index 1f223b8..a13798a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testOptionalUnstableWithStableExtensionReceiver\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testOptionalUnstableWithStableExtensionReceiver\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -7,9 +11,9 @@
print("Hello World")
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Bar.CanSkip(b: Foo?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testOptionalUnstableWithStableExtensionReceiver\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testOptionalUnstableWithStableExtensionReceiver\133useFir = true\135.txt"
index 1f223b8..a13798a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testOptionalUnstableWithStableExtensionReceiver\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testOptionalUnstableWithStableExtensionReceiver\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -7,9 +11,9 @@
print("Hello World")
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Bar.CanSkip(b: Foo?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testParamReordering\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testParamReordering\133useFir = false\135.txt"
index c5cca7e..afb7f4a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testParamReordering\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testParamReordering\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -7,9 +11,9 @@
A(y = y, x = x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Int, y: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testParamReordering\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testParamReordering\133useFir = true\135.txt"
index c5cca7e..afb7f4a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testParamReordering\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testParamReordering\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -7,9 +11,9 @@
A(y = y, x = x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Int, y: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testPassedExtensionWhenExtensionIsPotentiallyUnstable\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testPassedExtensionWhenExtensionIsPotentiallyUnstable\133useFir = false\135.txt"
index 58c6dcf..3c659c1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testPassedExtensionWhenExtensionIsPotentiallyUnstable\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testPassedExtensionWhenExtensionIsPotentiallyUnstable\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -9,9 +13,9 @@
@Composable fun doSomething(x: Unstable) {}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Unstable.Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testPassedExtensionWhenExtensionIsPotentiallyUnstable\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testPassedExtensionWhenExtensionIsPotentiallyUnstable\133useFir = true\135.txt"
index 58c6dcf..3c659c1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testPassedExtensionWhenExtensionIsPotentiallyUnstable\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testPassedExtensionWhenExtensionIsPotentiallyUnstable\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -9,9 +13,9 @@
@Composable fun doSomething(x: Unstable) {}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Unstable.Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testPrimitiveVarargParams\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testPrimitiveVarargParams\133useFir = false\135.txt"
index ec6091f..98e5aca 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testPrimitiveVarargParams\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testPrimitiveVarargParams\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
print(values)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun B(values: IntArray, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testPrimitiveVarargParams\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testPrimitiveVarargParams\133useFir = true\135.txt"
index ec6091f..98e5aca 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testPrimitiveVarargParams\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testPrimitiveVarargParams\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
print(values)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun B(values: IntArray, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverIssue\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverIssue\133useFir = false\135.txt"
index 46cb676..b485767 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverIssue\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverIssue\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -23,9 +27,9 @@
print(label)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ExplicitGroupsComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverIssue\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverIssue\133useFir = true\135.txt"
index 46cb676..b485767 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverIssue\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverIssue\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -23,9 +27,9 @@
print(label)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ExplicitGroupsComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverLambdaCall\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverLambdaCall\133useFir = false\135.txt"
index 0a04153..b3df740 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverLambdaCall\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverLambdaCall\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -14,9 +18,9 @@
used(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
val unstableUnused: @[ExtensionFunctionType] Function3<Foo, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-1
val unstableUsed: @[ExtensionFunctionType] Function3<Foo, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-2
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverLambdaCall\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverLambdaCall\133useFir = true\135.txt"
index 545e8a908..b976185 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverLambdaCall\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverLambdaCall\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -14,9 +18,9 @@
used(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
val unstableUnused: @[ExtensionFunctionType] Function3<Foo, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-1
val unstableUsed: @[ExtensionFunctionType] Function3<Foo, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-2
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverParamSkippability\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverParamSkippability\133useFir = false\135.txt"
index 7152e2e..e694ebe 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverParamSkippability\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverParamSkippability\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -13,9 +17,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverParamSkippability\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverParamSkippability\133useFir = true\135.txt"
index 7152e2e..e694ebe 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverParamSkippability\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testReceiverParamSkippability\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -13,9 +17,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testRecursiveCall\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testRecursiveCall\133useFir = false\135.txt"
index 7efc031..0ace20a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testRecursiveCall\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testRecursiveCall\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -9,9 +13,9 @@
X(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun X(x: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testRecursiveCall\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testRecursiveCall\133useFir = true\135.txt"
index 7efc031..0ace20a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testRecursiveCall\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testRecursiveCall\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -9,9 +13,9 @@
X(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun X(x: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSiblingIfsWithoutElseHaveUniqueKeys\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSiblingIfsWithoutElseHaveUniqueKeys\133useFir = false\135.txt"
index b30d23d..faf99be 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSiblingIfsWithoutElseHaveUniqueKeys\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSiblingIfsWithoutElseHaveUniqueKeys\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -13,9 +17,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(cond: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSiblingIfsWithoutElseHaveUniqueKeys\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSiblingIfsWithoutElseHaveUniqueKeys\133useFir = true\135.txt"
index b30d23d..faf99be 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSiblingIfsWithoutElseHaveUniqueKeys\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSiblingIfsWithoutElseHaveUniqueKeys\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -13,9 +17,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(cond: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleBoxWithShape\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleBoxWithShape\133useFir = false\135.txt"
index 345235c..fbef31c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleBoxWithShape\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleBoxWithShape\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -9,9 +13,9 @@
used(shape)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun SimpleBox(modifier: Modifier?, shape: Shape?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleBoxWithShape\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleBoxWithShape\133useFir = true\135.txt"
index 345235c..fbef31c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleBoxWithShape\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleBoxWithShape\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -9,9 +13,9 @@
used(shape)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun SimpleBox(modifier: Modifier?, shape: Shape?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleBox\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleBox\133useFir = false\135.txt"
index ebf222e..ccb90fe 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleBox\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleBox\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -9,9 +13,9 @@
content()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleBox\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleBox\133useFir = true\135.txt"
index ebf222e..ccb90fe 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleBox\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleBox\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -9,9 +13,9 @@
content()
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleColumn\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleColumn\133useFir = false\135.txt"
index 33fc927..d3c3c8f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleColumn\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleColumn\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -37,9 +41,9 @@
)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleColumn\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleColumn\133useFir = true\135.txt"
index 33fc927..d3c3c8f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleColumn\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimpleColumn\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -37,9 +41,9 @@
)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimplerBox\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimplerBox\133useFir = false\135.txt"
index dd524a1..547c1b3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimplerBox\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimplerBox\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
used(modifier)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun SimpleBox(modifier: Modifier?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimplerBox\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimplerBox\133useFir = true\135.txt"
index dd524a1..547c1b3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimplerBox\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSimplerBox\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
used(modifier)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun SimpleBox(modifier: Modifier?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParamWithComposableDefault\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParamWithComposableDefault\133useFir = false\135.txt"
index 9487220..a42e379 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParamWithComposableDefault\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParamWithComposableDefault\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParamWithComposableDefault\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParamWithComposableDefault\133useFir = true\135.txt"
index 9487220..a42e379 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParamWithComposableDefault\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParamWithComposableDefault\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParamWithDefault\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParamWithDefault\133useFir = false\135.txt"
index 371e31e..48bdb7c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParamWithDefault\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParamWithDefault\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParamWithDefault\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParamWithDefault\133useFir = true\135.txt"
index 371e31e..48bdb7c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParamWithDefault\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParamWithDefault\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParam\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParam\133useFir = false\135.txt"
index 02ff05d..b65366d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParam\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParam\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParam\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParam\133useFir = true\135.txt"
index 02ff05d..b65366d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParam\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleStableParam\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleUnstableParamWithDefault\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleUnstableParamWithDefault\133useFir = false\135.txt"
index 744d049..b3491d9 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleUnstableParamWithDefault\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleUnstableParamWithDefault\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Foo?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleUnstableParamWithDefault\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleUnstableParamWithDefault\133useFir = true\135.txt"
index 744d049..b3491d9 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleUnstableParamWithDefault\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleUnstableParamWithDefault\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Foo?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleUnstableParam\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleUnstableParam\133useFir = false\135.txt"
index 1dbc968..388b7bd 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleUnstableParam\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleUnstableParam\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Foo, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleUnstableParam\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleUnstableParam\133useFir = true\135.txt"
index 1dbc968..388b7bd 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleUnstableParam\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testSingleUnstableParam\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Foo, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStableUnstableParams\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStableUnstableParams\133useFir = false\135.txt"
index 3e14daa..78dec06 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStableUnstableParams\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStableUnstableParams\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -16,9 +20,9 @@
print("Hello World")
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun CanSkip(a: Int, b: Foo?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStableUnstableParams\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStableUnstableParams\133useFir = true\135.txt"
index 3e14daa..78dec06 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStableUnstableParams\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStableUnstableParams\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -16,9 +20,9 @@
print("Hello World")
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun CanSkip(a: Int, b: Foo?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStableVarargParams\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStableVarargParams\133useFir = false\135.txt"
index d116d9a..01b138d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStableVarargParams\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStableVarargParams\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
print(values)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun B(values: Array<out Foo>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStableVarargParams\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStableVarargParams\133useFir = true\135.txt"
index d116d9a..01b138d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStableVarargParams\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStableVarargParams\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
print(values)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun B(values: Array<out Foo>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStaticAndNonStaticDefaultValueSkipping\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStaticAndNonStaticDefaultValueSkipping\133useFir = false\135.txt"
index 77ad488..99abdd3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStaticAndNonStaticDefaultValueSkipping\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStaticAndNonStaticDefaultValueSkipping\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -12,9 +16,9 @@
A(mightChange)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(wontChange: Int, mightChange: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStaticAndNonStaticDefaultValueSkipping\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStaticAndNonStaticDefaultValueSkipping\133useFir = true\135.txt"
index 77ad488..99abdd3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStaticAndNonStaticDefaultValueSkipping\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStaticAndNonStaticDefaultValueSkipping\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -12,9 +16,9 @@
A(mightChange)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(wontChange: Int, mightChange: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStaticDetection\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStaticDetection\133useFir = false\135.txt"
index 883912a..e10b4f6 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStaticDetection\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStaticDetection\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -29,9 +33,9 @@
C(Math.random() / 100f)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStaticDetection\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStaticDetection\133useFir = true\135.txt"
index 3e2d62b..cae10d9 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStaticDetection\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testStaticDetection\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -29,9 +33,9 @@
C(Math.random() / 100f)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testUnstableVarargParams\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testUnstableVarargParams\133useFir = false\135.txt"
index bda21b8..e6e15a0 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testUnstableVarargParams\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testUnstableVarargParams\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
print(values)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun B(values: Array<out Foo>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testUnstableVarargParams\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testUnstableVarargParams\133useFir = true\135.txt"
index bda21b8..e6e15a0 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testUnstableVarargParams\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testUnstableVarargParams\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
print(values)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun B(values: Array<out Foo>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testUnusedParameters\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testUnusedParameters\133useFir = false\135.txt"
index 0a63034..19d681c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testUnusedParameters\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testUnusedParameters\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -18,9 +22,9 @@
@Composable
fun Skippable3(a: Unstable, b: Stable, c: MaybeStable) { }
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Unskippable(a: Unstable, b: Stable, c: MaybeStable, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testUnusedParameters\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testUnusedParameters\133useFir = true\135.txt"
index 0a63034..19d681c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testUnusedParameters\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/testUnusedParameters\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -18,9 +22,9 @@
@Composable
fun Skippable3(a: Unstable, b: Stable, c: MaybeStable) { }
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Unskippable(a: Unstable, b: Stable, c: MaybeStable, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test_InlineForLoop\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test_InlineForLoop\133useFir = false\135.txt"
index 3e5d49b..1249c09 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test_InlineForLoop\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test_InlineForLoop\133useFir = false\135.txt"
@@ -1,21 +1,24 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test() {
- Bug(listOf(1, 2, 3)) {
- Text(it.toString())
- }
- }
+@Composable
+fun Test() {
+ Bug(listOf(1, 2, 3)) {
+ Text(it.toString())
+ }
+}
- @Composable
- inline fun <T> Bug(items: List<T>, content: @Composable (item: T) -> Unit) {
- for (item in items) content(item)
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+inline fun <T> Bug(items: List<T>, content: @Composable (item: T) -> Unit) {
+ for (item in items) content(item)
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test_InlineForLoop\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test_InlineForLoop\133useFir = true\135.txt"
index adddabc..212f2a8 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test_InlineForLoop\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTests/test_InlineForLoop\133useFir = true\135.txt"
@@ -1,21 +1,24 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test() {
- Bug(listOf(1, 2, 3)) {
- Text(it.toString())
- }
- }
+@Composable
+fun Test() {
+ Bug(listOf(1, 2, 3)) {
+ Text(it.toString())
+ }
+}
- @Composable
- inline fun <T> Bug(items: List<T>, content: @Composable (item: T) -> Unit) {
- for (item in items) content(item)
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+inline fun <T> Bug(items: List<T>, content: @Composable (item: T) -> Unit) {
+ for (item in items) content(item)
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/testGrouplessProperty\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/testGrouplessProperty\133useFir = false\135.txt"
index ad6afba..725dde7 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/testGrouplessProperty\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/testGrouplessProperty\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -19,9 +23,9 @@
@Composable
fun getHashCode(): Int = currentComposer.hashCode()
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
open class Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/testGrouplessProperty\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/testGrouplessProperty\133useFir = true\135.txt"
index ad6afba..725dde7 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/testGrouplessProperty\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/testGrouplessProperty\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -19,9 +23,9 @@
@Composable
fun getHashCode(): Int = currentComposer.hashCode()
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
open class Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/testNonSkippableComposable\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/testNonSkippableComposable\133useFir = false\135.txt"
index 28562bc..dbaf284 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/testNonSkippableComposable\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/testNonSkippableComposable\133useFir = false\135.txt"
@@ -1,4 +1,8 @@
- import androidx.compose.runtime.Composable
+//
+// Source
+// ------------------------------------------
+
+import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -9,9 +13,10 @@
fun Test(i: Int) {
used(i)
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@NonSkippableComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/testNonSkippableComposable\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/testNonSkippableComposable\133useFir = true\135.txt"
index 28562bc..dbaf284 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/testNonSkippableComposable\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/testNonSkippableComposable\133useFir = true\135.txt"
@@ -1,4 +1,8 @@
- import androidx.compose.runtime.Composable
+//
+// Source
+// ------------------------------------------
+
+import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -9,9 +13,10 @@
fun Test(i: Int) {
used(i)
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@NonSkippableComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_ComposableLambdaWithUnusedParameter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_ComposableLambdaWithUnusedParameter\133useFir = false\135.txt"
index ed829a7..1ea1f8a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_ComposableLambdaWithUnusedParameter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_ComposableLambdaWithUnusedParameter\133useFir = false\135.txt"
@@ -1,13 +1,16 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- val layoutLambda = @Composable { _: Int ->
- Layout()
- }
-
-/********
- * TRANSFORMED
- ********/
+val layoutLambda = @Composable { _: Int ->
+ Layout()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
val layoutLambda: Function3<Int, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-1
internal object ComposableSingletons%TestKt {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_ComposableLambdaWithUnusedParameter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_ComposableLambdaWithUnusedParameter\133useFir = true\135.txt"
index ed829a7..1ea1f8a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_ComposableLambdaWithUnusedParameter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_ComposableLambdaWithUnusedParameter\133useFir = true\135.txt"
@@ -1,13 +1,16 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- val layoutLambda = @Composable { _: Int ->
- Layout()
- }
-
-/********
- * TRANSFORMED
- ********/
+val layoutLambda = @Composable { _: Int ->
+ Layout()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
val layoutLambda: Function3<Int, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-1
internal object ComposableSingletons%TestKt {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_InlineForLoop_no_source_info\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_InlineForLoop_no_source_info\133useFir = false\135.txt"
index 85cca2b..ad94e8d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_InlineForLoop_no_source_info\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_InlineForLoop_no_source_info\133useFir = false\135.txt"
@@ -1,21 +1,24 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- private fun Test() {
- Bug(listOf(1, 2, 3)) {
- Text(it.toString())
- }
- }
+@Composable
+private fun Test() {
+ Bug(listOf(1, 2, 3)) {
+ Text(it.toString())
+ }
+}
- @Composable
- private inline fun <T> Bug(items: List<T>, content: @Composable (item: T) -> Unit) {
- for (item in items) content(item)
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+private inline fun <T> Bug(items: List<T>, content: @Composable (item: T) -> Unit) {
+ for (item in items) content(item)
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
private fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_InlineForLoop_no_source_info\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_InlineForLoop_no_source_info\133useFir = true\135.txt"
index d79ab1b..86c92bd 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_InlineForLoop_no_source_info\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_InlineForLoop_no_source_info\133useFir = true\135.txt"
@@ -1,21 +1,24 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- private fun Test() {
- Bug(listOf(1, 2, 3)) {
- Text(it.toString())
- }
- }
+@Composable
+private fun Test() {
+ Bug(listOf(1, 2, 3)) {
+ Text(it.toString())
+ }
+}
- @Composable
- private inline fun <T> Bug(items: List<T>, content: @Composable (item: T) -> Unit) {
- for (item in items) content(item)
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+private inline fun <T> Bug(items: List<T>, content: @Composable (item: T) -> Unit) {
+ for (item in items) content(item)
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
private fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_InlineSkipping\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_InlineSkipping\133useFir = false\135.txt"
index 493f56f..3df5bc7 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_InlineSkipping\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_InlineSkipping\133useFir = false\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test() {
- InlineWrapperParam {
- Text("Function $it")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ InlineWrapperParam {
+ Text("Function $it")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_InlineSkipping\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_InlineSkipping\133useFir = true\135.txt"
index 493f56f..3df5bc7 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_InlineSkipping\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionBodySkippingTransformTestsNoSource/test_InlineSkipping\133useFir = true\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test() {
- InlineWrapperParam {
- Text("Function $it")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ InlineWrapperParam {
+ Text("Function $it")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testCaptureStableFunInterface\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testCaptureStableFunInterface\133useFir = false\135.txt"
index 150078b..d939cac 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testCaptureStableFunInterface\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testCaptureStableFunInterface\133useFir = false\135.txt"
@@ -1,22 +1,25 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- fun interface Consumer {
- fun consume(t: Int)
- }
+fun interface Consumer {
+ fun consume(t: Int)
+}
- @Composable fun Test(int: Int) {
- Example {
- println(int)
- }
- }
+@Composable fun Test(int: Int) {
+ Example {
+ println(int)
+ }
+}
- @Composable inline fun Example(consumer: Consumer) {
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable inline fun Example(consumer: Consumer) {
+}
+
+//
+// Transformed IR
+// ------------------------------------------
interface Consumer {
abstract fun consume(t: Int)
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testCaptureStableFunInterface\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testCaptureStableFunInterface\133useFir = true\135.txt"
index 150078b..d939cac 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testCaptureStableFunInterface\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testCaptureStableFunInterface\133useFir = true\135.txt"
@@ -1,22 +1,25 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- fun interface Consumer {
- fun consume(t: Int)
- }
+fun interface Consumer {
+ fun consume(t: Int)
+}
- @Composable fun Test(int: Int) {
- Example {
- println(int)
- }
- }
+@Composable fun Test(int: Int) {
+ Example {
+ println(int)
+ }
+}
- @Composable inline fun Example(consumer: Consumer) {
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable inline fun Example(consumer: Consumer) {
+}
+
+//
+// Transformed IR
+// ------------------------------------------
interface Consumer {
abstract fun consume(t: Int)
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfaceWAnonymousParam\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfaceWAnonymousParam\133useFir = false\135.txt"
index dfe0be9..8fe8115 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfaceWAnonymousParam\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfaceWAnonymousParam\133useFir = false\135.txt"
@@ -1,21 +1,24 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- fun interface Consumer {
- @Composable operator fun invoke(t: Int)
- }
+fun interface Consumer {
+ @Composable operator fun invoke(t: Int)
+}
- @Composable fun Test(int: Int) {
- Example { _ ->
- }
- }
+@Composable fun Test(int: Int) {
+ Example { _ ->
+ }
+}
- @Composable fun Example(consumer: Consumer) {
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable fun Example(consumer: Consumer) {
+}
+
+//
+// Transformed IR
+// ------------------------------------------
interface Consumer {
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfaceWAnonymousParam\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfaceWAnonymousParam\133useFir = true\135.txt"
index dfe0be9..8fe8115 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfaceWAnonymousParam\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfaceWAnonymousParam\133useFir = true\135.txt"
@@ -1,21 +1,24 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- fun interface Consumer {
- @Composable operator fun invoke(t: Int)
- }
+fun interface Consumer {
+ @Composable operator fun invoke(t: Int)
+}
- @Composable fun Test(int: Int) {
- Example { _ ->
- }
- }
+@Composable fun Test(int: Int) {
+ Example { _ ->
+ }
+}
- @Composable fun Example(consumer: Consumer) {
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable fun Example(consumer: Consumer) {
+}
+
+//
+// Transformed IR
+// ------------------------------------------
interface Consumer {
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfacesInVariance\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfacesInVariance\133useFir = false\135.txt"
index c0c4e6a..3bf8de2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfacesInVariance\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfacesInVariance\133useFir = false\135.txt"
@@ -1,23 +1,26 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- fun interface Consumer<T> {
- @Composable fun consume(t: T)
- }
+fun interface Consumer<T> {
+ @Composable fun consume(t: T)
+}
- class Repro<T : Any> {
- fun test(consumer: Consumer<in T>) {}
- }
+class Repro<T : Any> {
+ fun test(consumer: Consumer<in T>) {}
+}
- fun test() {
- Repro<String>().test { string ->
- println(string)
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+fun test() {
+ Repro<String>().test { string ->
+ println(string)
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
interface Consumer<T> {
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfacesInVariance\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfacesInVariance\133useFir = true\135.txt"
index c0c4e6a..3bf8de2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfacesInVariance\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfacesInVariance\133useFir = true\135.txt"
@@ -1,23 +1,26 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- fun interface Consumer<T> {
- @Composable fun consume(t: T)
- }
+fun interface Consumer<T> {
+ @Composable fun consume(t: T)
+}
- class Repro<T : Any> {
- fun test(consumer: Consumer<in T>) {}
- }
+class Repro<T : Any> {
+ fun test(consumer: Consumer<in T>) {}
+}
- fun test() {
- Repro<String>().test { string ->
- println(string)
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+fun test() {
+ Repro<String>().test { string ->
+ println(string)
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
interface Consumer<T> {
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfaces\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfaces\133useFir = false\135.txt"
index 67e1425..a899aa1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfaces\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfaces\133useFir = false\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- fun interface A {
- @Composable fun compute(value: Int): Unit
- }
- fun Example(a: A) {
- Example { it -> a.compute(it) }
- }
-
-/********
- * TRANSFORMED
- ********/
+fun interface A {
+ @Composable fun compute(value: Int): Unit
+}
+fun Example(a: A) {
+ Example { it -> a.compute(it) }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
interface A {
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfaces\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfaces\133useFir = true\135.txt"
index 67e1425..a899aa1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfaces\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testComposableFunInterfaces\133useFir = true\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- fun interface A {
- @Composable fun compute(value: Int): Unit
- }
- fun Example(a: A) {
- Example { it -> a.compute(it) }
- }
-
-/********
- * TRANSFORMED
- ********/
+fun interface A {
+ @Composable fun compute(value: Int): Unit
+}
+fun Example(a: A) {
+ Example { it -> a.compute(it) }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
interface A {
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testFunInterfaces\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testFunInterfaces\133useFir = false\135.txt"
index 9f4d6c1..f2ffbbf 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testFunInterfaces\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testFunInterfaces\133useFir = false\135.txt"
@@ -1,18 +1,21 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- fun interface A {
- fun compute(value: Int): Unit
- }
+fun interface A {
+ fun compute(value: Int): Unit
+}
- @Composable
- fun Example(a: A) {
- Example { it -> a.compute(it) }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Example(a: A) {
+ Example { it -> a.compute(it) }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
interface A {
abstract fun compute(value: Int)
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testFunInterfaces\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testFunInterfaces\133useFir = true\135.txt"
index 9f4d6c1..f2ffbbf 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testFunInterfaces\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testFunInterfaces\133useFir = true\135.txt"
@@ -1,18 +1,21 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- fun interface A {
- fun compute(value: Int): Unit
- }
+fun interface A {
+ fun compute(value: Int): Unit
+}
- @Composable
- fun Example(a: A) {
- Example { it -> a.compute(it) }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Example(a: A) {
+ Example { it -> a.compute(it) }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
interface A {
abstract fun compute(value: Int)
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testFunctionalInterfaceWithExtensionReceiverTransformation\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testFunctionalInterfaceWithExtensionReceiverTransformation\133useFir = false\135.txt"
index d98d313..510195c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testFunctionalInterfaceWithExtensionReceiverTransformation\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testFunctionalInterfaceWithExtensionReceiverTransformation\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.*
fun interface TestContent {
@Composable
@@ -14,9 +18,10 @@
fun CallTest() {
Test { this.length }
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
interface TestContent {
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testFunctionalInterfaceWithExtensionReceiverTransformation\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testFunctionalInterfaceWithExtensionReceiverTransformation\133useFir = true\135.txt"
index d98d313..510195c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testFunctionalInterfaceWithExtensionReceiverTransformation\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testFunctionalInterfaceWithExtensionReceiverTransformation\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.*
fun interface TestContent {
@Composable
@@ -14,9 +18,10 @@
fun CallTest() {
Test { this.length }
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
interface TestContent {
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testNoCaptureFunInterface\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testNoCaptureFunInterface\133useFir = false\135.txt"
index c73e658..4e5db6e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testNoCaptureFunInterface\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testNoCaptureFunInterface\133useFir = false\135.txt"
@@ -1,22 +1,25 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- fun interface Consumer {
- fun consume(t: Int)
- }
+fun interface Consumer {
+ fun consume(t: Int)
+}
- @Composable fun Test(int: Int) {
- Example {
- println(it)
- }
- }
+@Composable fun Test(int: Int) {
+ Example {
+ println(it)
+ }
+}
- @Composable inline fun Example(consumer: Consumer) {
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable inline fun Example(consumer: Consumer) {
+}
+
+//
+// Transformed IR
+// ------------------------------------------
interface Consumer {
abstract fun consume(t: Int)
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testNoCaptureFunInterface\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testNoCaptureFunInterface\133useFir = true\135.txt"
index c73e658..4e5db6e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testNoCaptureFunInterface\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.FunctionalInterfaceTransformTests/testNoCaptureFunInterface\133useFir = true\135.txt"
@@ -1,22 +1,25 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- fun interface Consumer {
- fun consume(t: Int)
- }
+fun interface Consumer {
+ fun consume(t: Int)
+}
- @Composable fun Test(int: Int) {
- Example {
- println(it)
- }
- }
+@Composable fun Test(int: Int) {
+ Example {
+ println(it)
+ }
+}
- @Composable inline fun Example(consumer: Consumer) {
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable inline fun Example(consumer: Consumer) {
+}
+
+//
+// Transformed IR
+// ------------------------------------------
interface Consumer {
abstract fun consume(t: Int)
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testJvmNameComposableSingletons\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testJvmNameComposableSingletons\133useFir = false\135.txt"
index fed4816..e5d7343 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testJvmNameComposableSingletons\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testJvmNameComposableSingletons\133useFir = false\135.txt"
@@ -1,12 +1,15 @@
+//
+// Source
+// ------------------------------------------
- @file:JvmName("A")
- import androidx.compose.runtime.Composable
+@file:JvmName("A")
+import androidx.compose.runtime.Composable
- val x = @Composable {}
-
-/********
- * TRANSFORMED
- ********/
+val x = @Composable {}
+
+//
+// Transformed IR
+// ------------------------------------------
val x: Function2<Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-1
internal object ComposableSingletons%TestKt {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testJvmNameComposableSingletons\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testJvmNameComposableSingletons\133useFir = true\135.txt"
index fed4816..e5d7343 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testJvmNameComposableSingletons\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testJvmNameComposableSingletons\133useFir = true\135.txt"
@@ -1,12 +1,15 @@
+//
+// Source
+// ------------------------------------------
- @file:JvmName("A")
- import androidx.compose.runtime.Composable
+@file:JvmName("A")
+import androidx.compose.runtime.Composable
- val x = @Composable {}
-
-/********
- * TRANSFORMED
- ********/
+val x = @Composable {}
+
+//
+// Transformed IR
+// ------------------------------------------
val x: Function2<Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-1
internal object ComposableSingletons%TestKt {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testNestedComposableSingletonsClass2\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testNestedComposableSingletonsClass2\133useFir = false\135.txt"
index 1bb4b77..a1749b9 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testNestedComposableSingletonsClass2\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testNestedComposableSingletonsClass2\133useFir = false\135.txt"
@@ -1,15 +1,18 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- class A {
- class B {
- val x = @Composable {}
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+class A {
+ class B {
+ val x = @Composable {}
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class A {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testNestedComposableSingletonsClass2\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testNestedComposableSingletonsClass2\133useFir = true\135.txt"
index 1bb4b77..a1749b9 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testNestedComposableSingletonsClass2\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testNestedComposableSingletonsClass2\133useFir = true\135.txt"
@@ -1,15 +1,18 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- class A {
- class B {
- val x = @Composable {}
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+class A {
+ class B {
+ val x = @Composable {}
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class A {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testNestedComposableSingletonsClass\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testNestedComposableSingletonsClass\133useFir = false\135.txt"
index 64bb721..0d4633d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testNestedComposableSingletonsClass\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testNestedComposableSingletonsClass\133useFir = false\135.txt"
@@ -1,13 +1,16 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- class A {
- val x = @Composable {}
- }
-
-/********
- * TRANSFORMED
- ********/
+class A {
+ val x = @Composable {}
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class A {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testNestedComposableSingletonsClass\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testNestedComposableSingletonsClass\133useFir = true\135.txt"
index 64bb721..0d4633d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testNestedComposableSingletonsClass\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationRegressionTests/testNestedComposableSingletonsClass\133useFir = true\135.txt"
@@ -1,13 +1,16 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- class A {
- val x = @Composable {}
- }
-
-/********
- * TRANSFORMED
- ********/
+class A {
+ val x = @Composable {}
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class A {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/memoizeLambdaInsideFunctionReturningValue\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/memoizeLambdaInsideFunctionReturningValue\133useFir = false\135.txt"
index 3a5d532..763ae86 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/memoizeLambdaInsideFunctionReturningValue\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/memoizeLambdaInsideFunctionReturningValue\133useFir = false\135.txt"
@@ -1,13 +1,16 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test(foo: Foo): Int =
- Consume { foo.value }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(foo: Foo): Int =
+ Consume { foo.value }
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(foo: Foo, %composer: Composer?, %changed: Int): Int {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/memoizeLambdaInsideFunctionReturningValue\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/memoizeLambdaInsideFunctionReturningValue\133useFir = true\135.txt"
index 3a5d532..763ae86 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/memoizeLambdaInsideFunctionReturningValue\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/memoizeLambdaInsideFunctionReturningValue\133useFir = true\135.txt"
@@ -1,13 +1,16 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test(foo: Foo): Int =
- Consume { foo.value }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(foo: Foo): Int =
+ Consume { foo.value }
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(foo: Foo, %composer: Composer?, %changed: Int): Int {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testCapturedThisFromFieldInitializer\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testCapturedThisFromFieldInitializer\133useFir = false\135.txt"
index 67b6e4a2..829deb3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testCapturedThisFromFieldInitializer\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testCapturedThisFromFieldInitializer\133useFir = false\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- class A {
- val b = ""
- val c = @Composable {
- print(b)
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+class A {
+ val b = ""
+ val c = @Composable {
+ print(b)
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class A {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testCapturedThisFromFieldInitializer\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testCapturedThisFromFieldInitializer\133useFir = true\135.txt"
index 67b6e4a2..829deb3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testCapturedThisFromFieldInitializer\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testCapturedThisFromFieldInitializer\133useFir = true\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- class A {
- val b = ""
- val c = @Composable {
- print(b)
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+class A {
+ val b = ""
+ val c = @Composable {
+ print(b)
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class A {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposabableLambdaInLocalDeclaration\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposabableLambdaInLocalDeclaration\133useFir = false\135.txt"
index dd598ef..432c028 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposabableLambdaInLocalDeclaration\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposabableLambdaInLocalDeclaration\133useFir = false\135.txt"
@@ -1,17 +1,20 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test(enabled: Boolean) {
- val content: @Composable () -> Unit = {
- Display("$enabled")
- }
- Wrap(content)
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(enabled: Boolean) {
+ val content: @Composable () -> Unit = {
+ Display("$enabled")
+ }
+ Wrap(content)
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(enabled: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposabableLambdaInLocalDeclaration\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposabableLambdaInLocalDeclaration\133useFir = true\135.txt"
index dd598ef..432c028 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposabableLambdaInLocalDeclaration\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposabableLambdaInLocalDeclaration\133useFir = true\135.txt"
@@ -1,17 +1,20 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test(enabled: Boolean) {
- val content: @Composable () -> Unit = {
- Display("$enabled")
- }
- Wrap(content)
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(enabled: Boolean) {
+ val content: @Composable () -> Unit = {
+ Display("$enabled")
+ }
+ Wrap(content)
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(enabled: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposableCaptureInDelegates\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposableCaptureInDelegates\133useFir = false\135.txt"
index c087f51..63ece0b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposableCaptureInDelegates\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposableCaptureInDelegates\133useFir = false\135.txt"
@@ -1,13 +1,16 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- class Test(val value: Int) : Delegate by Impl({
- value
- })
-
-/********
- * TRANSFORMED
- ********/
+class Test(val value: Int) : Delegate by Impl({
+ value
+})
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Test(val value: Int) : Delegate {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposableCaptureInDelegates\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposableCaptureInDelegates\133useFir = true\135.txt"
index dd86825..6a0874c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposableCaptureInDelegates\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposableCaptureInDelegates\133useFir = true\135.txt"
@@ -1,13 +1,16 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- class Test(val value: Int) : Delegate by Impl({
- value
- })
-
-/********
- * TRANSFORMED
- ********/
+class Test(val value: Int) : Delegate by Impl({
+ value
+})
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Test(val value: Int) : Delegate {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposableInAFunctionParameter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposableInAFunctionParameter\133useFir = false\135.txt"
index 0101162..c60bcb3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposableInAFunctionParameter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposableInAFunctionParameter\133useFir = false\135.txt"
@@ -1,17 +1,20 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test(enabled: Boolean, content: @Composable () -> Unit = {
- Display("$enabled")
- }
- ) {
- Wrap(content)
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(enabled: Boolean, content: @Composable () -> Unit = {
+ Display("$enabled")
+ }
+) {
+ Wrap(content)
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(enabled: Boolean, content: Function2<Composer, Int, Unit>?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposableInAFunctionParameter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposableInAFunctionParameter\133useFir = true\135.txt"
index 0101162..c60bcb3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposableInAFunctionParameter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testComposableInAFunctionParameter\133useFir = true\135.txt"
@@ -1,17 +1,20 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test(enabled: Boolean, content: @Composable () -> Unit = {
- Display("$enabled")
- }
- ) {
- Wrap(content)
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(enabled: Boolean, content: @Composable () -> Unit = {
+ Display("$enabled")
+ }
+) {
+ Wrap(content)
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(enabled: Boolean, content: Function2<Composer, Int, Unit>?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testCrossinlineLambda\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testCrossinlineLambda\133useFir = false\135.txt"
index 94701dc..c3fc89a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testCrossinlineLambda\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testCrossinlineLambda\133useFir = false\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test() {
- var lambda: (@Composable () -> Unit)? = null
- f { s -> lambda = { Text(s) } }
- lambda?.let { it() }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ var lambda: (@Composable () -> Unit)? = null
+ f { s -> lambda = { Text(s) } }
+ lambda?.let { it() }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testCrossinlineLambda\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testCrossinlineLambda\133useFir = true\135.txt"
index 94701dc..c3fc89a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testCrossinlineLambda\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testCrossinlineLambda\133useFir = true\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test() {
- var lambda: (@Composable () -> Unit)? = null
- f { s -> lambda = { Text(s) } }
- lambda?.let { it() }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ var lambda: (@Composable () -> Unit)? = null
+ f { s -> lambda = { Text(s) } }
+ lambda?.let { it() }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testFunctionReferenceNonComposableMemoization\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testFunctionReferenceNonComposableMemoization\133useFir = false\135.txt"
index 46482b5..0f56299 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testFunctionReferenceNonComposableMemoization\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testFunctionReferenceNonComposableMemoization\133useFir = false\135.txt"
@@ -1,13 +1,16 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
- @Composable fun Example(x: Int) {
- fun foo() { use(x) }
- val shouldMemoize: ()->(()->Unit) = { ::foo }
- }
-
-/********
- * TRANSFORMED
- ********/
+import androidx.compose.runtime.Composable
+@Composable fun Example(x: Int) {
+ fun foo() { use(x) }
+ val shouldMemoize: ()->(()->Unit) = { ::foo }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(x: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testFunctionReferenceNonComposableMemoization\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testFunctionReferenceNonComposableMemoization\133useFir = true\135.txt"
index 46482b5..0f56299 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testFunctionReferenceNonComposableMemoization\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testFunctionReferenceNonComposableMemoization\133useFir = true\135.txt"
@@ -1,13 +1,16 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
- @Composable fun Example(x: Int) {
- fun foo() { use(x) }
- val shouldMemoize: ()->(()->Unit) = { ::foo }
- }
-
-/********
- * TRANSFORMED
- ********/
+import androidx.compose.runtime.Composable
+@Composable fun Example(x: Int) {
+ fun foo() { use(x) }
+ val shouldMemoize: ()->(()->Unit) = { ::foo }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(x: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testFunctionReferenceWithinInferredComposableLambda\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testFunctionReferenceWithinInferredComposableLambda\133useFir = false\135.txt"
index 82a9f72..45b3e29 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testFunctionReferenceWithinInferredComposableLambda\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testFunctionReferenceWithinInferredComposableLambda\133useFir = false\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- fun Problem() {
- fun foo() { }
- val lambda: @Composable ()->Unit = {
- ::foo
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+fun Problem() {
+ fun foo() { }
+ val lambda: @Composable ()->Unit = {
+ ::foo
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
fun Problem() {
fun foo() { }
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testFunctionReferenceWithinInferredComposableLambda\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testFunctionReferenceWithinInferredComposableLambda\133useFir = true\135.txt"
index 82a9f72..45b3e29 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testFunctionReferenceWithinInferredComposableLambda\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testFunctionReferenceWithinInferredComposableLambda\133useFir = true\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- fun Problem() {
- fun foo() { }
- val lambda: @Composable ()->Unit = {
- ::foo
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+fun Problem() {
+ fun foo() { }
+ val lambda: @Composable ()->Unit = {
+ ::foo
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
fun Problem() {
fun foo() { }
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLambdaDoesCapture\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLambdaDoesCapture\133useFir = false\135.txt"
index 501b704..f680079 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLambdaDoesCapture\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLambdaDoesCapture\133useFir = false\135.txt"
@@ -1,21 +1,24 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun TestLambda(content: () -> Unit) {
- content()
- }
+@Composable
+fun TestLambda(content: () -> Unit) {
+ content()
+}
- @Composable
- fun Test(a: String) {
- TestLambda {
- println("Captures a" + a)
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(a: String) {
+ TestLambda {
+ println("Captures a" + a)
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun TestLambda(content: Function0<Unit>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLambdaDoesCapture\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLambdaDoesCapture\133useFir = true\135.txt"
index 501b704..f680079 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLambdaDoesCapture\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLambdaDoesCapture\133useFir = true\135.txt"
@@ -1,21 +1,24 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun TestLambda(content: () -> Unit) {
- content()
- }
+@Composable
+fun TestLambda(content: () -> Unit) {
+ content()
+}
- @Composable
- fun Test(a: String) {
- TestLambda {
- println("Captures a" + a)
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(a: String) {
+ TestLambda {
+ println("Captures a" + a)
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun TestLambda(content: Function0<Unit>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLambdaNoCapture\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLambdaNoCapture\133useFir = false\135.txt"
index a5f6b9f..435eebf 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLambdaNoCapture\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLambdaNoCapture\133useFir = false\135.txt"
@@ -1,21 +1,24 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun TestLambda(content: () -> Unit) {
- content()
- }
+@Composable
+fun TestLambda(content: () -> Unit) {
+ content()
+}
- @Composable
- fun Test() {
- TestLambda {
- println("Doesn't capture")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ TestLambda {
+ println("Doesn't capture")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun TestLambda(content: Function0<Unit>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLambdaNoCapture\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLambdaNoCapture\133useFir = true\135.txt"
index a5f6b9f..435eebf 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLambdaNoCapture\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLambdaNoCapture\133useFir = true\135.txt"
@@ -1,21 +1,24 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun TestLambda(content: () -> Unit) {
- content()
- }
+@Composable
+fun TestLambda(content: () -> Unit) {
+ content()
+}
- @Composable
- fun Test() {
- TestLambda {
- println("Doesn't capture")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ TestLambda {
+ println("Doesn't capture")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun TestLambda(content: Function0<Unit>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalClassCaptures1\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalClassCaptures1\133useFir = false\135.txt"
index 5db1e19..0a8b775 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalClassCaptures1\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalClassCaptures1\133useFir = false\135.txt"
@@ -1,22 +1,25 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.NonRestartableComposable
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.NonRestartableComposable
+import androidx.compose.runtime.Composable
- @NonRestartableComposable
- @Composable
- fun Err(y: Int, z: Int) {
- class Local {
- val w = z
- fun something(x: Int): Int { return x + y + w }
- }
- {
- Local().something(2)
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@NonRestartableComposable
+@Composable
+fun Err(y: Int, z: Int) {
+ class Local {
+ val w = z
+ fun something(x: Int): Int { return x + y + w }
+ }
+ {
+ Local().something(2)
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalClassCaptures1\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalClassCaptures1\133useFir = true\135.txt"
index 5db1e19..0a8b775 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalClassCaptures1\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalClassCaptures1\133useFir = true\135.txt"
@@ -1,22 +1,25 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.NonRestartableComposable
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.NonRestartableComposable
+import androidx.compose.runtime.Composable
- @NonRestartableComposable
- @Composable
- fun Err(y: Int, z: Int) {
- class Local {
- val w = z
- fun something(x: Int): Int { return x + y + w }
- }
- {
- Local().something(2)
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@NonRestartableComposable
+@Composable
+fun Err(y: Int, z: Int) {
+ class Local {
+ val w = z
+ fun something(x: Int): Int { return x + y + w }
+ }
+ {
+ Local().something(2)
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalClassCaptures2\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalClassCaptures2\133useFir = false\135.txt"
index 733fbed..f51fe66 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalClassCaptures2\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalClassCaptures2\133useFir = false\135.txt"
@@ -1,19 +1,22 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
- import androidx.compose.runtime.NonRestartableComposable
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.NonRestartableComposable
- @NonRestartableComposable
- @Composable
- fun Example(z: Int) {
- class Foo(val x: Int) { val y = z }
- val lambda: () -> Any = {
- Foo(1)
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@NonRestartableComposable
+@Composable
+fun Example(z: Int) {
+ class Foo(val x: Int) { val y = z }
+ val lambda: () -> Any = {
+ Foo(1)
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalClassCaptures2\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalClassCaptures2\133useFir = true\135.txt"
index 733fbed..f51fe66 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalClassCaptures2\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalClassCaptures2\133useFir = true\135.txt"
@@ -1,19 +1,22 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
- import androidx.compose.runtime.NonRestartableComposable
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.NonRestartableComposable
- @NonRestartableComposable
- @Composable
- fun Example(z: Int) {
- class Foo(val x: Int) { val y = z }
- val lambda: () -> Any = {
- Foo(1)
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@NonRestartableComposable
+@Composable
+fun Example(z: Int) {
+ class Foo(val x: Int) { val y = z }
+ val lambda: () -> Any = {
+ Foo(1)
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalFunCaptures3\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalFunCaptures3\133useFir = false\135.txt"
index c6d19e0..653cafe 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalFunCaptures3\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalFunCaptures3\133useFir = false\135.txt"
@@ -1,18 +1,21 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun SimpleAnimatedContentSample() {
- @Composable fun Foo() {}
+@Composable
+fun SimpleAnimatedContentSample() {
+ @Composable fun Foo() {}
- AnimatedContent(1f) {
- Foo()
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+ AnimatedContent(1f) {
+ Foo()
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun SimpleAnimatedContentSample(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalFunCaptures3\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalFunCaptures3\133useFir = true\135.txt"
index 9ce2e00..aadb90e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalFunCaptures3\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalFunCaptures3\133useFir = true\135.txt"
@@ -1,18 +1,21 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun SimpleAnimatedContentSample() {
- @Composable fun Foo() {}
+@Composable
+fun SimpleAnimatedContentSample() {
+ @Composable fun Foo() {}
- AnimatedContent(1f) {
- Foo()
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+ AnimatedContent(1f) {
+ Foo()
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun SimpleAnimatedContentSample(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalFunCaptures\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalFunCaptures\133useFir = false\135.txt"
index ba395df..6f6a11d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalFunCaptures\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalFunCaptures\133useFir = false\135.txt"
@@ -1,23 +1,26 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.NonRestartableComposable
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.NonRestartableComposable
+import androidx.compose.runtime.Composable
- @NonRestartableComposable
- @Composable
- fun Err() {
- // `x` is not a capture of handler, but is treated as such.
- fun handler() {
- { x: Int -> x }
- }
- // Lambda calling handler. To find captures, we need captures of `handler`.
- {
- handler()
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@NonRestartableComposable
+@Composable
+fun Err() {
+ // `x` is not a capture of handler, but is treated as such.
+ fun handler() {
+ { x: Int -> x }
+ }
+ // Lambda calling handler. To find captures, we need captures of `handler`.
+ {
+ handler()
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalFunCaptures\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalFunCaptures\133useFir = true\135.txt"
index ba395df..6f6a11d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalFunCaptures\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalFunCaptures\133useFir = true\135.txt"
@@ -1,23 +1,26 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.NonRestartableComposable
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.NonRestartableComposable
+import androidx.compose.runtime.Composable
- @NonRestartableComposable
- @Composable
- fun Err() {
- // `x` is not a capture of handler, but is treated as such.
- fun handler() {
- { x: Int -> x }
- }
- // Lambda calling handler. To find captures, we need captures of `handler`.
- {
- handler()
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@NonRestartableComposable
+@Composable
+fun Err() {
+ // `x` is not a capture of handler, but is treated as such.
+ fun handler() {
+ { x: Int -> x }
+ }
+ // Lambda calling handler. To find captures, we need captures of `handler`.
+ {
+ handler()
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@NonRestartableComposable
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalInALocal\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalInALocal\133useFir = false\135.txt"
index 74c9f3c..36d03b7 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalInALocal\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalInALocal\133useFir = false\135.txt"
@@ -1,17 +1,20 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable fun Example() {
- @Composable fun A() { }
- @Composable fun B(content: @Composable () -> Unit) { content() }
- @Composable fun C() {
- B { A() }
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable fun Example() {
+ @Composable fun A() { }
+ @Composable fun B(content: @Composable () -> Unit) { content() }
+ @Composable fun C() {
+ B { A() }
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalInALocal\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalInALocal\133useFir = true\135.txt"
index 74c9f3c..36d03b7 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalInALocal\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalInALocal\133useFir = true\135.txt"
@@ -1,17 +1,20 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable fun Example() {
- @Composable fun A() { }
- @Composable fun B(content: @Composable () -> Unit) { content() }
- @Composable fun C() {
- B { A() }
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable fun Example() {
+ @Composable fun A() { }
+ @Composable fun B(content: @Composable () -> Unit) { content() }
+ @Composable fun C() {
+ B { A() }
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalVariableComposableLambdas\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalVariableComposableLambdas\133useFir = false\135.txt"
index 86da6d9..b5e7854 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalVariableComposableLambdas\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalVariableComposableLambdas\133useFir = false\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable fun A() {
- val foo = @Composable {}
- val bar: @Composable () -> Unit = {}
- B(foo)
- B(bar)
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable fun A() {
+ val foo = @Composable {}
+ val bar: @Composable () -> Unit = {}
+ B(foo)
+ B(bar)
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalVariableComposableLambdas\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalVariableComposableLambdas\133useFir = true\135.txt"
index 86da6d9..b5e7854 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalVariableComposableLambdas\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testLocalVariableComposableLambdas\133useFir = true\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable fun A() {
- val foo = @Composable {}
- val bar: @Composable () -> Unit = {}
- B(foo)
- B(bar)
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable fun A() {
+ val foo = @Composable {}
+ val bar: @Composable () -> Unit = {}
+ B(foo)
+ B(bar)
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testParameterComposableLambdas\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testParameterComposableLambdas\133useFir = false\135.txt"
index 677a1a7..2a971d4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testParameterComposableLambdas\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testParameterComposableLambdas\133useFir = false\135.txt"
@@ -1,13 +1,16 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable fun A() {
- B {}
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable fun A() {
+ B {}
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testParameterComposableLambdas\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testParameterComposableLambdas\133useFir = true\135.txt"
index 677a1a7..2a971d4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testParameterComposableLambdas\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testParameterComposableLambdas\133useFir = true\135.txt"
@@ -1,13 +1,16 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable fun A() {
- B {}
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable fun A() {
+ B {}
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testRememberComposableLambda\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testRememberComposableLambda\133useFir = false\135.txt"
index e3c2d47..0b28cfa 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testRememberComposableLambda\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testRememberComposableLambda\133useFir = false\135.txt"
@@ -1,15 +1,18 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test(s: String) {
- remember<@Composable () -> Unit> { { Text(s) } }()
- currentComposer.cache<@Composable () -> Unit>(false) { { Text(s) } }()
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(s: String) {
+ remember<@Composable () -> Unit> { { Text(s) } }()
+ currentComposer.cache<@Composable () -> Unit>(false) { { Text(s) } }()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(s: String, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testRememberComposableLambda\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testRememberComposableLambda\133useFir = true\135.txt"
index e3c2d47..0b28cfa 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testRememberComposableLambda\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testRememberComposableLambda\133useFir = true\135.txt"
@@ -1,15 +1,18 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test(s: String) {
- remember<@Composable () -> Unit> { { Text(s) } }()
- currentComposer.cache<@Composable () -> Unit>(false) { { Text(s) } }()
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(s: String) {
+ remember<@Composable () -> Unit> { { Text(s) } }()
+ currentComposer.cache<@Composable () -> Unit>(false) { { Text(s) } }()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(s: String, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testStateDelegateCapture\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testStateDelegateCapture\133useFir = false\135.txt"
index 86f3bd9..60c8034 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testStateDelegateCapture\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testStateDelegateCapture\133useFir = false\135.txt"
@@ -1,18 +1,21 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
- import androidx.compose.runtime.mutableStateOf
- import androidx.compose.runtime.getValue
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.getValue
- @Composable fun A() {
- val x by mutableStateOf("abc")
- B {
- print(x)
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable fun A() {
+ val x by mutableStateOf("abc")
+ B {
+ print(x)
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testStateDelegateCapture\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testStateDelegateCapture\133useFir = true\135.txt"
index 86f3bd9..60c8034 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testStateDelegateCapture\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testStateDelegateCapture\133useFir = true\135.txt"
@@ -1,18 +1,21 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
- import androidx.compose.runtime.mutableStateOf
- import androidx.compose.runtime.getValue
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.getValue
- @Composable fun A() {
- val x by mutableStateOf("abc")
- B {
- print(x)
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable fun A() {
+ val x by mutableStateOf("abc")
+ B {
+ print(x)
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun A(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testTopLevelComposableLambdaProperties\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testTopLevelComposableLambdaProperties\133useFir = false\135.txt"
index 4d84b9f..8185a83 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testTopLevelComposableLambdaProperties\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testTopLevelComposableLambdaProperties\133useFir = false\135.txt"
@@ -1,12 +1,15 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- val foo = @Composable {}
- val bar: @Composable () -> Unit = {}
-
-/********
- * TRANSFORMED
- ********/
+val foo = @Composable {}
+val bar: @Composable () -> Unit = {}
+
+//
+// Transformed IR
+// ------------------------------------------
val foo: Function2<Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-1
val bar: Function2<Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-2
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testTopLevelComposableLambdaProperties\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testTopLevelComposableLambdaProperties\133useFir = true\135.txt"
index 4d84b9f..8185a83 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testTopLevelComposableLambdaProperties\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LambdaMemoizationTransformTests/testTopLevelComposableLambdaProperties\133useFir = true\135.txt"
@@ -1,12 +1,15 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- val foo = @Composable {}
- val bar: @Composable () -> Unit = {}
-
-/********
- * TRANSFORMED
- ********/
+val foo = @Composable {}
+val bar: @Composable () -> Unit = {}
+
+//
+// Transformed IR
+// ------------------------------------------
val foo: Function2<Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-1
val bar: Function2<Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-2
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testAnonymousClass\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testAnonymousClass\133useFir = false\135.txt"
index 649ae4b..9b4dc70 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testAnonymousClass\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testAnonymousClass\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
interface Foo { fun bar(): Int }
@@ -7,9 +11,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
interface Foo {
abstract fun bar(): Int
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testAnonymousClass\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testAnonymousClass\133useFir = true\135.txt"
index 649ae4b..9b4dc70 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testAnonymousClass\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testAnonymousClass\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
interface Foo { fun bar(): Int }
@@ -7,9 +11,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
interface Foo {
abstract fun bar(): Int
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testBasicTransformConstantFoldingK1\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testBasicTransformConstantFoldingK1\133useFir = false\135.txt"
index fb13a94..a61cac2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testBasicTransformConstantFoldingK1\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testBasicTransformConstantFoldingK1\133useFir = false\135.txt"
@@ -1,12 +1,16 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
fun A() {
print(3 + 4)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
fun A() {
print(LiveLiterals%TestKt.Int%%this%call-plus%arg-0%call-print%fun-A() + LiveLiterals%TestKt.Int%arg-0%call-plus%arg-0%call-print%fun-A())
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testBasicTransformConstantFoldingK2\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testBasicTransformConstantFoldingK2\133useFir = true\135.txt"
index 95c3c39..bc57096 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testBasicTransformConstantFoldingK2\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testBasicTransformConstantFoldingK2\133useFir = true\135.txt"
@@ -1,12 +1,16 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
fun A() {
print(3 + 4)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
fun A() {
print(LiveLiterals%TestKt.Int%arg-0%call-print%fun-A())
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testBasicTransform\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testBasicTransform\133useFir = false\135.txt"
index 0744119..a35baf3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testBasicTransform\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testBasicTransform\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
fun A() {
@@ -12,9 +16,9 @@
print(3)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
fun A() {
print(LiveLiterals%TestKt.Int%arg-0%call-print%fun-A())
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testBasicTransform\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testBasicTransform\133useFir = true\135.txt"
index 3b32ead..e36dae7 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testBasicTransform\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testBasicTransform\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
fun A() {
@@ -12,9 +16,9 @@
print(3)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
fun A() {
print(LiveLiterals%TestKt.Int%arg-0%call-print%fun-A())
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = false\135.txt"
index 47b207c..e5cb0f9 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.runtime.*
import androidx.compose.foundation.layout.*
@@ -18,9 +22,10 @@
Text("$keyboardActions2")
}
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
object Ui {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = true\135.txt"
index 47b207c..e5cb0f9 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralTransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.runtime.*
import androidx.compose.foundation.layout.*
@@ -18,9 +22,10 @@
Text("$keyboardActions2")
}
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
object Ui {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testAnonymousClass\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testAnonymousClass\133useFir = false\135.txt"
index 5939b46..84747ea 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testAnonymousClass\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testAnonymousClass\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
interface Foo { fun bar(): Int }
@@ -7,9 +11,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
interface Foo {
abstract fun bar(): Int
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testAnonymousClass\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testAnonymousClass\133useFir = true\135.txt"
index 5939b46..84747ea 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testAnonymousClass\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testAnonymousClass\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
interface Foo { fun bar(): Int }
@@ -7,9 +11,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
interface Foo {
abstract fun bar(): Int
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testBasicTransformConstantFoldingK1\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testBasicTransformConstantFoldingK1\133useFir = false\135.txt"
index 9663bee..5f86a83 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testBasicTransformConstantFoldingK1\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testBasicTransformConstantFoldingK1\133useFir = false\135.txt"
@@ -1,12 +1,16 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
fun A() {
print(3 + 4)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
fun A() {
print(LiveLiterals%TestKt.Int%%this%call-plus%arg-0%call-print%fun-A() + LiveLiterals%TestKt.Int%arg-0%call-plus%arg-0%call-print%fun-A())
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testBasicTransformConstantFoldingK2\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testBasicTransformConstantFoldingK2\133useFir = true\135.txt"
index 60463b2..2257250 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testBasicTransformConstantFoldingK2\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testBasicTransformConstantFoldingK2\133useFir = true\135.txt"
@@ -1,12 +1,16 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
fun A() {
print(3 + 4)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
fun A() {
print(LiveLiterals%TestKt.Int%arg-0%call-print%fun-A())
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testBasicTransform\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testBasicTransform\133useFir = false\135.txt"
index f5b8700..68dfcf2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testBasicTransform\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testBasicTransform\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
fun A() {
@@ -12,9 +16,9 @@
print(3)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
fun A() {
print(LiveLiterals%TestKt.Int%arg-0%call-print%fun-A())
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testBasicTransform\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testBasicTransform\133useFir = true\135.txt"
index 9e0360d..3a6be0a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testBasicTransform\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testBasicTransform\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
fun A() {
@@ -12,9 +16,9 @@
print(3)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
fun A() {
print(LiveLiterals%TestKt.Int%arg-0%call-print%fun-A())
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = false\135.txt"
index 332e3a5..2735eca 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.runtime.*
import androidx.compose.foundation.layout.*
@@ -18,9 +22,10 @@
Text("$keyboardActions2")
}
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
object Ui {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = true\135.txt"
index 332e3a5..2735eca 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.LiveLiteralV2TransformTests/testComposeIrSkippingWithDefaultsRelease\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.runtime.*
import androidx.compose.foundation.layout.*
@@ -18,9 +22,10 @@
Text("$keyboardActions2")
}
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
object Ui {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testComposableCallBeforeRemember\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testComposableCallBeforeRemember\133useFir = false\135.txt"
index 956b886..b120dce 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testComposableCallBeforeRemember\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testComposableCallBeforeRemember\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -8,9 +12,9 @@
val foo = remember { Foo() }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testComposableCallBeforeRemember\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testComposableCallBeforeRemember\133useFir = true\135.txt"
index 956b886..b120dce 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testComposableCallBeforeRemember\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testComposableCallBeforeRemember\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -8,9 +12,9 @@
val foo = remember { Foo() }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testComposableCallInArgument\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testComposableCallInArgument\133useFir = false\135.txt"
index 398a17d..09009ec 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testComposableCallInArgument\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testComposableCallInArgument\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -7,9 +11,9 @@
val foo = remember(CInt()) { Foo() }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testComposableCallInArgument\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testComposableCallInArgument\133useFir = true\135.txt"
index 398a17d..09009ec 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testComposableCallInArgument\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testComposableCallInArgument\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -7,9 +11,9 @@
val foo = remember(CInt()) { Foo() }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testCompositionLocalCallAsInput\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testCompositionLocalCallAsInput\133useFir = false\135.txt"
index d0b02e0..d78058d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testCompositionLocalCallAsInput\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testCompositionLocalCallAsInput\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -7,9 +11,9 @@
val foo = remember(compositionLocalBar.current) { Foo() }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testCompositionLocalCallAsInput\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testCompositionLocalCallAsInput\133useFir = true\135.txt"
index d0b02e0..d78058d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testCompositionLocalCallAsInput\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testCompositionLocalCallAsInput\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -7,9 +11,9 @@
val foo = remember(compositionLocalBar.current) { Foo() }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testCompositionLocalCallBeforeRemember\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testCompositionLocalCallBeforeRemember\133useFir = false\135.txt"
index 94bbf40..50103e6 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testCompositionLocalCallBeforeRemember\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testCompositionLocalCallBeforeRemember\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -8,9 +12,9 @@
val foo = remember(bar) { Foo() }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testCompositionLocalCallBeforeRemember\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testCompositionLocalCallBeforeRemember\133useFir = true\135.txt"
index 94bbf40..50103e6 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testCompositionLocalCallBeforeRemember\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testCompositionLocalCallBeforeRemember\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -8,9 +12,9 @@
val foo = remember(bar) { Foo() }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testElidedRememberInsideIfDeoptsRememberAfterIf\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testElidedRememberInsideIfDeoptsRememberAfterIf\133useFir = false\135.txt"
index f342811..b700885 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testElidedRememberInsideIfDeoptsRememberAfterIf\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testElidedRememberInsideIfDeoptsRememberAfterIf\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -11,9 +15,9 @@
val b = remember { 2 }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@NonRestartableComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testElidedRememberInsideIfDeoptsRememberAfterIf\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testElidedRememberInsideIfDeoptsRememberAfterIf\133useFir = true\135.txt"
index f342811..b700885 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testElidedRememberInsideIfDeoptsRememberAfterIf\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testElidedRememberInsideIfDeoptsRememberAfterIf\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -11,9 +15,9 @@
val b = remember { 2 }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@NonRestartableComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testForEarlyExit\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testForEarlyExit\133useFir = false\135.txt"
index 143fe01..86187fb 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testForEarlyExit\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testForEarlyExit\133useFir = false\135.txt"
@@ -1,17 +1,20 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test(condition: Boolean) {
- val value = remember { mutableStateOf(false) }
- if (!value.value && !condition) return
- val value2 = remember { mutableStateOf(false) }
- Text("Text ${value.value}, ${value2.value}")
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(condition: Boolean) {
+ val value = remember { mutableStateOf(false) }
+ if (!value.value && !condition) return
+ val value2 = remember { mutableStateOf(false) }
+ Text("Text ${value.value}, ${value2.value}")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testForEarlyExit\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testForEarlyExit\133useFir = true\135.txt"
index 143fe01..86187fb 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testForEarlyExit\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testForEarlyExit\133useFir = true\135.txt"
@@ -1,17 +1,20 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test(condition: Boolean) {
- val value = remember { mutableStateOf(false) }
- if (!value.value && !condition) return
- val value2 = remember { mutableStateOf(false) }
- Text("Text ${value.value}, ${value2.value}")
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(condition: Boolean) {
+ val value = remember { mutableStateOf(false) }
+ if (!value.value && !condition) return
+ val value2 = remember { mutableStateOf(false) }
+ Text("Text ${value.value}, ${value2.value}")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfDefaultParameters_AfterComposable\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfDefaultParameters_AfterComposable\133useFir = false\135.txt"
index 0e3e8ec..3ba59c3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfDefaultParameters_AfterComposable\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfDefaultParameters_AfterComposable\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -9,9 +13,9 @@
used(c)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, b: Int, c: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfDefaultParameters_AfterComposable\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfDefaultParameters_AfterComposable\133useFir = true\135.txt"
index 0e3e8ec..3ba59c3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfDefaultParameters_AfterComposable\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfDefaultParameters_AfterComposable\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -9,9 +13,9 @@
used(c)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, b: Int, c: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfDefaultParameters_Simple\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfDefaultParameters_Simple\133useFir = false\135.txt"
index e795429..70318d6 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfDefaultParameters_Simple\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfDefaultParameters_Simple\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -7,9 +11,9 @@
used(a)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfDefaultParameters_Simple\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfDefaultParameters_Simple\133useFir = true\135.txt"
index e795429..70318d6 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfDefaultParameters_Simple\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfDefaultParameters_Simple\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -7,9 +11,9 @@
used(a)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfLambdaInIfBlock\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfLambdaInIfBlock\133useFir = false\135.txt"
index c83eb29..11f69f4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfLambdaInIfBlock\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfLambdaInIfBlock\133useFir = false\135.txt"
@@ -1,4 +1,8 @@
- import androidx.compose.runtime.Composable
+//
+// Source
+// ------------------------------------------
+
+import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -17,9 +21,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Boolean, visible: Boolean, onDismiss: Function0<Unit>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfLambdaInIfBlock\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfLambdaInIfBlock\133useFir = true\135.txt"
index c83eb29..11f69f4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfLambdaInIfBlock\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testIntrinsicRememberOfLambdaInIfBlock\133useFir = true\135.txt"
@@ -1,4 +1,8 @@
- import androidx.compose.runtime.Composable
+//
+// Source
+// ------------------------------------------
+
+import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -17,9 +21,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Boolean, visible: Boolean, onDismiss: Function0<Unit>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testMultipleParamInputs\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testMultipleParamInputs\133useFir = false\135.txt"
index a851f79d..9f1eae6 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testMultipleParamInputs\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testMultipleParamInputs\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -14,9 +18,9 @@
return deferred > 10
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun <T> loadResourceInternal(key: String, pendingResource: T?, failedResource: T?, %composer: Composer?, %changed: Int, %default: Int): Boolean {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testMultipleParamInputs\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testMultipleParamInputs\133useFir = true\135.txt"
index a851f79d..9f1eae6 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testMultipleParamInputs\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testMultipleParamInputs\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -14,9 +18,9 @@
return deferred > 10
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun <T> loadResourceInternal(key: String, pendingResource: T?, failedResource: T?, %composer: Composer?, %changed: Int, %default: Int): Boolean {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testMultipleRememberCallsInARow\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testMultipleRememberCallsInARow\133useFir = false\135.txt"
index de1531d..20c5361 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testMultipleRememberCallsInARow\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testMultipleRememberCallsInARow\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -12,9 +16,9 @@
val bar = remember(c, d) { Foo(c, d) }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testMultipleRememberCallsInARow\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testMultipleRememberCallsInARow\133useFir = true\135.txt"
index de1531d..20c5361 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testMultipleRememberCallsInARow\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testMultipleRememberCallsInARow\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -12,9 +16,9 @@
val bar = remember(c, d) { Foo(c, d) }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNoArgs\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNoArgs\133useFir = false\135.txt"
index 700b5f4..95662bf 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNoArgs\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNoArgs\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -10,9 +14,9 @@
val bam = remember { Foo() }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNoArgs\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNoArgs\133useFir = true\135.txt"
index 700b5f4..95662bf 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNoArgs\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNoArgs\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -10,9 +14,9 @@
val bam = remember { Foo() }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNonArgs\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNonArgs\133useFir = false\135.txt"
index 72b0139..e61afb0 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNonArgs\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNonArgs\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -9,9 +13,9 @@
val foo = remember(a, b) { Foo(a, b) }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNonArgs\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNonArgs\133useFir = true\135.txt"
index 72b0139..e61afb0 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNonArgs\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNonArgs\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -9,9 +13,9 @@
val foo = remember(a, b) { Foo(a, b) }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNonRestartableParameterInputsStableUnstableUncertain\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNonRestartableParameterInputsStableUnstableUncertain\133useFir = false\135.txt"
index 08fca3f..60a2263 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNonRestartableParameterInputsStableUnstableUncertain\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNonRestartableParameterInputsStableUnstableUncertain\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -20,9 +24,9 @@
remember(x) { 1 }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@NonRestartableComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNonRestartableParameterInputsStableUnstableUncertain\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNonRestartableParameterInputsStableUnstableUncertain\133useFir = true\135.txt"
index 08fca3f..60a2263 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNonRestartableParameterInputsStableUnstableUncertain\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testNonRestartableParameterInputsStableUnstableUncertain\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -20,9 +24,9 @@
remember(x) { 1 }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@NonRestartableComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testOptimizationFailsIfDefaultsGroupIsUsed\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testOptimizationFailsIfDefaultsGroupIsUsed\133useFir = false\135.txt"
index 82d0a5b9..1b486ea 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testOptimizationFailsIfDefaultsGroupIsUsed\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testOptimizationFailsIfDefaultsGroupIsUsed\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -9,9 +13,9 @@
used(a)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testOptimizationFailsIfDefaultsGroupIsUsed\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testOptimizationFailsIfDefaultsGroupIsUsed\133useFir = true\135.txt"
index 82d0a5b9..1b486ea 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testOptimizationFailsIfDefaultsGroupIsUsed\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testOptimizationFailsIfDefaultsGroupIsUsed\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -9,9 +13,9 @@
used(a)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testParamAndNonParamInputsInDirectFunction\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testParamAndNonParamInputsInDirectFunction\133useFir = false\135.txt"
index b966daa..6a68a2b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testParamAndNonParamInputsInDirectFunction\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testParamAndNonParamInputsInDirectFunction\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -8,9 +12,9 @@
return remember(a, b) { Foo(a, b) }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, %composer: Composer?, %changed: Int): Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testParamAndNonParamInputsInDirectFunction\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testParamAndNonParamInputsInDirectFunction\133useFir = true\135.txt"
index b966daa..6a68a2b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testParamAndNonParamInputsInDirectFunction\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testParamAndNonParamInputsInDirectFunction\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -8,9 +12,9 @@
return remember(a, b) { Foo(a, b) }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, %composer: Composer?, %changed: Int): Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testParamAndNonParamInputsInRestartableFunction\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testParamAndNonParamInputsInRestartableFunction\133useFir = false\135.txt"
index c01df7f9f..0bf34d3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testParamAndNonParamInputsInRestartableFunction\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testParamAndNonParamInputsInRestartableFunction\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -8,9 +12,9 @@
val foo = remember(a, b) { Foo(a, b) }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testParamAndNonParamInputsInRestartableFunction\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testParamAndNonParamInputsInRestartableFunction\133useFir = true\135.txt"
index c01df7f9f..0bf34d3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testParamAndNonParamInputsInRestartableFunction\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testParamAndNonParamInputsInRestartableFunction\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -8,9 +12,9 @@
val foo = remember(a, b) { Foo(a, b) }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testPassedArgs\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testPassedArgs\133useFir = false\135.txt"
index 83a137f..28739a4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testPassedArgs\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testPassedArgs\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -5,9 +9,9 @@
@Composable
fun rememberFoo(a: Int, b: Int) = remember(a, b) { Foo(a, b) }
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun rememberFoo(a: Int, b: Int, %composer: Composer?, %changed: Int): Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testPassedArgs\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testPassedArgs\133useFir = true\135.txt"
index 83a137f..28739a4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testPassedArgs\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testPassedArgs\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -5,9 +9,9 @@
@Composable
fun rememberFoo(a: Int, b: Int) = remember(a, b) { Foo(a, b) }
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun rememberFoo(a: Int, b: Int, %composer: Composer?, %changed: Int): Foo {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAdaptedFunctionReference\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAdaptedFunctionReference\133useFir = false\135.txt"
index 96b313e..8ef7180 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAdaptedFunctionReference\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAdaptedFunctionReference\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -7,9 +11,9 @@
used(remember(a, ::effect))
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAdaptedFunctionReference\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAdaptedFunctionReference\133useFir = true\135.txt"
index 96b313e..8ef7180 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAdaptedFunctionReference\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAdaptedFunctionReference\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -7,9 +11,9 @@
used(remember(a, ::effect))
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterNonStaticDefaultParameters\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterNonStaticDefaultParameters\133useFir = false\135.txt"
index 40518d1..b63e3e7 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterNonStaticDefaultParameters\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterNonStaticDefaultParameters\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -8,9 +12,9 @@
used(s)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, b: Foo?, c: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterNonStaticDefaultParameters\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterNonStaticDefaultParameters\133useFir = true\135.txt"
index 40518d1..b63e3e7 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterNonStaticDefaultParameters\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterNonStaticDefaultParameters\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -8,9 +12,9 @@
used(s)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, b: Foo?, c: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterStaticDefaultParameters\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterStaticDefaultParameters\133useFir = false\135.txt"
index edd6df6..39860a0 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterStaticDefaultParameters\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterStaticDefaultParameters\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -8,9 +12,9 @@
used(s)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, b: Foo?, c: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterStaticDefaultParameters\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterStaticDefaultParameters\133useFir = true\135.txt"
index edd6df6..39860a0 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterStaticDefaultParameters\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberAfterStaticDefaultParameters\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -8,9 +12,9 @@
used(s)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, b: Foo?, c: Int, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberFunctionReference\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberFunctionReference\133useFir = false\135.txt"
index 5d81ffb..a4c5f1eb 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberFunctionReference\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberFunctionReference\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -7,9 +11,9 @@
used(remember(a, ::effect))
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberFunctionReference\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberFunctionReference\133useFir = true\135.txt"
index 5d81ffb..a4c5f1eb 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberFunctionReference\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberFunctionReference\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -7,9 +11,9 @@
used(remember(a, ::effect))
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInALoop\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInALoop\133useFir = false\135.txt"
index b88caef..fbcecde 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInALoop\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInALoop\133useFir = false\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- val content: @Composable (a: SomeUnstableClass) -> Unit = {
- for (index in 0 until count) {
- val i = remember { index }
- }
- val a = remember { 1 }
- }
-
-/********
- * TRANSFORMED
- ********/
+val content: @Composable (a: SomeUnstableClass) -> Unit = {
+ for (index in 0 until count) {
+ val i = remember { index }
+ }
+ val a = remember { 1 }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
val content: Function3<@[ParameterName(name = 'a')] SomeUnstableClass, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-1
internal object ComposableSingletons%TestKt {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInALoop\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInALoop\133useFir = true\135.txt"
index ebe302b..1403300 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInALoop\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInALoop\133useFir = true\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- val content: @Composable (a: SomeUnstableClass) -> Unit = {
- for (index in 0 until count) {
- val i = remember { index }
- }
- val a = remember { 1 }
- }
-
-/********
- * TRANSFORMED
- ********/
+val content: @Composable (a: SomeUnstableClass) -> Unit = {
+ for (index in 0 until count) {
+ val i = remember { index }
+ }
+ val a = remember { 1 }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
val content: Function3<@[ParameterName(name = 'a')] SomeUnstableClass, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-1
internal object ComposableSingletons%TestKt {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInALoop_NoTrailingRemember\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInALoop_NoTrailingRemember\133useFir = false\135.txt"
index fd9bcb3..09202c9 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInALoop_NoTrailingRemember\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInALoop_NoTrailingRemember\133useFir = false\135.txt"
@@ -1,15 +1,18 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- val content: @Composable (a: SomeUnstableClass) -> Unit = {
- for (index in 0 until count) {
- val i = remember { index }
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+val content: @Composable (a: SomeUnstableClass) -> Unit = {
+ for (index in 0 until count) {
+ val i = remember { index }
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
val content: Function3<@[ParameterName(name = 'a')] SomeUnstableClass, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-1
internal object ComposableSingletons%TestKt {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInALoop_NoTrailingRemember\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInALoop_NoTrailingRemember\133useFir = true\135.txt"
index 80aff8a..72b653b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInALoop_NoTrailingRemember\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInALoop_NoTrailingRemember\133useFir = true\135.txt"
@@ -1,15 +1,18 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- val content: @Composable (a: SomeUnstableClass) -> Unit = {
- for (index in 0 until count) {
- val i = remember { index }
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+val content: @Composable (a: SomeUnstableClass) -> Unit = {
+ for (index in 0 until count) {
+ val i = remember { index }
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
val content: Function3<@[ParameterName(name = 'a')] SomeUnstableClass, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda-1
internal object ComposableSingletons%TestKt {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfIfWithComposableCallBefore\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfIfWithComposableCallBefore\133useFir = false\135.txt"
index f4e220a..0425815d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfIfWithComposableCallBefore\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfIfWithComposableCallBefore\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -10,9 +14,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfIfWithComposableCallBefore\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfIfWithComposableCallBefore\133useFir = true\135.txt"
index f4e220a..0425815d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfIfWithComposableCallBefore\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfIfWithComposableCallBefore\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -10,9 +14,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfIf\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfIf\133useFir = false\135.txt"
index f5fd3e8..0af000b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfIf\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfIf\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -10,9 +14,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfIf\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfIf\133useFir = true\135.txt"
index f5fd3e8..0af000b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfIf\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfIf\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -10,9 +14,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(condition: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfWhileWithCallsAfter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfWhileWithCallsAfter\133useFir = false\135.txt"
index 8842393..77e7df1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfWhileWithCallsAfter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfWhileWithCallsAfter\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -12,9 +16,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(items: List<Int>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfWhileWithCallsAfter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfWhileWithCallsAfter\133useFir = true\135.txt"
index 8842393..77e7df1 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfWhileWithCallsAfter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfWhileWithCallsAfter\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -12,9 +16,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(items: List<Int>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfWhileWithOnlyRemembers\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfWhileWithOnlyRemembers\133useFir = false\135.txt"
index c5900e8..1202a89 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfWhileWithOnlyRemembers\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfWhileWithOnlyRemembers\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(items: List<Int>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfWhileWithOnlyRemembers\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfWhileWithOnlyRemembers\133useFir = true\135.txt"
index c5900e8..1202a89 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfWhileWithOnlyRemembers\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberInsideOfWhileWithOnlyRemembers\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(items: List<Int>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberMemoizedLambda\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberMemoizedLambda\133useFir = false\135.txt"
index ac9e597..122ef5d2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberMemoizedLambda\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberMemoizedLambda\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -7,9 +11,9 @@
used { a }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberMemoizedLambda\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberMemoizedLambda\133useFir = true\135.txt"
index ac9e597..122ef5d2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberMemoizedLambda\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberMemoizedLambda\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -7,9 +11,9 @@
used { a }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberPropertyReference\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberPropertyReference\133useFir = false\135.txt"
index 0ead04f..6a46f35 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberPropertyReference\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberPropertyReference\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -7,9 +11,9 @@
used(remember(a, a::value))
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: A, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberPropertyReference\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberPropertyReference\133useFir = true\135.txt"
index 0ead04f..6a46f35 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberPropertyReference\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberPropertyReference\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -7,9 +11,9 @@
used(remember(a, a::value))
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: A, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithInlineClassInput\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithInlineClassInput\133useFir = false\135.txt"
index 19b8d2a..89ee2a9 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithInlineClassInput\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithInlineClassInput\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -8,9 +12,9 @@
val foo = remember(inlineInt, a) { Foo() }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(inlineInt: InlineInt, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithInlineClassInput\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithInlineClassInput\133useFir = true\135.txt"
index 19b8d2a..89ee2a9 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithInlineClassInput\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithInlineClassInput\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -8,9 +12,9 @@
val foo = remember(inlineInt, a) { Foo() }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(inlineInt: InlineInt, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithNArgs\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithNArgs\133useFir = false\135.txt"
index d12a4c1..340650a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithNArgs\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithNArgs\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -7,9 +11,9 @@
val foo = remember(a, b, c, d) { Foo() }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, b: Int, c: Bar, d: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithNArgs\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithNArgs\133useFir = true\135.txt"
index d12a4c1..340650a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithNArgs\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithNArgs\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -7,9 +11,9 @@
val foo = remember(a, b, c, d) { Foo() }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(a: Int, b: Int, c: Bar, d: Boolean, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRestartableParameterInputsStableUnstableUncertain\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRestartableParameterInputsStableUnstableUncertain\133useFir = false\135.txt"
index f543ddc..b50bb53 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRestartableParameterInputsStableUnstableUncertain\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRestartableParameterInputsStableUnstableUncertain\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -15,9 +19,9 @@
remember(x) { 1 }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun test1(x: KnownStable, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRestartableParameterInputsStableUnstableUncertain\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRestartableParameterInputsStableUnstableUncertain\133useFir = true\135.txt"
index f543ddc..b50bb53 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRestartableParameterInputsStableUnstableUncertain\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRestartableParameterInputsStableUnstableUncertain\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -15,9 +19,9 @@
remember(x) { 1 }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun test1(x: KnownStable, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testVarargWithSpread\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testVarargWithSpread\133useFir = false\135.txt"
index 9a4e433..1b84b36 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testVarargWithSpread\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testVarargWithSpread\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -7,9 +11,9 @@
val foo = remember(*items) { Foo() }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(items: Array<Bar>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testVarargWithSpread\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testVarargWithSpread\133useFir = true\135.txt"
index 9a4e433..1b84b36 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testVarargWithSpread\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testVarargWithSpread\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -7,9 +11,9 @@
val foo = remember(*items) { Foo() }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(items: Array<Bar>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testVarargsIntrinsicRemember\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testVarargsIntrinsicRemember\133useFir = false\135.txt"
index 22b522a..d1ffbe4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testVarargsIntrinsicRemember\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testVarargsIntrinsicRemember\133useFir = false\135.txt"
@@ -1,17 +1,20 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test(vararg strings: String) {
- val show = remember { mutableStateOf(false) }
- if (show.value) {
- Text("Showing")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(vararg strings: String) {
+ val show = remember { mutableStateOf(false) }
+ if (show.value) {
+ Text("Showing")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(strings: Array<out String>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testVarargsIntrinsicRemember\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testVarargsIntrinsicRemember\133useFir = true\135.txt"
index 22b522a..d1ffbe4 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testVarargsIntrinsicRemember\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testVarargsIntrinsicRemember\133useFir = true\135.txt"
@@ -1,17 +1,20 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test(vararg strings: String) {
- val show = remember { mutableStateOf(false) }
- if (show.value) {
- Text("Showing")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(vararg strings: String) {
+ val show = remember { mutableStateOf(false) }
+ if (show.value) {
+ Text("Showing")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(strings: Array<out String>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testZeroArgRemember\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testZeroArgRemember\133useFir = false\135.txt"
index 78846fb..657ec08 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testZeroArgRemember\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testZeroArgRemember\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -8,9 +12,9 @@
used(items)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(items: List<Int>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testZeroArgRemember\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testZeroArgRemember\133useFir = true\135.txt"
index 78846fb..657ec08 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testZeroArgRemember\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testZeroArgRemember\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
@@ -8,9 +12,9 @@
used(items)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(items: List<Int>, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testListOfMarkedAsStable\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testListOfMarkedAsStable\133useFir = false\135.txt"
index bb0944d..6bb2549 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testListOfMarkedAsStable\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testListOfMarkedAsStable\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -6,9 +10,9 @@
A(listOf("a"))
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testListOfMarkedAsStable\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testListOfMarkedAsStable\133useFir = true\135.txt"
index bb0944d..6bb2549 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testListOfMarkedAsStable\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testListOfMarkedAsStable\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -6,9 +10,9 @@
A(listOf("a"))
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Example(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testPassingLocalKnownStable\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testPassingLocalKnownStable\133useFir = false\135.txt"
index 9a6bc3b..55c7278 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testPassingLocalKnownStable\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testPassingLocalKnownStable\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -10,9 +14,9 @@
A(remember { Foo(0) })
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Foo, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testPassingLocalKnownStable\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testPassingLocalKnownStable\133useFir = true\135.txt"
index 9a6bc3b..55c7278 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testPassingLocalKnownStable\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testPassingLocalKnownStable\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -10,9 +14,9 @@
A(remember { Foo(0) })
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Foo, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testPassingLocalKnownUnstable\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testPassingLocalKnownUnstable\133useFir = false\135.txt"
index 594324f..129c1cd 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testPassingLocalKnownUnstable\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testPassingLocalKnownUnstable\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -10,9 +14,9 @@
A(remember { Foo(0) })
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Foo, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testPassingLocalKnownUnstable\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testPassingLocalKnownUnstable\133useFir = true\135.txt"
index 594324f..129c1cd 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testPassingLocalKnownUnstable\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StabilityPropagationTransformTests/testPassingLocalKnownUnstable\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
@@ -10,9 +14,9 @@
A(remember { Foo(0) })
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Foo, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testDontMemoizeLambda\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testDontMemoizeLambda\133useFir = false\135.txt"
index 2432fa2..f9eb7dd 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testDontMemoizeLambda\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testDontMemoizeLambda\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -12,9 +16,9 @@
Lam @DontMemoize { foo }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testDontMemoizeLambda\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testDontMemoizeLambda\133useFir = true\135.txt"
index 2432fa2..f9eb7dd 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testDontMemoizeLambda\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testDontMemoizeLambda\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -12,9 +16,9 @@
Lam @DontMemoize { foo }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testDontMemoizeLambdasInMarkedFunction\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testDontMemoizeLambdasInMarkedFunction\133useFir = false\135.txt"
index 3797078..01d55915 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testDontMemoizeLambdasInMarkedFunction\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testDontMemoizeLambdasInMarkedFunction\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -12,9 +16,9 @@
val lambda = { foo }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@DontMemoize
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testDontMemoizeLambdasInMarkedFunction\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testDontMemoizeLambdasInMarkedFunction\133useFir = true\135.txt"
index 3797078..01d55915 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testDontMemoizeLambdasInMarkedFunction\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testDontMemoizeLambdasInMarkedFunction\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -12,9 +16,9 @@
val lambda = { foo }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@DontMemoize
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testFunctionInterfaceMemorized\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testFunctionInterfaceMemorized\133useFir = false\135.txt"
index b745607..39d3d12 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testFunctionInterfaceMemorized\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testFunctionInterfaceMemorized\133useFir = false\135.txt"
@@ -1,4 +1,8 @@
- import androidx.compose.runtime.Composable
+//
+// Source
+// ------------------------------------------
+
+import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -14,9 +18,10 @@
use(capture)
}
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun TestMemoizedFun(compute: TestFunInterface, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testFunctionInterfaceMemorized\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testFunctionInterfaceMemorized\133useFir = true\135.txt"
index b745607..39d3d12 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testFunctionInterfaceMemorized\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testFunctionInterfaceMemorized\133useFir = true\135.txt"
@@ -1,4 +1,8 @@
- import androidx.compose.runtime.Composable
+//
+// Source
+// ------------------------------------------
+
+import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -14,9 +18,10 @@
use(capture)
}
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun TestMemoizedFun(compute: TestFunInterface, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingComposableLambda\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingComposableLambda\133useFir = false\135.txt"
index e65f73b..a87358e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingComposableLambda\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingComposableLambda\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(foo: Foo, bar: Bar, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingComposableLambda\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingComposableLambda\133useFir = true\135.txt"
index e65f73b..a87358e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingComposableLambda\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingComposableLambda\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(foo: Foo, bar: Bar, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingStableAndUnstableCapturesInLambda\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingStableAndUnstableCapturesInLambda\133useFir = false\135.txt"
index 446969f..1d34b4c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingStableAndUnstableCapturesInLambda\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingStableAndUnstableCapturesInLambda\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -13,9 +17,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingStableAndUnstableCapturesInLambda\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingStableAndUnstableCapturesInLambda\133useFir = true\135.txt"
index 446969f..1d34b4c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingStableAndUnstableCapturesInLambda\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingStableAndUnstableCapturesInLambda\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -13,9 +17,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingUnstableCapturesInLambda\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingUnstableCapturesInLambda\133useFir = false\135.txt"
index f1c0d5e..43039fa 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingUnstableCapturesInLambda\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingUnstableCapturesInLambda\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -9,9 +13,9 @@
val lambda = { foo }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingUnstableCapturesInLambda\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingUnstableCapturesInLambda\133useFir = true\135.txt"
index f1c0d5e..43039fa 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingUnstableCapturesInLambda\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingUnstableCapturesInLambda\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -9,9 +13,9 @@
val lambda = { foo }
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingUnstableFunctionParameterInLambda\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingUnstableFunctionParameterInLambda\133useFir = false\135.txt"
index 348cbf0..ec359cb 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingUnstableFunctionParameterInLambda\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingUnstableFunctionParameterInLambda\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(foo: Foo, bar: Bar, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingUnstableFunctionParameterInLambda\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingUnstableFunctionParameterInLambda\133useFir = true\135.txt"
index 348cbf0..ec359cb 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingUnstableFunctionParameterInLambda\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testMemoizingUnstableFunctionParameterInLambda\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -11,9 +15,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(foo: Foo, bar: Bar, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testRuntimeStableParam\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testRuntimeStableParam\133useFir = false\135.txt"
index a5eeb2b..77819da 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testRuntimeStableParam\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testRuntimeStableParam\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -10,9 +14,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Holder<T> {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testRuntimeStableParam\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testRuntimeStableParam\133useFir = true\135.txt"
index a5eeb2b..77819da 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testRuntimeStableParam\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testRuntimeStableParam\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -10,9 +14,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Holder<T> {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testRuntimeStableVarArgs\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testRuntimeStableVarArgs\133useFir = false\135.txt"
index 7f2f1d5..0ac8764 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testRuntimeStableVarArgs\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testRuntimeStableVarArgs\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -10,9 +14,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Holder<T> {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testRuntimeStableVarArgs\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testRuntimeStableVarArgs\133useFir = true\135.txt"
index 7f2f1d5..0ac8764 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testRuntimeStableVarArgs\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testRuntimeStableVarArgs\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -10,9 +14,9 @@
}
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Holder<T> {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleNullableUnstableParam\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleNullableUnstableParam\133useFir = false\135.txt"
index 59a9555..1bd013b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleNullableUnstableParam\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleNullableUnstableParam\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Foo?, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleNullableUnstableParam\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleNullableUnstableParam\133useFir = true\135.txt"
index 59a9555..1bd013b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleNullableUnstableParam\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleNullableUnstableParam\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Foo?, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleOptionalUnstableParam\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleOptionalUnstableParam\133useFir = false\135.txt"
index 84adfc3..91e94e2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleOptionalUnstableParam\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleOptionalUnstableParam\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Foo?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleOptionalUnstableParam\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleOptionalUnstableParam\133useFir = true\135.txt"
index 84adfc3..91e94e2 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleOptionalUnstableParam\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleOptionalUnstableParam\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Foo?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleStableParam\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleStableParam\133useFir = false\135.txt"
index 00554e2..cf77d17 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleStableParam\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleStableParam\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Foo, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleStableParam\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleStableParam\133useFir = true\135.txt"
index 00554e2..cf77d17 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleStableParam\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleStableParam\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Foo, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleUnstableParam\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleUnstableParam\133useFir = false\135.txt"
index a724add..79205eb 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleUnstableParam\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleUnstableParam\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Foo, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleUnstableParam\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleUnstableParam\133useFir = true\135.txt"
index a724add..79205eb 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleUnstableParam\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testSingleUnstableParam\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -8,9 +12,9 @@
A(x)
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(x: Foo, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testStableUnstableParams\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testStableUnstableParams\133useFir = false\135.txt"
index d443504..650d163 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testStableUnstableParams\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testStableUnstableParams\133useFir = false\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -16,9 +20,9 @@
print("Hello World")
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun CanSkip(a: Int, b: Foo?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testStableUnstableParams\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testStableUnstableParams\133useFir = true\135.txt"
index d443504..650d163 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testStableUnstableParams\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testStableUnstableParams\133useFir = true\135.txt"
@@ -1,3 +1,7 @@
+//
+// Source
+// ------------------------------------------
+
import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -16,9 +20,9 @@
print("Hello World")
}
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun CanSkip(a: Int, b: Foo?, %composer: Composer?, %changed: Int, %default: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testStaticDefaultParam\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testStaticDefaultParam\133useFir = false\135.txt"
index de97893..cea0fa5 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testStaticDefaultParam\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testStaticDefaultParam\133useFir = false\135.txt"
@@ -1,4 +1,8 @@
- import androidx.compose.runtime.Composable
+//
+// Source
+// ------------------------------------------
+
+import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -6,9 +10,10 @@
fun Test(i: Int) {
A(i)
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(i: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testStaticDefaultParam\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testStaticDefaultParam\133useFir = true\135.txt"
index de97893..cea0fa5 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testStaticDefaultParam\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testStaticDefaultParam\133useFir = true\135.txt"
@@ -1,4 +1,8 @@
- import androidx.compose.runtime.Composable
+//
+// Source
+// ------------------------------------------
+
+import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -6,9 +10,10 @@
fun Test(i: Int) {
A(i)
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(i: Int, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testVarArgs\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testVarArgs\133useFir = false\135.txt"
index e7964b5..11217bf 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testVarArgs\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testVarArgs\133useFir = false\135.txt"
@@ -1,4 +1,8 @@
- import androidx.compose.runtime.Composable
+//
+// Source
+// ------------------------------------------
+
+import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -7,9 +11,10 @@
@Composable fun Test() {
Varargs(1, 2, 3)
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Varargs(ints: IntArray, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testVarArgs\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testVarArgs\133useFir = true\135.txt"
index e7964b5..11217bf 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testVarArgs\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.StrongSkippingModeTransformTests/testVarArgs\133useFir = true\135.txt"
@@ -1,4 +1,8 @@
- import androidx.compose.runtime.Composable
+//
+// Source
+// ------------------------------------------
+
+import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable
@@ -7,9 +11,10 @@
@Composable fun Test() {
Varargs(1, 2, 3)
}
-/********
- * TRANSFORMED
- ********/
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Varargs(ints: IntArray, %composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testAddingComposablesToAList\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testAddingComposablesToAList\133useFir = false\135.txt"
index 0cc221d..8cb05c7 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testAddingComposablesToAList\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testAddingComposablesToAList\133useFir = false\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- class Scope {
- private val list = IntervalList<Scope.(Int) -> (@Composable () -> Unit)>()
- fun item(content: @Composable Scope.() -> Unit) {
- list.add(1) { @Composable { content() } }
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+class Scope {
+ private val list = IntervalList<Scope.(Int) -> (@Composable () -> Unit)>()
+ fun item(content: @Composable Scope.() -> Unit) {
+ list.add(1) { @Composable { content() } }
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Scope {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testAddingComposablesToAList\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testAddingComposablesToAList\133useFir = true\135.txt"
index 0cc221d..8cb05c7 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testAddingComposablesToAList\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testAddingComposablesToAList\133useFir = true\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- class Scope {
- private val list = IntervalList<Scope.(Int) -> (@Composable () -> Unit)>()
- fun item(content: @Composable Scope.() -> Unit) {
- list.add(1) { @Composable { content() } }
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+class Scope {
+ private val list = IntervalList<Scope.(Int) -> (@Composable () -> Unit)>()
+ fun item(content: @Composable Scope.() -> Unit) {
+ list.add(1) { @Composable { content() } }
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class Scope {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingComposableParameterWithComposableParameter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingComposableParameterWithComposableParameter\133useFir = false\135.txt"
index f8681f0..2bf471c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingComposableParameterWithComposableParameter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingComposableParameterWithComposableParameter\133useFir = false\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test(decorator: @Composable (content: @Composable () -> Unit) -> Unit) {
- decorator {
- Text("Some text")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(decorator: @Composable (content: @Composable () -> Unit) -> Unit) {
+ decorator {
+ Text("Some text")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[UI[UI[UI]]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingComposableParameterWithComposableParameter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingComposableParameterWithComposableParameter\133useFir = true\135.txt"
index f8681f0..2bf471c 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingComposableParameterWithComposableParameter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingComposableParameterWithComposableParameter\133useFir = true\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test(decorator: @Composable (content: @Composable () -> Unit) -> Unit) {
- decorator {
- Text("Some text")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(decorator: @Composable (content: @Composable () -> Unit) -> Unit) {
+ decorator {
+ Text("Some text")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[UI[UI[UI]]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingLayout\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingLayout\133useFir = false\135.txt"
index 2e8d6b1..ba5d12b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingLayout\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingLayout\133useFir = false\135.txt"
@@ -1,54 +1,57 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
- import androidx.compose.ui.layout.*
- import androidx.compose.foundation.text.*
- import androidx.compose.ui.text.*
- import androidx.compose.ui.text.style.*
+import androidx.compose.runtime.*
+import androidx.compose.ui.layout.*
+import androidx.compose.foundation.text.*
+import androidx.compose.ui.text.*
+import androidx.compose.ui.text.style.*
- @Composable
- fun Test1() {
- Layout(content = { }) { _, _ -> error("") }
- }
+@Composable
+fun Test1() {
+ Layout(content = { }) { _, _ -> error("") }
+}
- @Composable
- fun Test2(content: @Composable ()->Unit) {
- Layout(content = content) { _, _ -> error("") }
- }
+@Composable
+fun Test2(content: @Composable ()->Unit) {
+ Layout(content = content) { _, _ -> error("") }
+}
- @Composable
- fun Test3() {
- Test1()
- }
+@Composable
+fun Test3() {
+ Test1()
+}
- @Composable
- fun Test4() {
- BasicText(text = AnnotatedString("Some text"))
- }
+@Composable
+fun Test4() {
+ BasicText(text = AnnotatedString("Some text"))
+}
- val Local = compositionLocalOf { 0 }
+val Local = compositionLocalOf { 0 }
- @Composable
- fun Test5(content: @Composable () -> Unit) {
- CompositionLocalProvider(Local provides 5) {
- Test1()
- content()
- }
- }
+@Composable
+fun Test5(content: @Composable () -> Unit) {
+ CompositionLocalProvider(Local provides 5) {
+ Test1()
+ content()
+ }
+}
- @Composable
- fun Test6(test: String) {
- CompositionLocalProvider(Local provides 6) {
- T(test)
- Test1()
- }
- }
+@Composable
+fun Test6(test: String) {
+ CompositionLocalProvider(Local provides 6) {
+ T(test)
+ Test1()
+ }
+}
- @Composable
- fun T(value: String) { }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun T(value: String) { }
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableTarget(applier = "androidx.compose.ui.UiComposable")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingLayout\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingLayout\133useFir = true\135.txt"
index 2e8d6b1..ba5d12b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingLayout\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingLayout\133useFir = true\135.txt"
@@ -1,54 +1,57 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
- import androidx.compose.ui.layout.*
- import androidx.compose.foundation.text.*
- import androidx.compose.ui.text.*
- import androidx.compose.ui.text.style.*
+import androidx.compose.runtime.*
+import androidx.compose.ui.layout.*
+import androidx.compose.foundation.text.*
+import androidx.compose.ui.text.*
+import androidx.compose.ui.text.style.*
- @Composable
- fun Test1() {
- Layout(content = { }) { _, _ -> error("") }
- }
+@Composable
+fun Test1() {
+ Layout(content = { }) { _, _ -> error("") }
+}
- @Composable
- fun Test2(content: @Composable ()->Unit) {
- Layout(content = content) { _, _ -> error("") }
- }
+@Composable
+fun Test2(content: @Composable ()->Unit) {
+ Layout(content = content) { _, _ -> error("") }
+}
- @Composable
- fun Test3() {
- Test1()
- }
+@Composable
+fun Test3() {
+ Test1()
+}
- @Composable
- fun Test4() {
- BasicText(text = AnnotatedString("Some text"))
- }
+@Composable
+fun Test4() {
+ BasicText(text = AnnotatedString("Some text"))
+}
- val Local = compositionLocalOf { 0 }
+val Local = compositionLocalOf { 0 }
- @Composable
- fun Test5(content: @Composable () -> Unit) {
- CompositionLocalProvider(Local provides 5) {
- Test1()
- content()
- }
- }
+@Composable
+fun Test5(content: @Composable () -> Unit) {
+ CompositionLocalProvider(Local provides 5) {
+ Test1()
+ content()
+ }
+}
- @Composable
- fun Test6(test: String) {
- CompositionLocalProvider(Local provides 6) {
- T(test)
- Test1()
- }
- }
+@Composable
+fun Test6(test: String) {
+ CompositionLocalProvider(Local provides 6) {
+ T(test)
+ Test1()
+ }
+}
- @Composable
- fun T(value: String) { }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun T(value: String) { }
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableTarget(applier = "androidx.compose.ui.UiComposable")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingNullableComposableWithNull\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingNullableComposableWithNull\133useFir = false\135.txt"
index 81e32a5..cb02395 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingNullableComposableWithNull\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingNullableComposableWithNull\133useFir = false\135.txt"
@@ -1,14 +1,17 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test() {
- Widget(null)
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ Widget(null)
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingNullableComposableWithNull\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingNullableComposableWithNull\133useFir = true\135.txt"
index 81e32a5..cb02395 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingNullableComposableWithNull\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCallingNullableComposableWithNull\133useFir = true\135.txt"
@@ -1,14 +1,17 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test() {
- Widget(null)
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ Widget(null)
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCanInferWithGeneric\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCanInferWithGeneric\133useFir = false\135.txt"
index 4d2f3c4..f6fd18e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCanInferWithGeneric\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCanInferWithGeneric\133useFir = false\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test() {
- Wrapper {
- Text("test")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ Wrapper {
+ Text("test")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableTarget(applier = "UI")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCanInferWithGeneric\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCanInferWithGeneric\133useFir = true\135.txt"
index 4d2f3c4..f6fd18e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCanInferWithGeneric\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCanInferWithGeneric\133useFir = true\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test() {
- Wrapper {
- Text("test")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ Wrapper {
+ Text("test")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableTarget(applier = "UI")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCompositionLocalsProvider\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCompositionLocalsProvider\133useFir = false\135.txt"
index 394f4b7..7da5ff3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCompositionLocalsProvider\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCompositionLocalsProvider\133useFir = false\135.txt"
@@ -1,17 +1,20 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
- import androidx.compose.runtime.CompositionLocalProvider
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.CompositionLocalProvider
- @Composable
- fun Test() {
- CompositionLocalProvider {
- Text("test")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ CompositionLocalProvider {
+ Text("test")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableTarget(applier = "UI")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCompositionLocalsProvider\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCompositionLocalsProvider\133useFir = true\135.txt"
index 394f4b7..7da5ff3 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCompositionLocalsProvider\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCompositionLocalsProvider\133useFir = true\135.txt"
@@ -1,17 +1,20 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
- import androidx.compose.runtime.CompositionLocalProvider
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.CompositionLocalProvider
- @Composable
- fun Test() {
- CompositionLocalProvider {
- Text("test")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ CompositionLocalProvider {
+ Text("test")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableTarget(applier = "UI")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCrossfileFileScope\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCrossfileFileScope\133useFir = false\135.txt"
index 5f37e9f..9fb4333 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCrossfileFileScope\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCrossfileFileScope\133useFir = false\135.txt"
@@ -1,12 +1,15 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun InferN() { N() }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun InferN() { N() }
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableTarget(applier = "NComposable")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCrossfileFileScope\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCrossfileFileScope\133useFir = true\135.txt"
index 5f37e9f..9fb4333 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCrossfileFileScope\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testCrossfileFileScope\133useFir = true\135.txt"
@@ -1,12 +1,15 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun InferN() { N() }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun InferN() { N() }
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableTarget(applier = "NComposable")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testFileScoped\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testFileScoped\133useFir = false\135.txt"
index a94ece00..2fb24818 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testFileScoped\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testFileScoped\133useFir = false\135.txt"
@@ -1,22 +1,24 @@
+//
+// Source
+// ------------------------------------------
- @file:NComposable
+@file:NComposable
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun NFromFile() {
- Open()
- }
+@Composable
+fun NFromFile() {
+ Open()
+}
- @Composable
- fun NFromInference() {
- N()
- }
+@Composable
+fun NFromInference() {
+ N()
+}
-
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun NFromFile(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testFileScoped\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testFileScoped\133useFir = true\135.txt"
index a94ece00..2fb24818 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testFileScoped\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testFileScoped\133useFir = true\135.txt"
@@ -1,22 +1,24 @@
+//
+// Source
+// ------------------------------------------
- @file:NComposable
+@file:NComposable
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun NFromFile() {
- Open()
- }
+@Composable
+fun NFromFile() {
+ Open()
+}
- @Composable
- fun NFromInference() {
- N()
- }
+@Composable
+fun NFromInference() {
+ N()
+}
-
-/********
- * TRANSFORMED
- ********/
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun NFromFile(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferInlineLambdaParameter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferInlineLambdaParameter\133useFir = false\135.txt"
index 9b8d93e..a3ceb41 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferInlineLambdaParameter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferInlineLambdaParameter\133useFir = false\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test(content: @Composable () -> Unit) {
- InlineRow {
- Text("test")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(content: @Composable () -> Unit) {
+ InlineRow {
+ Text("test")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[UI[_]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferInlineLambdaParameter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferInlineLambdaParameter\133useFir = true\135.txt"
index 9b8d93e..a3ceb41 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferInlineLambdaParameter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferInlineLambdaParameter\133useFir = true\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test(content: @Composable () -> Unit) {
- InlineRow {
- Text("test")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(content: @Composable () -> Unit) {
+ InlineRow {
+ Text("test")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[UI[_]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferLambdaParameter\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferLambdaParameter\133useFir = false\135.txt"
index fdc636c..944f0fb 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferLambdaParameter\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferLambdaParameter\133useFir = false\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test(content: @Composable () -> Unit) {
- Row {
- Text("test")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(content: @Composable () -> Unit) {
+ Row {
+ Text("test")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[UI[_]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferLambdaParameter\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferLambdaParameter\133useFir = true\135.txt"
index fdc636c..944f0fb 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferLambdaParameter\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferLambdaParameter\133useFir = true\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test(content: @Composable () -> Unit) {
- Row {
- Text("test")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(content: @Composable () -> Unit) {
+ Row {
+ Text("test")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[UI[_]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferSimpleOpen\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferSimpleOpen\133useFir = false\135.txt"
index e8e49d4..33cc305 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferSimpleOpen\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferSimpleOpen\133useFir = false\135.txt"
@@ -1,12 +1,15 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test() { }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() { }
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferSimpleOpen\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferSimpleOpen\133useFir = true\135.txt"
index e8e49d4..33cc305 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferSimpleOpen\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferSimpleOpen\133useFir = true\135.txt"
@@ -1,12 +1,15 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test() { }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() { }
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
fun Test(%composer: Composer?, %changed: Int) {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferUIFromCall\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferUIFromCall\133useFir = false\135.txt"
index 29dd610..bcd752a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferUIFromCall\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferUIFromCall\133useFir = false\135.txt"
@@ -1,14 +1,17 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test() {
- Text("Hello")
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ Text("Hello")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableTarget(applier = "UI")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferUIFromCall\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferUIFromCall\133useFir = true\135.txt"
index 29dd610..bcd752a 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferUIFromCall\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferUIFromCall\133useFir = true\135.txt"
@@ -1,14 +1,17 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test() {
- Text("Hello")
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ Text("Hello")
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableTarget(applier = "UI")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferUnifiedParameters\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferUnifiedParameters\133useFir = false\135.txt"
index dfe9ccb..f848dfe 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferUnifiedParameters\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferUnifiedParameters\133useFir = false\135.txt"
@@ -1,14 +1,17 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test(content: @Composable () -> Unit) {
- content()
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(content: @Composable () -> Unit) {
+ content()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferUnifiedParameters\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferUnifiedParameters\133useFir = true\135.txt"
index dfe9ccb..f848dfe 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferUnifiedParameters\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferUnifiedParameters\133useFir = true\135.txt"
@@ -1,14 +1,17 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test(content: @Composable () -> Unit) {
- content()
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(content: @Composable () -> Unit) {
+ content()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferVectorFromCall\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferVectorFromCall\133useFir = false\135.txt"
index 2463e67..7d21a2d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferVectorFromCall\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferVectorFromCall\133useFir = false\135.txt"
@@ -1,14 +1,17 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test() {
- Circle()
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ Circle()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableTarget(applier = "Vector")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferVectorFromCall\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferVectorFromCall\133useFir = true\135.txt"
index 2463e67..7d21a2d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferVectorFromCall\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferVectorFromCall\133useFir = true\135.txt"
@@ -1,14 +1,17 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- @Composable
- fun Test() {
- Circle()
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ Circle()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableTarget(applier = "Vector")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferringFunInterfaceParameterAnnotations\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferringFunInterfaceParameterAnnotations\133useFir = false\135.txt"
index 73ba221..b55867d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferringFunInterfaceParameterAnnotations\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferringFunInterfaceParameterAnnotations\133useFir = false\135.txt"
@@ -1,35 +1,38 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- fun interface CustomComposable {
- @Composable
- fun call()
- }
+fun interface CustomComposable {
+ @Composable
+ fun call()
+}
- @Composable
- fun OpenCustom(content: CustomComposable) {
- content.call()
- }
+@Composable
+fun OpenCustom(content: CustomComposable) {
+ content.call()
+}
- @Composable
- fun ClosedCustom(content: CustomComposable) {
- Text("Test")
- content.call()
- }
+@Composable
+fun ClosedCustom(content: CustomComposable) {
+ Text("Test")
+ content.call()
+}
- @Composable
- fun Test() {
- OpenCustom {
- Text("Test")
- }
- ClosedCustom {
- Text("Test")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ OpenCustom {
+ Text("Test")
+ }
+ ClosedCustom {
+ Text("Test")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
interface CustomComposable {
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferringFunInterfaceParameterAnnotations\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferringFunInterfaceParameterAnnotations\133useFir = true\135.txt"
index 73ba221..b55867d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferringFunInterfaceParameterAnnotations\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferringFunInterfaceParameterAnnotations\133useFir = true\135.txt"
@@ -1,35 +1,38 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- fun interface CustomComposable {
- @Composable
- fun call()
- }
+fun interface CustomComposable {
+ @Composable
+ fun call()
+}
- @Composable
- fun OpenCustom(content: CustomComposable) {
- content.call()
- }
+@Composable
+fun OpenCustom(content: CustomComposable) {
+ content.call()
+}
- @Composable
- fun ClosedCustom(content: CustomComposable) {
- Text("Test")
- content.call()
- }
+@Composable
+fun ClosedCustom(content: CustomComposable) {
+ Text("Test")
+ content.call()
+}
- @Composable
- fun Test() {
- OpenCustom {
- Text("Test")
- }
- ClosedCustom {
- Text("Test")
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test() {
+ OpenCustom {
+ Text("Test")
+ }
+ ClosedCustom {
+ Text("Test")
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
interface CustomComposable {
@Composable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferringTargetFromAncestorMethod\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferringTargetFromAncestorMethod\133useFir = false\135.txt"
index 01a4bd8..117b34b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferringTargetFromAncestorMethod\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferringTargetFromAncestorMethod\133useFir = false\135.txt"
@@ -1,23 +1,26 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
- import androidx.compose.runtime.ComposableTarget
- import androidx.compose.runtime.ComposableOpenTarget
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.ComposableTarget
+import androidx.compose.runtime.ComposableOpenTarget
- @Composable @ComposableOpenTarget(0) fun OpenTarget() { }
+@Composable @ComposableOpenTarget(0) fun OpenTarget() { }
- abstract class Base {
- @Composable @ComposableTarget("N") abstract fun Compose()
- }
+abstract class Base {
+ @Composable @ComposableTarget("N") abstract fun Compose()
+}
- class Valid : Base () {
- @Composable override fun Compose() {
- OpenTarget()
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+class Valid : Base () {
+ @Composable override fun Compose() {
+ OpenTarget()
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableOpenTarget(index = 0)
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferringTargetFromAncestorMethod\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferringTargetFromAncestorMethod\133useFir = true\135.txt"
index 01a4bd8..117b34b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferringTargetFromAncestorMethod\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testInferringTargetFromAncestorMethod\133useFir = true\135.txt"
@@ -1,23 +1,26 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
- import androidx.compose.runtime.ComposableTarget
- import androidx.compose.runtime.ComposableOpenTarget
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.ComposableTarget
+import androidx.compose.runtime.ComposableOpenTarget
- @Composable @ComposableOpenTarget(0) fun OpenTarget() { }
+@Composable @ComposableOpenTarget(0) fun OpenTarget() { }
- abstract class Base {
- @Composable @ComposableTarget("N") abstract fun Compose()
- }
+abstract class Base {
+ @Composable @ComposableTarget("N") abstract fun Compose()
+}
- class Valid : Base () {
- @Composable override fun Compose() {
- OpenTarget()
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+class Valid : Base () {
+ @Composable override fun Compose() {
+ OpenTarget()
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableOpenTarget(index = 0)
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testLetIt\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testLetIt\133useFir = false\135.txt"
index 3f1cc6f..704fe0d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testLetIt\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testLetIt\133useFir = false\135.txt"
@@ -1,14 +1,17 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test(content: (@Composable () -> Unit?)) {
- content?.let { it() }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(content: (@Composable () -> Unit?)) {
+ content?.let { it() }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testLetIt\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testLetIt\133useFir = true\135.txt"
index 3f1cc6f..704fe0d 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testLetIt\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testLetIt\133useFir = true\135.txt"
@@ -1,14 +1,17 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test(content: (@Composable () -> Unit?)) {
- content?.let { it() }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(content: (@Composable () -> Unit?)) {
+ content?.let { it() }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testOptionalParameters\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testOptionalParameters\133useFir = false\135.txt"
index f029861..e58ce9e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testOptionalParameters\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testOptionalParameters\133useFir = false\135.txt"
@@ -1,54 +1,57 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- @ComposableTarget("UI")
- fun Leaf() { }
+@Composable
+@ComposableTarget("UI")
+fun Leaf() { }
- @Composable
- fun Wrapper(content: @Composable () -> Unit) { content() }
+@Composable
+fun Wrapper(content: @Composable () -> Unit) { content() }
- // [0,[0],[0],[0],[0],[0],[0],[0]]
- @Composable
- fun Optional(
- one: @Composable () -> Unit = { },
- two: (@Composable () -> Unit)? = null,
- three: (@Composable () -> Unit)? = null,
- four: (@Composable () -> Unit)? = null,
- five: (@Composable () -> Unit)? = null,
- six: (@Composable () -> Unit)? = null,
- content: @Composable () -> Unit
- ) {
- one()
+// [0,[0],[0],[0],[0],[0],[0],[0]]
+@Composable
+fun Optional(
+ one: @Composable () -> Unit = { },
+ two: (@Composable () -> Unit)? = null,
+ three: (@Composable () -> Unit)? = null,
+ four: (@Composable () -> Unit)? = null,
+ five: (@Composable () -> Unit)? = null,
+ six: (@Composable () -> Unit)? = null,
+ content: @Composable () -> Unit
+) {
+ one()
- // Invoke through a ?.
- two?.invoke()
+ // Invoke through a ?.
+ two?.invoke()
- // Invoke through a let
- three?.let { it() }
+ // Invoke through a let
+ three?.let { it() }
- // Invoke through a let test
- four?.let { four() }
+ // Invoke through a let test
+ four?.let { four() }
- // Invoke through in an then block
- if (five != null)
- five()
+ // Invoke through in an then block
+ if (five != null)
+ five()
- six?.let { it -> Wrapper(it) }
+ six?.let { it -> Wrapper(it) }
- content()
- }
+ content()
+}
- @Composable
- fun UseOptional() {
- Optional {
- Leaf()
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun UseOptional() {
+ Optional {
+ Leaf()
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableTarget(applier = "UI")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testOptionalParameters\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testOptionalParameters\133useFir = true\135.txt"
index f029861..e58ce9e 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testOptionalParameters\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testOptionalParameters\133useFir = true\135.txt"
@@ -1,54 +1,57 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- @ComposableTarget("UI")
- fun Leaf() { }
+@Composable
+@ComposableTarget("UI")
+fun Leaf() { }
- @Composable
- fun Wrapper(content: @Composable () -> Unit) { content() }
+@Composable
+fun Wrapper(content: @Composable () -> Unit) { content() }
- // [0,[0],[0],[0],[0],[0],[0],[0]]
- @Composable
- fun Optional(
- one: @Composable () -> Unit = { },
- two: (@Composable () -> Unit)? = null,
- three: (@Composable () -> Unit)? = null,
- four: (@Composable () -> Unit)? = null,
- five: (@Composable () -> Unit)? = null,
- six: (@Composable () -> Unit)? = null,
- content: @Composable () -> Unit
- ) {
- one()
+// [0,[0],[0],[0],[0],[0],[0],[0]]
+@Composable
+fun Optional(
+ one: @Composable () -> Unit = { },
+ two: (@Composable () -> Unit)? = null,
+ three: (@Composable () -> Unit)? = null,
+ four: (@Composable () -> Unit)? = null,
+ five: (@Composable () -> Unit)? = null,
+ six: (@Composable () -> Unit)? = null,
+ content: @Composable () -> Unit
+) {
+ one()
- // Invoke through a ?.
- two?.invoke()
+ // Invoke through a ?.
+ two?.invoke()
- // Invoke through a let
- three?.let { it() }
+ // Invoke through a let
+ three?.let { it() }
- // Invoke through a let test
- four?.let { four() }
+ // Invoke through a let test
+ four?.let { four() }
- // Invoke through in an then block
- if (five != null)
- five()
+ // Invoke through in an then block
+ if (five != null)
+ five()
- six?.let { it -> Wrapper(it) }
+ six?.let { it -> Wrapper(it) }
- content()
- }
+ content()
+}
- @Composable
- fun UseOptional() {
- Optional {
- Leaf()
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun UseOptional() {
+ Optional {
+ Leaf()
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableTarget(applier = "UI")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testReceiverScope\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testReceiverScope\133useFir = false\135.txt"
index 4ef6561..9efcacb 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testReceiverScope\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testReceiverScope\133useFir = false\135.txt"
@@ -1,43 +1,46 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
- import androidx.compose.ui.layout.*
- import androidx.compose.foundation.text.*
- import androidx.compose.ui.text.*
- import androidx.compose.ui.text.style.*
- import androidx.compose.ui.*
+import androidx.compose.runtime.*
+import androidx.compose.ui.layout.*
+import androidx.compose.foundation.text.*
+import androidx.compose.ui.text.*
+import androidx.compose.ui.text.style.*
+import androidx.compose.ui.*
- @Immutable
- interface LocalBoxScope {
- @Stable
- fun Modifier.align(alignment: Alignment): Modifier
- }
+@Immutable
+interface LocalBoxScope {
+ @Stable
+ fun Modifier.align(alignment: Alignment): Modifier
+}
- object LocalBoxScopeInstance : LocalBoxScope {
- override fun Modifier.align(alignment: Alignment): Modifier = Modifier
- }
+object LocalBoxScopeInstance : LocalBoxScope {
+ override fun Modifier.align(alignment: Alignment): Modifier = Modifier
+}
- val localBoxMeasurePolicy = MeasurePolicy { _, constraints ->
- layout(
- constraints.minWidth,
- constraints.minHeight
- ) {}
- }
+val localBoxMeasurePolicy = MeasurePolicy { _, constraints ->
+ layout(
+ constraints.minWidth,
+ constraints.minHeight
+ ) {}
+}
- @Composable
- inline fun LocalBox(
- modifier: Modifier = Modifier,
- content: @Composable LocalBoxScope.() -> Unit
- ) {
- Layout(
- modifier = modifier,
- measurePolicy = localBoxMeasurePolicy,
- content = { LocalBoxScopeInstance.content() }
- )
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+inline fun LocalBox(
+ modifier: Modifier = Modifier,
+ content: @Composable LocalBoxScope.() -> Unit
+) {
+ Layout(
+ modifier = modifier,
+ measurePolicy = localBoxMeasurePolicy,
+ content = { LocalBoxScopeInstance.content() }
+ )
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Immutable
interface LocalBoxScope {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testReceiverScope\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testReceiverScope\133useFir = true\135.txt"
index 4ef6561..9efcacb 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testReceiverScope\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testReceiverScope\133useFir = true\135.txt"
@@ -1,43 +1,46 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
- import androidx.compose.ui.layout.*
- import androidx.compose.foundation.text.*
- import androidx.compose.ui.text.*
- import androidx.compose.ui.text.style.*
- import androidx.compose.ui.*
+import androidx.compose.runtime.*
+import androidx.compose.ui.layout.*
+import androidx.compose.foundation.text.*
+import androidx.compose.ui.text.*
+import androidx.compose.ui.text.style.*
+import androidx.compose.ui.*
- @Immutable
- interface LocalBoxScope {
- @Stable
- fun Modifier.align(alignment: Alignment): Modifier
- }
+@Immutable
+interface LocalBoxScope {
+ @Stable
+ fun Modifier.align(alignment: Alignment): Modifier
+}
- object LocalBoxScopeInstance : LocalBoxScope {
- override fun Modifier.align(alignment: Alignment): Modifier = Modifier
- }
+object LocalBoxScopeInstance : LocalBoxScope {
+ override fun Modifier.align(alignment: Alignment): Modifier = Modifier
+}
- val localBoxMeasurePolicy = MeasurePolicy { _, constraints ->
- layout(
- constraints.minWidth,
- constraints.minHeight
- ) {}
- }
+val localBoxMeasurePolicy = MeasurePolicy { _, constraints ->
+ layout(
+ constraints.minWidth,
+ constraints.minHeight
+ ) {}
+}
- @Composable
- inline fun LocalBox(
- modifier: Modifier = Modifier,
- content: @Composable LocalBoxScope.() -> Unit
- ) {
- Layout(
- modifier = modifier,
- measurePolicy = localBoxMeasurePolicy,
- content = { LocalBoxScopeInstance.content() }
- )
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+inline fun LocalBox(
+ modifier: Modifier = Modifier,
+ content: @Composable LocalBoxScope.() -> Unit
+) {
+ Layout(
+ modifier = modifier,
+ measurePolicy = localBoxMeasurePolicy,
+ content = { LocalBoxScopeInstance.content() }
+ )
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Immutable
interface LocalBoxScope {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testRememberUpdatedState\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testRememberUpdatedState\133useFir = false\135.txt"
index 7ff95fb..ce41a8f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testRememberUpdatedState\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testRememberUpdatedState\133useFir = false\135.txt"
@@ -1,19 +1,22 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test(content: @Composable () -> Unit) {
- val updatedContent by rememberUpdatedState(content)
- Defer {
- UiContent {
- updatedContent()
- }
- }
+@Composable
+fun Test(content: @Composable () -> Unit) {
+ val updatedContent by rememberUpdatedState(content)
+ Defer {
+ UiContent {
+ updatedContent()
}
-
-/********
- * TRANSFORMED
- ********/
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[UI[UI]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testRememberUpdatedState\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testRememberUpdatedState\133useFir = true\135.txt"
index 7ff95fb..ce41a8f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testRememberUpdatedState\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TargetAnnotationsTransformTests/testRememberUpdatedState\133useFir = true\135.txt"
@@ -1,19 +1,22 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- fun Test(content: @Composable () -> Unit) {
- val updatedContent by rememberUpdatedState(content)
- Defer {
- UiContent {
- updatedContent()
- }
- }
+@Composable
+fun Test(content: @Composable () -> Unit) {
+ val updatedContent by rememberUpdatedState(content)
+ Defer {
+ UiContent {
+ updatedContent()
}
-
-/********
- * TRANSFORMED
- ********/
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[UI[UI]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testBasicComposableFunctions\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testBasicComposableFunctions\133useFir = false\135.txt"
index 6e949aa..f24438b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testBasicComposableFunctions\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testBasicComposableFunctions\133useFir = false\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- class A {
- @Composable fun B(x: Int) { }
- }
+class A {
+ @Composable fun B(x: Int) { }
+}
- @Composable
- fun C() { A().B(1337) }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun C() { A().B(1337) }
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class A {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testBasicComposableFunctions\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testBasicComposableFunctions\133useFir = true\135.txt"
index 6e949aa..f24438b 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testBasicComposableFunctions\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testBasicComposableFunctions\133useFir = true\135.txt"
@@ -1,16 +1,19 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.Composable
+import androidx.compose.runtime.Composable
- class A {
- @Composable fun B(x: Int) { }
- }
+class A {
+ @Composable fun B(x: Int) { }
+}
- @Composable
- fun C() { A().B(1337) }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun C() { A().B(1337) }
+
+//
+// Transformed IR
+// ------------------------------------------
@StabilityInferred(parameters = 0)
class A {
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testInlineFunctionsDonotGenerateTraceMarkers\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testInlineFunctionsDonotGenerateTraceMarkers\133useFir = false\135.txt"
index b6dcb04..c217496 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testInlineFunctionsDonotGenerateTraceMarkers\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testInlineFunctionsDonotGenerateTraceMarkers\133useFir = false\135.txt"
@@ -1,23 +1,26 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- inline fun Wrapper(content: @Composable () -> Unit) = content()
+@Composable
+inline fun Wrapper(content: @Composable () -> Unit) = content()
- @Composable
- fun Test(condition: Boolean) {
- A()
- Wrapper {
- A()
- if (!condition) return
- A()
- }
- A()
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(condition: Boolean) {
+ A()
+ Wrapper {
+ A()
+ if (!condition) return
+ A()
+ }
+ A()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testInlineFunctionsDonotGenerateTraceMarkers\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testInlineFunctionsDonotGenerateTraceMarkers\133useFir = true\135.txt"
index b6dcb04..c217496 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testInlineFunctionsDonotGenerateTraceMarkers\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testInlineFunctionsDonotGenerateTraceMarkers\133useFir = true\135.txt"
@@ -1,23 +1,26 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- inline fun Wrapper(content: @Composable () -> Unit) = content()
+@Composable
+inline fun Wrapper(content: @Composable () -> Unit) = content()
- @Composable
- fun Test(condition: Boolean) {
- A()
- Wrapper {
- A()
- if (!condition) return
- A()
- }
- A()
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+fun Test(condition: Boolean) {
+ A()
+ Wrapper {
+ A()
+ if (!condition) return
+ A()
+ }
+ A()
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testReadOnlyComposable\133useFir = false\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testReadOnlyComposable\133useFir = false\135.txt"
index a68233f..fc9237f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testReadOnlyComposable\133useFir = false\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testReadOnlyComposable\133useFir = false\135.txt"
@@ -1,19 +1,22 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- @ReadOnlyComposable
- internal fun someFun(a: Boolean): Boolean {
- if (a) {
- return a
- } else {
- return a
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+@ReadOnlyComposable
+internal fun someFun(a: Boolean): Boolean {
+ if (a) {
+ return a
+ } else {
+ return a
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ReadOnlyComposable
diff --git "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testReadOnlyComposable\133useFir = true\135.txt" "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testReadOnlyComposable\133useFir = true\135.txt"
index a68233f..fc9237f 100644
--- "a/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testReadOnlyComposable\133useFir = true\135.txt"
+++ "b/compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.TraceInformationTest/testReadOnlyComposable\133useFir = true\135.txt"
@@ -1,19 +1,22 @@
+//
+// Source
+// ------------------------------------------
- import androidx.compose.runtime.*
+import androidx.compose.runtime.*
- @Composable
- @ReadOnlyComposable
- internal fun someFun(a: Boolean): Boolean {
- if (a) {
- return a
- } else {
- return a
- }
- }
-
-/********
- * TRANSFORMED
- ********/
+@Composable
+@ReadOnlyComposable
+internal fun someFun(a: Boolean): Boolean {
+ if (a) {
+ return a
+ } else {
+ return a
+ }
+}
+
+//
+// Transformed IR
+// ------------------------------------------
@Composable
@ReadOnlyComposable
diff --git a/compose/foundation/foundation/api/api_lint.ignore b/compose/foundation/foundation/api/api_lint.ignore
index 0e31469..cc77cb9 100644
--- a/compose/foundation/foundation/api/api_lint.ignore
+++ b/compose/foundation/foundation/api/api_lint.ignore
@@ -23,8 +23,6 @@
Getter for boolean property `canScrollBackward` is named `getCanScrollBackward` but should match the property name. Use `@get:JvmName` to rename.
GetterSetterNames: androidx.compose.foundation.pager.PagerState#getCanScrollForward():
Getter for boolean property `canScrollForward` is named `getCanScrollForward` but should match the property name. Use `@get:JvmName` to rename.
-GetterSetterNames: androidx.compose.foundation.text2.input.TextFieldBufferWithSelection#getHasSelection():
- Getter for boolean property `hasSelection` is named `getHasSelection` but should match the property name. Use `@get:JvmName` to rename.
GetterSetterNames: field KeyboardOptions.autoCorrect:
Invalid name for boolean property `autoCorrect`. Should start with one of `has`, `can`, `should`, `is`.
GetterSetterNames: field LazyGridLayoutInfo.reverseLayout:
diff --git a/compose/foundation/foundation/lint-baseline.xml b/compose/foundation/foundation/lint-baseline.xml
index f68c010..0815416 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-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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="BanSuppressTag"
@@ -949,8 +949,8 @@
<issue
id="PrimitiveInLambda"
message="Use a functional interface instead of lambda syntax for lambdas with primitive values in constructor DraggableNode has parameter 'onDragStarted' with type Function3<? super CoroutineScope, ? super Offset, ? super Continuation<? super Unit>, ? extends Object>."
- errorLine1=" private var onDragStarted: suspend CoroutineScope.(startedPosition: Offset) -> Unit,"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" onDragStarted: suspend CoroutineScope.(startedPosition: Offset) -> Unit,"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable.kt"/>
</issue>
@@ -958,8 +958,8 @@
<issue
id="PrimitiveInLambda"
message="Use a functional interface instead of lambda syntax for lambdas with primitive values in constructor DraggableNode has parameter 'onDragStopped' with type Function3<? super CoroutineScope, ? super Velocity, ? super Continuation<? super Unit>, ? extends Object>."
- errorLine1=" private var onDragStopped: suspend CoroutineScope.(velocity: Velocity) -> Unit,"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" onDragStopped: suspend CoroutineScope.(velocity: Velocity) -> Unit,"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable.kt"/>
</issue>
@@ -984,15 +984,6 @@
<issue
id="PrimitiveInLambda"
- message="Use a functional interface instead of lambda syntax for lambdas with primitive values in variable 'postPointerSlop' with type Function2<? super PointerInputChange, ? super Offset, ? extends Unit>."
- errorLine1=" val postPointerSlop = { event: PointerInputChange, offset: Offset ->"
- errorLine2=" ^">
- <location
- file="src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInLambda"
message="Use a functional interface instead of lambda syntax for lambdas with primitive values in constructor DefaultDraggableState has parameter 'onDelta' with type Function1<? super Float, Unit>."
errorLine1="private class DefaultDraggableState(val onDelta: (Float) -> Unit) : DraggableState {"
errorLine2=" ~~~~~~~~~~~~~~~">
@@ -1804,8 +1795,8 @@
<issue
id="PrimitiveInLambda"
message="Use a functional interface instead of lambda syntax for lambdas with primitive values in method magnifier has parameter 'magnifierCenter' with type Function1<? super Density, Offset>."
- errorLine1=" magnifierCenter: Density.() -> Offset = { Offset.Unspecified },"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" magnifierCenter: (Density.() -> Offset)? = null,"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/androidMain/kotlin/androidx/compose/foundation/Magnifier.kt"/>
</issue>
@@ -1831,8 +1822,8 @@
<issue
id="PrimitiveInLambda"
message="Use a functional interface instead of lambda syntax for lambdas with primitive values in method magnifier has parameter 'magnifierCenter' with type Function1<? super Density, Offset>."
- errorLine1=" magnifierCenter: Density.() -> Offset = { Offset.Unspecified },"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" magnifierCenter: (Density.() -> Offset)? = null,"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/androidMain/kotlin/androidx/compose/foundation/Magnifier.kt"/>
</issue>
@@ -1858,8 +1849,8 @@
<issue
id="PrimitiveInLambda"
message="Use a functional interface instead of lambda syntax for lambdas with primitive values in constructor MagnifierElement has parameter 'magnifierCenter' with type Function1<? super Density, Offset>."
- errorLine1=" private val magnifierCenter: Density.() -> Offset = { Offset.Unspecified },"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" private val magnifierCenter: (Density.() -> Offset)? = null,"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/androidMain/kotlin/androidx/compose/foundation/Magnifier.kt"/>
</issue>
@@ -1903,8 +1894,8 @@
<issue
id="PrimitiveInLambda"
message="Use a functional interface instead of lambda syntax for lambdas with primitive values in constructor MagnifierNode has parameter 'magnifierCenter' with type Function1<? super Density, Offset>."
- errorLine1=" var magnifierCenter: Density.() -> Offset = { Offset.Unspecified },"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" var magnifierCenter: (Density.() -> Offset)? = null,"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/androidMain/kotlin/androidx/compose/foundation/Magnifier.kt"/>
</issue>
@@ -1912,8 +1903,8 @@
<issue
id="PrimitiveInLambda"
message="Use a functional interface instead of lambda syntax for lambdas with primitive values in method setMagnifierCenter has parameter '<set-?>' with type Function1<? super Density, Offset>."
- errorLine1=" var magnifierCenter: Density.() -> Offset = { Offset.Unspecified },"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" var magnifierCenter: (Density.() -> Offset)? = null,"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/androidMain/kotlin/androidx/compose/foundation/Magnifier.kt"/>
</issue>
@@ -1921,8 +1912,8 @@
<issue
id="PrimitiveInLambda"
message="Use a functional interface instead of lambda syntax for lambdas with primitive values in return type Function1<Density, Offset> of 'getMagnifierCenter'."
- errorLine1=" var magnifierCenter: Density.() -> Offset = { Offset.Unspecified },"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" var magnifierCenter: (Density.() -> Offset)? = null,"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/androidMain/kotlin/androidx/compose/foundation/Magnifier.kt"/>
</issue>
@@ -1966,8 +1957,8 @@
<issue
id="PrimitiveInLambda"
message="Use a functional interface instead of lambda syntax for lambdas with primitive values in method update has parameter 'magnifierCenter' with type Function1<? super Density, Offset>."
- errorLine1=" magnifierCenter: Density.() -> Offset,"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" magnifierCenter: (Density.() -> Offset)?,"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/androidMain/kotlin/androidx/compose/foundation/Magnifier.kt"/>
</issue>
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/anchoredDraggable/AnchoredDraggableGestureTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/anchoredDraggable/AnchoredDraggableGestureTest.kt
index 59b8466..c058a64 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/anchoredDraggable/AnchoredDraggableGestureTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/anchoredDraggable/AnchoredDraggableGestureTest.kt
@@ -322,6 +322,68 @@
}
@Test
+ fun anchoredDraggable_negative_offset_targetState() {
+ val positionalThreshold = 0.5f
+ val absThreshold = abs(positionalThreshold)
+ val state = AnchoredDraggableState(
+ initialValue = A,
+ positionalThreshold = { distance -> distance * positionalThreshold },
+ velocityThreshold = DefaultVelocityThreshold,
+ animationSpec = tween()
+ )
+ rule.setContent {
+ Box(Modifier.fillMaxSize()) {
+ Box(
+ Modifier
+ .requiredSize(AnchoredDraggableBoxSize)
+ .testTag(AnchoredDraggableTestTag)
+ .anchoredDraggable(
+ state = state,
+ orientation = Orientation.Horizontal
+ )
+ .onSizeChanged { layoutSize ->
+ val anchors = DraggableAnchors {
+ A at 0f
+ B at -layoutSize.width.toFloat()
+ }
+ state.updateAnchors(anchors)
+ }
+ .offset {
+ IntOffset(
+ state
+ .requireOffset()
+ .roundToInt(), 0
+ )
+ }
+ .background(Color.Red)
+ )
+ }
+ }
+
+ val positionOfA = state.anchors.positionOf(A)
+ val positionOfB = state.anchors.positionOf(B)
+ val distance = abs(positionOfA - positionOfB)
+
+ rule.onNodeWithTag(AnchoredDraggableTestTag)
+ .performTouchInput { swipeLeft(startX = right, endX = left) }
+ rule.waitForIdle()
+
+ assertThat(state.currentValue).isEqualTo(B)
+ assertThat(state.targetValue).isEqualTo(B)
+
+ state.dispatchRawDelta(distance * (absThreshold * 1.1f))
+ rule.waitForIdle()
+
+ assertThat(state.currentValue).isEqualTo(B)
+ assertThat(state.targetValue).isEqualTo(A)
+
+ runBlocking(AutoTestFrameClock()) { state.settle(velocity = 0f) }
+
+ assertThat(state.currentValue).isEqualTo(A)
+ assertThat(state.targetValue).isEqualTo(A)
+ }
+
+ @Test
fun anchoredDraggable_positionalThresholds_fractional_targetState() {
val positionalThreshold = 0.5f
val absThreshold = abs(positionalThreshold)
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/BasicSecureTextFieldTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/BasicSecureTextFieldTest.kt
index 485190f..6cadee0 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/BasicSecureTextFieldTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/BasicSecureTextFieldTest.kt
@@ -353,7 +353,6 @@
}
}
- @OptIn(ExperimentalTestApi::class)
@Test
fun toolbarDoesNotShowCopyOrCut() {
var copyOptionAvailable = false
@@ -378,7 +377,10 @@
}
rule.onNodeWithTag(Tag).requestFocus()
- rule.onNodeWithTag(Tag).performTextInputSelection(TextRange(0, 5))
+ // We need to disable the traversalMode to show the toolbar.
+ rule.onNodeWithTag(Tag).performSemanticsAction(SemanticsActions.SetSelection) {
+ it(0, 5, false)
+ }
rule.runOnIdle {
assertThat(showMenuRequested).isTrue()
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/InputMethodInterceptor.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/InputMethodInterceptor.kt
index 74106a0..4b95f5a 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/InputMethodInterceptor.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/InputMethodInterceptor.kt
@@ -22,11 +22,11 @@
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.platform.LocalView
+import androidx.compose.ui.platform.PlatformTextInputMethodRequest
import androidx.compose.ui.platform.PlatformTextInputSession
import androidx.compose.ui.test.ExperimentalTestApi
import androidx.compose.ui.test.PlatformTextInputMethodTestOverride
import androidx.compose.ui.test.junit4.ComposeContentTestRule
-import androidx.compose.ui.text.input.PlatformTextInputMethodRequest
import com.google.common.truth.Truth.assertWithMessage
import kotlinx.coroutines.awaitCancellation
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/TextFieldCursorTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/TextFieldCursorTest.kt
index 16f3650..85c4f9a 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/TextFieldCursorTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/TextFieldCursorTest.kt
@@ -733,6 +733,14 @@
}
}
+ focusAndWait()
+
+ // cursor visible first 500ms
+ rule.mainClock.advanceTimeBy(100)
+ rule.onNode(hasSetTextAction())
+ .captureToImage()
+ .assertContainsColor(cursorColor)
+
// window loses focus
focusWindow.value = false
rule.waitForIdle()
@@ -776,12 +784,11 @@
// check that text field cursor disappeared even within visible 500ms
rule.mainClock.advanceTimeBy(100)
-
rule.onNode(hasSetTextAction())
.captureToImage()
.assertDoesNotContainColor(cursorColor)
- // window regains focus
+ // window regains focus within 500ms
focusWindow.value = true
rule.waitForIdle()
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/TextFieldSingleLineHeightTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/TextFieldSingleLineHeightTest.kt
new file mode 100644
index 0000000..0315b03
--- /dev/null
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/TextFieldSingleLineHeightTest.kt
@@ -0,0 +1,137 @@
+/*
+ * 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.foundation.text2
+
+import androidx.compose.foundation.ExperimentalFoundationApi
+import androidx.compose.foundation.text.FocusedWindowTest
+import androidx.compose.foundation.text.Handle
+import androidx.compose.foundation.text.selection.isSelectionHandle
+import androidx.compose.foundation.text2.input.TextFieldLineLimits
+import androidx.compose.foundation.text2.input.TextFieldState
+import androidx.compose.foundation.text2.input.setTextAndPlaceCursorAtEnd
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.layout.onSizeChanged
+import androidx.compose.ui.platform.testTag
+import androidx.compose.ui.test.assertIsDisplayed
+import androidx.compose.ui.test.junit4.createComposeRule
+import androidx.compose.ui.test.onNodeWithTag
+import androidx.compose.ui.test.performClick
+import androidx.compose.ui.unit.IntSize
+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
+
+@OptIn(ExperimentalFoundationApi::class)
+@MediumTest
+@RunWith(AndroidJUnit4::class)
+class TextFieldSingleLineHeightTest : FocusedWindowTest {
+
+ private val TextfieldTag = "textField"
+
+ private val defaultText = "TEXT"
+
+ // Arabic and Thai characters combined for super tall script
+ private val tallText = "\u0627\u0644\u0646\u0635\u0E17\u0E35\u0E48"
+
+ @get:Rule
+ val rule = createComposeRule()
+
+ @Test
+ fun singleLineTextField_fromEmptyToTallText_updatesHeight() {
+ val state = TextFieldState("")
+ var reportedSize: IntSize = IntSize.Zero
+ rule.setTextFieldTestContent {
+ BasicTextField2(
+ state = state,
+ lineLimits = TextFieldLineLimits.SingleLine,
+ modifier = Modifier.onSizeChanged {
+ reportedSize = it
+ }
+ )
+ }
+
+ rule.waitForIdle()
+ val emptyHeight = reportedSize.height
+
+ state.setTextAndPlaceCursorAtEnd(tallText)
+
+ rule.waitForIdle()
+ val tallHeight = reportedSize.height
+
+ assertThat(emptyHeight).isLessThan(tallHeight)
+ }
+
+ @Test
+ fun singleLineTextField_fromLatinToTallText_updatesHeight() {
+ val state = TextFieldState(defaultText)
+ var reportedSize: IntSize = IntSize.Zero
+ rule.setTextFieldTestContent {
+ BasicTextField2(
+ state = state,
+ lineLimits = TextFieldLineLimits.SingleLine,
+ modifier = Modifier.onSizeChanged {
+ reportedSize = it
+ }
+ )
+ }
+
+ rule.waitForIdle()
+ val latinHeight = reportedSize.height
+
+ state.setTextAndPlaceCursorAtEnd(tallText)
+
+ rule.waitForIdle()
+ val tallHeight = reportedSize.height
+
+ assertThat(latinHeight).isLessThan(tallHeight)
+ }
+
+ @Test
+ fun singleLineTextField_withTallText_showsCursorHandle_whenClicked() {
+ val state = TextFieldState(tallText)
+ rule.setTextFieldTestContent {
+ BasicTextField2(
+ state = state,
+ lineLimits = TextFieldLineLimits.SingleLine,
+ modifier = Modifier.testTag(TextfieldTag)
+ )
+ }
+
+ rule.onNodeWithTag(TextfieldTag).performClick()
+
+ rule.onNode(isSelectionHandle(Handle.Cursor)).assertIsDisplayed()
+ }
+
+ @Test
+ fun multiLineTextField_withTallText_showsCursorHandle_whenClicked() {
+ val state = TextFieldState(tallText)
+ rule.setTextFieldTestContent {
+ BasicTextField2(
+ state = state,
+ lineLimits = TextFieldLineLimits.MultiLine(1, 1),
+ modifier = Modifier.testTag(TextfieldTag)
+ )
+ }
+
+ rule.onNodeWithTag(TextfieldTag).performClick()
+
+ rule.onNode(isSelectionHandle(Handle.Cursor)).assertIsDisplayed()
+ }
+}
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/input/internal/selection/TextFieldTextToolbarTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/input/internal/selection/TextFieldTextToolbarTest.kt
index 9025a62..c392fd1 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/input/internal/selection/TextFieldTextToolbarTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text2/input/internal/selection/TextFieldTextToolbarTest.kt
@@ -26,12 +26,14 @@
import androidx.compose.foundation.text.Handle
import androidx.compose.foundation.text.TEST_FONT_FAMILY
import androidx.compose.foundation.text.selection.FakeTextToolbar
+import androidx.compose.foundation.text.selection.gestures.util.longPress
import androidx.compose.foundation.text.selection.isSelectionHandle
import androidx.compose.foundation.text2.BasicTextField2
import androidx.compose.foundation.text2.input.InputTransformation
import androidx.compose.foundation.text2.input.TextFieldLineLimits
import androidx.compose.foundation.text2.input.TextFieldState
import androidx.compose.foundation.text2.input.placeCursorAtEnd
+import androidx.compose.foundation.text2.input.selectAll
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
@@ -48,7 +50,9 @@
import androidx.compose.ui.platform.TextToolbar
import androidx.compose.ui.platform.TextToolbarStatus
import androidx.compose.ui.platform.testTag
+import androidx.compose.ui.semantics.SemanticsActions
import androidx.compose.ui.test.ExperimentalTestApi
+import androidx.compose.ui.test.SemanticsNodeInteraction
import androidx.compose.ui.test.click
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.longClick
@@ -56,6 +60,7 @@
import androidx.compose.ui.test.performClick
import androidx.compose.ui.test.performKeyInput
import androidx.compose.ui.test.performMouseInput
+import androidx.compose.ui.test.performSemanticsAction
import androidx.compose.ui.test.performTextInput
import androidx.compose.ui.test.performTextInputSelection
import androidx.compose.ui.test.performTouchInput
@@ -63,6 +68,7 @@
import androidx.compose.ui.test.requestFocus
import androidx.compose.ui.test.swipeLeft
import androidx.compose.ui.test.swipeRight
+import androidx.compose.ui.test.withKeyDown
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.TextRange
import androidx.compose.ui.text.TextStyle
@@ -78,7 +84,7 @@
import org.junit.Rule
import org.junit.Test
-@OptIn(ExperimentalFoundationApi::class)
+@OptIn(ExperimentalFoundationApi::class, ExperimentalTestApi::class)
@LargeTest
class TextFieldTextToolbarTest : FocusedWindowTest {
@@ -163,6 +169,98 @@
}
@Test
+ fun toolbarDoesNotAppear_ifSelectionIsInitiatedViaHardwareKeys() {
+ val textToolbar = FakeTextToolbar()
+ val state = TextFieldState("Hello")
+ setupContent(state, textToolbar)
+
+ with(rule.onNodeWithTag(TAG)) {
+ requestFocus()
+ performKeyInput {
+ withKeyDown(Key.ShiftLeft) {
+ pressKey(Key.DirectionLeft)
+ pressKey(Key.DirectionLeft)
+ pressKey(Key.DirectionLeft)
+ }
+ }
+ }
+
+ rule.runOnIdle {
+ assertThat(state.text.selectionInChars).isEqualTo(TextRange(5, 2))
+ assertThat(textToolbar.status).isEqualTo(TextToolbarStatus.Hidden)
+ }
+
+ with(rule.onNodeWithTag(TAG)) {
+ performKeyInput {
+ withKeyDown(Key.CtrlLeft) {
+ pressKey(Key.A)
+ }
+ }
+ }
+
+ rule.runOnIdle {
+ assertThat(state.text.selectionInChars).isEqualTo(TextRange(0, 5))
+ assertThat(textToolbar.status).isEqualTo(TextToolbarStatus.Hidden)
+ }
+ }
+
+ @Test
+ fun toolbarDoesNotAppear_ifSelectionIsInitiatedViaStateUpdate() {
+ val textToolbar = FakeTextToolbar()
+ val state = TextFieldState("Hello")
+ setupContent(state, textToolbar)
+
+ with(rule.onNodeWithTag(TAG)) {
+ requestFocus()
+ }
+
+ rule.runOnIdle {
+ state.edit { selectAll() }
+ }
+
+ rule.runOnIdle {
+ assertThat(state.text.selectionInChars).isEqualTo(TextRange(0, 5))
+ assertThat(textToolbar.status).isEqualTo(TextToolbarStatus.Hidden)
+ }
+ }
+
+ @Test
+ fun toolbarDoesNotAppear_ifSelectionIsInitiatedViaSemantics() {
+ val textToolbar = FakeTextToolbar()
+ val state = TextFieldState("Hello")
+ setupContent(state, textToolbar)
+
+ with(rule.onNodeWithTag(TAG)) {
+ requestFocus()
+ performTextInputSelection(TextRange(0, 5))
+ }
+
+ rule.runOnIdle {
+ assertThat(state.text.selectionInChars).isEqualTo(TextRange(0, 5))
+ assertThat(textToolbar.status).isEqualTo(TextToolbarStatus.Hidden)
+ }
+ }
+
+ @Test
+ fun toolbarAppears_ifSelectionIsInitiatedViaSemantics_inNoneTraversalMode() {
+ val textToolbar = FakeTextToolbar()
+ val state = TextFieldState("Hello")
+ setupContent(state, textToolbar)
+
+ with(rule.onNodeWithTag(TAG)) {
+ requestFocus()
+ performSemanticsAction(SemanticsActions.SetSelection) {
+ it(0, 5, false)
+ }
+ }
+
+ rule.runOnIdle {
+ assertThat(state.text.selectionInChars).isEqualTo(TextRange(0, 5))
+ assertThat(textToolbar.status).isEqualTo(TextToolbarStatus.Shown)
+ }
+ }
+
+ @Test
fun toolbarDisappears_whenTextIsEntered_throughIME() {
val textToolbar = FakeTextToolbar()
val state = TextFieldState("Hello")
@@ -206,7 +304,6 @@
}
}
- @OptIn(ExperimentalTestApi::class)
@Test
fun selectionToolbarDisappears_whenTextField_getsDisabled_doesNotReappear() {
val textToolbar = FakeTextToolbar()
@@ -214,7 +311,7 @@
setupContent(state, textToolbar)
rule.onNodeWithTag(TAG).requestFocus()
- rule.onNodeWithTag(TAG).performTextInputSelection(TextRange(2, 4))
+ rule.onNodeWithTag(TAG).performTextInputSelectionShowingToolbar(TextRange(2, 4))
rule.runOnIdle {
assertThat(textToolbar.status).isEqualTo(TextToolbarStatus.Shown)
}
@@ -487,7 +584,6 @@
}
}
- @OptIn(ExperimentalTestApi::class)
@Test
fun toolbarShowsCopyAndCut_whenSelectionIsExpanded() {
var cutOptionAvailable = false
@@ -503,7 +599,7 @@
setupContent(state, textToolbar, true)
rule.onNodeWithTag(TAG).requestFocus()
- rule.onNodeWithTag(TAG).performTextInputSelection(TextRange(2, 4))
+ rule.onNodeWithTag(TAG).performTextInputSelectionShowingToolbar(TextRange(2, 4))
rule.runOnIdle {
assertThat(copyOptionAvailable).isTrue()
@@ -511,7 +607,6 @@
}
}
- @OptIn(ExperimentalTestApi::class)
@Test
fun copyUpdatesClipboardManager_placesCursorAtTheEndOfSelectedRegion() {
var copyOption: (() -> Unit)? = null
@@ -526,7 +621,7 @@
setupContent(state, textToolbar, true, clipboardManager)
rule.onNodeWithTag(TAG).requestFocus()
- rule.onNodeWithTag(TAG).performTextInputSelection(TextRange(0, 5))
+ rule.onNodeWithTag(TAG).performTextInputSelectionShowingToolbar(TextRange(0, 5))
rule.runOnIdle {
copyOption!!.invoke()
@@ -538,7 +633,6 @@
}
}
- @OptIn(ExperimentalTestApi::class)
@Test
fun cutUpdatesClipboardManager_placesCursorAtTheEndOfSelectedRegion_removesTheCutContent() {
var cutOption: (() -> Unit)? = null
@@ -553,7 +647,7 @@
setupContent(state, textToolbar, true, clipboardManager)
rule.onNodeWithTag(TAG).requestFocus()
- rule.onNodeWithTag(TAG).performTextInputSelection(TextRange(1, 5))
+ rule.onNodeWithTag(TAG).performTextInputSelectionShowingToolbar(TextRange(1, 5))
rule.runOnIdle {
cutOption!!.invoke()
@@ -566,7 +660,6 @@
}
}
- @OptIn(ExperimentalTestApi::class)
@Test
fun cutAppliesFilter() {
var cutOption: (() -> Unit)? = null
@@ -586,7 +679,7 @@
}
rule.onNodeWithTag(TAG).requestFocus()
- rule.onNodeWithTag(TAG).performTextInputSelection(TextRange(1, 5))
+ rule.onNodeWithTag(TAG).performTextInputSelectionShowingToolbar(TextRange(1, 5))
rule.runOnIdle {
cutOption!!.invoke()
@@ -712,6 +805,27 @@
}
}
+ @Test
+ fun toolbarDisappears_whenLongPressIsInitiated() {
+ val textToolbar = FakeTextToolbar()
+ val state = TextFieldState("Hello")
+ setupContent(state, textToolbar)
+
+ rule.onNodeWithTag(TAG).performTouchInput { click(Offset(fontSizePx * 2, fontSizePx / 2)) }
+ rule.onNode(isSelectionHandle(Handle.Cursor)).performClick()
+ rule.runOnIdle {
+ assertThat(textToolbar.status).isEqualTo(TextToolbarStatus.Shown)
+ }
+
+ rule.onNodeWithTag(TAG).performTouchInput {
+ longPress(Offset(3 * fontSizePx * 2, fontSizePx / 2))
+ }
+
+ rule.runOnIdle {
+ assertThat(textToolbar.status).isEqualTo(TextToolbarStatus.Hidden)
+ }
+ }
+
private fun setupContent(
state: TextFieldState = TextFieldState(),
toolbar: TextToolbar = FakeTextToolbar(),
@@ -785,3 +899,15 @@
return currentText
}
}
+
+/**
+ * Toolbar does not show up when text is selected with traversal mode off (relative to original
+ * text). This is an override of [SemanticsNodeInteraction.performTextInputSelection] that
+ * makes sure the toolbar shows up after selection is initiated.
+ */
+fun SemanticsNodeInteraction.performTextInputSelectionShowingToolbar(selection: TextRange) {
+ requestFocus()
+ performSemanticsAction(SemanticsActions.SetSelection) {
+ it(selection.min, selection.max, false)
+ }
+}
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/textfield/TextFieldCursorTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/textfield/TextFieldCursorTest.kt
index 249f1a4..38a96aa 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/textfield/TextFieldCursorTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/textfield/TextFieldCursorTest.kt
@@ -28,6 +28,8 @@
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
+import androidx.compose.testutils.assertContainsColor
+import androidx.compose.testutils.assertDoesNotContainColor
import androidx.compose.testutils.assertPixelColor
import androidx.compose.testutils.assertPixels
import androidx.compose.testutils.assertShape
@@ -600,11 +602,9 @@
// cursor visible first 500ms
rule.mainClock.advanceTimeBy(100)
- with(rule.density) {
- rule.onNode(hasSetTextAction())
- .captureToImage()
- .assertCursor(2.dp, this, cursorRect)
- }
+ rule.onNode(hasSetTextAction())
+ .captureToImage()
+ .assertContainsColor(cursorColor)
// window loses focus
focusWindow.value = false
@@ -614,13 +614,7 @@
rule.mainClock.advanceTimeBy(100)
rule.onNode(hasSetTextAction())
.captureToImage()
- .assertShape(
- density = rule.density,
- shape = RectangleShape,
- shapeColor = Color.White,
- backgroundColor = Color.White,
- shapeOverlapPixelCount = 0.0f
- )
+ .assertDoesNotContainColor(cursorColor)
}
@Test
@@ -656,24 +650,17 @@
rule.mainClock.advanceTimeBy(100)
rule.onNode(hasSetTextAction())
.captureToImage()
- .assertShape(
- density = rule.density,
- shape = RectangleShape,
- shapeColor = Color.White,
- backgroundColor = Color.White,
- shapeOverlapPixelCount = 0.0f
- )
+ .assertDoesNotContainColor(cursorColor)
// window regains focus within 500ms
focusWindow.value = true
rule.waitForIdle()
rule.mainClock.advanceTimeBy(100)
- with(rule.density) {
- rule.onNode(hasSetTextAction())
- .captureToImage()
- .assertCursor(2.dp, this, cursorRect)
- }
+ rule.onNode(hasSetTextAction())
+ .captureToImage()
+ .assertContainsColor(cursorColor)
+ .assertCursor(2.dp, rule.density, cursorRect)
}
private fun focusAndWait() {
diff --git a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/textfield/TextFieldTest.kt b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/textfield/TextFieldTest.kt
index 0f6574d..51379d4 100644
--- a/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/textfield/TextFieldTest.kt
+++ b/compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/textfield/TextFieldTest.kt
@@ -17,7 +17,6 @@
package androidx.compose.foundation.textfield
import android.os.Build
-import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.interaction.FocusInteraction
@@ -40,9 +39,11 @@
import androidx.compose.foundation.text.BasicText
import androidx.compose.foundation.text.BasicTextField
import androidx.compose.foundation.text.FocusedWindowTest
+import androidx.compose.foundation.text.Handle
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.foundation.text.computeSizeForDefaultText
+import androidx.compose.foundation.text.selection.isSelectionHandle
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.MutableState
@@ -54,6 +55,7 @@
import androidx.compose.runtime.setValue
import androidx.compose.testutils.assertPixelColor
import androidx.compose.testutils.assertShape
+import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.drawBehind
import androidx.compose.ui.focus.onFocusChanged
@@ -166,7 +168,6 @@
@MediumTest
@RunWith(AndroidJUnit4::class)
-@OptIn(ExperimentalFoundationApi::class)
class TextFieldTest : FocusedWindowTest {
@get:Rule
val rule = createComposeRule()
@@ -1300,6 +1301,29 @@
rule.onNodeWithTag(Tag).captureToImage().assertCentered(fontSize)
}
+ @Test
+ fun textField_cursorAppearsOnTouch_thenDisappearsWhenTyping() {
+ rule.setTextFieldTestContent {
+ Box(Modifier.fillMaxSize(), Alignment.Center) {
+ BasicTextField(
+ value = "test",
+ onValueChange = {},
+ // center so that the click places the cursor in the middle of the word
+ textStyle = TextStyle(textAlign = TextAlign.Center),
+ modifier = Modifier.testTag(Tag),
+ )
+ }
+ }
+
+ rule.onNode(isSelectionHandle(Handle.Cursor)).assertDoesNotExist()
+
+ rule.onNodeWithTag(Tag).performTouchInput { click() }
+ rule.onNode(isSelectionHandle(Handle.Cursor)).assertExists()
+
+ rule.onNodeWithTag(Tag).performTextInput("t")
+ rule.onNode(isSelectionHandle(Handle.Cursor)).assertDoesNotExist()
+ }
+
@OptIn(ExperimentalTestApi::class)
@Test
fun whenSelectedTextIsRemoved_SelectionCoerces() {
diff --git a/compose/foundation/foundation/src/androidUnitTest/kotlin/androidx/compose/foundation/text/selection/TextFieldSelectionManagerTest.kt b/compose/foundation/foundation/src/androidUnitTest/kotlin/androidx/compose/foundation/text/selection/TextFieldSelectionManagerTest.kt
index d300920..8a9749d 100644
--- a/compose/foundation/foundation/src/androidUnitTest/kotlin/androidx/compose/foundation/text/selection/TextFieldSelectionManagerTest.kt
+++ b/compose/foundation/foundation/src/androidUnitTest/kotlin/androidx/compose/foundation/text/selection/TextFieldSelectionManagerTest.kt
@@ -180,7 +180,7 @@
manager.touchSelectionObserver.onStart(dragBeginPosition)
// Assert
- assertThat(state.handleState).isEqualTo(HandleState.Selection)
+ assertThat(state.handleState).isEqualTo(HandleState.Cursor)
assertThat(state.showFloatingToolbar).isFalse()
assertThat(value.selection).isEqualTo(TextRange(fakeLineEnd))
verify(
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 d7696e1..8b3c9c4 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
@@ -446,33 +446,23 @@
val velocityThresholdPx = velocityThreshold()
return if (currentAnchorPosition == offset || currentAnchorPosition.isNaN()) {
currentValue
- } else if (currentAnchorPosition < offset) {
- // Swiping from lower to upper (positive).
- if (velocity >= velocityThresholdPx) {
- currentAnchors.closestAnchor(offset, true)!!
- } else {
- val upper = currentAnchors.closestAnchor(offset, true)!!
- val distance = abs(currentAnchors.positionOf(upper) - currentAnchorPosition)
- val relativeThreshold = abs(positionalThreshold(distance))
- val absoluteThreshold = abs(currentAnchorPosition + relativeThreshold)
- if (offset < absoluteThreshold) currentValue else upper
- }
} else {
- // Swiping from upper to lower (negative).
- if (velocity <= -velocityThresholdPx) {
- currentAnchors.closestAnchor(offset, false)!!
+ if (abs(velocity) >= abs(velocityThresholdPx)) {
+ currentAnchors.closestAnchor(
+ offset,
+ offset - currentAnchorPosition > 0
+ )!!
} else {
- val lower = currentAnchors.closestAnchor(offset, false)!!
- val distance = abs(currentAnchorPosition - currentAnchors.positionOf(lower))
+ val neighborAnchor =
+ currentAnchors.closestAnchor(
+ offset,
+ offset - currentAnchorPosition > 0
+ )!!
+ val neighborAnchorPosition = currentAnchors.positionOf(neighborAnchor)
+ val distance = abs(currentAnchorPosition - neighborAnchorPosition)
val relativeThreshold = abs(positionalThreshold(distance))
- val absoluteThreshold = abs(currentAnchorPosition - relativeThreshold)
- if (offset < 0) {
- // For negative offsets, larger absolute thresholds are closer to lower anchors
- // than smaller ones.
- if (abs(offset) < absoluteThreshold) currentValue else lower
- } else {
- if (offset > absoluteThreshold) currentValue else lower
- }
+ val relativePosition = abs(currentAnchorPosition - offset)
+ if (relativePosition <= relativeThreshold) currentValue else neighborAnchor
}
}
}
@@ -485,10 +475,11 @@
val currentAnchor = currentAnchors.positionOf(currentValue)
return if (currentAnchor == offset || currentAnchor.isNaN()) {
currentValue
- } else if (currentAnchor < offset) {
- currentAnchors.closestAnchor(offset, true) ?: currentValue
} else {
- currentAnchors.closestAnchor(offset, false) ?: currentValue
+ currentAnchors.closestAnchor(
+ offset,
+ offset - currentAnchor > 0
+ ) ?: currentValue
}
}
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt
index 53c5297..c9389b5 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt
@@ -716,13 +716,17 @@
SelectionToolbarAndHandles(
manager = manager,
- show = state.handleState == HandleState.Selection &&
+ show = state.handleState != HandleState.None &&
state.layoutCoordinates != null &&
state.layoutCoordinates!!.isAttached &&
showHandleAndMagnifier
)
- if (!readOnly && showHandleAndMagnifier) {
+ if (
+ state.handleState == HandleState.Cursor &&
+ !readOnly &&
+ showHandleAndMagnifier
+ ) {
TextFieldCursorHandle(manager = manager)
}
}
@@ -880,6 +884,11 @@
/**
* A flag to check if the floating toolbar should show.
+ *
+ * This state is meant to represent the floating toolbar status regardless of if all touch
+ * behaviors are disabled (like if the user is using a mouse). This is so that when touch
+ * behaviors are re-enabled, the toolbar status will still reflect whether it should be shown
+ * at that point.
*/
var showFloatingToolbar by mutableStateOf(false)
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/LongPressTextDragObserver.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/LongPressTextDragObserver.kt
index 142a3fc..c1f1066 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/LongPressTextDragObserver.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/LongPressTextDragObserver.kt
@@ -96,7 +96,7 @@
observer: TextDragObserver
) {
awaitEachGesture {
- val down = awaitFirstDown()
+ val down = awaitFirstDown(requireUnconsumed = false)
observer.onDown(down.position)
// Wait for that pointer to come up.
do {
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/TextFieldSelectionManager.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/TextFieldSelectionManager.kt
index 922fd3a..29e29d1 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/TextFieldSelectionManager.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/TextFieldSelectionManager.kt
@@ -210,6 +210,7 @@
)
enterSelectionMode(showFloatingToolbar = false)
+ setHandleState(HandleState.Cursor)
hapticFeedBack?.performHapticFeedback(HapticFeedbackType.TextHandleMove)
onValueChange(newValue)
}
@@ -299,14 +300,13 @@
)
}
}
- state?.showFloatingToolbar = false
+ updateFloatingToolbar(show = false)
}
override fun onStop() {
draggingHandle = null
currentDragPosition = null
- state?.showFloatingToolbar = true
- if (textToolbar?.status == TextToolbarStatus.Hidden) showSelectionToolbar()
+ updateFloatingToolbar(show = true)
dragBeginOffsetInText = null
}
@@ -398,13 +398,13 @@
draggingHandle = if (isStartHandle) Handle.SelectionStart else Handle.SelectionEnd
currentDragPosition = getAdjustedCoordinates(getHandlePosition(isStartHandle))
state?.isInTouchMode = true
- state?.showFloatingToolbar = false
+ updateFloatingToolbar(show = false)
}
override fun onUp() {
draggingHandle = null
currentDragPosition = null
- state?.showFloatingToolbar = true
+ updateFloatingToolbar(show = true)
}
override fun onStart(startPoint: Offset) {
@@ -416,7 +416,7 @@
// Zero out the total distance that being dragged.
dragTotalDistance = Offset.Zero
draggingHandle = if (isStartHandle) Handle.SelectionStart else Handle.SelectionEnd
- state?.showFloatingToolbar = false
+ updateFloatingToolbar(show = false)
}
override fun onDrag(delta: Offset) {
@@ -431,14 +431,13 @@
adjustment = SelectionAdjustment.CharacterWithWordAccelerate,
isTouchBasedSelection = true, // handle drag infers touch
)
- state?.showFloatingToolbar = false
+ updateFloatingToolbar(show = false)
}
override fun onStop() {
draggingHandle = null
currentDragPosition = null
- state?.showFloatingToolbar = true
- if (textToolbar?.status == TextToolbarStatus.Hidden) showSelectionToolbar()
+ updateFloatingToolbar(show = true)
}
override fun onCancel() {}
@@ -449,8 +448,7 @@
*/
internal fun cursorDragObserver(): TextDragObserver = object : TextDragObserver {
override fun onDown(point: Offset) {
- draggingHandle = Handle.Cursor
- currentDragPosition = getAdjustedCoordinates(getHandlePosition(true))
+ // Nothing
}
override fun onUp() {
@@ -466,6 +464,7 @@
// Zero out the total distance that being dragged.
dragTotalDistance = Offset.Zero
draggingHandle = Handle.Cursor
+ updateFloatingToolbar(show = false)
}
override fun onDrag(delta: Offset) {
@@ -515,7 +514,7 @@
focusRequester?.requestFocus()
}
oldValue = value
- state?.showFloatingToolbar = showFloatingToolbar
+ updateFloatingToolbar(showFloatingToolbar)
setHandleState(HandleState.Selection)
}
@@ -525,7 +524,7 @@
* Is triggered on accessibility action.
*/
internal fun exitSelectionMode() {
- state?.showFloatingToolbar = false
+ updateFloatingToolbar(show = false)
setHandleState(HandleState.None)
}
@@ -553,7 +552,7 @@
HandleState.None
}
setHandleState(selectionMode)
- hideSelectionToolbar()
+ updateFloatingToolbar(show = false)
}
/**
@@ -645,7 +644,7 @@
)
onValueChange(newValue)
oldValue = oldValue.copy(selection = newValue.selection)
- state?.showFloatingToolbar = true
+ updateFloatingToolbar(show = true)
}
internal fun getHandlePosition(isStartHandle: Boolean): Offset {
@@ -671,6 +670,19 @@
}
/**
+ * Update the [TextFieldState.showFloatingToolbar] state and show/hide the toolbar.
+ *
+ * You may want to call [showSelectionToolbar] and [hideSelectionToolbar] directly without
+ * updating the [TextFieldState.showFloatingToolbar] if you are simply hiding all touch
+ * selection behaviors (toolbar, handles, cursor, magnifier), but want the toolbar to come
+ * back when you un-hide all those behaviors.
+ */
+ private fun updateFloatingToolbar(show: Boolean) {
+ state?.showFloatingToolbar = show
+ if (show) showSelectionToolbar() else hideSelectionToolbar()
+ }
+
+ /**
* This function get the selected region as a Rectangle region, and pass it to [TextToolbar]
* to make the FloatingToolbar show up in the proper place. In addition, this function passes
* the copy, paste and cut method as callbacks when "copy", "cut" or "paste" is clicked.
@@ -882,6 +894,9 @@
)
onValueChange(newValue)
+ val handle = if (newValue.selection.collapsed) HandleState.Cursor else HandleState.Selection
+ setHandleState(handle)
+
state?.isInTouchMode = isTouchBasedSelection
// showSelectionHandleStart/End might be set to false when scrolled out of the view.
@@ -894,7 +909,7 @@
}
private fun setHandleState(handleState: HandleState) {
- state?.let { it.handleState = handleState }
+ state?.takeUnless { it.handleState == handleState }?.let { it.handleState = handleState }
}
private fun createTextFieldValue(
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/BasicTextField2.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/BasicTextField2.kt
index d7abaa4..cf09e8d 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/BasicTextField2.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/BasicTextField2.kt
@@ -26,6 +26,7 @@
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.interaction.collectIsFocusedAsState
import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.text.CursorHandle
import androidx.compose.foundation.text.Handle
@@ -413,6 +414,7 @@
Box(
propagateMinConstraints = true,
modifier = Modifier
+ .heightIn(min = textLayoutState.minHeightForSingleLineField)
.heightInLines(
textStyle = textStyle,
minLines = minLines,
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/TextFieldDecoratorModifier.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/TextFieldDecoratorModifier.kt
index 9fa8310..ae67c8e 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/TextFieldDecoratorModifier.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/TextFieldDecoratorModifier.kt
@@ -23,6 +23,7 @@
import androidx.compose.foundation.text2.BasicTextField2
import androidx.compose.foundation.text2.input.InputTransformation
import androidx.compose.foundation.text2.input.internal.selection.TextFieldSelectionState
+import androidx.compose.foundation.text2.input.internal.selection.TextToolbarState
import androidx.compose.ui.focus.FocusDirection
import androidx.compose.ui.focus.FocusEventModifierNode
import androidx.compose.ui.focus.FocusManager
@@ -63,6 +64,7 @@
import androidx.compose.ui.semantics.insertTextAtCursor
import androidx.compose.ui.semantics.onClick
import androidx.compose.ui.semantics.onImeAction
+import androidx.compose.ui.semantics.onLongClick
import androidx.compose.ui.semantics.pasteText
import androidx.compose.ui.semantics.setSelection
import androidx.compose.ui.semantics.setText
@@ -311,6 +313,10 @@
}
@Suppress("NAME_SHADOWING")
setSelection { start, end, relativeToOriginal ->
+ // in traversal mode (relativeToOriginal=true) we get selection from the
+ // `textSelectionRange` semantics which is selection in original text. In non-traversal
+ // mode selection comes from the Talkback and indices are relative to the transformed
+ // text
val text = if (relativeToOriginal) {
textFieldState.untransformedText
} else {
@@ -331,6 +337,13 @@
}
val selectionRange = TextRange(start, end)
+ // Do not show toolbar if it's a traversal mode (with the volume keys), or if the
+ // selection is collapsed.
+ if (relativeToOriginal || start == end) {
+ textFieldSelectionState.updateTextToolbarState(TextToolbarState.None)
+ } else {
+ textFieldSelectionState.updateTextToolbarState(TextToolbarState.Selection)
+ }
if (relativeToOriginal) {
textFieldState.selectUntransformedCharsIn(selectionRange)
} else {
@@ -360,6 +373,13 @@
}
true
}
+ onLongClick {
+ if (!isFocused) {
+ requestFocus()
+ }
+ textFieldSelectionState.updateTextToolbarState(TextToolbarState.Selection)
+ true
+ }
if (!selection.collapsed) {
copyText {
textFieldSelectionState.copy()
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/TextFieldTextLayoutModifier.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/TextFieldTextLayoutModifier.kt
index c69bce5..e6de7e8 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/TextFieldTextLayoutModifier.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/TextFieldTextLayoutModifier.kt
@@ -16,6 +16,7 @@
package androidx.compose.foundation.text2.input.internal
+import androidx.compose.foundation.text.ceilToIntPx
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.FirstBaseline
import androidx.compose.ui.layout.LastBaseline
@@ -34,6 +35,7 @@
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.unit.Constraints
import androidx.compose.ui.unit.Density
+import androidx.compose.ui.unit.dp
import kotlin.math.roundToInt
/**
@@ -77,7 +79,7 @@
private var textLayoutState: TextLayoutState,
textFieldState: TransformedTextFieldState,
textStyle: TextStyle,
- singleLine: Boolean,
+ private var singleLine: Boolean,
onTextLayout: Density.(getResult: () -> TextLayoutResult?) -> Unit
) : Modifier.Node(),
LayoutModifierNode,
@@ -106,6 +108,7 @@
) {
this.textLayoutState = textLayoutState
this.textLayoutState.onTextLayout = onTextLayout
+ this.singleLine = singleLine
this.textLayoutState.updateNonMeasureInputs(
textFieldState = textFieldState,
textStyle = textStyle,
@@ -133,7 +136,15 @@
Constraints.fixed(result.size.width, result.size.height)
)
- // TODO: min height
+ // calculate the min height for single line text to prevent text cuts.
+ // for single line text maxLines puts in max height constraint based on
+ // constant characters therefore if the user enters a character that is
+ // longer (i.e. emoji or a tall script) the text is cut
+ textLayoutState.minHeightForSingleLineField = if (singleLine) {
+ result.getLineBottom(0).ceilToIntPx().toDp()
+ } else {
+ 0.dp
+ }
return layout(
width = result.size.width,
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/TextLayoutState.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/TextLayoutState.kt
index 8cb2d62..29df3cd 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/TextLayoutState.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/TextLayoutState.kt
@@ -30,6 +30,7 @@
import androidx.compose.ui.unit.Constraints
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.LayoutDirection
+import androidx.compose.ui.unit.dp
/**
* Manages text layout for TextField including layout coordinates of decoration box and inner text
@@ -73,6 +74,11 @@
var decoratorNodeCoordinates: LayoutCoordinates? by mutableStateOf(null, neverEqualPolicy())
/**
+ * Set to a non-zero value for single line TextFields in order to prevent text cuts.
+ */
+ var minHeightForSingleLineField by mutableStateOf(0.dp)
+
+ /**
* Updates the [TextFieldLayoutStateCache] with inputs that don't come from the measure phase.
* This method will initialize the cache the first time it's called.
* If the new inputs require re-calculating text layout, any readers of [layoutResult] called
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/selection/TextFieldSelectionState.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/selection/TextFieldSelectionState.kt
index 069d2c1..54c30a7 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/selection/TextFieldSelectionState.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text2/input/internal/selection/TextFieldSelectionState.kt
@@ -46,6 +46,7 @@
import androidx.compose.runtime.structuralEqualityPolicy
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.geometry.Rect
+import androidx.compose.ui.geometry.isSpecified
import androidx.compose.ui.geometry.isUnspecified
import androidx.compose.ui.hapticfeedback.HapticFeedback
import androidx.compose.ui.hapticfeedback.HapticFeedbackType
@@ -168,10 +169,10 @@
private var showCursorHandle by mutableStateOf(false)
/**
- * Request to show the text toolbar right now, anchored to the cursor handle. This is not the
- * final decider for showing the toolbar. Please refer to [observeTextToolbarVisibility] docs.
+ * Whether to show the TextToolbar according to current selection state. This is not the final
+ * decider for showing the toolbar. Please refer to [observeTextToolbarVisibility] docs.
*/
- private var showCursorHandleToolbar by mutableStateOf(false)
+ private var textToolbarState by mutableStateOf(TextToolbarState.None)
/**
* Access helper for text layout node coordinates that checks attached state.
@@ -321,7 +322,11 @@
}
launch(start = CoroutineStart.UNDISPATCHED) {
detectTapGestures(onTap = {
- showCursorHandleToolbar = !showCursorHandleToolbar
+ textToolbarState = if (textToolbarState == TextToolbarState.Cursor) {
+ TextToolbarState.None
+ } else {
+ TextToolbarState.Cursor
+ }
})
}
}
@@ -391,12 +396,16 @@
}
} finally {
showCursorHandle = false
- if (showCursorHandleToolbar) {
+ if (textToolbarState != TextToolbarState.None) {
hideTextToolbar()
}
}
}
+ fun updateTextToolbarState(textToolbarState: TextToolbarState) {
+ this.textToolbarState = textToolbarState
+ }
+
fun dispose() {
hideTextToolbar()
@@ -434,7 +443,8 @@
showCursorHandle = true
}
- showCursorHandleToolbar = false
+ // do not show any TextToolbar.
+ updateTextToolbarState(TextToolbarState.None)
// find the cursor position
val cursorIndex = textLayoutState.getOffsetForPosition(offset)
@@ -449,7 +459,8 @@
// onTap is already called at this point. Focus is requested.
showCursorHandle = false
- showCursorHandleToolbar = false
+ // go into selection mode.
+ updateTextToolbarState(TextToolbarState.Selection)
val index = textLayoutState.getOffsetForPosition(offset)
val newSelection = updateSelection(
@@ -474,9 +485,12 @@
var cursorDragDelta = Offset.Unspecified
fun onDragStop() {
- cursorDragStart = Offset.Unspecified
- cursorDragDelta = Offset.Unspecified
- clearHandleDragging()
+ // Only execute clear-up if drag was actually ongoing.
+ if (cursorDragStart.isSpecified) {
+ cursorDragStart = Offset.Unspecified
+ cursorDragDelta = Offset.Unspecified
+ clearHandleDragging()
+ }
}
// b/288931376: detectDragGestures do not call onDragCancel when composable is disposed.
@@ -524,14 +538,22 @@
var dragTotalDistance: Offset = Offset.Zero
var actingHandle: Handle = Handle.SelectionEnd // start with a placeholder.
+ fun onDragStop() {
+ // Only execute clear-up if drag was actually ongoing.
+ if (dragBeginPosition.isSpecified) {
+ clearHandleDragging()
+ dragBeginOffsetInText = -1
+ dragBeginPosition = Offset.Unspecified
+ dragTotalDistance = Offset.Zero
+ previousRawDragOffset = -1
+ }
+ }
+
// offsets received by this gesture detector are in decoration box coordinates
detectDragGesturesAfterLongPress(
onDragStart = onDragStart@{ dragStartOffset ->
logDebug { "onDragStart after longPress $dragStartOffset" }
requestFocus()
- // at the beginning of selection disable toolbar, re-evaluate visibility after
- // drag gesture is finished
- showCursorHandleToolbar = false
// this gesture detector is applied on the decoration box. We do not need to
// convert the gesture offset, that's going to be calculated by [handleDragPosition]
@@ -551,7 +573,7 @@
hapticFeedBack?.performHapticFeedback(HapticFeedbackType.TextHandleMove)
textFieldState.placeCursorBeforeCharAt(offset)
showCursorHandle = true
- showCursorHandleToolbar = true
+ updateTextToolbarState(TextToolbarState.Cursor)
} else {
if (textFieldState.text.isEmpty()) return@onDragStart
val offset = textLayoutState.getOffsetForPosition(dragStartOffset)
@@ -568,27 +590,15 @@
adjustment = SelectionAdjustment.CharacterWithWordAccelerate,
)
textFieldState.selectCharsIn(newSelection)
- showCursorHandle = false
+ updateTextToolbarState(TextToolbarState.Selection)
// For touch, set the begin offset to the adjusted selection.
// When char based selection is used, we want to ensure we snap the
// beginning offset to the start word boundary of the first selected word.
dragBeginOffsetInText = newSelection.start
}
},
- onDragEnd = {
- clearHandleDragging()
- dragBeginOffsetInText = -1
- dragBeginPosition = Offset.Unspecified
- dragTotalDistance = Offset.Zero
- previousRawDragOffset = -1
- },
- onDragCancel = {
- clearHandleDragging()
- dragBeginOffsetInText = -1
- dragBeginPosition = Offset.Unspecified
- dragTotalDistance = Offset.Zero
- previousRawDragOffset = -1
- },
+ onDragEnd = { onDragStop() },
+ onDragCancel = { onDragStop() },
onDrag = onDrag@{ _, dragAmount ->
// selection never started, did not consume any drag
if (textFieldState.text.isEmpty()) return@onDrag
@@ -716,10 +726,13 @@
val handle = if (isStartHandle) Handle.SelectionStart else Handle.SelectionEnd
fun onDragStop() {
- clearHandleDragging()
- dragBeginPosition = Offset.Unspecified
- dragTotalDistance = Offset.Zero
- previousRawDragOffset = -1
+ // Only execute clear-up if drag was actually ongoing.
+ if (dragBeginPosition.isSpecified) {
+ clearHandleDragging()
+ dragBeginPosition = Offset.Unspecified
+ dragTotalDistance = Offset.Zero
+ previousRawDragOffset = -1
+ }
}
// b/288931376: detectDragGestures do not call onDragCancel when composable is disposed.
@@ -792,7 +805,8 @@
.drop(1)
.collect {
showCursorHandle = false
- showCursorHandleToolbar = false
+ // hide the toolbar any time text content changes.
+ updateTextToolbarState(TextToolbarState.None)
}
}
@@ -800,28 +814,34 @@
* Manages the visibility of text toolbar according to current state and received events from
* various sources.
*
- * - Tapping the cursor handle toggles the visibility of the toolbar [showCursorHandleToolbar].
+ * - Tapping the cursor handle toggles the visibility of the toolbar [TextToolbarState.Cursor].
* - Dragging the cursor handle or selection handles temporarily hides the toolbar
* [draggingHandle].
- * - Tapping somewhere on the textfield, whether it causes a cursor position change or not,
- * fully hides the toolbar [showCursorHandleToolbar].
- * - Scrolling the textfield temporarily hides the toolbar [getContentRect].
- * - When cursor leaves the visible bounds, text toolbar is temporarily hidden.
+ * - Tapping somewhere on the TextField, whether it causes a cursor position change or not,
+ * fully hides the toolbar [TextToolbarState.None].
+ * - When cursor or selection leaves the visible bounds, text toolbar is temporarily hidden.
+ * [getContentRect]
+ * - When selection is initiated via long press, double click, or semantics, text toolbar shows
+ * [TextToolbarState.Selection]
*/
private suspend fun observeTextToolbarVisibility() {
snapshotFlow {
val isCollapsed = textFieldState.text.selectionInChars.collapsed
- val toolbarVisibility =
- // either toolbar is requested specifically or selection is active
- (showCursorHandleToolbar || !isCollapsed) &&
+ val textToolbarStateVisible =
+ isCollapsed && textToolbarState == TextToolbarState.Cursor ||
+ !isCollapsed && textToolbarState == TextToolbarState.Selection
+
+ val textToolbarVisible =
+ // toolbar is requested specifically for the current selection state
+ textToolbarStateVisible &&
draggingHandle == null && // not dragging any selection handles
- isInTouchMode
+ isInTouchMode // toolbar hidden when not in touch mode
// final visibility decision is made by contentRect visibility.
// if contentRect is not in visible bounds, just pass Rect.Zero to the observer so that
// it hides the toolbar. If Rect is successfully passed to the observer, toolbar will
// be displayed.
- if (!toolbarVisibility) {
+ if (!textToolbarVisible) {
Rect.Zero
} else {
// contentRect is calculated in root coordinates. VisibleBounds are in parent
@@ -1055,28 +1075,28 @@
val paste: (() -> Unit)? = if (editable && clipboardManager?.hasText() == true) {
{
paste()
- showCursorHandleToolbar = false
+ updateTextToolbarState(TextToolbarState.None)
}
} else null
val copy: (() -> Unit)? = if (!selection.collapsed) {
{
copy()
- showCursorHandleToolbar = false
+ updateTextToolbarState(TextToolbarState.None)
}
} else null
val cut: (() -> Unit)? = if (!selection.collapsed && editable) {
{
cut()
- showCursorHandleToolbar = false
+ updateTextToolbarState(TextToolbarState.None)
}
} else null
val selectAll: (() -> Unit)? = if (selection.length != textFieldState.text.length) {
{
textFieldState.selectAll()
- showCursorHandleToolbar = false
+ updateTextToolbarState(TextToolbarState.Selection)
}
} else null
@@ -1095,7 +1115,7 @@
}
showCursorHandle = false
- showCursorHandleToolbar = false
+ updateTextToolbarState(TextToolbarState.None)
}
private fun hideTextToolbar() {
@@ -1189,6 +1209,21 @@
private fun TextRange.reverse() = TextRange(end, start)
+/**
+ * A state that indicates when to show TextToolbar.
+ *
+ * - [None] Do not show the TextToolbar at all.
+ * - [Cursor] if selection is collapsed and all the other criteria are met, show the TextToolbar.
+ * - [Selection] if selection is expanded and all the other criteria are met, show the TextToolbar.
+ *
+ * @see [TextFieldSelectionState.observeTextToolbarVisibility]
+ */
+internal enum class TextToolbarState {
+ None,
+ Cursor,
+ Selection,
+}
+
private const val DEBUG = false
private const val DEBUG_TAG = "TextFieldSelectionState"
diff --git a/compose/material/material/api/api_lint.ignore b/compose/material/material/api/api_lint.ignore
index 1ab2ffe..21f1bf6 100644
--- a/compose/material/material/api/api_lint.ignore
+++ b/compose/material/material/api/api_lint.ignore
@@ -1,8 +1,4 @@
// Baseline format: 1.0
-KotlinDefaultParameterOrder: androidx.compose.material.ModalBottomSheetKt#rememberModalBottomSheetState(androidx.compose.material.ModalBottomSheetValue, androidx.compose.animation.core.AnimationSpec<java.lang.Float>, boolean, kotlin.jvm.functions.Function1<? super androidx.compose.material.ModalBottomSheetValue,java.lang.Boolean>) parameter #1:
- Parameter `animationSpec` has a default value and should come after all parameters without default values (except for a trailing lambda parameter)
-KotlinDefaultParameterOrder: androidx.compose.material.ModalBottomSheetState#ModalBottomSheetState(androidx.compose.material.ModalBottomSheetValue, androidx.compose.animation.core.AnimationSpec<java.lang.Float>, boolean, kotlin.jvm.functions.Function1<? super androidx.compose.material.ModalBottomSheetValue,java.lang.Boolean>) parameter #1:
- Parameter `animationSpec` has a default value and should come after all parameters without default values (except for a trailing lambda parameter)
KotlinDefaultParameterOrder: androidx.compose.material.SwipeToDismissKt#SwipeToDismiss(androidx.compose.material.DismissState, androidx.compose.ui.Modifier, java.util.Set<? extends androidx.compose.material.DismissDirection>, kotlin.jvm.functions.Function1<? super androidx.compose.material.DismissDirection,? extends androidx.compose.material.ThresholdConfig>, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>) parameter #1:
Parameter `modifier` has a default value and should come after all parameters without default values (except for a trailing lambda parameter)
KotlinDefaultParameterOrder: androidx.compose.material.SwipeToDismissKt#SwipeToDismiss(androidx.compose.material.DismissState, androidx.compose.ui.Modifier, java.util.Set<? extends androidx.compose.material.DismissDirection>, kotlin.jvm.functions.Function1<? super androidx.compose.material.DismissDirection,? extends androidx.compose.material.ThresholdConfig>, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit>) parameter #2:
diff --git a/compose/material3/material3-adaptive/api/current.txt b/compose/material3/material3-adaptive/api/current.txt
index 1a6cd1b..15b55c6 100644
--- a/compose/material3/material3-adaptive/api/current.txt
+++ b/compose/material3/material3-adaptive/api/current.txt
@@ -16,24 +16,22 @@
}
public final class AndroidWindowInfo_androidKt {
- method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.WindowAdaptiveInfo calculateWindowAdaptiveInfo();
- method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.runtime.State<java.util.List<androidx.window.layout.FoldingFeature>> foldingFeaturesAsState();
- method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.runtime.State<androidx.compose.ui.unit.IntSize> windowSizeAsState();
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.runtime.State<java.util.List<androidx.window.layout.FoldingFeature>> collectFoldingFeaturesAsState();
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.runtime.State<androidx.compose.ui.unit.IntSize> collectWindowSizeAsState();
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.WindowAdaptiveInfo currentWindowAdaptiveInfo();
}
@SuppressCompatibility @kotlin.RequiresOptIn(message="This material3-adaptive API is experimental and is likely to change or to be" + "removed in the future.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public @interface ExperimentalMaterial3AdaptiveApi {
}
@SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Immutable public final class GutterSizes {
- ctor public GutterSizes(float outerVertical, float innerVertical, optional float outerHorizontal, optional float innerHorizontal);
- method public float getInnerHorizontal();
- method public float getInnerVertical();
- method public float getOuterHorizontal();
- method public float getOuterVertical();
- property public final float innerHorizontal;
- property public final float innerVertical;
- property public final float outerHorizontal;
- property public final float outerVertical;
+ ctor public GutterSizes(androidx.compose.foundation.layout.PaddingValues contentPadding, float verticalSpacerSize, optional float horizontalSpacerSize);
+ method public androidx.compose.foundation.layout.PaddingValues getContentPadding();
+ method public float getHorizontalSpacerSize();
+ method public float getVerticalSpacerSize();
+ property public final androidx.compose.foundation.layout.PaddingValues contentPadding;
+ property public final float horizontalSpacerSize;
+ property public final float verticalSpacerSize;
}
@androidx.compose.runtime.Immutable @kotlin.jvm.JvmInline public final value class HingePolicy {
diff --git a/compose/material3/material3-adaptive/api/restricted_current.txt b/compose/material3/material3-adaptive/api/restricted_current.txt
index 1a6cd1b..15b55c6 100644
--- a/compose/material3/material3-adaptive/api/restricted_current.txt
+++ b/compose/material3/material3-adaptive/api/restricted_current.txt
@@ -16,24 +16,22 @@
}
public final class AndroidWindowInfo_androidKt {
- method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.WindowAdaptiveInfo calculateWindowAdaptiveInfo();
- method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.runtime.State<java.util.List<androidx.window.layout.FoldingFeature>> foldingFeaturesAsState();
- method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.runtime.State<androidx.compose.ui.unit.IntSize> windowSizeAsState();
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.runtime.State<java.util.List<androidx.window.layout.FoldingFeature>> collectFoldingFeaturesAsState();
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.runtime.State<androidx.compose.ui.unit.IntSize> collectWindowSizeAsState();
+ method @SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Composable public static androidx.compose.material3.adaptive.WindowAdaptiveInfo currentWindowAdaptiveInfo();
}
@SuppressCompatibility @kotlin.RequiresOptIn(message="This material3-adaptive API is experimental and is likely to change or to be" + "removed in the future.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public @interface ExperimentalMaterial3AdaptiveApi {
}
@SuppressCompatibility @androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi @androidx.compose.runtime.Immutable public final class GutterSizes {
- ctor public GutterSizes(float outerVertical, float innerVertical, optional float outerHorizontal, optional float innerHorizontal);
- method public float getInnerHorizontal();
- method public float getInnerVertical();
- method public float getOuterHorizontal();
- method public float getOuterVertical();
- property public final float innerHorizontal;
- property public final float innerVertical;
- property public final float outerHorizontal;
- property public final float outerVertical;
+ ctor public GutterSizes(androidx.compose.foundation.layout.PaddingValues contentPadding, float verticalSpacerSize, optional float horizontalSpacerSize);
+ method public androidx.compose.foundation.layout.PaddingValues getContentPadding();
+ method public float getHorizontalSpacerSize();
+ method public float getVerticalSpacerSize();
+ property public final androidx.compose.foundation.layout.PaddingValues contentPadding;
+ property public final float horizontalSpacerSize;
+ property public final float verticalSpacerSize;
}
@androidx.compose.runtime.Immutable @kotlin.jvm.JvmInline public final value class HingePolicy {
diff --git a/compose/material3/material3-adaptive/build.gradle b/compose/material3/material3-adaptive/build.gradle
index 0579140..3d01dc8 100644
--- a/compose/material3/material3-adaptive/build.gradle
+++ b/compose/material3/material3-adaptive/build.gradle
@@ -81,7 +81,6 @@
androidInstrumentedTest {
dependsOn(jvmTest)
- dependsOn(androidMain)
dependencies {
implementation(project(":compose:test-utils"))
implementation(project(":window:window-testing"))
diff --git a/compose/material3/material3-adaptive/samples/src/main/java/androidx/compose/material3-adaptive/samples/NavigationSuiteScaffoldSamples.kt b/compose/material3/material3-adaptive/samples/src/main/java/androidx/compose/material3-adaptive/samples/NavigationSuiteScaffoldSamples.kt
index 01ccec2..bba3254 100644
--- a/compose/material3/material3-adaptive/samples/src/main/java/androidx/compose/material3-adaptive/samples/NavigationSuiteScaffoldSamples.kt
+++ b/compose/material3/material3-adaptive/samples/src/main/java/androidx/compose/material3-adaptive/samples/NavigationSuiteScaffoldSamples.kt
@@ -26,7 +26,7 @@
import androidx.compose.material3.adaptive.NavigationSuiteScaffold
import androidx.compose.material3.adaptive.NavigationSuiteScaffoldDefaults
import androidx.compose.material3.adaptive.NavigationSuiteType
-import androidx.compose.material3.adaptive.calculateWindowAdaptiveInfo
+import androidx.compose.material3.adaptive.currentWindowAdaptiveInfo
import androidx.compose.material3.windowsizeclass.WindowWidthSizeClass
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
@@ -45,7 +45,7 @@
var selectedItem by remember { mutableIntStateOf(0) }
val navItems = listOf("Songs", "Artists", "Playlists")
val navSuiteType =
- NavigationSuiteScaffoldDefaults.calculateFromAdaptiveInfo(calculateWindowAdaptiveInfo())
+ NavigationSuiteScaffoldDefaults.calculateFromAdaptiveInfo(currentWindowAdaptiveInfo())
NavigationSuiteScaffold(
navigationSuiteItems = {
@@ -74,7 +74,7 @@
fun NavigationSuiteScaffoldCustomConfigSample() {
var selectedItem by remember { mutableIntStateOf(0) }
val navItems = listOf("Songs", "Artists", "Playlists")
- val adaptiveInfo = calculateWindowAdaptiveInfo()
+ val adaptiveInfo = currentWindowAdaptiveInfo()
// Custom configuration that shows a navigation drawer in large screens.
val customNavSuiteType = with(adaptiveInfo) {
if (windowSizeClass.widthSizeClass == WindowWidthSizeClass.Expanded) {
diff --git a/compose/material3/material3-adaptive/samples/src/main/java/androidx/compose/material3-adaptive/samples/ThreePaneScaffoldSample.kt b/compose/material3/material3-adaptive/samples/src/main/java/androidx/compose/material3-adaptive/samples/ThreePaneScaffoldSample.kt
index fe8fcfe..87fce7e 100644
--- a/compose/material3/material3-adaptive/samples/src/main/java/androidx/compose/material3-adaptive/samples/ThreePaneScaffoldSample.kt
+++ b/compose/material3/material3-adaptive/samples/src/main/java/androidx/compose/material3-adaptive/samples/ThreePaneScaffoldSample.kt
@@ -37,7 +37,7 @@
import androidx.compose.material3.adaptive.ThreePaneScaffoldDefaults
import androidx.compose.material3.adaptive.calculateStandardPaneScaffoldDirective
import androidx.compose.material3.adaptive.calculateThreePaneScaffoldValue
-import androidx.compose.material3.adaptive.calculateWindowAdaptiveInfo
+import androidx.compose.material3.adaptive.currentWindowAdaptiveInfo
import androidx.compose.material3.adaptive.rememberListDetailPaneScaffoldState
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
@@ -182,7 +182,7 @@
@Preview
@Composable
internal fun ThreePaneScaffoldSample() {
- val scaffoldDirective = calculateStandardPaneScaffoldDirective(calculateWindowAdaptiveInfo())
+ val scaffoldDirective = calculateStandardPaneScaffoldDirective(currentWindowAdaptiveInfo())
ThreePaneScaffold(
modifier = Modifier.fillMaxSize(),
scaffoldDirective = scaffoldDirective,
diff --git a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/FoldingFeaturesAsStateTest.kt b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/CollectFoldingFeaturesAsStateTest.kt
similarity index 90%
rename from compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/FoldingFeaturesAsStateTest.kt
rename to compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/CollectFoldingFeaturesAsStateTest.kt
index 709ddf0..1eb4823 100644
--- a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/FoldingFeaturesAsStateTest.kt
+++ b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/CollectFoldingFeaturesAsStateTest.kt
@@ -36,7 +36,7 @@
@OptIn(ExperimentalMaterial3AdaptiveApi::class)
@SmallTest
@RunWith(AndroidJUnit4::class)
-class FoldingFeaturesAsStateTest {
+class CollectFoldingFeaturesAsStateTest {
private val composeRule = createComposeRule()
private val publisherRule = WindowLayoutInfoPublisherRule()
@@ -47,11 +47,11 @@
}
@Test
- fun test_foldingFeatureAsState_returnEmptyListInitially() {
+ fun test_collectFoldingFeatureAsState_returnEmptyListInitially() {
lateinit var actualFoldingFeatures: State<List<FoldingFeature>>
composeRule.setContent {
- actualFoldingFeatures = foldingFeaturesAsState()
+ actualFoldingFeatures = collectFoldingFeaturesAsState()
}
composeRule.runOnIdle {
@@ -60,11 +60,11 @@
}
@Test
- fun test_foldingFeatureAsState_returnCurrentFoldingFeatures() {
+ fun test_collectFoldingFeatureAsState_returnCurrentFoldingFeatures() {
lateinit var actualFoldingFeatures: State<List<FoldingFeature>>
composeRule.setContent {
- actualFoldingFeatures = foldingFeaturesAsState()
+ actualFoldingFeatures = collectFoldingFeaturesAsState()
}
publisherRule.overrideWindowLayoutInfo(
diff --git a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/WindowSizeAsStateTest.kt b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/CollectWindowSizeAsStateTest.kt
similarity index 91%
rename from compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/WindowSizeAsStateTest.kt
rename to compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/CollectWindowSizeAsStateTest.kt
index 0b7d176..ec1328d 100644
--- a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/WindowSizeAsStateTest.kt
+++ b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/CollectWindowSizeAsStateTest.kt
@@ -40,13 +40,13 @@
@OptIn(ExperimentalMaterial3AdaptiveApi::class)
@SmallTest
@RunWith(AndroidJUnit4::class)
-class WindowSizeAsStateTest {
+class CollectWindowSizeAsStateTest {
@get:Rule
val rule = createComposeRule()
@Test
- fun test_windowSizeAsState() {
- lateinit var actualWindowSize: State<IntSize>
+ fun test_collectWindowSizeAsState() {
+ var actualWindowSize: IntSize = IntSize.Zero
val mockWindowSize = mutableStateOf(MockWindowSize1)
WindowMetricsCalculator.overrideDecorator(
@@ -58,18 +58,18 @@
testConfiguration.screenWidthDp = mockWindowSize.value.width
testConfiguration.screenHeightDp = mockWindowSize.value.height
CompositionLocalProvider(LocalConfiguration provides testConfiguration) {
- actualWindowSize = windowSizeAsState()
+ actualWindowSize = collectWindowSizeAsState().value
}
}
rule.runOnIdle {
- assertThat(actualWindowSize.value).isEqualTo(MockWindowSize1)
+ assertThat(actualWindowSize).isEqualTo(MockWindowSize1)
}
mockWindowSize.value = MockWindowSize2
rule.runOnIdle {
- assertThat(actualWindowSize.value).isEqualTo(MockWindowSize2)
+ assertThat(actualWindowSize).isEqualTo(MockWindowSize2)
}
}
diff --git a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/CalculateWindowAdaptiveInfoTest.kt b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/CurrentWindowAdaptiveInfoTest.kt
similarity index 96%
rename from compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/CalculateWindowAdaptiveInfoTest.kt
rename to compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/CurrentWindowAdaptiveInfoTest.kt
index 816c5bb..dcbfe12 100644
--- a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/CalculateWindowAdaptiveInfoTest.kt
+++ b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/CurrentWindowAdaptiveInfoTest.kt
@@ -43,7 +43,7 @@
@OptIn(ExperimentalMaterial3AdaptiveApi::class)
@SmallTest
@RunWith(AndroidJUnit4::class)
-class CalculateWindowAdaptiveInfoTest {
+class CurrentWindowAdaptiveInfoTest {
private val composeRule = createComposeRule()
private val layoutInfoRule = WindowLayoutInfoPublisherRule()
@@ -55,7 +55,7 @@
@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
@Test
- fun test_calculateWindowAdaptiveInfo() {
+ fun test_currentWindowAdaptiveInfo() {
lateinit var actualAdaptiveInfo: WindowAdaptiveInfo
val mockWindowSize = mutableStateOf(MockWindowSize1)
WindowMetricsCalculator.overrideDecorator(
@@ -70,7 +70,7 @@
LocalDensity provides MockDensity,
LocalConfiguration provides testConfiguration
) {
- actualAdaptiveInfo = calculateWindowAdaptiveInfo()
+ actualAdaptiveInfo = currentWindowAdaptiveInfo()
}
}
diff --git a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ListDetailPaneScaffoldStateTest.kt b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ListDetailPaneScaffoldStateTest.kt
index 6214ed4..cd2f37c 100644
--- a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ListDetailPaneScaffoldStateTest.kt
+++ b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ListDetailPaneScaffoldStateTest.kt
@@ -16,6 +16,7 @@
package androidx.compose.material3.adaptive
+import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.runtime.mutableStateOf
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.unit.dp
@@ -181,7 +182,7 @@
@OptIn(ExperimentalMaterial3AdaptiveApi::class)
private val MockSinglePaneScaffoldDirective = PaneScaffoldDirective(
maxHorizontalPartitions = 1,
- gutterSizes = GutterSizes(0.dp, 0.dp),
+ gutterSizes = GutterSizes(PaddingValues(0.dp), 0.dp),
maxVerticalPartitions = 1,
excludedBounds = emptyList()
)
@@ -189,7 +190,7 @@
@OptIn(ExperimentalMaterial3AdaptiveApi::class)
private val MockDualPaneScaffoldDirective = PaneScaffoldDirective(
maxHorizontalPartitions = 2,
- gutterSizes = GutterSizes(16.dp, 16.dp),
+ gutterSizes = GutterSizes(PaddingValues(16.dp), 16.dp),
maxVerticalPartitions = 1,
excludedBounds = emptyList()
)
diff --git a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/SupportingPaneScaffoldStateTest.kt b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/SupportingPaneScaffoldStateTest.kt
index d1c94ca..812482f 100644
--- a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/SupportingPaneScaffoldStateTest.kt
+++ b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/SupportingPaneScaffoldStateTest.kt
@@ -16,6 +16,7 @@
package androidx.compose.material3.adaptive
+import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.runtime.mutableStateOf
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.unit.dp
@@ -181,7 +182,7 @@
@OptIn(ExperimentalMaterial3AdaptiveApi::class)
private val MockSinglePaneScaffoldDirective = PaneScaffoldDirective(
maxHorizontalPartitions = 1,
- gutterSizes = GutterSizes(0.dp, 0.dp),
+ gutterSizes = GutterSizes(PaddingValues(0.dp), 0.dp),
maxVerticalPartitions = 1,
excludedBounds = emptyList()
)
@@ -189,7 +190,7 @@
@OptIn(ExperimentalMaterial3AdaptiveApi::class)
private val MockDualPaneScaffoldDirective = PaneScaffoldDirective(
maxHorizontalPartitions = 2,
- gutterSizes = GutterSizes(16.dp, 16.dp),
+ gutterSizes = GutterSizes(PaddingValues(16.dp), 16.dp),
maxVerticalPartitions = 1,
excludedBounds = emptyList()
)
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 c5793d7..a3a45ad 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
@@ -44,7 +44,7 @@
fun threePaneScaffold_listDetailArrangement_standard() {
rule.setContent {
val scaffoldDirective = calculateStandardPaneScaffoldDirective(
- calculateWindowAdaptiveInfo()
+ currentWindowAdaptiveInfo()
)
val scaffoldValue = calculateThreePaneScaffoldValue(
scaffoldDirective.maxHorizontalPartitions
@@ -65,7 +65,7 @@
fun threePaneScaffold_listDetailArrangement_dense() {
rule.setContent {
val scaffoldDirective = calculateDensePaneScaffoldDirective(
- calculateWindowAdaptiveInfo()
+ currentWindowAdaptiveInfo()
)
val scaffoldValue = calculateThreePaneScaffoldValue(
scaffoldDirective.maxHorizontalPartitions
diff --git a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldTest.kt b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldTest.kt
index ad60581..d9b7506 100644
--- a/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldTest.kt
+++ b/compose/material3/material3-adaptive/src/androidInstrumentedTest/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffoldTest.kt
@@ -16,6 +16,7 @@
package androidx.compose.material3.adaptive
+import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
@@ -106,7 +107,7 @@
@OptIn(ExperimentalMaterial3AdaptiveApi::class)
private val MockScaffoldDirective = PaneScaffoldDirective(
maxHorizontalPartitions = 1,
- gutterSizes = GutterSizes(0.dp, 0.dp),
+ gutterSizes = GutterSizes(PaddingValues(0.dp), 0.dp),
maxVerticalPartitions = 1,
excludedBounds = emptyList()
)
diff --git a/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/AndroidWindowInfo.android.kt b/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/AndroidWindowInfo.android.kt
index a21a05e..5b7b34c 100644
--- a/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/AndroidWindowInfo.android.kt
+++ b/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/AndroidWindowInfo.android.kt
@@ -44,14 +44,14 @@
@ExperimentalMaterial3AdaptiveApi
@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
@Composable
-fun calculateWindowAdaptiveInfo(): WindowAdaptiveInfo =
+fun currentWindowAdaptiveInfo(): WindowAdaptiveInfo =
WindowAdaptiveInfo(
WindowSizeClass.calculateFromSize(
with(LocalDensity.current) {
- windowSizeAsState().value.toSize().toDpSize()
+ collectWindowSizeAsState().value.toSize().toDpSize()
}
),
- calculatePosture(foldingFeaturesAsState().value)
+ calculatePosture(collectFoldingFeaturesAsState().value)
)
/**
@@ -61,7 +61,7 @@
*/
@ExperimentalMaterial3AdaptiveApi
@Composable
-fun windowSizeAsState(): State<IntSize> {
+fun collectWindowSizeAsState(): State<IntSize> {
val size = remember {
mutableStateOf(IntSize(0, 0))
}
@@ -90,7 +90,7 @@
*/
@ExperimentalMaterial3AdaptiveApi
@Composable
-fun foldingFeaturesAsState(): State<List<FoldingFeature>> {
+fun collectFoldingFeaturesAsState(): State<List<FoldingFeature>> {
val context = LocalContext.current
return remember(context) {
if (context is Activity) {
diff --git a/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/ListDetailPaneScaffold.kt b/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/ListDetailPaneScaffold.kt
index b6c828e..b10a7bc 100644
--- a/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/ListDetailPaneScaffold.kt
+++ b/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/ListDetailPaneScaffold.kt
@@ -155,7 +155,7 @@
@Composable
fun rememberListDetailPaneScaffoldState(
scaffoldDirective: PaneScaffoldDirective =
- calculateStandardPaneScaffoldDirective(calculateWindowAdaptiveInfo()),
+ calculateStandardPaneScaffoldDirective(currentWindowAdaptiveInfo()),
adaptStrategies: ThreePaneScaffoldAdaptStrategies =
ListDetailPaneScaffoldDefaults.adaptStrategies(),
initialFocusHistory: List<ListDetailPaneScaffoldRole> = listOf(ListDetailPaneScaffoldRole.List)
diff --git a/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/NavigationSuiteScaffold.android.kt b/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/NavigationSuiteScaffold.android.kt
index 97c0534..ce6c321 100644
--- a/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/NavigationSuiteScaffold.android.kt
+++ b/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/NavigationSuiteScaffold.android.kt
@@ -21,4 +21,4 @@
@OptIn(ExperimentalMaterial3AdaptiveApi::class)
internal actual val WindowAdaptiveInfoDefault: WindowAdaptiveInfo
@Composable
- get() = calculateWindowAdaptiveInfo()
+ get() = currentWindowAdaptiveInfo()
diff --git a/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/SupportingPaneScaffold.kt b/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/SupportingPaneScaffold.kt
index 1c0a80e..7e83cd7 100644
--- a/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/SupportingPaneScaffold.kt
+++ b/compose/material3/material3-adaptive/src/androidMain/kotlin/androidx/compose/material3/adaptive/SupportingPaneScaffold.kt
@@ -140,7 +140,7 @@
@Composable
fun rememberSupportingPaneScaffoldState(
scaffoldDirective: PaneScaffoldDirective =
- calculateStandardPaneScaffoldDirective(calculateWindowAdaptiveInfo()),
+ calculateStandardPaneScaffoldDirective(currentWindowAdaptiveInfo()),
adaptStrategies: ThreePaneScaffoldAdaptStrategies =
SupportingPaneScaffoldDefaults.adaptStrategies(),
initialFocusHistory: List<SupportingPaneScaffoldRole> = listOf(SupportingPaneScaffoldRole.Main)
diff --git a/compose/material3/material3-adaptive/src/androidUnitTest/kotlin/androidx/compose/material3/adaptive/PaneScaffoldDirectiveTest.kt b/compose/material3/material3-adaptive/src/androidUnitTest/kotlin/androidx/compose/material3/adaptive/PaneScaffoldDirectiveTest.kt
index 68c5553..505ccf9 100644
--- a/compose/material3/material3-adaptive/src/androidUnitTest/kotlin/androidx/compose/material3/adaptive/PaneScaffoldDirectiveTest.kt
+++ b/compose/material3/material3-adaptive/src/androidUnitTest/kotlin/androidx/compose/material3/adaptive/PaneScaffoldDirectiveTest.kt
@@ -20,6 +20,7 @@
import androidx.compose.material3.windowsizeclass.WindowSizeClass
import androidx.compose.ui.geometry.Rect
import androidx.compose.ui.unit.DpSize
+import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.dp
import com.google.common.truth.Truth.assertThat
import org.junit.Test
@@ -40,10 +41,20 @@
assertThat(scaffoldDirective.maxHorizontalPartitions).isEqualTo(1)
assertThat(scaffoldDirective.maxVerticalPartitions).isEqualTo(1)
- assertThat(scaffoldDirective.gutterSizes.outerVertical).isEqualTo(16.dp)
- assertThat(scaffoldDirective.gutterSizes.innerVertical).isEqualTo(0.dp)
- assertThat(scaffoldDirective.gutterSizes.outerHorizontal).isEqualTo(16.dp)
- assertThat(scaffoldDirective.gutterSizes.innerHorizontal).isEqualTo(0.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateLeftPadding(LayoutDirection.Ltr)
+ ).isEqualTo(16.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateRightPadding(LayoutDirection.Ltr)
+ ).isEqualTo(16.dp)
+ assertThat(scaffoldDirective.gutterSizes.verticalSpacerSize).isEqualTo(0.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateTopPadding()
+ ).isEqualTo(16.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateBottomPadding()
+ ).isEqualTo(16.dp)
+ assertThat(scaffoldDirective.gutterSizes.horizontalSpacerSize).isEqualTo(0.dp)
}
@Test
@@ -57,10 +68,20 @@
assertThat(scaffoldDirective.maxHorizontalPartitions).isEqualTo(1)
assertThat(scaffoldDirective.maxVerticalPartitions).isEqualTo(1)
- assertThat(scaffoldDirective.gutterSizes.outerVertical).isEqualTo(24.dp)
- assertThat(scaffoldDirective.gutterSizes.innerVertical).isEqualTo(0.dp)
- assertThat(scaffoldDirective.gutterSizes.outerHorizontal).isEqualTo(24.dp)
- assertThat(scaffoldDirective.gutterSizes.innerHorizontal).isEqualTo(0.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateLeftPadding(LayoutDirection.Ltr)
+ ).isEqualTo(24.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateRightPadding(LayoutDirection.Ltr)
+ ).isEqualTo(24.dp)
+ assertThat(scaffoldDirective.gutterSizes.verticalSpacerSize).isEqualTo(0.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateTopPadding()
+ ).isEqualTo(24.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateBottomPadding()
+ ).isEqualTo(24.dp)
+ assertThat(scaffoldDirective.gutterSizes.horizontalSpacerSize).isEqualTo(0.dp)
}
@Test
@@ -74,10 +95,20 @@
assertThat(scaffoldDirective.maxHorizontalPartitions).isEqualTo(2)
assertThat(scaffoldDirective.maxVerticalPartitions).isEqualTo(1)
- assertThat(scaffoldDirective.gutterSizes.outerVertical).isEqualTo(24.dp)
- assertThat(scaffoldDirective.gutterSizes.innerVertical).isEqualTo(24.dp)
- assertThat(scaffoldDirective.gutterSizes.outerHorizontal).isEqualTo(24.dp)
- assertThat(scaffoldDirective.gutterSizes.innerHorizontal).isEqualTo(0.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateLeftPadding(LayoutDirection.Ltr)
+ ).isEqualTo(24.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateRightPadding(LayoutDirection.Ltr)
+ ).isEqualTo(24.dp)
+ assertThat(scaffoldDirective.gutterSizes.verticalSpacerSize).isEqualTo(24.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateTopPadding()
+ ).isEqualTo(24.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateBottomPadding()
+ ).isEqualTo(24.dp)
+ assertThat(scaffoldDirective.gutterSizes.horizontalSpacerSize).isEqualTo(0.dp)
}
@Test
@@ -91,10 +122,20 @@
assertThat(scaffoldDirective.maxHorizontalPartitions).isEqualTo(1)
assertThat(scaffoldDirective.maxVerticalPartitions).isEqualTo(2)
- assertThat(scaffoldDirective.gutterSizes.outerVertical).isEqualTo(24.dp)
- assertThat(scaffoldDirective.gutterSizes.innerVertical).isEqualTo(0.dp)
- assertThat(scaffoldDirective.gutterSizes.outerHorizontal).isEqualTo(24.dp)
- assertThat(scaffoldDirective.gutterSizes.innerHorizontal).isEqualTo(24.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateLeftPadding(LayoutDirection.Ltr)
+ ).isEqualTo(24.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateRightPadding(LayoutDirection.Ltr)
+ ).isEqualTo(24.dp)
+ assertThat(scaffoldDirective.gutterSizes.verticalSpacerSize).isEqualTo(0.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateTopPadding()
+ ).isEqualTo(24.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateBottomPadding()
+ ).isEqualTo(24.dp)
+ assertThat(scaffoldDirective.gutterSizes.horizontalSpacerSize).isEqualTo(24.dp)
}
@Test
@@ -108,10 +149,20 @@
assertThat(scaffoldDirective.maxHorizontalPartitions).isEqualTo(1)
assertThat(scaffoldDirective.maxVerticalPartitions).isEqualTo(1)
- assertThat(scaffoldDirective.gutterSizes.outerVertical).isEqualTo(16.dp)
- assertThat(scaffoldDirective.gutterSizes.innerVertical).isEqualTo(0.dp)
- assertThat(scaffoldDirective.gutterSizes.outerHorizontal).isEqualTo(16.dp)
- assertThat(scaffoldDirective.gutterSizes.innerHorizontal).isEqualTo(0.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateLeftPadding(LayoutDirection.Ltr)
+ ).isEqualTo(16.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateRightPadding(LayoutDirection.Ltr)
+ ).isEqualTo(16.dp)
+ assertThat(scaffoldDirective.gutterSizes.verticalSpacerSize).isEqualTo(0.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateTopPadding()
+ ).isEqualTo(16.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateBottomPadding()
+ ).isEqualTo(16.dp)
+ assertThat(scaffoldDirective.gutterSizes.horizontalSpacerSize).isEqualTo(0.dp)
}
@Test
@@ -125,10 +176,20 @@
assertThat(scaffoldDirective.maxHorizontalPartitions).isEqualTo(2)
assertThat(scaffoldDirective.maxVerticalPartitions).isEqualTo(1)
- assertThat(scaffoldDirective.gutterSizes.outerVertical).isEqualTo(24.dp)
- assertThat(scaffoldDirective.gutterSizes.innerVertical).isEqualTo(24.dp)
- assertThat(scaffoldDirective.gutterSizes.outerHorizontal).isEqualTo(24.dp)
- assertThat(scaffoldDirective.gutterSizes.innerHorizontal).isEqualTo(0.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateLeftPadding(LayoutDirection.Ltr)
+ ).isEqualTo(24.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateRightPadding(LayoutDirection.Ltr)
+ ).isEqualTo(24.dp)
+ assertThat(scaffoldDirective.gutterSizes.verticalSpacerSize).isEqualTo(24.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateTopPadding()
+ ).isEqualTo(24.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateBottomPadding()
+ ).isEqualTo(24.dp)
+ assertThat(scaffoldDirective.gutterSizes.horizontalSpacerSize).isEqualTo(0.dp)
}
@Test
@@ -142,10 +203,20 @@
assertThat(scaffoldDirective.maxHorizontalPartitions).isEqualTo(2)
assertThat(scaffoldDirective.maxVerticalPartitions).isEqualTo(1)
- assertThat(scaffoldDirective.gutterSizes.outerVertical).isEqualTo(24.dp)
- assertThat(scaffoldDirective.gutterSizes.innerVertical).isEqualTo(24.dp)
- assertThat(scaffoldDirective.gutterSizes.outerHorizontal).isEqualTo(24.dp)
- assertThat(scaffoldDirective.gutterSizes.innerHorizontal).isEqualTo(0.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateLeftPadding(LayoutDirection.Ltr)
+ ).isEqualTo(24.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateRightPadding(LayoutDirection.Ltr)
+ ).isEqualTo(24.dp)
+ assertThat(scaffoldDirective.gutterSizes.verticalSpacerSize).isEqualTo(24.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateTopPadding()
+ ).isEqualTo(24.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateBottomPadding()
+ ).isEqualTo(24.dp)
+ assertThat(scaffoldDirective.gutterSizes.horizontalSpacerSize).isEqualTo(0.dp)
}
@Test
@@ -159,10 +230,20 @@
assertThat(scaffoldDirective.maxHorizontalPartitions).isEqualTo(2)
assertThat(scaffoldDirective.maxVerticalPartitions).isEqualTo(2)
- assertThat(scaffoldDirective.gutterSizes.outerVertical).isEqualTo(24.dp)
- assertThat(scaffoldDirective.gutterSizes.innerVertical).isEqualTo(24.dp)
- assertThat(scaffoldDirective.gutterSizes.outerHorizontal).isEqualTo(24.dp)
- assertThat(scaffoldDirective.gutterSizes.innerHorizontal).isEqualTo(24.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateLeftPadding(LayoutDirection.Ltr)
+ ).isEqualTo(24.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateRightPadding(LayoutDirection.Ltr)
+ ).isEqualTo(24.dp)
+ assertThat(scaffoldDirective.gutterSizes.verticalSpacerSize).isEqualTo(24.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateTopPadding()
+ ).isEqualTo(24.dp)
+ assertThat(
+ scaffoldDirective.gutterSizes.contentPadding.calculateBottomPadding()
+ ).isEqualTo(24.dp)
+ assertThat(scaffoldDirective.gutterSizes.horizontalSpacerSize).isEqualTo(24.dp)
}
@Test
diff --git a/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/PaneScaffoldDirective.kt b/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/PaneScaffoldDirective.kt
index ca23073..4c88e8d 100644
--- a/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/PaneScaffoldDirective.kt
+++ b/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/PaneScaffoldDirective.kt
@@ -16,6 +16,7 @@
package androidx.compose.material3.adaptive
+import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.material3.windowsizeclass.WindowWidthSizeClass
import androidx.compose.runtime.Immutable
import androidx.compose.ui.geometry.Rect
@@ -42,42 +43,40 @@
hingePolicy: HingePolicy = HingePolicy.AvoidSeparating
): PaneScaffoldDirective {
val maxHorizontalPartitions: Int
- val gutterOuterVertical: Dp
- val gutterInnerVertical: Dp
+ val contentPadding: PaddingValues
+ val verticalSpacerSize: Dp
when (windowAdaptiveInfo.windowSizeClass.widthSizeClass) {
WindowWidthSizeClass.Compact -> {
maxHorizontalPartitions = 1
- gutterOuterVertical = 16.dp
- gutterInnerVertical = 0.dp
+ contentPadding = PaddingValues(16.dp)
+ verticalSpacerSize = 0.dp
}
WindowWidthSizeClass.Medium -> {
maxHorizontalPartitions = 1
- gutterOuterVertical = 24.dp
- gutterInnerVertical = 0.dp
+ contentPadding = PaddingValues(24.dp)
+ verticalSpacerSize = 0.dp
}
else -> {
maxHorizontalPartitions = 2
- gutterOuterVertical = 24.dp
- gutterInnerVertical = 24.dp
+ contentPadding = PaddingValues(24.dp)
+ verticalSpacerSize = 24.dp
}
}
val maxVerticalPartitions: Int
- val gutterInnerHorizontal: Dp
+ val horizontalSpacerSize: Dp
// TODO(conradchen): Confirm the table top mode settings
if (windowAdaptiveInfo.posture.isTabletop) {
maxVerticalPartitions = 2
- gutterInnerHorizontal = 24.dp
+ horizontalSpacerSize = 24.dp
} else {
maxVerticalPartitions = 1
- gutterInnerHorizontal = 0.dp
+ horizontalSpacerSize = 0.dp
}
return PaneScaffoldDirective(
maxHorizontalPartitions,
- GutterSizes(
- gutterOuterVertical, gutterInnerVertical, innerHorizontal = gutterInnerHorizontal
- ),
+ GutterSizes(contentPadding, verticalSpacerSize, horizontalSpacerSize),
maxVerticalPartitions,
getExcludedBounds(windowAdaptiveInfo.posture, hingePolicy)
)
@@ -103,42 +102,40 @@
hingePolicy: HingePolicy = HingePolicy.AvoidSeparating
): PaneScaffoldDirective {
val maxHorizontalPartitions: Int
- val gutterOuterVertical: Dp
- val gutterInnerVertical: Dp
+ val contentPadding: PaddingValues
+ val verticalSpacerSize: Dp
when (windowAdaptiveInfo.windowSizeClass.widthSizeClass) {
WindowWidthSizeClass.Compact -> {
maxHorizontalPartitions = 1
- gutterOuterVertical = 16.dp
- gutterInnerVertical = 0.dp
+ contentPadding = PaddingValues(16.dp)
+ verticalSpacerSize = 0.dp
}
WindowWidthSizeClass.Medium -> {
// TODO(conradchen): Confirm the outer gutter size
maxHorizontalPartitions = 2
- gutterOuterVertical = 24.dp
- gutterInnerVertical = 24.dp
+ contentPadding = PaddingValues(24.dp)
+ verticalSpacerSize = 24.dp
}
else -> {
maxHorizontalPartitions = 2
- gutterOuterVertical = 24.dp
- gutterInnerVertical = 24.dp
+ contentPadding = PaddingValues(24.dp)
+ verticalSpacerSize = 24.dp
}
}
val maxVerticalPartitions: Int
- val gutterInnerHorizontal: Dp
+ val horizontalSpacerSize: Dp
if (windowAdaptiveInfo.posture.isTabletop) {
maxVerticalPartitions = 2
- gutterInnerHorizontal = 24.dp
+ horizontalSpacerSize = 24.dp
} else {
maxVerticalPartitions = 1
- gutterInnerHorizontal = 0.dp
+ horizontalSpacerSize = 0.dp
}
return PaneScaffoldDirective(
maxHorizontalPartitions,
- GutterSizes(
- gutterOuterVertical, gutterInnerVertical, innerHorizontal = gutterInnerHorizontal
- ),
+ GutterSizes(contentPadding, verticalSpacerSize, horizontalSpacerSize),
maxVerticalPartitions,
getExcludedBounds(windowAdaptiveInfo.posture, hingePolicy)
)
@@ -193,44 +190,38 @@
}
/**
- * Denotes the gutter sizes of an adaptive layout. Gutters of an adaptive layouts include margins
- * between panes ([innerVertical] and [innerHorizontal]) and paddings of the layout itself
- * ([outerVertical] and [outerHorizontal]). Usually we will expect larger gutter sizes to be set
- * when the layout is larger and more panes are shown in the layout.
+ * Denotes the gutter sizes of an adaptive layout. Gutters of an adaptive layouts include spacers
+ * between panes ([verticalSpacerSize] and [horizontalSpacerSize]) and paddings of the layout itself
+ * ([contentPadding]). Usually we will expect larger gutter sizes to be set when the layout is
+ * larger and more panes are shown in the layout.
*
* @constructor create an instance of [GutterSizes]
- * @param outerVertical Size of the outer vertical gutters. It's similar to left/right paddings of
- * a normal layout.
- * @param innerVertical Size of the inner vertical gutters. It's similar to left/right margins of
- * the layout's children.
- * @param outerHorizontal Size of the outer horizontal gutters. It's similar to top/bottom paddings
- * of a normal layout.
- * @param innerHorizontal Size of the inner horizontal gutters. It's similar to top/bottom margins
- * of the layout's children.
+ * @param contentPadding Size of the paddings between the panes and the outer bounds of the layout.
+ * @param verticalSpacerSize Size of the vertical spacers between panes. It's similar to left/right
+ * margins of the layout's children.
+ * @param horizontalSpacerSize Size of the horizontal spacers between panes. It's similar to
+ * top/bottom margins of the layout's children.
*/
@ExperimentalMaterial3AdaptiveApi
@Immutable
class GutterSizes(
- val outerVertical: Dp,
- val innerVertical: Dp,
- val outerHorizontal: Dp = outerVertical,
- val innerHorizontal: Dp = innerVertical
+ val contentPadding: PaddingValues,
+ val verticalSpacerSize: Dp,
+ val horizontalSpacerSize: Dp = verticalSpacerSize
) {
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other !is GutterSizes) return false
- if (outerVertical != other.outerVertical) return false
- if (innerVertical != other.innerVertical) return false
- if (outerHorizontal != other.outerHorizontal) return false
- if (innerHorizontal != other.innerHorizontal) return false
+ if (contentPadding != other.contentPadding) return false
+ if (verticalSpacerSize != other.verticalSpacerSize) return false
+ if (horizontalSpacerSize != other.horizontalSpacerSize) return false
return true
}
override fun hashCode(): Int {
- var result = outerVertical.hashCode()
- result = 31 * result + innerVertical.hashCode()
- result = 31 * result + outerHorizontal.hashCode()
- result = 31 * result + innerHorizontal.hashCode()
+ var result = contentPadding.hashCode()
+ result = 31 * result + verticalSpacerSize.hashCode()
+ result = 31 * result + horizontalSpacerSize.hashCode()
return result
}
}
diff --git a/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffold.kt b/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffold.kt
index d4b5036..d9bedb5 100644
--- a/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffold.kt
+++ b/compose/material3/material3-adaptive/src/commonMain/kotlin/androidx/compose/material3/adaptive/ThreePaneScaffold.kt
@@ -376,24 +376,33 @@
it == PaneAdaptedValue.Hidden
}
- val outerVerticalGutterSize = scaffoldDirective.gutterSizes.outerVertical.roundToPx()
- val innerVerticalGutterSize = scaffoldDirective.gutterSizes.innerVertical.roundToPx()
- val outerHorizontalGutterSize =
- scaffoldDirective.gutterSizes.outerHorizontal.roundToPx()
+ val verticalSpacerSize = scaffoldDirective.gutterSizes.verticalSpacerSize.roundToPx()
+ val leftContentPadding =
+ scaffoldDirective.gutterSizes.contentPadding.calculateLeftPadding(
+ layoutDirection
+ ).roundToPx()
+ val rightContentPadding =
+ scaffoldDirective.gutterSizes.contentPadding.calculateRightPadding(
+ layoutDirection
+ ).roundToPx()
+ val topContentPadding =
+ scaffoldDirective.gutterSizes.contentPadding.calculateTopPadding().roundToPx()
+ val bottomContentPadding =
+ scaffoldDirective.gutterSizes.contentPadding.calculateBottomPadding().roundToPx()
val outerBounds = IntRect(
- outerVerticalGutterSize,
- outerHorizontalGutterSize,
- constraints.maxWidth - outerVerticalGutterSize,
- constraints.maxHeight - outerHorizontalGutterSize
+ leftContentPadding,
+ topContentPadding,
+ constraints.maxWidth - rightContentPadding,
+ constraints.maxHeight - bottomContentPadding
)
if (scaffoldDirective.excludedBounds.isNotEmpty()) {
val layoutBounds = coordinates!!.boundsInWindow()
val layoutPhysicalPartitions = mutableListOf<Rect>()
- var actualLeft = layoutBounds.left + outerVerticalGutterSize
- var actualRight = layoutBounds.right - outerVerticalGutterSize
- val actualTop = layoutBounds.top + outerHorizontalGutterSize
- val actualBottom = layoutBounds.bottom - outerHorizontalGutterSize
+ var actualLeft = layoutBounds.left + leftContentPadding
+ var actualRight = layoutBounds.right - rightContentPadding
+ val actualTop = layoutBounds.top + topContentPadding
+ val actualBottom = layoutBounds.bottom - bottomContentPadding
// Assume hinge bounds are sorted from left to right, non-overlapped.
scaffoldDirective.excludedBounds.fastForEach { hingeBound ->
if (hingeBound.left <= actualLeft) {
@@ -414,7 +423,7 @@
Rect(actualLeft, actualTop, hingeBound.left, actualBottom)
)
actualLeft +=
- max(hingeBound.right, hingeBound.left + innerVerticalGutterSize)
+ max(hingeBound.right, hingeBound.left + verticalSpacerSize)
}
}
if (actualLeft < actualRight) {
@@ -428,7 +437,7 @@
} else if (layoutPhysicalPartitions.size == 1) {
measureAndPlacePanes(
layoutPhysicalPartitions[0],
- innerVerticalGutterSize,
+ verticalSpacerSize,
visiblePanes,
isLookingAhead
)
@@ -439,7 +448,7 @@
if (layoutPhysicalPartitions[0].width > layoutPhysicalPartitions[1].width) {
measureAndPlacePanes(
layoutPhysicalPartitions[0],
- innerVerticalGutterSize,
+ verticalSpacerSize,
visiblePanes.subList(0, 2),
isLookingAhead
)
@@ -456,7 +465,7 @@
)
measureAndPlacePanes(
layoutPhysicalPartitions[1],
- innerVerticalGutterSize,
+ verticalSpacerSize,
visiblePanes.subList(1, 3),
isLookingAhead
)
@@ -474,7 +483,7 @@
} else {
measureAndPlacePanesWithLocalBounds(
outerBounds,
- innerVerticalGutterSize,
+ verticalSpacerSize,
visiblePanes,
isLookingAhead
)
diff --git a/compose/material3/material3-window-size-class/lint-baseline.xml b/compose/material3/material3-window-size-class/lint-baseline.xml
index 41ded8f..4f32419 100644
--- a/compose/material3/material3-window-size-class/lint-baseline.xml
+++ b/compose/material3/material3-window-size-class/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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="PrimitiveInCollection"
@@ -21,33 +21,6 @@
<issue
id="PrimitiveInCollection"
- message="field DefaultSizeClasses with type Set<WindowWidthSizeClass>: replace with IntSet"
- errorLine1=" /**"
- errorLine2=" ^">
- <location
- file="src/commonMain/kotlin/androidx/compose/material3/windowsizeclass/WindowSizeClass.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type Set<WindowWidthSizeClass> of getDefaultSizeClasses: replace with IntSet"
- errorLine1=" val DefaultSizeClasses = setOf(Compact, Medium, Expanded)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/material3/windowsizeclass/WindowSizeClass.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type Set<WindowWidthSizeClass> of getStandardSizeClasses: replace with IntSet"
- errorLine1=" val StandardSizeClasses get() = DefaultSizeClasses"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/material3/windowsizeclass/WindowSizeClass.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
message="method fromWidth$lint_module has parameter supportedSizeClasses with type Set<WindowWidthSizeClass>: replace with IntSet"
errorLine1=" supportedSizeClasses: Set<WindowWidthSizeClass>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -57,42 +30,6 @@
<issue
id="PrimitiveInCollection"
- message="variable sortedSizeClasses with type List<? extends WindowWidthSizeClass>: replace with IntList"
- errorLine1=" val sortedSizeClasses = supportedSizeClasses.sortedDescending()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/material3/windowsizeclass/WindowSizeClass.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="field DefaultSizeClasses with type Set<WindowHeightSizeClass>: replace with IntSet"
- errorLine1=" /**"
- errorLine2=" ^">
- <location
- file="src/commonMain/kotlin/androidx/compose/material3/windowsizeclass/WindowSizeClass.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type Set<WindowHeightSizeClass> of getDefaultSizeClasses: replace with IntSet"
- errorLine1=" val DefaultSizeClasses = setOf(Compact, Medium, Expanded)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/material3/windowsizeclass/WindowSizeClass.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type Set<WindowHeightSizeClass> of getStandardSizeClasses: replace with IntSet"
- errorLine1=" val StandardSizeClasses get() = DefaultSizeClasses"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/material3/windowsizeclass/WindowSizeClass.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
message="method fromHeight$lint_module has parameter supportedSizeClasses with type Set<WindowHeightSizeClass>: replace with IntSet"
errorLine1=" supportedSizeClasses: Set<WindowHeightSizeClass>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -100,13 +37,4 @@
file="src/commonMain/kotlin/androidx/compose/material3/windowsizeclass/WindowSizeClass.kt"/>
</issue>
- <issue
- id="PrimitiveInCollection"
- message="variable sortedSizeClasses with type List<? extends WindowHeightSizeClass>: replace with IntList"
- errorLine1=" val sortedSizeClasses = supportedSizeClasses.sortedDescending()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/material3/windowsizeclass/WindowSizeClass.kt"/>
- </issue>
-
</issues>
diff --git a/compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/ExposedDropdownMenuTest.kt b/compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/ExposedDropdownMenuTest.kt
index f765c01..0ebdf52 100644
--- a/compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/ExposedDropdownMenuTest.kt
+++ b/compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/ExposedDropdownMenuTest.kt
@@ -559,7 +559,7 @@
ExposedDropdownMenuBox(
modifier = Modifier.align(Alignment.Center),
expanded = expanded,
- onExpandedChange = { onExpandChange(!expanded) }
+ onExpandedChange = onExpandChange,
) {
TextField(
modifier = Modifier
diff --git a/compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/ModalBottomSheetTest.kt b/compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/ModalBottomSheetTest.kt
index af0436a..2c6213d 100644
--- a/compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/ModalBottomSheetTest.kt
+++ b/compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/ModalBottomSheetTest.kt
@@ -1325,7 +1325,7 @@
// TODO: 33 > API > 29 does not use imePadding because of b/285746907, include when a better solution is found.
Assume.assumeTrue(SDK_INT >= 33)
- val imeAnimationDuration = 750000L
+ val imeAnimationDuration = 1000000L
val textFieldTag = "sheetTextField"
lateinit var sheetState: SheetState
diff --git a/compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/ExposedDropdownMenu.kt b/compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/ExposedDropdownMenu.kt
index b3b34c4..a1f9f3e 100644
--- a/compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/ExposedDropdownMenu.kt
+++ b/compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/ExposedDropdownMenu.kt
@@ -1039,7 +1039,7 @@
menuDescription: String,
expandedDescription: String,
collapsedDescription: String,
-) = pointerInput(Unit) {
+) = pointerInput(onExpandedChange) {
awaitEachGesture {
// Must be PointerEventPass.Initial to observe events before the text field consumes them
// in the Main pass
diff --git a/compose/runtime/runtime/src/androidMain/kotlin/androidx/compose/runtime/ActualAndroid.android.kt b/compose/runtime/runtime/src/androidMain/kotlin/androidx/compose/runtime/ActualAndroid.android.kt
index 13d9104..f9fde8e 100644
--- a/compose/runtime/runtime/src/androidMain/kotlin/androidx/compose/runtime/ActualAndroid.android.kt
+++ b/compose/runtime/runtime/src/androidMain/kotlin/androidx/compose/runtime/ActualAndroid.android.kt
@@ -114,4 +114,12 @@
Log.e(LogTag, message, e)
}
-internal actual val MainThreadId: Long = Looper.getMainLooper()?.thread?.id ?: -1
+internal actual val MainThreadId: Long =
+ try {
+ Looper.getMainLooper().thread.id
+ } catch (e: Exception) {
+ // When linked against Android SDK stubs and running host-side tests, APIs such as
+ // Looper.getMainLooper() can throw or return null
+ // This branch intercepts that exception and returns default value for such cases.
+ -1
+ }
diff --git a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composer.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composer.kt
index 1c019dc4..775fce2 100644
--- a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composer.kt
+++ b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composer.kt
@@ -19,6 +19,7 @@
)
package androidx.compose.runtime
+import androidx.collection.MutableIntIntMap
import androidx.compose.runtime.Composer.Companion.equals
import androidx.compose.runtime.changelist.ChangeList
import androidx.compose.runtime.changelist.ComposerChangeListWriter
@@ -1263,7 +1264,7 @@
private var groupNodeCount: Int = 0
private var groupNodeCountStack = IntStack()
private var nodeCountOverrides: IntArray? = null
- private var nodeCountVirtualOverrides: HashMap<Int, Int>? = null
+ private var nodeCountVirtualOverrides: MutableIntIntMap? = null
private var forceRecomposeScopes = false
private var forciblyRecompose = false
private var nodeExpected = false
@@ -1271,7 +1272,7 @@
private val entersStack = IntStack()
private var parentProvider: PersistentCompositionLocalMap =
persistentCompositionLocalHashMapOf()
- private val providerUpdates = IntMap<PersistentCompositionLocalMap>()
+ private var providerUpdates: IntMap<PersistentCompositionLocalMap>? = null
private var providersInvalid = false
private val providersInvalidStack = IntStack()
private var reusing = false
@@ -1497,7 +1498,7 @@
groupNodeCountStack.clear()
entersStack.clear()
providersInvalidStack.clear()
- providerUpdates.clear()
+ providerUpdates = null
if (!reader.closed) {
reader.close()
}
@@ -1517,7 +1518,7 @@
}
internal fun changesApplied() {
- providerUpdates.clear()
+ providerUpdates = null
}
/**
@@ -1573,7 +1574,7 @@
invalidateStack.clear()
invalidations.clear()
changes.clear()
- providerUpdates.clear()
+ providerUpdates = null
}
internal fun forceRecomposeScopes(): Boolean {
@@ -1995,7 +1996,7 @@
reader.groupObjectKey(current) == compositionLocalMap
) {
@Suppress("UNCHECKED_CAST")
- val providers = providerUpdates[current]
+ val providers = providerUpdates?.get(current)
?: reader.groupAux(current) as PersistentCompositionLocalMap
providerCache = providers
return providers
@@ -2054,7 +2055,7 @@
invalid = reusing || oldScope !== providers
}
if (invalid && !inserting) {
- providerUpdates[reader.currentGroup] = providers
+ recordProviderUpdate(providers)
}
providersInvalidStack.push(providersInvalid.asInt())
providersInvalid = invalid
@@ -2062,6 +2063,15 @@
start(compositionLocalMapKey, compositionLocalMap, GroupKind.Group, providers)
}
+ private fun recordProviderUpdate(providers: PersistentCompositionLocalMap) {
+ val providerUpdates = providerUpdates ?: run {
+ val newProviderUpdates = IntMap<PersistentCompositionLocalMap>()
+ this.providerUpdates = newProviderUpdates
+ newProviderUpdates
+ }
+ providerUpdates[reader.currentGroup] = providers
+ }
+
@InternalComposeApi
override fun endProvider() {
endGroup()
@@ -2105,7 +2115,7 @@
}
if (invalid && !inserting) {
- providerUpdates[reader.currentGroup] = providers
+ recordProviderUpdate(providers)
}
providersInvalidStack.push(providersInvalid.asInt())
providersInvalid = invalid
@@ -2674,7 +2684,9 @@
}
private fun updatedNodeCount(group: Int): Int {
- if (group < 0) return nodeCountVirtualOverrides?.let { it[group] } ?: 0
+ if (group < 0) return nodeCountVirtualOverrides?.let {
+ if (it.contains(group)) it[group] else 0
+ } ?: 0
val nodeCounts = nodeCountOverrides
if (nodeCounts != null) {
val override = nodeCounts[group]
@@ -2687,7 +2699,7 @@
if (updatedNodeCount(group) != count) {
if (group < 0) {
val virtualCounts = nodeCountVirtualOverrides ?: run {
- val newCounts = HashMap<Int, Int>()
+ val newCounts = MutableIntIntMap()
nodeCountVirtualOverrides = newCounts
newCounts
}
@@ -2963,15 +2975,15 @@
// changes to the locals as the value moves well as enables finding the correct providers
// when applying late changes which might be very complicated otherwise.
val providersChanged = if (inserting) false else reader.groupAux != locals
- if (providersChanged) providerUpdates[reader.currentGroup] = locals
+ if (providersChanged) recordProviderUpdate(locals)
start(compositionLocalMapKey, compositionLocalMap, GroupKind.Group, locals)
+ providerCache = null
// Either insert a place-holder to be inserted later (either created new or moved from
// another location) or (re)compose the movable content. This is forced if a new value
// needs to be created as a late change.
if (inserting && !force) {
writerHasAProvider = true
- providerCache = null
// Create an anchor to the movable group
val anchor = writer.anchor(writer.parent(writer.parent))
@@ -2994,6 +3006,7 @@
} finally {
// Restore the state back to what is expected by the caller.
endGroup()
+ providerCache = null
compoundKeyHash = savedCompoundKeyHash
endMovableGroup()
}
@@ -3141,13 +3154,16 @@
private inline fun <R> withReader(reader: SlotReader, block: () -> R): R {
val savedReader = this.reader
val savedCountOverrides = nodeCountOverrides
+ val savedProviderUpdates = providerUpdates
nodeCountOverrides = null
+ providerUpdates = null
try {
this.reader = reader
return block()
} finally {
this.reader = savedReader
nodeCountOverrides = savedCountOverrides
+ providerUpdates = savedProviderUpdates
}
}
@@ -3257,7 +3273,7 @@
runtimeCheck(!isComposing) { "Reentrant composition is not supported" }
trace("Compose:recompose") {
compositionToken = currentSnapshot().id
- providerUpdates.clear()
+ providerUpdates = null
invalidationsRequested.forEach { scope, set ->
val location = scope.anchor?.location ?: return
invalidations.add(Invalidation(scope, location, set))
diff --git a/compose/test-utils/build.gradle b/compose/test-utils/build.gradle
index 8e330f4..230c55d 100644
--- a/compose/test-utils/build.gradle
+++ b/compose/test-utils/build.gradle
@@ -23,11 +23,9 @@
id("AndroidXComposePlugin")
}
-def desktopEnabled = false // b/276387374 TODO: KmpPlatformsKt.enableDesktop(project)
-
androidXMultiplatform {
android()
- if (desktopEnabled) desktop()
+ desktop()
sourceSets {
commonMain {
@@ -71,11 +69,9 @@
}
}
- if (desktopEnabled) {
- desktopMain {
- dependsOn(jvmMain)
- dependencies {
- }
+ desktopMain {
+ dependsOn(jvmMain)
+ dependencies {
}
}
@@ -100,11 +96,9 @@
}
}
- if (desktopEnabled) {
- desktopTest {
- dependsOn(jvmTest)
- dependencies {
- }
+ desktopTest {
+ dependsOn(jvmTest)
+ dependencies {
}
}
}
diff --git a/compose/ui/ui-unit/src/desktopMain/kotlin/androidx/compose/ui/unit/FontScalable.desktop.kt b/compose/test-utils/src/androidMain/kotlin/androidx/compose/testutils/NativeView.android.kt
similarity index 80%
copy from compose/ui/ui-unit/src/desktopMain/kotlin/androidx/compose/ui/unit/FontScalable.desktop.kt
copy to compose/test-utils/src/androidMain/kotlin/androidx/compose/testutils/NativeView.android.kt
index d753871..017dbe0 100644
--- a/compose/ui/ui-unit/src/desktopMain/kotlin/androidx/compose/ui/unit/FontScalable.desktop.kt
+++ b/compose/test-utils/src/androidMain/kotlin/androidx/compose/testutils/NativeView.android.kt
@@ -14,9 +14,6 @@
* limitations under the License.
*/
-package androidx.compose.ui.unit
+package androidx.compose.testutils
-/**
- * Converts [TextUnit] to [Dp] and vice-versa.
- */
-actual typealias FontScalable = FontScalableLinear
+actual typealias NativeView = android.view.View
diff --git a/compose/test-utils/src/commonMain/kotlin/androidx/compose/testutils/ComposeExecutionControl.kt b/compose/test-utils/src/commonMain/kotlin/androidx/compose/testutils/ComposeExecutionControl.kt
index 3d67155..0a9521c 100644
--- a/compose/test-utils/src/commonMain/kotlin/androidx/compose/testutils/ComposeExecutionControl.kt
+++ b/compose/test-utils/src/commonMain/kotlin/androidx/compose/testutils/ComposeExecutionControl.kt
@@ -16,7 +16,7 @@
package androidx.compose.testutils
-import android.view.View
+expect class NativeView
/**
* Test scope accessible from execution controlled tests to test compose.
@@ -92,7 +92,12 @@
*/
fun recompose()
- fun getHostView(): View
+ /**
+ * Please avoid using this API; Make your tests more platform agnostic by utilizing platform-
+ * independent test hooks instead of invoking APIs on native views.
+ * This API may be removed in the future.
+ */
+ fun getHostView(): NativeView
}
/**
diff --git a/compose/test-utils/src/commonMain/kotlin/androidx/compose/testutils/ModifierTestUtils.kt b/compose/test-utils/src/commonMain/kotlin/androidx/compose/testutils/ModifierTestUtils.kt
index 933f5aaf..0682039 100644
--- a/compose/test-utils/src/commonMain/kotlin/androidx/compose/testutils/ModifierTestUtils.kt
+++ b/compose/test-utils/src/commonMain/kotlin/androidx/compose/testutils/ModifierTestUtils.kt
@@ -16,12 +16,11 @@
package androidx.compose.testutils
-import android.annotation.SuppressLint
import androidx.compose.ui.Modifier
fun Modifier.toList(): List<Modifier.Element> =
foldIn(mutableListOf()) { acc, e -> acc.apply { acc.add(e) } }
-@SuppressLint("ModifierFactoryReturnType")
+@Suppress("ModifierFactoryReturnType")
fun Modifier.first(): Modifier.Element =
toList().first()
diff --git a/compose/ui/ui-unit/src/desktopMain/kotlin/androidx/compose/ui/unit/FontScalable.desktop.kt b/compose/test-utils/src/desktopMain/kotlin/androidx/compose/testutils/NativeView.desktop.kt
similarity index 81%
copy from compose/ui/ui-unit/src/desktopMain/kotlin/androidx/compose/ui/unit/FontScalable.desktop.kt
copy to compose/test-utils/src/desktopMain/kotlin/androidx/compose/testutils/NativeView.desktop.kt
index d753871..6eac797 100644
--- a/compose/ui/ui-unit/src/desktopMain/kotlin/androidx/compose/ui/unit/FontScalable.desktop.kt
+++ b/compose/test-utils/src/desktopMain/kotlin/androidx/compose/testutils/NativeView.desktop.kt
@@ -14,9 +14,7 @@
* limitations under the License.
*/
-package androidx.compose.ui.unit
+package androidx.compose.testutils
-/**
- * Converts [TextUnit] to [Dp] and vice-versa.
- */
-actual typealias FontScalable = FontScalableLinear
+class NativeViewEmptyImpl
+actual typealias NativeView = NativeViewEmptyImpl
diff --git a/compose/ui/ui-android-stubs/api/api_lint.ignore b/compose/ui/ui-android-stubs/api/api_lint.ignore
index 6a77ca1..0e88b37 100644
--- a/compose/ui/ui-android-stubs/api/api_lint.ignore
+++ b/compose/ui/ui-android-stubs/api/api_lint.ignore
@@ -1,3 +1,7 @@
// Baseline format: 1.0
GetterSetterNames: android.view.RenderNode#getClipToOutline():
Symmetric method for `setClipToOutline` must be named `isClipToOutline`; was `getClipToOutline`
+
+
+NotCloseable: android.view.RenderNode:
+ Classes that release resources (destroy()) should implement AutoCloseable and CloseGuard: class android.view.RenderNode
diff --git a/compose/ui/ui-test-junit4/api/api_lint.ignore b/compose/ui/ui-test-junit4/api/api_lint.ignore
index 4857f646..0a2af4f 100644
--- a/compose/ui/ui-test-junit4/api/api_lint.ignore
+++ b/compose/ui/ui-test-junit4/api/api_lint.ignore
@@ -3,7 +3,3 @@
Invalid nullability on parameter `base` in method `apply`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
InvalidNullabilityOverride: androidx.compose.ui.test.junit4.AndroidComposeTestRule#apply(org.junit.runners.model.Statement, org.junit.runner.Description) parameter #1:
Invalid nullability on parameter `description` in method `apply`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-
-
-MissingNullability: androidx.compose.ui.test.junit4.AndroidComposeTestRule_androidKt#createAndroidComposeRule():
- Missing nullability on method `createAndroidComposeRule` return
diff --git a/compose/ui/ui-test-junit4/src/androidInstrumentedTest/kotlin/androidx/compose/ui/test/ComposeUiTestTest.kt b/compose/ui/ui-test-junit4/src/androidInstrumentedTest/kotlin/androidx/compose/ui/test/ComposeUiTestTest.kt
index f820217..1195ad9 100644
--- a/compose/ui/ui-test-junit4/src/androidInstrumentedTest/kotlin/androidx/compose/ui/test/ComposeUiTestTest.kt
+++ b/compose/ui/ui-test-junit4/src/androidInstrumentedTest/kotlin/androidx/compose/ui/test/ComposeUiTestTest.kt
@@ -38,6 +38,8 @@
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
+import androidx.compose.runtime.ExperimentalComposeApi
+import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.MutableState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
@@ -59,9 +61,14 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.LargeTest
import com.google.common.truth.Truth.assertThat
+import com.google.common.truth.Truth.assertWithMessage
import kotlin.coroutines.CoroutineContext
import kotlin.math.roundToInt
+import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.Runnable
+import kotlinx.coroutines.test.StandardTestDispatcher
import org.junit.After
import org.junit.Before
import org.junit.Rule
@@ -73,7 +80,7 @@
@LargeTest
@RunWith(AndroidJUnit4::class)
-@OptIn(ExperimentalTestApi::class)
+@OptIn(ExperimentalTestApi::class, ExperimentalComposeApi::class, ExperimentalCoroutinesApi::class)
class ComposeUiTestTest {
private var idlingPolicy: IdlingPolicy? = null
@@ -369,6 +376,103 @@
}
}
+ @Test
+ fun customDispatcher_ignoredWhenNotSubclassOfTestDispatcher() {
+ class CustomNonTestDispatcher : CoroutineDispatcher() {
+ private var queuedTasks = mutableListOf<Runnable>()
+ override fun dispatch(context: CoroutineContext, block: Runnable) {
+ queuedTasks.add(block)
+ }
+
+ fun runQueuedTasks() {
+ val tasksToRun = queuedTasks
+ queuedTasks = mutableListOf()
+ tasksToRun.forEach {
+ it.run()
+ }
+ }
+ }
+
+ val customDispatcher = CustomNonTestDispatcher()
+
+ var expectCounter = 0
+ fun expect(value: Int) {
+ assertWithMessage("Expected sequence")
+ .that(expectCounter)
+ .isEqualTo(value)
+ expectCounter++
+ }
+
+ runComposeUiTest(effectContext = customDispatcher) {
+ setContent {
+ LaunchedEffect(Unit) {
+ expect(2)
+ withFrameNanos {
+ expect(4)
+ }
+ expect(6)
+ }
+ }
+ expect(0)
+
+ // None of these will actually start the effect, because we control tasks.
+ waitForIdle()
+ mainClock.advanceTimeByFrame()
+ waitForIdle()
+ expect(1)
+
+ // This will actually start the effect.
+ customDispatcher.runQueuedTasks()
+ expect(3)
+
+ // This runs the first withFrameNanos.
+ mainClock.advanceTimeByFrame()
+ expect(5)
+
+ // And this resumes the effect coroutine after withFrameNanos.
+ customDispatcher.runQueuedTasks()
+ expect(7)
+ }
+ }
+
+ @Test
+ fun customDispatcher_usedWhenSubclassesTestDispatcher() {
+ var expectCounter = 0
+ fun expect(value: Int) {
+ assertWithMessage("Expected sequence")
+ .that(expectCounter)
+ .isEqualTo(value)
+ expectCounter++
+ }
+
+ val customDispatcher = StandardTestDispatcher()
+
+ // TestDispatcher has an internal constructor so we can't make our own subclass.
+ // StandardTestDispatcher was the only other subclass of TestDispatcher at the time this
+ // test was initially written.
+ runComposeUiTest(effectContext = customDispatcher) {
+ setContent {
+ LaunchedEffect(Unit) {
+ expect(2)
+ withFrameNanos {
+ expect(3)
+ }
+ expect(4)
+ }
+ }
+ expect(0)
+
+ // This won't wait for the effect to launch…
+ waitForIdle()
+ expect(1)
+
+ // …but this will, because Compose detected the custom TestDispatcher and wired the
+ // clock to it.
+ mainClock.advanceTimeByFrame()
+ expect(5)
+ }
+ }
+
private class TestCoroutineContextElement : CoroutineContext.Element {
override val key: CoroutineContext.Key<*> get() = Key
diff --git a/compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/ComposeUiTest.android.kt b/compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/ComposeUiTest.android.kt
index 09198ee..33af8ea 100644
--- a/compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/ComposeUiTest.android.kt
+++ b/compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/ComposeUiTest.android.kt
@@ -42,6 +42,7 @@
import androidx.compose.ui.unit.Density
import androidx.test.core.app.ActivityScenario
import androidx.test.core.app.ApplicationProvider
+import kotlin.coroutines.ContinuationInterceptor
import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.EmptyCoroutineContext
import kotlinx.coroutines.CancellationException
@@ -50,6 +51,7 @@
import kotlinx.coroutines.Job
import kotlinx.coroutines.cancel
import kotlinx.coroutines.launch
+import kotlinx.coroutines.test.TestDispatcher
import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.UnconfinedTestDispatcher
import kotlinx.coroutines.test.runTest
@@ -239,7 +241,9 @@
private var idlingStrategy: IdlingStrategy = EspressoLink(idlingResourceRegistry)
private val recomposer: Recomposer
- private val testCoroutineDispatcher = UnconfinedTestDispatcher()
+ // 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 val coroutineExceptionHandler = UncaughtExceptionHandler()
diff --git a/compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/PlatformTextInputMethodOverride.kt b/compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/PlatformTextInputMethodOverride.kt
index 56ac2486..01d1e84 100644
--- a/compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/PlatformTextInputMethodOverride.kt
+++ b/compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/PlatformTextInputMethodOverride.kt
@@ -24,13 +24,13 @@
import androidx.compose.ui.InternalComposeUiApi
import androidx.compose.ui.SessionMutex
import androidx.compose.ui.platform.LocalPlatformTextInputMethodOverride
+import androidx.compose.ui.platform.PlatformTextInputMethodRequest
import androidx.compose.ui.platform.PlatformTextInputModifierNode
import androidx.compose.ui.platform.PlatformTextInputSession
import androidx.compose.ui.platform.PlatformTextInputSessionHandler
import androidx.compose.ui.platform.PlatformTextInputSessionScope
import androidx.compose.ui.platform.runTextInputSession
import androidx.compose.ui.test.PlatformTextInputMethodOverride.OverrideSession
-import androidx.compose.ui.text.input.PlatformTextInputMethodRequest
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.job
diff --git a/compose/ui/ui-text/api/api_lint.ignore b/compose/ui/ui-text/api/api_lint.ignore
index 734b4f8..2515e64 100644
--- a/compose/ui/ui-text/api/api_lint.ignore
+++ b/compose/ui/ui-text/api/api_lint.ignore
@@ -41,8 +41,6 @@
Invalid name for boolean property `didExceedMaxLines`. Should start with one of `has`, `can`, `should`, `is`.
GetterSetterNames: field Paragraph.didExceedMaxLines:
Invalid name for boolean property `didExceedMaxLines`. Should start with one of `has`, `can`, `should`, `is`.
-GetterSetterNames: field PlatformParagraphStyle.includeFontPadding:
- Invalid name for boolean property `includeFontPadding`. Should start with one of `has`, `can`, `should`, `is`.
GetterSetterNames: field TextLayoutInput.softWrap:
Invalid name for boolean property `softWrap`. Should start with one of `has`, `can`, `should`, `is`.
GetterSetterNames: field TextLayoutResult.didOverflowHeight:
diff --git a/compose/ui/ui-text/api/current.txt b/compose/ui/ui-text/api/current.txt
index a417aab..abf54b5 100644
--- a/compose/ui/ui-text/api/current.txt
+++ b/compose/ui/ui-text/api/current.txt
@@ -799,7 +799,7 @@
}
@kotlin.jvm.JvmInline public final value class FontStyle {
- ctor public FontStyle(int value);
+ ctor @Deprecated public FontStyle(int value);
method public int getValue();
property public final int value;
field public static final androidx.compose.ui.text.font.FontStyle.Companion Companion;
@@ -1142,10 +1142,6 @@
public sealed interface PlatformImeOptions {
}
- public fun interface PlatformTextInputMethodRequest {
- method public android.view.inputmethod.InputConnection createInputConnection(android.view.inputmethod.EditorInfo outAttributes);
- }
-
public interface PlatformTextInputService {
method public void hideSoftwareKeyboard();
method public default void notifyFocusedRect(androidx.compose.ui.geometry.Rect rect);
diff --git a/compose/ui/ui-text/api/restricted_current.txt b/compose/ui/ui-text/api/restricted_current.txt
index a417aab..abf54b5 100644
--- a/compose/ui/ui-text/api/restricted_current.txt
+++ b/compose/ui/ui-text/api/restricted_current.txt
@@ -799,7 +799,7 @@
}
@kotlin.jvm.JvmInline public final value class FontStyle {
- ctor public FontStyle(int value);
+ ctor @Deprecated public FontStyle(int value);
method public int getValue();
property public final int value;
field public static final androidx.compose.ui.text.font.FontStyle.Companion Companion;
@@ -1142,10 +1142,6 @@
public sealed interface PlatformImeOptions {
}
- public fun interface PlatformTextInputMethodRequest {
- method public android.view.inputmethod.InputConnection createInputConnection(android.view.inputmethod.EditorInfo outAttributes);
- }
-
public interface PlatformTextInputService {
method public void hideSoftwareKeyboard();
method public default void notifyFocusedRect(androidx.compose.ui.geometry.Rect rect);
diff --git a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontStyle.kt b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontStyle.kt
index f37c520..2153ff2 100644
--- a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontStyle.kt
+++ b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontStyle.kt
@@ -21,9 +21,13 @@
* @see Font
* @see FontFamily
*/
-// TODO(b/205312869) This constructor should not be public as it leads to FontStyle([cursor]) in AS
@kotlin.jvm.JvmInline
-value class FontStyle(val value: Int) {
+value class FontStyle
+@Deprecated(
+ "Please use FontStyle.Normal or FontStyle.Italic",
+ replaceWith = ReplaceWith("FontStyle.")
+)
+constructor(val value: Int) {
override fun toString(): String {
return when (this) {
@@ -35,9 +39,11 @@
companion object {
/** Use the upright glyphs */
+ @Suppress("DEPRECATION")
val Normal = FontStyle(0)
/** Use glyphs designed for slanting */
+ @Suppress("DEPRECATION")
val Italic = FontStyle(1)
/** Returns a list of possible values of [FontStyle]. */
diff --git a/compose/ui/ui-unit/api/current.txt b/compose/ui/ui-unit/api/current.txt
index 74aa8d8..eba7f2c 100644
--- a/compose/ui/ui-unit/api/current.txt
+++ b/compose/ui/ui-unit/api/current.txt
@@ -46,7 +46,7 @@
method @androidx.compose.runtime.Stable public static long offset(long, optional int horizontal, optional int vertical);
}
- @androidx.compose.runtime.Immutable @kotlin.jvm.JvmDefaultWithCompatibility public interface Density extends androidx.compose.ui.unit.FontScalable {
+ @androidx.compose.runtime.Immutable @kotlin.jvm.JvmDefaultWithCompatibility public interface Density extends androidx.compose.ui.unit.FontScaling {
method public float getDensity();
method @androidx.compose.runtime.Stable public default int roundToPx(float);
method @androidx.compose.runtime.Stable public default int roundToPx(long);
@@ -192,14 +192,14 @@
@SuppressCompatibility @kotlin.RequiresOptIn(message="This API is experimental and is likely to change in the future.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public @interface ExperimentalUnitApi {
}
- @androidx.compose.runtime.Immutable @kotlin.jvm.JvmDefaultWithCompatibility public interface FontScalable {
+ @androidx.compose.runtime.Immutable @kotlin.jvm.JvmDefaultWithCompatibility public interface FontScaling {
method public float getFontScale();
method @androidx.compose.runtime.Stable public default float toDp(long);
method @androidx.compose.runtime.Stable public default long toSp(float);
property public abstract float fontScale;
}
- public final class FontScalableKt {
+ public final class FontScalingKt {
method @SuppressCompatibility @androidx.compose.ui.ExperimentalComposeUiApi public static boolean getDisableNonLinearFontScalingInCompose();
method @SuppressCompatibility @androidx.compose.ui.ExperimentalComposeUiApi public static void setDisableNonLinearFontScalingInCompose(boolean);
property @SuppressCompatibility @androidx.compose.ui.ExperimentalComposeUiApi public static final boolean DisableNonLinearFontScalingInCompose;
diff --git a/compose/ui/ui-unit/api/restricted_current.txt b/compose/ui/ui-unit/api/restricted_current.txt
index e9ca1c6..e9b932e 100644
--- a/compose/ui/ui-unit/api/restricted_current.txt
+++ b/compose/ui/ui-unit/api/restricted_current.txt
@@ -46,7 +46,7 @@
method @androidx.compose.runtime.Stable public static long offset(long, optional int horizontal, optional int vertical);
}
- @androidx.compose.runtime.Immutable @kotlin.jvm.JvmDefaultWithCompatibility public interface Density extends androidx.compose.ui.unit.FontScalable {
+ @androidx.compose.runtime.Immutable @kotlin.jvm.JvmDefaultWithCompatibility public interface Density extends androidx.compose.ui.unit.FontScaling {
method public float getDensity();
method @androidx.compose.runtime.Stable public default int roundToPx(float);
method @androidx.compose.runtime.Stable public default int roundToPx(long);
@@ -192,14 +192,14 @@
@SuppressCompatibility @kotlin.RequiresOptIn(message="This API is experimental and is likely to change in the future.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public @interface ExperimentalUnitApi {
}
- @androidx.compose.runtime.Immutable @kotlin.jvm.JvmDefaultWithCompatibility public interface FontScalable {
+ @androidx.compose.runtime.Immutable @kotlin.jvm.JvmDefaultWithCompatibility public interface FontScaling {
method public float getFontScale();
method @androidx.compose.runtime.Stable public default float toDp(long);
method @androidx.compose.runtime.Stable public default long toSp(float);
property public abstract float fontScale;
}
- public final class FontScalableKt {
+ public final class FontScalingKt {
method @SuppressCompatibility @androidx.compose.ui.ExperimentalComposeUiApi public static boolean getDisableNonLinearFontScalingInCompose();
method @SuppressCompatibility @androidx.compose.ui.ExperimentalComposeUiApi public static void setDisableNonLinearFontScalingInCompose(boolean);
property @SuppressCompatibility @androidx.compose.ui.ExperimentalComposeUiApi public static final boolean DisableNonLinearFontScalingInCompose;
diff --git a/compose/ui/ui-unit/src/androidMain/kotlin/androidx/compose/ui/unit/FontScalable.android.kt b/compose/ui/ui-unit/src/androidMain/kotlin/androidx/compose/ui/unit/FontScaling.android.kt
similarity index 98%
rename from compose/ui/ui-unit/src/androidMain/kotlin/androidx/compose/ui/unit/FontScalable.android.kt
rename to compose/ui/ui-unit/src/androidMain/kotlin/androidx/compose/ui/unit/FontScaling.android.kt
index b1b4075..e9f3565 100644
--- a/compose/ui/ui-unit/src/androidMain/kotlin/androidx/compose/ui/unit/FontScalable.android.kt
+++ b/compose/ui/ui-unit/src/androidMain/kotlin/androidx/compose/ui/unit/FontScaling.android.kt
@@ -32,7 +32,7 @@
@Immutable
@JvmDefaultWithCompatibility
@OptIn(ExperimentalComposeUiApi::class)
-actual interface FontScalable {
+actual interface FontScaling {
/**
* Current user preference for the scaling factor for fonts.
*/
diff --git a/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Density.kt b/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Density.kt
index 5b867be..59cd655 100644
--- a/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Density.kt
+++ b/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Density.kt
@@ -46,7 +46,7 @@
*/
@Immutable
@JvmDefaultWithCompatibility
-interface Density : FontScalable {
+interface Density : FontScaling {
/**
* The logical density of the display. This is a scaling factor for the [Dp] unit.
diff --git a/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/FontScalable.kt b/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/FontScaling.kt
similarity index 97%
rename from compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/FontScalable.kt
rename to compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/FontScaling.kt
index 0c90726..65d23a8 100644
--- a/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/FontScalable.kt
+++ b/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/FontScaling.kt
@@ -50,7 +50,7 @@
*/
@Immutable
@JvmDefaultWithCompatibility
-expect interface FontScalable {
+expect interface FontScaling {
/**
* Current user preference for the scaling factor for fonts.
*/
@@ -79,7 +79,7 @@
@Immutable
@JvmDefaultWithCompatibility
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
-interface FontScalableLinear {
+interface FontScalingLinear {
/**
* Current user preference for the scaling factor for fonts.
*/
diff --git a/compose/ui/ui-unit/src/desktopMain/kotlin/androidx/compose/ui/unit/FontScalable.desktop.kt b/compose/ui/ui-unit/src/desktopMain/kotlin/androidx/compose/ui/unit/FontScaling.desktop.kt
similarity index 93%
rename from compose/ui/ui-unit/src/desktopMain/kotlin/androidx/compose/ui/unit/FontScalable.desktop.kt
rename to compose/ui/ui-unit/src/desktopMain/kotlin/androidx/compose/ui/unit/FontScaling.desktop.kt
index d753871..609aa4c 100644
--- a/compose/ui/ui-unit/src/desktopMain/kotlin/androidx/compose/ui/unit/FontScalable.desktop.kt
+++ b/compose/ui/ui-unit/src/desktopMain/kotlin/androidx/compose/ui/unit/FontScaling.desktop.kt
@@ -19,4 +19,4 @@
/**
* Converts [TextUnit] to [Dp] and vice-versa.
*/
-actual typealias FontScalable = FontScalableLinear
+actual typealias FontScaling = FontScalingLinear
diff --git a/compose/ui/ui/api/api_lint.ignore b/compose/ui/ui/api/api_lint.ignore
index b334166..4148e4a 100644
--- a/compose/ui/ui/api/api_lint.ignore
+++ b/compose/ui/ui/api/api_lint.ignore
@@ -23,8 +23,6 @@
Invalid name for boolean property `usePlatformDefaultWidth`. Should start with one of `has`, `can`, `should`, `is`.
GetterSetterNames: field ImageVector.autoMirror:
Invalid name for boolean property `autoMirror`. Should start with one of `has`, `can`, `should`, `is`.
-GetterSetterNames: field ModifierNodeElement.autoInvalidate:
- Invalid name for boolean property `autoInvalidate`. Should start with one of `has`, `can`, `should`, `is`.
GetterSetterNames: field PointerInputChange.pressed:
Invalid name for boolean property `pressed`. Should start with one of `has`, `can`, `should`, `is`.
GetterSetterNames: field PointerInputChange.previousPressed:
diff --git a/compose/ui/ui/api/current.txt b/compose/ui/ui/api/current.txt
index cd2a1dd..e93d846 100644
--- a/compose/ui/ui/api/current.txt
+++ b/compose/ui/ui/api/current.txt
@@ -2890,6 +2890,10 @@
method @androidx.compose.runtime.Composable public static androidx.compose.ui.input.nestedscroll.NestedScrollConnection rememberNestedScrollInteropConnection(optional android.view.View hostView);
}
+ public fun interface PlatformTextInputMethodRequest {
+ method public android.view.inputmethod.InputConnection createInputConnection(android.view.inputmethod.EditorInfo outAttributes);
+ }
+
public interface PlatformTextInputModifierNode extends androidx.compose.ui.node.DelegatableNode {
}
@@ -2899,7 +2903,7 @@
public interface PlatformTextInputSession {
method public android.view.View getView();
- method public suspend Object? startInputMethod(androidx.compose.ui.text.input.PlatformTextInputMethodRequest request, kotlin.coroutines.Continuation<?>);
+ method public suspend Object? startInputMethod(androidx.compose.ui.platform.PlatformTextInputMethodRequest request, kotlin.coroutines.Continuation<?>);
property public abstract android.view.View view;
}
diff --git a/compose/ui/ui/api/restricted_current.txt b/compose/ui/ui/api/restricted_current.txt
index 5688c87..f056cf7 100644
--- a/compose/ui/ui/api/restricted_current.txt
+++ b/compose/ui/ui/api/restricted_current.txt
@@ -2944,6 +2944,10 @@
method @androidx.compose.runtime.Composable public static androidx.compose.ui.input.nestedscroll.NestedScrollConnection rememberNestedScrollInteropConnection(optional android.view.View hostView);
}
+ public fun interface PlatformTextInputMethodRequest {
+ method public android.view.inputmethod.InputConnection createInputConnection(android.view.inputmethod.EditorInfo outAttributes);
+ }
+
public interface PlatformTextInputModifierNode extends androidx.compose.ui.node.DelegatableNode {
}
@@ -2953,7 +2957,7 @@
public interface PlatformTextInputSession {
method public android.view.View getView();
- method public suspend Object? startInputMethod(androidx.compose.ui.text.input.PlatformTextInputMethodRequest request, kotlin.coroutines.Continuation<?>);
+ method public suspend Object? startInputMethod(androidx.compose.ui.platform.PlatformTextInputMethodRequest request, kotlin.coroutines.Continuation<?>);
property public abstract android.view.View view;
}
diff --git a/compose/ui/ui/benchmark/src/androidTest/java/androidx/compose/ui/benchmark/graphics/vector/CreateVectorPainterBenchmark.kt b/compose/ui/ui/benchmark/src/androidTest/java/androidx/compose/ui/benchmark/graphics/vector/CreateVectorPainterBenchmark.kt
index 00182f8..e96dac5 100644
--- a/compose/ui/ui/benchmark/src/androidTest/java/androidx/compose/ui/benchmark/graphics/vector/CreateVectorPainterBenchmark.kt
+++ b/compose/ui/ui/benchmark/src/androidTest/java/androidx/compose/ui/benchmark/graphics/vector/CreateVectorPainterBenchmark.kt
@@ -52,13 +52,6 @@
RecreateVectorPainterTestCase()
}, assertOneRecomposition = false)
}
-
- @Test
- fun renderVectorWithDifferentSizes() {
- benchmarkRule.toggleStateBenchmarkDraw({
- ResizeVectorPainter()
- }, assertOneRecomposition = false)
- }
}
private class RecreateVectorPainterTestCase : ComposeTestCase, ToggleableTestCase {
@@ -87,39 +80,3 @@
}
}
}
-
-private class ResizeVectorPainter : ComposeTestCase, ToggleableTestCase {
-
- private var alpha by mutableStateOf(1f)
-
- @Composable
- override fun Content() {
- Column {
- Box(modifier = Modifier.wrapContentSize()) {
- Image(
- painter = painterResource(R.drawable.ic_hourglass),
- contentDescription = null,
- modifier = Modifier.size(100.dp),
- alpha = alpha
- )
- }
-
- Box(modifier = Modifier.wrapContentSize()) {
- Image(
- painter = painterResource(R.drawable.ic_hourglass),
- contentDescription = null,
- modifier = Modifier.size(200.dp),
- alpha = alpha
- )
- }
- }
- }
-
- override fun toggleState() {
- if (alpha == 1.0f) {
- alpha = 0.5f
- } else {
- alpha = 1.0f
- }
- }
-}
diff --git a/compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/UiDemos.kt b/compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/UiDemos.kt
index 91b5ebb..856c334 100644
--- a/compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/UiDemos.kt
+++ b/compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/UiDemos.kt
@@ -238,8 +238,8 @@
val AccessibilityDemos = DemoCategory(
"Accessibility",
listOf(
- ComposableDemo("Scaffold Top Bar") { ScaffoldSample() },
- ComposableDemo("Scaffold with Scrolling") { ScaffoldSampleScroll() },
+ ComposableDemo("Scaffold Top Bar") { ScaffoldSampleDemo() },
+ ComposableDemo("Scaffold with Scrolling") { ScaffoldSampleScrollDemo() },
ComposableDemo("Simple Top Bar with Scrolling") { ScrollingColumnDemo() },
ComposableDemo("Nested Containers—True") { NestedContainersTrueDemo() },
ComposableDemo("Nested Containers—False") { NestedContainersFalseDemo() },
diff --git a/compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/accessibility/ComplexAccessibility.kt b/compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/accessibility/ComplexAccessibilityDemos.kt
similarity index 99%
rename from compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/accessibility/ComplexAccessibility.kt
rename to compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/accessibility/ComplexAccessibilityDemos.kt
index f2096fe..cf041f4 100644
--- a/compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/accessibility/ComplexAccessibility.kt
+++ b/compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/accessibility/ComplexAccessibilityDemos.kt
@@ -204,7 +204,7 @@
@Preview
@Composable
-fun ScaffoldSample() {
+fun ScaffoldSampleDemo() {
val scaffoldState = rememberScaffoldState(rememberDrawerState(DrawerValue.Closed))
Scaffold(
scaffoldState = scaffoldState,
@@ -222,7 +222,7 @@
@Preview
@Composable
-fun ScaffoldSampleScroll() {
+fun ScaffoldSampleScrollDemo() {
val scaffoldState = rememberScaffoldState(rememberDrawerState(DrawerValue.Closed))
Scaffold(
scaffoldState = scaffoldState,
diff --git a/compose/ui/ui/lint-baseline.xml b/compose/ui/ui/lint-baseline.xml
index ba27473..73f6cb2 100644
--- a/compose/ui/ui/lint-baseline.xml
+++ b/compose/ui/ui/lint-baseline.xml
@@ -1,14 +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">
-
- <issue
- id="BanHideTag"
- message="@hide is not allowed in documentation"
- errorLine1=" fun findViewByAccessibilityIdTraversal(accessibilityId: Int): View? {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt"/>
- </issue>
+<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"
@@ -57,321 +48,6 @@
<issue
id="PrimitiveInCollection"
- message="field pendingHorizontalScrollEvents with type HashMap<Integer, ScrollAxisRange>: replace with IntObjectMap"
- errorLine1=" private val pendingHorizontalScrollEvents = HashMap<Int, ScrollAxisRange>()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="field pendingVerticalScrollEvents with type HashMap<Integer, ScrollAxisRange>: replace with IntObjectMap"
- errorLine1=" private val pendingVerticalScrollEvents = HashMap<Int, ScrollAxisRange>()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="field bufferedContentCaptureAppearedNodes with type ArrayMap<Integer, ViewStructureCompat>: replace with IntObjectMap"
- errorLine1=" internal val bufferedContentCaptureAppearedNodes = ArrayMap<Int, ViewStructureCompat>()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type ArrayMap<Integer, ViewStructureCompat> of getBufferedContentCaptureAppearedNodes$lint_module: replace with IntObjectMap"
- errorLine1=" internal val bufferedContentCaptureAppearedNodes = ArrayMap<Int, ViewStructureCompat>()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="field bufferedContentCaptureDisappearedNodes with type ArraySet<Integer>: replace with IntSet"
- errorLine1=" internal val bufferedContentCaptureDisappearedNodes = ArraySet<Int>()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type ArraySet<Integer> of getBufferedContentCaptureDisappearedNodes$lint_module: replace with IntSet"
- errorLine1=" internal val bufferedContentCaptureDisappearedNodes = ArraySet<Int>()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="method setCurrentSemanticsNodes$lint_module has parameter <set-?> with type Map<Integer, SemanticsNodeWithAdjustedBounds>: replace with IntObjectMap"
- errorLine1=" /**"
- errorLine2=" ^">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="field currentSemanticsNodes with type Map<Integer, SemanticsNodeWithAdjustedBounds>: replace with IntObjectMap"
- errorLine1=" internal var currentSemanticsNodes: Map<Int, SemanticsNodeWithAdjustedBounds> = mapOf()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type Map<Integer, SemanticsNodeWithAdjustedBounds> of getCurrentSemanticsNodes$lint_module: replace with IntObjectMap"
- errorLine1=" internal var currentSemanticsNodes: Map<Int, SemanticsNodeWithAdjustedBounds> = mapOf()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="field paneDisplayed with type ArraySet<Integer>: replace with IntSet"
- errorLine1=" private var paneDisplayed = ArraySet<Int>()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="field idToBeforeMap with type HashMap<Integer, Integer>: replace with IntIntMap"
- errorLine1=" internal var idToBeforeMap = HashMap<Int, Int>()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="method setIdToBeforeMap$lint_module has parameter <set-?> with type HashMap<Integer, Integer>: replace with IntIntMap"
- errorLine1=" internal var idToBeforeMap = HashMap<Int, Int>()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type HashMap<Integer, Integer> of getIdToBeforeMap$lint_module: replace with IntIntMap"
- errorLine1=" internal var idToBeforeMap = HashMap<Int, Int>()"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="field idToAfterMap with type HashMap<Integer, Integer>: replace with IntIntMap"
- errorLine1=" internal var idToAfterMap = HashMap<Int, Int>()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="method setIdToAfterMap$lint_module has parameter <set-?> with type HashMap<Integer, Integer>: replace with IntIntMap"
- errorLine1=" internal var idToAfterMap = HashMap<Int, Int>()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type HashMap<Integer, Integer> of getIdToAfterMap$lint_module: replace with IntIntMap"
- errorLine1=" internal var idToAfterMap = HashMap<Int, Int>()"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="constructor SemanticsNodeCopy has parameter currentSemanticsNodes with type Map<Integer, SemanticsNodeWithAdjustedBounds>: replace with IntObjectMap"
- errorLine1=" currentSemanticsNodes: Map<Int, SemanticsNodeWithAdjustedBounds>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="field children with type Set<Integer>: replace with IntSet"
- errorLine1=" val children: MutableSet<Int> = mutableSetOf()"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type Set<Integer> of getChildren: replace with IntSet"
- errorLine1=" val children: MutableSet<Int> = mutableSetOf()"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="method setPreviousSemanticsNodes$lint_module has parameter <set-?> with type Map<Integer, SemanticsNodeCopy>: replace with IntObjectMap"
- errorLine1=" // previousSemanticsNodes holds the previous pruned semantics tree so that we can compare the"
- errorLine2=" ^">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="field previousSemanticsNodes with type Map<Integer, SemanticsNodeCopy>: replace with IntObjectMap"
- errorLine1=" internal var previousSemanticsNodes: MutableMap<Int, SemanticsNodeCopy> = mutableMapOf()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type Map<Integer, SemanticsNodeCopy> of getPreviousSemanticsNodes$lint_module: replace with IntObjectMap"
- errorLine1=" internal var previousSemanticsNodes: MutableMap<Int, SemanticsNodeCopy> = mutableMapOf()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="method sortByGeometryGroupings has parameter containerChildrenMapping with type Map<Integer, List<SemanticsNode>>: replace with IntObjectMap"
- errorLine1=" containerChildrenMapping: MutableMap<Int, MutableList<SemanticsNode>> = mutableMapOf()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="method geometryDepthFirstSearch has parameter containerMapToChildren with type Map<Integer, List<SemanticsNode>>: replace with IntObjectMap"
- errorLine1=" containerMapToChildren: MutableMap<Int, MutableList<SemanticsNode>>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="variable containerMapToChildren with type Map<Integer, List<SemanticsNode>>: replace with IntObjectMap"
- errorLine1=" val containerMapToChildren = mutableMapOf<Int, MutableList<SemanticsNode>>()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="variable currentLabelToActionId with type Map<CharSequence, Integer>: replace with ObjectIntMap"
- errorLine1=" val currentLabelToActionId = mutableMapOf<CharSequence, Int>()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="variable oldLabelToActionId with type Map<CharSequence, ? extends Integer>: replace with ObjectIntMap"
- errorLine1=" val oldLabelToActionId = labelToActionId[virtualViewId]"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="variable availableIds with type List<Integer>: replace with IntList"
- errorLine1=" val availableIds = AccessibilityActionsResourceIds.toMutableList()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="variable subtreeChangedSemanticsNodesIds with type ArraySet<Integer>: replace with IntSet"
- errorLine1=" val subtreeChangedSemanticsNodesIds = ArraySet<Int>()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="method sendSubtreeChangeAccessibilityEvents has parameter subtreeChangedSemanticsNodesIds with type ArraySet<Integer>: replace with IntSet"
- errorLine1=" subtreeChangedSemanticsNodesIds: ArraySet<Int>"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="variable toRemove with type ArraySet<Integer>: replace with IntSet"
- errorLine1=" val toRemove = ArraySet<Int>()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="method sendSemanticsPropertyChangeEvents$lint_module has parameter newSemanticsNodes with type Map<Integer, SemanticsNodeWithAdjustedBounds>: replace with IntObjectMap"
- errorLine1=" newSemanticsNodes: Map<Int, SemanticsNodeWithAdjustedBounds>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="variable newChildren with type Set<Integer>: replace with IntSet"
- errorLine1=" val newChildren: MutableSet<Int> = mutableSetOf()"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="return type Map<Integer, SemanticsNodeWithAdjustedBounds> of getAllUncoveredSemanticsNodesToMap: replace with IntObjectMap"
- errorLine1=" Map<Int, SemanticsNodeWithAdjustedBounds> {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="variable nodes with type Map<Integer, SemanticsNodeWithAdjustedBounds>: replace with IntObjectMap"
- errorLine1=" val nodes = mutableMapOf<Int, SemanticsNodeWithAdjustedBounds>()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
message="field children with type Map<Integer, AutofillNode>: replace with IntObjectMap"
errorLine1=" val children: MutableMap<Int, AutofillNode> = mutableMapOf()"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -471,24 +147,6 @@
<issue
id="PrimitiveInCollection"
- message="variable oldLines with type Map<AlignmentLine, Integer>: replace with ObjectIntMap"
- errorLine1=" val oldLines = oldAlignmentLines"
- errorLine2=" ^">
- <location
- file="src/commonMain/kotlin/androidx/compose/ui/node/LookaheadDelegate.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
- message="variable var4a364b23 with type Map<AlignmentLine, Integer>: replace with ObjectIntMap"
- errorLine1=" val oldLines = oldAlignmentLines"
- errorLine2=" ^">
- <location
- file="src/commonMain/kotlin/androidx/compose/ui/node/LookaheadDelegate.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInCollection"
message="field cachedAlignmentLinesMap with type Map<AlignmentLine, Integer>: replace with ObjectIntMap"
errorLine1=" protected val cachedAlignmentLinesMap = mutableMapOf<AlignmentLine, Int>()"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -624,60 +282,6 @@
<issue
id="PrimitiveInLambda"
- message="Use a functional interface instead of lambda syntax for lambdas with primitive values in variable 'setSelectionAction' with type AccessibilityAction<Function3<? super Integer, ? super Integer, ? super Boolean, ? extends Boolean>>."
- errorLine1=" val setSelectionAction ="
- errorLine2=" ^">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInLambda"
- message="Use a functional interface instead of lambda syntax for lambdas with primitive values in variable 'scrollAction' with type AccessibilityAction<Function2<? super Float, ? super Float, ? extends Boolean>>."
- errorLine1=" val scrollAction = semanticsNode.unmergedConfig.getOrNull(SemanticsActions.ScrollBy)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInLambda"
- message="Use a functional interface instead of lambda syntax for lambdas with primitive values in variable 'setProgressAction' with type AccessibilityAction<Function1<? super Float, ? extends Boolean>>."
- errorLine1=" val setProgressAction ="
- errorLine2=" ^">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInLambda"
- message="Use a functional interface instead of lambda syntax for lambdas with primitive values in variable 'canScroll' with type Function2<? super ScrollAxisRange, ? super Float, ? extends Boolean>."
- errorLine1=" // Will the scrollable scroll when ScrollBy is invoked with the given [amount]?"
- errorLine2=" ^">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInLambda"
- message="Use a functional interface instead of lambda syntax for lambdas with primitive values in variable 'scrollAction' with type AccessibilityAction<Function2<? super Float, ? super Float, ? extends Boolean>>."
- errorLine1=" var scrollAction = scrollableAncestor?.config?.getOrNull(SemanticsActions.ScrollBy)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInLambda"
- message="Use a functional interface instead of lambda syntax for lambdas with primitive values in variable 'scrollDelta' with type Function2<? super Float, ? super Float, ? extends Float>."
- errorLine1=" // Given the desired scroll value to align either side of the target with the"
- errorLine2=" ^">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInLambda"
message="Use a functional interface instead of lambda syntax for lambdas with primitive values in return type Function2<ComposeUiNode, Integer, Unit> of 'getSetCompositeKeyHash'."
errorLine1=" val SetCompositeKeyHash: ComposeUiNode.(Int) -> Unit ="
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
diff --git a/compose/ui/ui/samples/src/main/java/androidx/compose/ui/samples/PlatformTextInputModifierNodeSample.kt b/compose/ui/ui/samples/src/main/java/androidx/compose/ui/samples/PlatformTextInputModifierNodeSample.kt
index 54a4b03..097052e 100644
--- a/compose/ui/ui/samples/src/main/java/androidx/compose/ui/samples/PlatformTextInputModifierNodeSample.kt
+++ b/compose/ui/ui/samples/src/main/java/androidx/compose/ui/samples/PlatformTextInputModifierNodeSample.kt
@@ -22,10 +22,10 @@
import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.FocusEventModifierNode
import androidx.compose.ui.focus.FocusState
+import androidx.compose.ui.platform.PlatformTextInputMethodRequest
import androidx.compose.ui.platform.PlatformTextInputModifierNode
import androidx.compose.ui.platform.PlatformTextInputSession
import androidx.compose.ui.platform.runTextInputSession
-import androidx.compose.ui.text.input.PlatformTextInputMethodRequest
import kotlinx.coroutines.Job
import kotlinx.coroutines.launch
diff --git a/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/AndroidAccessibilityTest.kt b/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/AndroidAccessibilityTest.kt
index 2c92123..b413110 100644
--- a/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/AndroidAccessibilityTest.kt
+++ b/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/AndroidAccessibilityTest.kt
@@ -3782,6 +3782,40 @@
}
@Test
+ fun testAccessibilityNodeInfoTreePruned_testTagOnlyDoesNotPrune() {
+ // Arrange.
+ val parentTag = "ParentForOverlappedChildren"
+ val childOneTag = "OverlappedChildOne"
+ val childTwoTag = "OverlappedChildTwo"
+ setContent {
+ Box(Modifier.testTag(parentTag)) {
+ with(LocalDensity.current) {
+ Box(
+ Modifier
+ .zIndex(1f)
+ .testTag(childOneTag)
+ .requiredSize(50.toDp())
+ )
+ BasicText(
+ "Child Two",
+ Modifier
+ .testTag(childTwoTag)
+ .requiredSize(50.toDp())
+ )
+ }
+ }
+ }
+ val parentNodeId = rule.onNodeWithTag(parentTag).semanticsId
+ val overlappedChildTwoNodeId = rule.onNodeWithTag(childTwoTag).semanticsId
+
+ rule.runOnIdle {
+ assertThat(createAccessibilityNodeInfo(parentNodeId).childCount).isEqualTo(2)
+ assertThat(createAccessibilityNodeInfo(overlappedChildTwoNodeId).text.toString())
+ .isEqualTo("Child Two")
+ }
+ }
+
+ @Test
fun testPaneAppear() {
var isPaneVisible by mutableStateOf(false)
val paneTestTitle by mutableStateOf("pane title")
diff --git a/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/graphics/vector/VectorTest.kt b/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/graphics/vector/VectorTest.kt
index 6edf095..0e0a75b 100644
--- a/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/graphics/vector/VectorTest.kt
+++ b/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/graphics/vector/VectorTest.kt
@@ -36,7 +36,6 @@
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.getValue
-import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
@@ -176,50 +175,6 @@
}
}
- @Test
- fun testVectorSkipsRecompositionOnNoChange() {
- val state = mutableIntStateOf(0)
- var composeCount = 0
- var vectorComposeCount = 0
-
- val composeVector: @Composable @VectorComposable (Float, Float) -> Unit = {
- viewportWidth, viewportHeight ->
-
- vectorComposeCount++
- Path(
- fill = SolidColor(Color.Blue),
- pathData = PathData {
- lineTo(viewportWidth, 0f)
- lineTo(viewportWidth, viewportHeight)
- lineTo(0f, viewportHeight)
- close()
- }
- )
- }
-
- rule.setContent {
- composeCount++
- // Arbitrary read to force composition here and verify the subcomposition below skips
- state.value
- val vectorPainter = rememberVectorPainter(
- defaultWidth = 10.dp,
- defaultHeight = 10.dp,
- autoMirror = false,
- content = composeVector
- )
- Image(
- vectorPainter,
- null,
- modifier = Modifier.size(20.dp)
- )
- }
-
- state.value = 1
- rule.waitForIdle()
- assertEquals(2, composeCount) // Arbitrary state read should compose twice
- assertEquals(1, vectorComposeCount) // Vector is identical so should compose once
- }
-
@SdkSuppress(minSdkVersion = Build.VERSION_CODES.O)
@Test
fun testVectorInvalidation() {
@@ -1108,7 +1063,6 @@
var vectorInCache = false
rule.setContent {
val theme = LocalContext.current.theme
- val density = LocalDensity.current
val imageVectorCache = LocalImageVectorCache.current
imageVectorCache.clear()
Image(
@@ -1116,22 +1070,8 @@
contentDescription = null
)
- val key = ImageVectorCache.Key(theme, R.drawable.ic_triangle, density)
- vectorInCache = imageVectorCache[key] != null
- }
-
- assertTrue(vectorInCache)
- }
-
- @Test
- fun testVectorPainterCacheHit() {
- var vectorInCache = false
- rule.setContent {
- // obtaining the same painter resource should return the same instance root
- // GroupComponent
- val painter1 = painterResource(R.drawable.ic_triangle) as VectorPainter
- val painter2 = painterResource(R.drawable.ic_triangle) as VectorPainter
- vectorInCache = painter1.vector.root === painter2.vector.root
+ vectorInCache =
+ imageVectorCache[ImageVectorCache.Key(theme, R.drawable.ic_triangle)] != null
}
assertTrue(vectorInCache)
@@ -1143,10 +1083,8 @@
var application: Application? = null
var theme: Resources.Theme? = null
var vectorCache: ImageVectorCache? = null
- var density: Density? = null
rule.setContent {
application = LocalContext.current.applicationContext as Application
- density = LocalDensity.current
theme = LocalContext.current.theme
val imageVectorCache = LocalImageVectorCache.current
imageVectorCache.clear()
@@ -1155,8 +1093,8 @@
contentDescription = null
)
- val key = ImageVectorCache.Key(theme!!, R.drawable.ic_triangle, density!!)
- vectorInCache = imageVectorCache[key] != null
+ vectorInCache =
+ imageVectorCache[ImageVectorCache.Key(theme!!, R.drawable.ic_triangle)] != null
vectorCache = imageVectorCache
}
@@ -1164,7 +1102,7 @@
application?.onTrimMemory(0)
val cacheCleared = vectorCache?.let {
- it[ImageVectorCache.Key(theme!!, R.drawable.ic_triangle, density!!)] == null
+ it[ImageVectorCache.Key(theme!!, R.drawable.ic_triangle)] == null
} ?: false
assertTrue("Vector was not inserted in cache after initial creation", vectorInCache)
diff --git a/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/input/PlatformTextInputMethodTestOverrideTest.kt b/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/input/PlatformTextInputMethodTestOverrideTest.kt
index 080dd22..d1ada36 100644
--- a/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/input/PlatformTextInputMethodTestOverrideTest.kt
+++ b/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/input/PlatformTextInputMethodTestOverrideTest.kt
@@ -22,6 +22,7 @@
import androidx.compose.ui.Modifier
import androidx.compose.ui.node.ModifierNodeElement
import androidx.compose.ui.platform.LocalView
+import androidx.compose.ui.platform.PlatformTextInputMethodRequest
import androidx.compose.ui.platform.PlatformTextInputModifierNode
import androidx.compose.ui.platform.PlatformTextInputSession
import androidx.compose.ui.platform.runTextInputSession
diff --git a/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/input/TestInputMethodRequest.kt b/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/input/TestInputMethodRequest.kt
index 4ab8ddb..4a0a8d1 100644
--- a/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/input/TestInputMethodRequest.kt
+++ b/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/input/TestInputMethodRequest.kt
@@ -20,6 +20,7 @@
import android.view.inputmethod.BaseInputConnection
import android.view.inputmethod.EditorInfo
import android.view.inputmethod.InputConnection
+import androidx.compose.ui.platform.PlatformTextInputMethodRequest
internal open class TestInputMethodRequest(view: View) : BaseInputConnection(view, false),
PlatformTextInputMethodRequest {
diff --git a/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/AndroidViewTest.kt b/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/AndroidViewTest.kt
index d4135a8..f530f0d 100644
--- a/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/AndroidViewTest.kt
+++ b/compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/AndroidViewTest.kt
@@ -31,7 +31,6 @@
import android.view.ViewGroup
import android.view.ViewGroup.LayoutParams.WRAP_CONTENT
import android.view.accessibility.AccessibilityNodeInfo
-import android.widget.EditText
import android.widget.FrameLayout
import android.widget.RelativeLayout
import android.widget.TextView
@@ -111,7 +110,6 @@
import androidx.savedstate.findViewTreeSavedStateRegistryOwner
import androidx.test.espresso.Espresso
import androidx.test.espresso.Espresso.onView
-import androidx.test.espresso.action.ViewActions.typeText
import androidx.test.espresso.assertion.ViewAssertions.doesNotExist
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.Visibility
@@ -123,13 +121,16 @@
import androidx.test.filters.LargeTest
import androidx.test.filters.MediumTest
import androidx.test.filters.SdkSuppress
+import androidx.testutils.withActivity
import com.google.common.truth.Truth.assertThat
import kotlin.math.roundToInt
import kotlin.test.assertIs
+import kotlin.test.assertNull
import org.hamcrest.CoreMatchers.endsWith
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.CoreMatchers.instanceOf
import org.junit.Assert.assertEquals
+import org.junit.Assert.assertNull
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
@@ -877,10 +878,9 @@
if (currentScreen == "screen1") {
AndroidView({
StateSavingView(
- "testKey",
- "testValue",
- { restoredValue -> result = restoredValue },
- it
+ context = it,
+ value = "testValue",
+ onRestoredValue = { restoredValue -> result = restoredValue }
)
})
} else {
@@ -1470,8 +1470,8 @@
val movableContext = remember {
movableContentOf {
ReusableAndroidViewWithLifecycleTracking(
- factory = {
- EditText(it).apply { id = R.id.testContentViewId }
+ factory = { context ->
+ StateSavingView(context, "")
},
onLifecycleEvent = lifecycleEvents::add
)
@@ -1491,9 +1491,15 @@
}
}
- onView(instanceOf(EditText::class.java))
- .check(matches(withEffectiveVisibility(Visibility.VISIBLE)))
- .perform(typeText("Input"))
+ rule.activityRule.withActivity {
+ val view = findViewById<StateSavingView>(StateSavingView.ID)
+ assertEquals(
+ "View didn't have the expected initial value",
+ "",
+ view.value
+ )
+ view.value = "Value 1"
+ }
assertEquals(
"AndroidView did not experience the expected lifecycle when " +
@@ -1511,7 +1517,7 @@
lifecycleEvents.clear()
slotWithContent++
- rule.runOnIdle { /* Wait for UI to settle */ }
+ rule.waitForIdle()
assertEquals(
"AndroidView experienced unexpected lifecycle events when " +
@@ -1521,44 +1527,67 @@
)
// Check that the state of the view is retained
- onView(instanceOf(EditText::class.java))
- .check(matches(isDisplayed()))
- .check(matches(withText("Input")))
+ rule.activityRule.withActivity {
+ val view = findViewById<StateSavingView>(StateSavingView.ID)
+ assertEquals(
+ "View didn't retain its state across reuse",
+ "Value 1",
+ view.value
+ )
+ }
}
@Test
fun testViewRestoresState_whenRemovedAndRecreatedWithNoReuse() {
- val lifecycleEvents = mutableListOf<AndroidViewLifecycleEvent>()
var screen by mutableStateOf("screen1")
rule.setContent {
with(rememberSaveableStateHolder()) {
if (screen == "screen1") {
SaveableStateProvider("screen1") {
- ReusableAndroidViewWithLifecycleTracking(
- factory = {
- EditText(it).apply { id = R.id.testContentViewId }
+ AndroidView(
+ factory = { context ->
+ StateSavingView(context, "screen1 first value")
},
- onLifecycleEvent = lifecycleEvents::add
+ update = { },
+ onReset = { },
+ onRelease = { }
)
}
}
}
}
- onView(instanceOf(EditText::class.java))
- .check(matches(isDisplayed()))
- .perform(typeText("User Input"))
+ rule.activityRule.withActivity {
+ val view = findViewById<StateSavingView>(StateSavingView.ID)
+ assertEquals(
+ "View didn't have the expected initial value",
+ "screen1 first value",
+ view.value
+ )
+ view.value = "screen1 new value"
+ }
rule.runOnIdle { screen = "screen2" }
+ rule.waitForIdle()
- onView(instanceOf(EditText::class.java))
- .check(doesNotExist())
+ rule.activityRule.withActivity {
+ assertNull(
+ findViewById<StateSavingView>(StateSavingView.ID),
+ "StateSavingView should be removed from the hierarchy"
+ )
+ }
rule.runOnIdle { screen = "screen1" }
+ rule.waitForIdle()
- onView(instanceOf(EditText::class.java))
- .check(matches(isDisplayed()))
- .check(matches(withText("User Input")))
+ rule.activityRule.withActivity {
+ val view = findViewById<StateSavingView>(StateSavingView.ID)
+ assertEquals(
+ "View did not restore with the correct state",
+ "screen1 new value",
+ view.value
+ )
+ }
}
@Test
@@ -1741,27 +1770,33 @@
}
private class StateSavingView(
- private val key: String,
- private val value: String,
- private val onRestoredValue: (String) -> Unit,
- context: Context
+ context: Context,
+ var value: String = "",
+ private val onRestoredValue: (String) -> Unit = {}
) : View(context) {
init {
- id = 73
+ id = ID
}
override fun onSaveInstanceState(): Parcelable {
val superState = super.onSaveInstanceState()
val bundle = Bundle()
bundle.putParcelable("superState", superState)
- bundle.putString(key, value)
+ bundle.putString(KEY, value)
return bundle
}
@Suppress("DEPRECATION")
override fun onRestoreInstanceState(state: Parcelable?) {
super.onRestoreInstanceState((state as Bundle).getParcelable("superState"))
- onRestoredValue(state.getString(key)!!)
+ val value = state.getString(KEY)!!
+ this.value = value
+ onRestoredValue(value)
+ }
+
+ companion object {
+ const val ID = 73
+ private const val KEY: String = "StateSavingView.Key"
}
}
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 101ce72..d38b388 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
@@ -626,13 +626,6 @@
// Support for this feature in Compose is tracked here: b/207654434
AndroidComposeViewForceDarkModeQ.disallowForceDark(this)
}
-
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
- AndroidComposeViewTranslationCallbackS.setViewTranslationCallback(
- this,
- AndroidComposeViewTranslationCallback()
- )
- }
}
/**
@@ -1374,6 +1367,13 @@
viewTreeObserver.addOnGlobalLayoutListener(globalLayoutListener)
viewTreeObserver.addOnScrollChangedListener(scrollChangedListener)
viewTreeObserver.addOnTouchModeChangeListener(touchModeChangeListener)
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
+ AndroidComposeViewTranslationCallbackS.setViewTranslationCallback(
+ this,
+ AndroidComposeViewTranslationCallback()
+ )
+ }
}
override fun onDetachedFromWindow() {
@@ -1389,6 +1389,10 @@
viewTreeObserver.removeOnGlobalLayoutListener(globalLayoutListener)
viewTreeObserver.removeOnScrollChangedListener(scrollChangedListener)
viewTreeObserver.removeOnTouchModeChangeListener(touchModeChangeListener)
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
+ AndroidComposeViewTranslationCallbackS.clearViewTranslationCallback(this)
+ }
}
override fun onProvideAutofillVirtualStructure(structure: ViewStructure?, flags: Int) {
@@ -2084,6 +2088,12 @@
fun setViewTranslationCallback(view: View, translationCallback: ViewTranslationCallback) {
view.setViewTranslationCallback(translationCallback)
}
+
+ @DoNotInline
+ @RequiresApi(Build.VERSION_CODES.S)
+ fun clearViewTranslationCallback(view: View) {
+ view.clearViewTranslationCallback()
+ }
}
/**
diff --git a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt
index 9d0e142..1d4d6e2 100644
--- a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt
@@ -820,9 +820,7 @@
// are also non-speakable.
// * Non-merging nodes that are empty: notably, clearAndSetSemantics {}
// and the root of the SemanticsNode tree.
- info.isImportantForAccessibility =
- semanticsNode.unmergedConfig.isMergingSemanticsOfDescendants ||
- semanticsNode.unmergedConfig.containsImportantForAccessibility()
+ info.isImportantForAccessibility = semanticsNode.isImportantForAccessibility()
semanticsNode.replacedChildren.fastForEach { child ->
if (currentSemanticsNodes.contains(child.id)) {
@@ -3546,6 +3544,10 @@
private fun SemanticsNode.enabled() = (config.getOrNull(SemanticsProperties.Disabled) == null)
+private fun SemanticsNode.isImportantForAccessibility() =
+ unmergedConfig.isMergingSemanticsOfDescendants ||
+ unmergedConfig.containsImportantForAccessibility()
+
@OptIn(ExperimentalComposeUiApi::class)
private val SemanticsNode.isVisible: Boolean
get() = !isTransparent && !unmergedConfig.contains(SemanticsProperties.InvisibleToUser)
@@ -3661,7 +3663,9 @@
for (i in children.size - 1 downTo 0) {
findAllSemanticNodesRecursive(children[i], region)
}
- unaccountedSpace.op(left, top, right, bottom, Region.Op.DIFFERENCE)
+ if (currentNode.isImportantForAccessibility()) {
+ unaccountedSpace.op(left, top, right, bottom, Region.Op.DIFFERENCE)
+ }
} else {
if (currentNode.isFake) {
val parentNode = currentNode.parent
diff --git a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidPlatformTextInputSession.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidPlatformTextInputSession.kt
index 261c2e7..550a026 100644
--- a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidPlatformTextInputSession.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidPlatformTextInputSession.kt
@@ -24,7 +24,6 @@
import androidx.compose.ui.node.Owner
import androidx.compose.ui.text.InternalTextApi
import androidx.compose.ui.text.input.NullableInputConnectionWrapper
-import androidx.compose.ui.text.input.PlatformTextInputMethodRequest
import androidx.compose.ui.text.input.TextInputService
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.cancel
diff --git a/compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/input/PlatformTextInputMethodRequest.android.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/PlatformTextInputMethodRequest.kt
similarity index 97%
rename from compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/input/PlatformTextInputMethodRequest.android.kt
rename to compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/PlatformTextInputMethodRequest.kt
index 475e443..2813d78 100644
--- a/compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/input/PlatformTextInputMethodRequest.android.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/PlatformTextInputMethodRequest.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package androidx.compose.ui.text.input
+package androidx.compose.ui.platform
import android.view.View
import android.view.inputmethod.EditorInfo
diff --git a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/PlatformTextInputSession.android.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/PlatformTextInputSession.android.kt
index ea9cf2f..54e6566 100644
--- a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/PlatformTextInputSession.android.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/PlatformTextInputSession.android.kt
@@ -18,7 +18,6 @@
import android.view.View
import android.view.inputmethod.InputMethodManager
-import androidx.compose.ui.text.input.PlatformTextInputMethodRequest
actual interface PlatformTextInputSession {
/**
diff --git a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/res/PainterResources.android.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/res/PainterResources.android.kt
index 3f330b4..32dcbe67 100644
--- a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/res/PainterResources.android.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/res/PainterResources.android.kt
@@ -26,15 +26,12 @@
import androidx.compose.ui.graphics.nativeCanvas
import androidx.compose.ui.graphics.painter.BitmapPainter
import androidx.compose.ui.graphics.painter.Painter
-import androidx.compose.ui.graphics.vector.GroupComponent
+import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.graphics.vector.VectorPainter
import androidx.compose.ui.graphics.vector.compat.seekToStartTag
-import androidx.compose.ui.graphics.vector.createGroupComponent
-import androidx.compose.ui.graphics.vector.createVectorPainterFromImageVector
+import androidx.compose.ui.graphics.vector.rememberVectorPainter
import androidx.compose.ui.platform.LocalContext
-import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.platform.LocalImageVectorCache
-import androidx.compose.ui.res.ImageVectorCache.ImageVectorEntry
/**
* Create a [Painter] from an Android resource id. This can load either an instance of
@@ -65,7 +62,8 @@
val path = value.string
// Assume .xml suffix implies loading a VectorDrawable resource
return if (path?.endsWith(".xml") == true) {
- obtainVectorPainter(context.theme, res, id, value.changingConfigurations)
+ val imageVector = loadVectorResource(context.theme, res, id, value.changingConfigurations)
+ rememberVectorPainter(imageVector)
} else {
// Otherwise load the bitmap resource
val imageBitmap = remember(path, id, context.theme) {
@@ -76,42 +74,29 @@
}
/**
- * Helper method to load the previously cached VectorPainter instance if it exists, otherwise
- * this parses the xml into an ImageVector and creates a new VectorPainter inserting it into the
- * cache for reuse
+ * Helper method to validate that the xml resource is a vector drawable then load
+ * the ImageVector. Because this throws exceptions we cannot have this implementation as part of
+ * the composable implementation it is invoked in.
*/
@Composable
-private fun obtainVectorPainter(
+private fun loadVectorResource(
theme: Resources.Theme,
res: Resources,
id: Int,
changingConfigurations: Int
-): VectorPainter {
+): ImageVector {
val imageVectorCache = LocalImageVectorCache.current
- val density = LocalDensity.current
- val key = remember(theme, id, density) {
- ImageVectorCache.Key(theme, id, density)
- }
- val imageVectorEntry = imageVectorCache[key]
- var imageVector = imageVectorEntry?.imageVector
- if (imageVector == null) {
+ val key = ImageVectorCache.Key(theme, id)
+ var imageVectorEntry = imageVectorCache[key]
+ if (imageVectorEntry == null) {
@Suppress("ResourceType") val parser = res.getXml(id)
if (parser.seekToStartTag().name != "vector") {
throw IllegalArgumentException(errorMessage)
}
- imageVector = loadVectorResourceInner(theme, res, parser)
+ imageVectorEntry = loadVectorResourceInner(theme, res, parser, changingConfigurations)
+ imageVectorCache[key] = imageVectorEntry
}
-
- var rootGroup = imageVectorEntry?.rootGroup
- if (rootGroup == null) {
- rootGroup = GroupComponent().apply {
- createGroupComponent(imageVector.root)
- }
- imageVectorCache[key] = ImageVectorEntry(imageVector, changingConfigurations, rootGroup)
- }
- return remember(key) {
- createVectorPainterFromImageVector(density, imageVector, rootGroup)
- }
+ return imageVectorEntry.imageVector
}
/**
diff --git a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/res/VectorResources.android.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/res/VectorResources.android.kt
index 9c5cfdd..eeb02ee 100644
--- a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/res/VectorResources.android.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/res/VectorResources.android.kt
@@ -24,7 +24,6 @@
import androidx.annotation.DrawableRes
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
-import androidx.compose.ui.graphics.vector.GroupComponent
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.graphics.vector.compat.AndroidVectorParser
import androidx.compose.ui.graphics.vector.compat.createVectorImageBuilder
@@ -32,9 +31,6 @@
import androidx.compose.ui.graphics.vector.compat.parseCurrentVectorNode
import androidx.compose.ui.graphics.vector.compat.seekToStartTag
import androidx.compose.ui.platform.LocalContext
-import androidx.compose.ui.platform.LocalDensity
-import androidx.compose.ui.platform.LocalImageVectorCache
-import androidx.compose.ui.unit.Density
import java.lang.ref.WeakReference
import org.xmlpull.v1.XmlPullParserException
@@ -50,26 +46,13 @@
*/
@Composable
fun ImageVector.Companion.vectorResource(@DrawableRes id: Int): ImageVector {
- val imageCache = LocalImageVectorCache.current
val context = LocalContext.current
- val density = LocalDensity.current
val res = resources()
val theme = context.theme
- val key = remember(theme, id, density) {
- ImageVectorCache.Key(theme, id, density)
+
+ return remember(id, res, theme, res.configuration) {
+ vectorResource(theme, res, id)
}
- var imageVector = imageCache[key]?.imageVector
- if (imageVector == null) {
- val value = remember { TypedValue() }
- res.getValue(id, value, true)
- imageVector = vectorResource(theme, res, id)
- imageCache[key] = ImageVectorCache.ImageVectorEntry(
- imageVector,
- value.changingConfigurations,
- null
- )
- }
- return imageVector
}
@Throws(XmlPullParserException::class)
@@ -78,11 +61,15 @@
res: Resources,
resId: Int
): ImageVector {
+ val value = TypedValue()
+ res.getValue(resId, value, true)
+
return loadVectorResourceInner(
theme,
res,
res.getXml(resId).apply { seekToStartTag() },
- )
+ value.changingConfigurations
+ ).imageVector
}
/**
@@ -94,8 +81,9 @@
internal fun loadVectorResourceInner(
theme: Resources.Theme? = null,
res: Resources,
- parser: XmlResourceParser
-): ImageVector {
+ parser: XmlResourceParser,
+ changingConfigurations: Int
+): ImageVectorCache.ImageVectorEntry {
val attrs = Xml.asAttributeSet(parser)
val resourceParser = AndroidVectorParser(parser)
val builder = resourceParser.createVectorImageBuilder(res, theme, attrs)
@@ -111,7 +99,7 @@
)
parser.next()
}
- return builder.build()
+ return ImageVectorCache.ImageVectorEntry(builder.build(), changingConfigurations)
}
/**
@@ -125,8 +113,7 @@
*/
data class Key(
val theme: Resources.Theme,
- val id: Int,
- val density: Density
+ val id: Int
)
/**
@@ -136,8 +123,7 @@
*/
data class ImageVectorEntry(
val imageVector: ImageVector,
- val configFlags: Int,
- val rootGroup: GroupComponent?,
+ val configFlags: Int
)
private val map = HashMap<Key, WeakReference<ImageVectorEntry>>()
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/graphics/vector/Vector.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/graphics/vector/Vector.kt
index fd2d8fb..def8917 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/graphics/vector/Vector.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/graphics/vector/Vector.kt
@@ -19,7 +19,6 @@
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
-import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.geometry.Size.Companion.Unspecified
import androidx.compose.ui.graphics.BlendMode
@@ -37,7 +36,6 @@
import androidx.compose.ui.graphics.StrokeJoin
import androidx.compose.ui.graphics.drawscope.DrawScope
import androidx.compose.ui.graphics.drawscope.Stroke
-import androidx.compose.ui.graphics.drawscope.scale
import androidx.compose.ui.graphics.drawscope.withTransform
import androidx.compose.ui.graphics.isSpecified
import androidx.compose.ui.graphics.isUnspecified
@@ -94,15 +92,20 @@
abstract fun DrawScope.draw()
}
-internal class VectorComponent(val root: GroupComponent) : VNode() {
-
- init {
- root.invalidateListener = {
+internal class VectorComponent : VNode() {
+ val root = GroupComponent().apply {
+ pivotX = 0.0f
+ pivotY = 0.0f
+ invalidateListener = {
doInvalidate()
}
}
- var name: String = DefaultGroupName
+ var name: String
+ get() = root.name
+ set(value) {
+ root.name = value
+ }
private fun doInvalidate() {
isDirty = true
@@ -128,18 +131,11 @@
private var previousDrawSize = Unspecified
- private var rootScaleX = 1f
- private var rootScaleY = 1f
-
/**
* Cached lambda used to avoid allocating the lambda on each draw invocation
*/
private val drawVectorBlock: DrawScope.() -> Unit = {
- with(root) {
- scale(rootScaleX, rootScaleY, pivot = Offset.Zero) {
- draw()
- }
- }
+ with(root) { draw() }
}
fun DrawScope.draw(alpha: Float, colorFilter: ColorFilter?) {
@@ -159,8 +155,8 @@
} else {
null
}
- rootScaleX = size.width / viewportSize.width
- rootScaleY = size.height / viewportSize.height
+ root.scaleX = size.width / viewportSize.width
+ root.scaleY = size.height / viewportSize.height
cacheDrawScope.drawCachedImage(
targetImageConfig,
IntSize(ceil(size.width).toInt(), ceil(size.height).toInt()),
@@ -270,23 +266,29 @@
var trimPathStart = DefaultTrimPathStart
set(value) {
- field = value
- isTrimPathDirty = true
- invalidate()
+ if (field != value) {
+ field = value
+ isTrimPathDirty = true
+ invalidate()
+ }
}
var trimPathEnd = DefaultTrimPathEnd
set(value) {
- field = value
- isTrimPathDirty = true
- invalidate()
+ if (field != value) {
+ field = value
+ isTrimPathDirty = true
+ invalidate()
+ }
}
var trimPathOffset = DefaultTrimPathOffset
set(value) {
- field = value
- isTrimPathDirty = true
- invalidate()
+ if (field != value) {
+ field = value
+ isTrimPathDirty = true
+ invalidate()
+ }
}
private var isPathDirty = true
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/graphics/vector/VectorPainter.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/graphics/vector/VectorPainter.kt
index fbc1930..35225ac 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/graphics/vector/VectorPainter.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/graphics/vector/VectorPainter.kt
@@ -19,6 +19,8 @@
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ComposableOpenTarget
import androidx.compose.runtime.Composition
+import androidx.compose.runtime.CompositionContext
+import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateOf
@@ -33,11 +35,9 @@
import androidx.compose.ui.graphics.ImageBitmapConfig
import androidx.compose.ui.graphics.drawscope.DrawScope
import androidx.compose.ui.graphics.drawscope.scale
-import androidx.compose.ui.graphics.isSpecified
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.internal.JvmDefaultWithCompatibility
import androidx.compose.ui.platform.LocalDensity
-import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.LayoutDirection
@@ -127,36 +127,27 @@
content: @Composable @VectorComposable (viewportWidth: Float, viewportHeight: Float) -> Unit
): VectorPainter {
val density = LocalDensity.current
- val defaultSize = density.obtainSizePx(defaultWidth, defaultHeight)
- val viewport = obtainViewportSize(defaultSize, viewportWidth, viewportHeight)
+ val widthPx = with(density) { defaultWidth.toPx() }
+ val heightPx = with(density) { defaultHeight.toPx() }
+
+ val vpWidth = if (viewportWidth.isNaN()) widthPx else viewportWidth
+ val vpHeight = if (viewportHeight.isNaN()) heightPx else viewportHeight
+
val intrinsicColorFilter = remember(tintColor, tintBlendMode) {
- createColorFilter(tintColor, tintBlendMode)
- }
- return remember { VectorPainter() }.apply {
- configureVectorPainter(
- defaultSize = defaultSize,
- viewportSize = viewport,
- name = name,
- intrinsicColorFilter = intrinsicColorFilter,
- autoMirror = autoMirror
- )
- val compositionContext = rememberCompositionContext()
- this.composition = remember(viewportWidth, viewportHeight, content) {
- val curComp = this.composition
- val next = if (curComp == null || curComp.isDisposed) {
- Composition(
- VectorApplier(this.vector.root),
- compositionContext
- )
- } else {
- curComp
- }
- next.setContent {
- content(viewport.width, viewport.height)
- }
- next
+ if (tintColor != Color.Unspecified) {
+ ColorFilter.tint(tintColor, tintBlendMode)
+ } else {
+ null
}
}
+
+ return remember { VectorPainter() }.apply {
+ // These assignments are thread safe as parameters are backed by a mutableState object
+ size = Size(widthPx, heightPx)
+ this.autoMirror = autoMirror
+ this.intrinsicColorFilter = intrinsicColorFilter
+ RenderVector(name, vpWidth, vpHeight, content)
+ }
}
/**
@@ -184,7 +175,7 @@
* This can be represented by either a [ImageVector] or a programmatic
* composition of a vector
*/
-class VectorPainter internal constructor(root: GroupComponent = GroupComponent()) : Painter() {
+class VectorPainter internal constructor() : Painter() {
internal var size by mutableStateOf(Size.Zero)
@@ -199,19 +190,7 @@
vector.intrinsicColorFilter = value
}
- internal var viewportSize: Size
- get() = vector.viewportSize
- set(value) {
- vector.viewportSize = value
- }
-
- internal var name: String
- get() = vector.name
- set(value) {
- vector.name = value
- }
-
- internal val vector = VectorComponent(root).apply {
+ private val vector = VectorComponent().apply {
invalidateCallback = {
if (drawCount == invalidateCount) {
invalidateCount++
@@ -222,11 +201,56 @@
internal val bitmapConfig: ImageBitmapConfig
get() = vector.cacheBitmapConfig
- internal var composition: Composition? = null
+ private var composition: Composition? = null
+
+ @Suppress("PrimitiveInLambda")
+ private fun composeVector(
+ parent: CompositionContext,
+ composable: @Composable (viewportWidth: Float, viewportHeight: Float) -> Unit
+ ): Composition {
+ val existing = composition
+ val next = if (existing == null || existing.isDisposed) {
+ Composition(
+ VectorApplier(vector.root),
+ parent
+ )
+ } else {
+ existing
+ }
+ composition = next
+ next.setContent {
+ composable(vector.viewportSize.width, vector.viewportSize.height)
+ }
+ return next
+ }
// TODO replace with mutableStateOf(Unit, neverEqualPolicy()) after b/291647821 is addressed
private var invalidateCount by mutableIntStateOf(0)
+ @Suppress("PrimitiveInLambda")
+ @Composable
+ internal fun RenderVector(
+ name: String,
+ viewportWidth: Float,
+ viewportHeight: Float,
+ content: @Composable (viewportWidth: Float, viewportHeight: Float) -> Unit
+ ) {
+ vector.apply {
+ this.name = name
+ this.viewportSize = Size(viewportWidth, viewportHeight)
+ }
+ val composition = composeVector(
+ rememberCompositionContext(),
+ content
+ )
+
+ DisposableEffect(composition) {
+ onDispose {
+ composition.dispose()
+ }
+ }
+ }
+
private var currentAlpha: Float = 1.0f
private var currentColorFilter: ColorFilter? = null
@@ -302,117 +326,6 @@
}
}
-private fun Density.obtainSizePx(defaultWidth: Dp, defaultHeight: Dp) =
- Size(defaultWidth.toPx(), defaultHeight.toPx())
-
-/**
- * Helper method to calculate the viewport size. If the viewport width/height are not specified
- * this falls back on the default size provided
- */
-private fun obtainViewportSize(
- defaultSize: Size,
- viewportWidth: Float,
- viewportHeight: Float
-) = Size(
- if (viewportWidth.isNaN()) defaultSize.width else viewportWidth,
- if (viewportHeight.isNaN()) defaultSize.height else viewportHeight
- )
-
-/**
- * Helper method to conditionally create a ColorFilter to tint contents if [tintColor] is
- * specified, that is [Color.isSpecified] returns true
- */
-private fun createColorFilter(tintColor: Color, tintBlendMode: BlendMode): ColorFilter? =
- if (tintColor.isSpecified) {
- ColorFilter.tint(tintColor, tintBlendMode)
- } else {
- null
- }
-
-/**
- * Helper method to configure the properties of a VectorPainter that maybe re-used
- */
-internal fun VectorPainter.configureVectorPainter(
- defaultSize: Size,
- viewportSize: Size,
- name: String = RootGroupName,
- intrinsicColorFilter: ColorFilter?,
- autoMirror: Boolean = false,
-): VectorPainter = apply {
- this.size = defaultSize
- this.autoMirror = autoMirror
- this.intrinsicColorFilter = intrinsicColorFilter
- this.viewportSize = viewportSize
- this.name = name
- }
-
-/**
- * Helper method to create a VectorPainter instance from an ImageVector
- */
-internal fun createVectorPainterFromImageVector(
- density: Density,
- imageVector: ImageVector,
- root: GroupComponent
-): VectorPainter {
- val defaultSize = density.obtainSizePx(imageVector.defaultWidth, imageVector.defaultHeight)
- val viewport = obtainViewportSize(
- defaultSize,
- imageVector.viewportWidth,
- imageVector.viewportHeight
- )
- return VectorPainter(root).configureVectorPainter(
- defaultSize = defaultSize,
- viewportSize = viewport,
- name = imageVector.name,
- intrinsicColorFilter = createColorFilter(imageVector.tintColor, imageVector.tintBlendMode),
- autoMirror = imageVector.autoMirror
- )
-}
-
-/**
- * statically create a a GroupComponent from the VectorGroup representation provided from
- * an [ImageVector] instance
- */
-internal fun GroupComponent.createGroupComponent(currentGroup: VectorGroup): GroupComponent {
- for (index in 0 until currentGroup.size) {
- val vectorNode = currentGroup[index]
- if (vectorNode is VectorPath) {
- val pathComponent = PathComponent().apply {
- pathData = vectorNode.pathData
- pathFillType = vectorNode.pathFillType
- name = vectorNode.name
- fill = vectorNode.fill
- fillAlpha = vectorNode.fillAlpha
- stroke = vectorNode.stroke
- strokeAlpha = vectorNode.strokeAlpha
- strokeLineWidth = vectorNode.strokeLineWidth
- strokeLineCap = vectorNode.strokeLineCap
- strokeLineJoin = vectorNode.strokeLineJoin
- strokeLineMiter = vectorNode.strokeLineMiter
- trimPathStart = vectorNode.trimPathStart
- trimPathEnd = vectorNode.trimPathEnd
- trimPathOffset = vectorNode.trimPathOffset
- }
- insertAt(index, pathComponent)
- } else if (vectorNode is VectorGroup) {
- val groupComponent = GroupComponent().apply {
- name = vectorNode.name
- rotation = vectorNode.rotation
- scaleX = vectorNode.scaleX
- scaleY = vectorNode.scaleY
- translationX = vectorNode.translationX
- translationY = vectorNode.translationY
- pivotX = vectorNode.pivotX
- pivotY = vectorNode.pivotY
- clipPathData = vectorNode.clipPathData
- createGroupComponent(vectorNode)
- }
- insertAt(index, groupComponent)
- }
- }
- return this
-}
-
/**
* Recursively creates the vector graphic composition by traversing the tree structure.
*
diff --git a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/input/PlatformTextInputMethodRequest.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/PlatformTextInputMethodRequest.kt
similarity index 94%
rename from compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/input/PlatformTextInputMethodRequest.kt
rename to compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/PlatformTextInputMethodRequest.kt
index 4dcc7fa..417cfba 100644
--- a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/input/PlatformTextInputMethodRequest.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/PlatformTextInputMethodRequest.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package androidx.compose.ui.text.input
+package androidx.compose.ui.platform
/**
* Represents a request to open a platform-specific text input session via
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/PlatformTextInputModifierNode.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/PlatformTextInputModifierNode.kt
index 6e638fc..bd4133c 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/PlatformTextInputModifierNode.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/PlatformTextInputModifierNode.kt
@@ -23,7 +23,6 @@
import androidx.compose.ui.node.DelegatableNode
import androidx.compose.ui.node.requireLayoutNode
import androidx.compose.ui.node.requireOwner
-import androidx.compose.ui.text.input.PlatformTextInputMethodRequest
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.cancelAndJoin
diff --git a/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopTextInputSession.kt b/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopTextInputSession.kt
index a874b46..9b95882 100644
--- a/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopTextInputSession.kt
+++ b/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopTextInputSession.kt
@@ -18,7 +18,6 @@
import androidx.compose.ui.InternalComposeUiApi
import androidx.compose.ui.SessionMutex
-import androidx.compose.ui.text.input.PlatformTextInputMethodRequest
import java.awt.Component
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.suspendCancellableCoroutine
diff --git a/compose/ui/ui-text/src/desktopMain/kotlin/androidx/compose/ui/text/input/PlatformTextInputMethodRequest.desktop.kt b/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/PlatformTextInputMethodRequest.kt
similarity index 96%
rename from compose/ui/ui-text/src/desktopMain/kotlin/androidx/compose/ui/text/input/PlatformTextInputMethodRequest.desktop.kt
rename to compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/PlatformTextInputMethodRequest.kt
index 503015a..c4db1d1 100644
--- a/compose/ui/ui-text/src/desktopMain/kotlin/androidx/compose/ui/text/input/PlatformTextInputMethodRequest.desktop.kt
+++ b/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/PlatformTextInputMethodRequest.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package androidx.compose.ui.text.input
+package androidx.compose.ui.platform
import java.awt.Component
import java.awt.event.InputMethodListener
diff --git a/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/PlatformTextInputSession.desktop.kt b/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/PlatformTextInputSession.desktop.kt
index f35320b..e5b8469 100644
--- a/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/PlatformTextInputSession.desktop.kt
+++ b/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/PlatformTextInputSession.desktop.kt
@@ -16,8 +16,6 @@
package androidx.compose.ui.platform
-import androidx.compose.ui.text.input.PlatformTextInputMethodRequest
-
actual interface PlatformTextInputSession {
actual suspend fun startInputMethod(request: PlatformTextInputMethodRequest): Nothing
}
diff --git a/compose/ui/ui/src/desktopTest/kotlin/androidx/compose/ui/platform/DesktopTextInputSessionTest.kt b/compose/ui/ui/src/desktopTest/kotlin/androidx/compose/ui/platform/DesktopTextInputSessionTest.kt
index 24e4bc4..f0d005f 100644
--- a/compose/ui/ui/src/desktopTest/kotlin/androidx/compose/ui/platform/DesktopTextInputSessionTest.kt
+++ b/compose/ui/ui/src/desktopTest/kotlin/androidx/compose/ui/platform/DesktopTextInputSessionTest.kt
@@ -16,7 +16,6 @@
package androidx.compose.ui.platform
-import androidx.compose.ui.text.input.PlatformTextInputMethodRequest
import androidx.compose.ui.unit.Density
import com.google.common.truth.Truth.assertThat
import java.awt.Frame
diff --git a/concurrent/concurrent-futures/api/api_lint.ignore b/concurrent/concurrent-futures/api/api_lint.ignore
index faa2f5c..e13d6a3 100644
--- a/concurrent/concurrent-futures/api/api_lint.ignore
+++ b/concurrent/concurrent-futures/api/api_lint.ignore
@@ -8,7 +8,7 @@
NotCloseable: androidx.concurrent.futures.CallbackToFutureAdapter.Completer:
- Classes that release resources (finalize()) should implement AutoClosable and CloseGuard: class androidx.concurrent.futures.CallbackToFutureAdapter.Completer
+ Classes that release resources (finalize()) should implement AutoCloseable and CloseGuard: class androidx.concurrent.futures.CallbackToFutureAdapter.Completer
PairedRegistration: androidx.concurrent.futures.CallbackToFutureAdapter.Completer#addCancellationListener(Runnable, java.util.concurrent.Executor):
diff --git a/concurrent/concurrent-futures/lint-baseline.xml b/concurrent/concurrent-futures/lint-baseline.xml
index 3757244..7d10429 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.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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="BanSynchronizedMethods"
@@ -11,15 +11,6 @@
</issue>
<issue
- id="BanThreadSleep"
- message="Uses Thread.sleep()"
- errorLine1=" Thread.sleep(toWaitMillis);"
- errorLine2=" ~~~~~">
- <location
- file="src/test/java/androidx/concurrent/futures/AbstractResolvableFutureTest.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 final void addListener(Runnable listener, Executor executor) {"
diff --git a/constraintlayout/constraintlayout-compose/api/api_lint.ignore b/constraintlayout/constraintlayout-compose/api/api_lint.ignore
index 71cc70d..5b29013 100644
--- a/constraintlayout/constraintlayout-compose/api/api_lint.ignore
+++ b/constraintlayout/constraintlayout-compose/api/api_lint.ignore
@@ -11,13 +11,3 @@
Invalid name for boolean property `showKeyPositions`. Should start with one of `has`, `can`, `should`, `is`.
GetterSetterNames: field DebugFlags.showPaths:
Invalid name for boolean property `showPaths`. Should start with one of `has`, `can`, `should`, `is`.
-
-
-KotlinDefaultParameterOrder: androidx.constraintlayout.compose.MotionLayoutKt#MotionLayout(androidx.constraintlayout.compose.ConstraintSet, androidx.constraintlayout.compose.ConstraintSet, androidx.compose.ui.Modifier, androidx.constraintlayout.compose.Transition, float, int, androidx.constraintlayout.compose.LayoutInformationReceiver, int, kotlin.jvm.functions.Function1<? super androidx.constraintlayout.compose.MotionLayoutScope,kotlin.Unit>) parameter #2:
- Parameter `modifier` has a default value and should come after all parameters without default values (except for a trailing lambda parameter)
-KotlinDefaultParameterOrder: androidx.constraintlayout.compose.MotionLayoutKt#MotionLayout(androidx.constraintlayout.compose.ConstraintSet, androidx.constraintlayout.compose.ConstraintSet, androidx.compose.ui.Modifier, androidx.constraintlayout.compose.Transition, float, int, androidx.constraintlayout.compose.LayoutInformationReceiver, int, kotlin.jvm.functions.Function1<? super androidx.constraintlayout.compose.MotionLayoutScope,kotlin.Unit>) parameter #3:
- Parameter `transition` has a default value and should come after all parameters without default values (except for a trailing lambda parameter)
-KotlinDefaultParameterOrder: androidx.constraintlayout.compose.MotionLayoutKt#MotionLayout(androidx.constraintlayout.compose.ConstraintSet, androidx.constraintlayout.compose.ConstraintSet, androidx.compose.ui.Modifier, androidx.constraintlayout.compose.Transition, float, int, int, kotlin.jvm.functions.Function1<? super androidx.constraintlayout.compose.MotionLayoutScope,kotlin.Unit>) parameter #2:
- Parameter `modifier` has a default value and should come after all parameters without default values (except for a trailing lambda parameter)
-KotlinDefaultParameterOrder: androidx.constraintlayout.compose.MotionLayoutKt#MotionLayout(androidx.constraintlayout.compose.ConstraintSet, androidx.constraintlayout.compose.ConstraintSet, androidx.compose.ui.Modifier, androidx.constraintlayout.compose.Transition, float, int, int, kotlin.jvm.functions.Function1<? super androidx.constraintlayout.compose.MotionLayoutScope,kotlin.Unit>) parameter #3:
- Parameter `transition` has a default value and should come after all parameters without default values (except for a trailing lambda parameter)
diff --git a/constraintlayout/constraintlayout-core/api/api_lint.ignore b/constraintlayout/constraintlayout-core/api/api_lint.ignore
index 0f5c412..e0d0141 100644
--- a/constraintlayout/constraintlayout-core/api/api_lint.ignore
+++ b/constraintlayout/constraintlayout-core/api/api_lint.ignore
@@ -2219,8 +2219,6 @@
Missing nullability on method `allocate` return
MissingNullability: androidx.constraintlayout.core.parser.CLContainer#allocate(char[]) parameter #0:
Missing nullability on parameter `content` in method `allocate`
-MissingNullability: androidx.constraintlayout.core.parser.CLContainer#clone():
- Missing nullability on method `clone` return
MissingNullability: androidx.constraintlayout.core.parser.CLContainer#get(String):
Missing nullability on method `get` return
MissingNullability: androidx.constraintlayout.core.parser.CLContainer#get(String) parameter #0:
@@ -2297,8 +2295,6 @@
Missing nullability on parameter `content` in method `CLElement`
MissingNullability: androidx.constraintlayout.core.parser.CLElement#addIndent(StringBuilder, int) parameter #0:
Missing nullability on parameter `builder` in method `addIndent`
-MissingNullability: androidx.constraintlayout.core.parser.CLElement#clone():
- Missing nullability on method `clone` return
MissingNullability: androidx.constraintlayout.core.parser.CLElement#content():
Missing nullability on method `content` return
MissingNullability: androidx.constraintlayout.core.parser.CLElement#getContainer():
@@ -2353,8 +2349,6 @@
Missing nullability on method `allocate` return
MissingNullability: androidx.constraintlayout.core.parser.CLObject#allocate(char[]) parameter #0:
Missing nullability on parameter `content` in method `allocate`
-MissingNullability: androidx.constraintlayout.core.parser.CLObject#clone():
- Missing nullability on method `clone` return
MissingNullability: androidx.constraintlayout.core.parser.CLObject#iterator():
Missing nullability on method `iterator` return
MissingNullability: androidx.constraintlayout.core.parser.CLObject#toFormattedJSON():
@@ -3059,12 +3053,6 @@
Missing nullability on parameter `widgetState` in method `setPathRelative`
MissingNullability: androidx.constraintlayout.core.state.Transition.WidgetState#update(androidx.constraintlayout.core.widgets.ConstraintWidget, int) parameter #0:
Missing nullability on parameter `child` in method `update`
-MissingNullability: androidx.constraintlayout.core.state.TransitionParser#parse(androidx.constraintlayout.core.parser.CLObject, androidx.constraintlayout.core.state.Transition, androidx.constraintlayout.core.state.CorePixelDp) parameter #0:
- Missing nullability on parameter `json` in method `parse`
-MissingNullability: androidx.constraintlayout.core.state.TransitionParser#parse(androidx.constraintlayout.core.parser.CLObject, androidx.constraintlayout.core.state.Transition, androidx.constraintlayout.core.state.CorePixelDp) parameter #1:
- Missing nullability on parameter `transition` in method `parse`
-MissingNullability: androidx.constraintlayout.core.state.TransitionParser#parse(androidx.constraintlayout.core.parser.CLObject, androidx.constraintlayout.core.state.Transition, androidx.constraintlayout.core.state.CorePixelDp) parameter #2:
- Missing nullability on parameter `dpToPixel` in method `parse`
MissingNullability: androidx.constraintlayout.core.state.TransitionParser#parseKeyFrames(androidx.constraintlayout.core.parser.CLObject, androidx.constraintlayout.core.state.Transition) parameter #0:
Missing nullability on parameter `transitionCLObject` in method `parseKeyFrames`
MissingNullability: androidx.constraintlayout.core.state.TransitionParser#parseKeyFrames(androidx.constraintlayout.core.parser.CLObject, androidx.constraintlayout.core.state.Transition) parameter #1:
diff --git a/constraintlayout/constraintlayout/api/api_lint.ignore b/constraintlayout/constraintlayout/api/api_lint.ignore
index 422e6ca..85dff48e 100644
--- a/constraintlayout/constraintlayout/api/api_lint.ignore
+++ b/constraintlayout/constraintlayout/api/api_lint.ignore
@@ -331,8 +331,6 @@
Missing nullability on method `getSpans` return
MissingNullability: androidx.constraintlayout.helper.widget.Grid#init(android.util.AttributeSet) parameter #0:
Missing nullability on parameter `attrs` in method `init`
-MissingNullability: androidx.constraintlayout.helper.widget.Grid#onDraw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `onDraw`
MissingNullability: androidx.constraintlayout.helper.widget.Grid#setColumnWeights(String) parameter #0:
Missing nullability on parameter `columnWeights` in method `setColumnWeights`
MissingNullability: androidx.constraintlayout.helper.widget.Grid#setRowWeights(String) parameter #0:
@@ -1073,8 +1071,6 @@
Missing nullability on parameter `context` in method `ImageFilterButton`
MissingNullability: androidx.constraintlayout.utils.widget.ImageFilterButton#ImageFilterButton(android.content.Context, android.util.AttributeSet, int) parameter #1:
Missing nullability on parameter `attrs` in method `ImageFilterButton`
-MissingNullability: androidx.constraintlayout.utils.widget.ImageFilterButton#draw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `draw`
MissingNullability: androidx.constraintlayout.utils.widget.ImageFilterButton#setImageDrawable(android.graphics.drawable.Drawable) parameter #0:
Missing nullability on parameter `drawable` in method `setImageDrawable`
MissingNullability: androidx.constraintlayout.utils.widget.ImageFilterView#ImageFilterView(android.content.Context) parameter #0:
@@ -1087,8 +1083,6 @@
Missing nullability on parameter `context` in method `ImageFilterView`
MissingNullability: androidx.constraintlayout.utils.widget.ImageFilterView#ImageFilterView(android.content.Context, android.util.AttributeSet, int) parameter #1:
Missing nullability on parameter `attrs` in method `ImageFilterView`
-MissingNullability: androidx.constraintlayout.utils.widget.ImageFilterView#draw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `draw`
MissingNullability: androidx.constraintlayout.utils.widget.ImageFilterView#setAltImageDrawable(android.graphics.drawable.Drawable) parameter #0:
Missing nullability on parameter `altDrawable` in method `setAltImageDrawable`
MissingNullability: androidx.constraintlayout.utils.widget.ImageFilterView#setImageDrawable(android.graphics.drawable.Drawable) parameter #0:
@@ -1105,8 +1099,6 @@
Missing nullability on parameter `attrs` in method `MockView`
MissingNullability: androidx.constraintlayout.utils.widget.MockView#mText:
Missing nullability on field `mText` in class `class androidx.constraintlayout.utils.widget.MockView`
-MissingNullability: androidx.constraintlayout.utils.widget.MockView#onDraw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `onDraw`
MissingNullability: androidx.constraintlayout.utils.widget.MotionButton#MotionButton(android.content.Context) parameter #0:
Missing nullability on parameter `context` in method `MotionButton`
MissingNullability: androidx.constraintlayout.utils.widget.MotionButton#MotionButton(android.content.Context, android.util.AttributeSet) parameter #0:
@@ -1117,8 +1109,6 @@
Missing nullability on parameter `context` in method `MotionButton`
MissingNullability: androidx.constraintlayout.utils.widget.MotionButton#MotionButton(android.content.Context, android.util.AttributeSet, int) parameter #1:
Missing nullability on parameter `attrs` in method `MotionButton`
-MissingNullability: androidx.constraintlayout.utils.widget.MotionButton#draw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `draw`
MissingNullability: androidx.constraintlayout.utils.widget.MotionLabel#MotionLabel(android.content.Context) parameter #0:
Missing nullability on parameter `context` in method `MotionLabel`
MissingNullability: androidx.constraintlayout.utils.widget.MotionLabel#MotionLabel(android.content.Context, android.util.AttributeSet) parameter #0:
@@ -1127,8 +1117,6 @@
Missing nullability on parameter `context` in method `MotionLabel`
MissingNullability: androidx.constraintlayout.utils.widget.MotionLabel#getTypeface():
Missing nullability on method `getTypeface` return
-MissingNullability: androidx.constraintlayout.utils.widget.MotionLabel#onDraw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `onDraw`
MissingNullability: androidx.constraintlayout.utils.widget.MotionLabel#setText(CharSequence) parameter #0:
Missing nullability on parameter `text` in method `setText`
MissingNullability: androidx.constraintlayout.utils.widget.MotionLabel#setTypeface(android.graphics.Typeface) parameter #0:
@@ -1143,8 +1131,6 @@
Missing nullability on parameter `context` in method `MotionTelltales`
MissingNullability: androidx.constraintlayout.utils.widget.MotionTelltales#MotionTelltales(android.content.Context, android.util.AttributeSet, int) parameter #1:
Missing nullability on parameter `attrs` in method `MotionTelltales`
-MissingNullability: androidx.constraintlayout.utils.widget.MotionTelltales#onDraw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `onDraw`
MissingNullability: androidx.constraintlayout.utils.widget.MotionTelltales#setText(CharSequence) parameter #0:
Missing nullability on parameter `text` in method `setText`
MissingNullability: androidx.constraintlayout.widget.Barrier#Barrier(android.content.Context) parameter #0:
@@ -1263,8 +1249,6 @@
Missing nullability on field `mReferenceTags` in class `class androidx.constraintlayout.widget.ConstraintHelper`
MissingNullability: androidx.constraintlayout.widget.ConstraintHelper#myContext:
Missing nullability on field `myContext` in class `class androidx.constraintlayout.widget.ConstraintHelper`
-MissingNullability: androidx.constraintlayout.widget.ConstraintHelper#onDraw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `onDraw`
MissingNullability: androidx.constraintlayout.widget.ConstraintHelper#removeView(android.view.View) parameter #0:
Missing nullability on parameter `view` in method `removeView`
MissingNullability: androidx.constraintlayout.widget.ConstraintHelper#resolveRtl(androidx.constraintlayout.core.widgets.ConstraintWidget, boolean) parameter #0:
@@ -1711,8 +1695,6 @@
Missing nullability on parameter `context` in method `Guideline`
MissingNullability: androidx.constraintlayout.widget.Guideline#Guideline(android.content.Context, android.util.AttributeSet, int, int) parameter #1:
Missing nullability on parameter `attrs` in method `Guideline`
-MissingNullability: androidx.constraintlayout.widget.Guideline#draw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `draw`
MissingNullability: androidx.constraintlayout.widget.Placeholder#Placeholder(android.content.Context) parameter #0:
Missing nullability on parameter `context` in method `Placeholder`
MissingNullability: androidx.constraintlayout.widget.Placeholder#Placeholder(android.content.Context, android.util.AttributeSet) parameter #0:
@@ -1729,8 +1711,6 @@
Missing nullability on parameter `attrs` in method `Placeholder`
MissingNullability: androidx.constraintlayout.widget.Placeholder#getContent():
Missing nullability on method `getContent` return
-MissingNullability: androidx.constraintlayout.widget.Placeholder#onDraw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `onDraw`
MissingNullability: androidx.constraintlayout.widget.Placeholder#updatePostMeasure(androidx.constraintlayout.widget.ConstraintLayout) parameter #0:
Missing nullability on parameter `container` in method `updatePostMeasure`
MissingNullability: androidx.constraintlayout.widget.Placeholder#updatePreLayout(androidx.constraintlayout.widget.ConstraintLayout) parameter #0:
@@ -1749,8 +1729,6 @@
Missing nullability on parameter `context` in method `ReactiveGuide`
MissingNullability: androidx.constraintlayout.widget.ReactiveGuide#ReactiveGuide(android.content.Context, android.util.AttributeSet, int, int) parameter #1:
Missing nullability on parameter `attrs` in method `ReactiveGuide`
-MissingNullability: androidx.constraintlayout.widget.ReactiveGuide#draw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `draw`
MissingNullability: androidx.constraintlayout.widget.SharedValues#addListener(int, androidx.constraintlayout.widget.SharedValues.SharedValuesListener) parameter #1:
Missing nullability on parameter `listener` in method `addListener`
MissingNullability: androidx.constraintlayout.widget.SharedValues#removeListener(androidx.constraintlayout.widget.SharedValues.SharedValuesListener) parameter #0:
diff --git a/constraintlayout/constraintlayout/build.gradle b/constraintlayout/constraintlayout/build.gradle
index 2dd7a27..9a4f6cc 100644
--- a/constraintlayout/constraintlayout/build.gradle
+++ b/constraintlayout/constraintlayout/build.gradle
@@ -32,24 +32,7 @@
}
-def latestSdkVersion = 31
-
android {
- defaultConfig {
- minSdkVersion 14
- targetSdkVersion latestSdkVersion
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- }
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
-
- buildFeatures {
- buildConfig = false
- }
-
namespace "androidx.constraintlayout.widget"
}
diff --git a/constraintlayout/constraintlayout/lint-baseline.xml b/constraintlayout/constraintlayout/lint-baseline.xml
index 03b1210..70b5c26 100644
--- a/constraintlayout/constraintlayout/lint-baseline.xml
+++ b/constraintlayout/constraintlayout/lint-baseline.xml
@@ -1,41 +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">
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `android.view.ViewGroup.MarginLayoutParams#setMarginStart`"
- errorLine1=" mParams.setMarginStart(mParams.UNSET);"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintProperties.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `android.view.ViewGroup.MarginLayoutParams#setMarginEnd`"
- errorLine1=" mParams.setMarginEnd(mParams.UNSET);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintProperties.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `android.view.ViewGroup.MarginLayoutParams#setMarginStart`"
- errorLine1=" mParams.setMarginStart(value);"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintProperties.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `android.view.ViewGroup.MarginLayoutParams#setMarginEnd`"
- errorLine1=" mParams.setMarginEnd(value);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintProperties.java"/>
- </issue>
+<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="BanTargetApiAnnotation"
@@ -327,96 +291,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.constraintlayout.widget.ConstraintLayout is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" int paddingStart = Math.max(0, getPaddingStart());"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintLayout.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.constraintlayout.widget.ConstraintLayout is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" int paddingEnd = Math.max(0, getPaddingEnd());"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintLayout.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.constraintlayout.widget.ConstraintLayout is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return isRtlSupported && (View.LAYOUT_DIRECTION_RTL == getLayoutDirection());"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintLayout.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.constraintlayout.widget.ConstraintLayout is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" rtlPadding = Math.max(0, getPaddingStart()) + Math.max(0, getPaddingEnd());"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintLayout.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.constraintlayout.widget.ConstraintLayout is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" rtlPadding = Math.max(0, getPaddingStart()) + Math.max(0, getPaddingEnd());"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintLayout.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.constraintlayout.widget.ConstraintLayout.LayoutParams is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" isRtl = (View.LAYOUT_DIRECTION_RTL == getLayoutDirection());"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintLayout.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.constraintlayout.widget.ConstraintProperties is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mParams.setMarginStart(mParams.UNSET);"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintProperties.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.constraintlayout.widget.ConstraintProperties is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mParams.setMarginEnd(mParams.UNSET);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintProperties.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.constraintlayout.widget.ConstraintProperties is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mParams.setMarginStart(value);"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintProperties.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.constraintlayout.widget.ConstraintProperties is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mParams.setMarginEnd(value);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintProperties.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 21; however, the containing class androidx.constraintlayout.widget.ConstraintProperties is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" mView.setElevation(elevation);"
errorLine2=" ~~~~~~~~~~~~">
@@ -435,24 +309,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.constraintlayout.widget.ConstraintProperties is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mParams.setMarginStart(margin);"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintProperties.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.constraintlayout.widget.ConstraintProperties is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mParams.setMarginEnd(margin);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/widget/ConstraintProperties.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=" ~~~~~~~~~~~~~~~">
@@ -471,42 +327,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.constraintlayout.widget.ConstraintSet.Constraint is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" layout.endMargin = param.getMarginEnd();"
- 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 17; however, the containing class androidx.constraintlayout.widget.ConstraintSet.Constraint is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" layout.startMargin = param.getMarginStart();"
- 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 17; however, the containing class androidx.constraintlayout.widget.ConstraintSet.Constraint is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" param.setMarginStart(layout.startMargin);"
- 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 17; however, the containing class androidx.constraintlayout.widget.ConstraintSet.Constraint is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" param.setMarginEnd(layout.endMargin);"
- 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=" ~~~~~~~~~~~~~~~">
@@ -543,15 +363,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.constraintlayout.helper.widget.Grid is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" v.setId(View.generateViewId());"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/helper/widget/Grid.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 21; however, the containing class null is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" outline.setRoundRect(0, 0, w, h, r);"
errorLine2=" ~~~~~~~~~~~~">
@@ -957,33 +768,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.constraintlayout.motion.widget.MotionLayout is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" Display display = getDisplay();"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/motion/widget/MotionLayout.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.constraintlayout.motion.widget.MotionLayout is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" int currentRotation = getDisplay().getRotation();"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/motion/widget/MotionLayout.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.constraintlayout.motion.widget.MotionLayout.Model is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" layoutParams.resolveLayoutDirection(getLayoutDirection());"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/motion/widget/MotionLayout.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 21; however, the containing class androidx.constraintlayout.motion.widget.MotionLayout is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" target.setNestedScrollingEnabled(false);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -1002,15 +786,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.constraintlayout.motion.widget.MotionLayout is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" Display display = getDisplay();"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/main/java/androidx/constraintlayout/motion/widget/MotionLayout.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 21; however, the containing class androidx.constraintlayout.motion.utils.ViewOscillator.ElevationSet is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" view.setElevation(get(t));"
errorLine2=" ~~~~~~~~~~~~">
@@ -1118,6 +893,285 @@
</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 de601d0..2e1fb98 100644
--- a/contentpager/contentpager/lint-baseline.xml
+++ b/contentpager/contentpager/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="cli" dependencies="false" name="AGP (7.4.0-alpha08)" variant="all" version="7.4.0-alpha08">
+<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 23 (current min is 14): `android.database.AbstractCursor#setExtras`"
+ message="Call requires API level 23 (current min is 19): `android.database.AbstractCursor#setExtras`"
errorLine1=" c.setExtras(extras);"
errorLine2=" ~~~~~~~~~">
<location
@@ -12,16 +12,7 @@
<issue
id="NewApi"
- message="Call requires API level 15 (current min is 14): `new android.database.CursorWindow`"
- errorLine1=" setWindow(new CursorWindow("stevie"));"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/contentpager/content/TestContentProvider.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 23 (current min is 14): `android.database.AbstractCursor#setExtras`"
+ message="Call requires API level 23 (current min is 19): `android.database.AbstractCursor#setExtras`"
errorLine1=" cursor.setExtras(extras);"
errorLine2=" ~~~~~~~~~">
<location
@@ -47,28 +38,19 @@
</issue>
<issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.contentpager.content.Query is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return resolver.query("
- errorLine2=" ~~~~~">
+ 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="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.contentpager.content.Query is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" if (mCancellationSignal != null && !mCancellationSignal.isCanceled()) {"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/main/java/androidx/contentpager/content/Query.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.contentpager.content.Query is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mCancellationSignal.cancel();"
- errorLine2=" ~~~~~~">
+ 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>
diff --git a/coordinatorlayout/coordinatorlayout/api/api_lint.ignore b/coordinatorlayout/coordinatorlayout/api/api_lint.ignore
index 06d3c6e..968f68f 100644
--- a/coordinatorlayout/coordinatorlayout/api/api_lint.ignore
+++ b/coordinatorlayout/coordinatorlayout/api/api_lint.ignore
@@ -33,8 +33,6 @@
Missing nullability on method `generateLayoutParams` return
MissingNullability: androidx.coordinatorlayout.widget.CoordinatorLayout#generateLayoutParams(android.view.ViewGroup.LayoutParams) parameter #0:
Missing nullability on parameter `p` in method `generateLayoutParams`
-MissingNullability: androidx.coordinatorlayout.widget.CoordinatorLayout#onDraw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `c` in method `onDraw`
MissingNullability: androidx.coordinatorlayout.widget.CoordinatorLayout#onInterceptTouchEvent(android.view.MotionEvent) parameter #0:
Missing nullability on parameter `ev` in method `onInterceptTouchEvent`
MissingNullability: androidx.coordinatorlayout.widget.CoordinatorLayout#onNestedFling(android.view.View, float, float, boolean) parameter #0:
diff --git a/core/core-animation/lint-baseline.xml b/core/core-animation/lint-baseline.xml
index d3b9273..ee39c90 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 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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="ResourceType"
@@ -308,6 +308,24 @@
</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/build.gradle b/core/core-graphics-integration-tests/testapp/build.gradle
index 768d7b4..7007b32 100644
--- a/core/core-graphics-integration-tests/testapp/build.gradle
+++ b/core/core-graphics-integration-tests/testapp/build.gradle
@@ -14,10 +14,6 @@
* limitations under the License.
*/
-
-//import androidx.build.LibraryType
-//import androidx.build.LibraryGroups
-
plugins {
id("AndroidXPlugin")
id("com.android.application")
@@ -27,7 +23,6 @@
android {
defaultConfig {
applicationId "androidx.core.graphics.sample"
- minSdkVersion 17
}
namespace "androidx.core.graphics.sample"
}
diff --git a/core/core-graphics-integration-tests/testapp/lint-baseline.xml b/core/core-graphics-integration-tests/testapp/lint-baseline.xml
new file mode 100644
index 0000000..456d9b8
--- /dev/null
+++ b/core/core-graphics-integration-tests/testapp/lint-baseline.xml
@@ -0,0 +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">
+
+ <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
new file mode 100644
index 0000000..0df70ca
--- /dev/null
+++ b/core/core-ktx/lint-baseline.xml
@@ -0,0 +1,517 @@
+<?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-location-altitude/lint-baseline.xml b/core/core-location-altitude/lint-baseline.xml
deleted file mode 100644
index 034c3b4..0000000
--- a/core/core-location-altitude/lint-baseline.xml
+++ /dev/null
@@ -1,301 +0,0 @@
-<?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">
-
- <issue
- id="RestrictedApiAndroidX"
- message="MapParamsProto.getMapS2Level can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" int sizeIj = 1 << (S2CellIdUtils.MAX_LEVEL - params.getMapS2Level());"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/AltitudeConverter.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="MapParamsProto.getMapS2Level can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" long z11 = S2CellIdUtils.getParent(s2CellId, params.getMapS2Level());"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/AltitudeConverter.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="MapParamsProto.getMapS2Level can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" params.getMapS2Level()),"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/AltitudeConverter.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="MapParamsProto.getMapS2Level can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" params.getMapS2Level()),"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/AltitudeConverter.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="MapParamsProto.getMapS2Level can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" params.getMapS2Level())"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/AltitudeConverter.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="MapParamsProto.getMapS2Level can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" double sizeIj = 1 << (S2CellIdUtils.MAX_LEVEL - params.getMapS2Level());"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/AltitudeConverter.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="MapParamsProto.getModelRmseMeters can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" (float) Math.hypot(verticalAccuracyMeters, params.getModelRmseMeters()));"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/AltitudeConverter.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="MapParamsProto.getCacheTileS2Level can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" return S2CellIdUtils.getParent(s2CellId, params.getCacheTileS2Level());"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="MapParamsProto.getDiskTileS2Level can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" S2CellIdUtils.getParent(s2CellId, params.getDiskTileS2Level()));"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="S2TileProto.getByteBuffer can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" ByteString byteString = tiles[tileIndex].getByteBuffer();"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="ByteString.isEmpty can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" if (byteString.isEmpty()) {"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="ByteString.asReadOnlyByteBuffer can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" ByteBuffer byteBuffer = byteString.asReadOnlyByteBuffer();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="MapParamsProto.getMapS2Level can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" params.getMapS2Level() - Integer.numberOfTrailingZeros(byteBuffer.limit()) / 2;"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="MapParamsProto.getMapS2Level can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" int numBitsRightOfMap = 2 * (S2CellIdUtils.MAX_LEVEL - params.getMapS2Level()) + 1;"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="S2TileProto.getByteJpeg can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" mergeByteImageValues(params, tiles[tileIndex].getByteJpeg(), s2CellIds, tiles, tileIndex,"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="S2TileProto.getBytePng can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" mergeByteImageValues(params, tiles[tileIndex].getBytePng(), s2CellIds, tiles, tileIndex,"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="ByteString.isEmpty can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" if (byteString.isEmpty()) {"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="ByteString.newInput can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" try (InputStream inputStream = byteString.newInput()) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="MapParamsProto.getMapS2Level can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" return (iOrJ >> (S2CellIdUtils.MAX_LEVEL - params.getMapS2Level())) % widthOrHeight;"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="MapParamsProto.getMapS2Level can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" Preconditions.checkArgument(S2CellIdUtils.getLevel(s2CellId) == params.getMapS2Level());"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="MapParamsProto.getModelAMeters can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" heightsMeters[i] *= params.getModelAMeters();"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="MapParamsProto.getModelBMeters can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" heightsMeters[i] += params.getModelBMeters();"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="MapParamsProto.getCacheTileS2Level can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" 1 << (2 * (params.getMapS2Level() - params.getCacheTileS2Level()));"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="MapParamsProto.getMapS2Level can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" 1 << (2 * (params.getMapS2Level() - params.getCacheTileS2Level()));"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="MapParamsProto.getMapS2Level can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" long s2CellId = S2CellIdUtils.getTraversalStart(cacheKeys[i], params.getMapS2Level());"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="Builder.build can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" S2TileProto.newBuilder().setByteBuffer(ByteString.copyFrom(bytes)).build();"
- errorLine2=" ~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="Builder.setByteBuffer can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" S2TileProto.newBuilder().setByteBuffer(ByteString.copyFrom(bytes)).build();"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="ByteString.copyFrom can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" S2TileProto.newBuilder().setByteBuffer(ByteString.copyFrom(bytes)).build();"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="S2TileProto.newBuilder can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" S2TileProto.newBuilder().setByteBuffer(ByteString.copyFrom(bytes)).build();"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/GeoidHeightMap.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="AbstractMessageLite.toByteArray can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" return value.toByteArray();"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/db/MapParamsEntity.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="MapParamsProto.parseFrom can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" return MapParamsProto.parseFrom(byteArray);"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/db/MapParamsEntity.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="AbstractMessageLite.toByteArray can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" return tile.toByteArray();"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/db/TilesEntity.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="S2TileProto.parseFrom can only be called from within the same library (missing Maven coordinate due to repackaging)"
- errorLine1=" return S2TileProto.parseFrom(byteArray);"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/altitude/impl/db/TilesEntity.java"/>
- </issue>
-
-</issues>
diff --git a/core/core-remoteviews/lint-baseline.xml b/core/core-remoteviews/lint-baseline.xml
new file mode 100644
index 0000000..959235b
--- /dev/null
+++ b/core/core-remoteviews/lint-baseline.xml
@@ -0,0 +1,103 @@
+<?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-remoteviews/src/test/java/androidx/core/widget/AppWidgetManagerCompatTest.kt b/core/core-remoteviews/src/test/java/androidx/core/widget/AppWidgetManagerCompatTest.kt
index c190fbb..4c36b25 100644
--- a/core/core-remoteviews/src/test/java/androidx/core/widget/AppWidgetManagerCompatTest.kt
+++ b/core/core-remoteviews/src/test/java/androidx/core/widget/AppWidgetManagerCompatTest.kt
@@ -48,8 +48,7 @@
@RunWith(RobolectricTestRunner::class)
@DoNotInstrument
-@Config(sdk = [17])
-@RequiresApi(17)
+@Config(sdk = [19])
class AppWidgetManagerCompatTest {
private val context = ApplicationProvider.getApplicationContext<Context>()
diff --git a/core/core-remoteviews/src/test/java/androidx/core/widget/RemoteViewsTest.kt b/core/core-remoteviews/src/test/java/androidx/core/widget/RemoteViewsTest.kt
index 0a38a01..bf57523 100644
--- a/core/core-remoteviews/src/test/java/androidx/core/widget/RemoteViewsTest.kt
+++ b/core/core-remoteviews/src/test/java/androidx/core/widget/RemoteViewsTest.kt
@@ -49,7 +49,6 @@
@RunWith(RobolectricTestRunner::class)
@DoNotInstrument
-@Config(minSdk = 14)
class RemoteViewsTest {
private val mContext = ApplicationProvider.getApplicationContext<Context>()
private lateinit var mRemoteViews: RemoteViews
@@ -96,8 +95,6 @@
assertThat(mTextView.error).isNull()
}
- @Config(minSdk = 16)
- @SdkSuppress(minSdkVersion = 16)
@Test
fun setTextViewMaxLines() {
mRemoteViews.setTextViewMaxLines(R.id.text, 7)
diff --git a/core/core-remoteviews/src/test/resources/robolectric.properties b/core/core-remoteviews/src/test/resources/robolectric.properties
new file mode 100644
index 0000000..69fde47
--- /dev/null
+++ b/core/core-remoteviews/src/test/resources/robolectric.properties
@@ -0,0 +1,3 @@
+# robolectric properties
+# Temporary until we update Robolectric to support API level 34.
+sdk=33
diff --git a/core/core-telecom/api/api_lint.ignore b/core/core-telecom/api/api_lint.ignore
new file mode 100644
index 0000000..2bf73e4
--- /dev/null
+++ b/core/core-telecom/api/api_lint.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+NotCloseable: androidx.core.telecom.CallControlScope:
+ Classes that release resources (disconnect()) should implement AutoCloseable and CloseGuard: class androidx.core.telecom.CallControlScope
diff --git a/core/core/api/api_lint.ignore b/core/core/api/api_lint.ignore
index 2c91af6..3da615d 100644
--- a/core/core/api/api_lint.ignore
+++ b/core/core/api/api_lint.ignore
@@ -935,6 +935,22 @@
Provide an explicit copy constructor instead of implementing `clone()`
+NotCloseable: androidx.core.app.FrameMetricsAggregator:
+ Classes that release resources (stop()) should implement AutoCloseable and CloseGuard: class androidx.core.app.FrameMetricsAggregator
+NotCloseable: androidx.core.util.Pools.Pool:
+ Classes that release resources (release()) should implement AutoCloseable and CloseGuard: class androidx.core.util.Pools.Pool
+NotCloseable: androidx.core.util.Pools.SimplePool:
+ Classes that release resources (release()) should implement AutoCloseable and CloseGuard: class androidx.core.util.Pools.SimplePool
+NotCloseable: androidx.core.util.Pools.SynchronizedPool:
+ Classes that release resources (release()) should implement AutoCloseable and CloseGuard: class androidx.core.util.Pools.SynchronizedPool
+NotCloseable: androidx.core.view.DragAndDropPermissionsCompat:
+ Classes that release resources (release()) should implement AutoCloseable and CloseGuard: class androidx.core.view.DragAndDropPermissionsCompat
+NotCloseable: androidx.core.view.WindowInsetsAnimationControllerCompat:
+ Classes that release resources (finish()) should implement AutoCloseable and CloseGuard: class androidx.core.view.WindowInsetsAnimationControllerCompat
+NotCloseable: androidx.core.widget.EdgeEffectCompat:
+ Classes that release resources (finish()) should implement AutoCloseable and CloseGuard: class androidx.core.widget.EdgeEffectCompat
+
+
NullableCollection: androidx.core.app.ActivityOptionsCompat#toBundle():
Return type of method androidx.core.app.ActivityOptionsCompat.toBundle() is a nullable collection (`android.os.Bundle`); must be non-null
NullableCollection: androidx.core.app.FrameMetricsAggregator#getMetrics():
diff --git a/core/core/lint-baseline.xml b/core/core/lint-baseline.xml
index 5a6970a..a35d552 100644
--- a/core/core/lint-baseline.xml
+++ b/core/core/lint-baseline.xml
@@ -1,9 +1,9 @@
<?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-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 24 (current min is 14): `java.util.Optional#of`"
+ message="Call requires API level 24 (current min is 19): `java.util.Optional#of`"
errorLine1=" return Optional.of(modeCompat);"
errorLine2=" ~~">
<location
@@ -12,7 +12,7 @@
<issue
id="NewApi"
- message="Call requires API level 24 (current min is 14): `java.util.Optional#empty`"
+ message="Call requires API level 24 (current min is 19): `java.util.Optional#empty`"
errorLine1=" return Optional.empty();"
errorLine2=" ~~~~~">
<location
@@ -21,25 +21,7 @@
<issue
id="NewApi"
- message="Class requires API level 17 (current min is 14): `android.hardware.display.DisplayManager`"
- errorLine1=" mDisplayManager = (DisplayManager) mContext.getSystemService(DISPLAY_SERVICE);"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/test/java/androidx/core/view/DisplayCompatTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `android.hardware.display.DisplayManager#getDisplay`"
- errorLine1=" mDefaultDisplay = mDisplayManager.getDisplay(Display.DEFAULT_DISPLAY);"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/test/java/androidx/core/view/DisplayCompatTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 24 (current min is 14): `java.util.Optional#get`"
+ message="Call requires API level 24 (current min is 19): `java.util.Optional#get`"
errorLine1=" findNativeMode(DisplayCompat.getSupportedModes(mContext, mDefaultDisplay)).get();"
errorLine2=" ~~~">
<location
@@ -48,16 +30,7 @@
<issue
id="NewApi"
- message="Call requires API level 17 (current min is 14): `android.hardware.display.DisplayManager#getDisplay`"
- errorLine1=" Display secondDisplay = mDisplayManager.getDisplay(secondDisplayId);"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/test/java/androidx/core/view/DisplayCompatTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 24 (current min is 14): `java.util.Optional#get`"
+ message="Call requires API level 24 (current min is 19): `java.util.Optional#get`"
errorLine1=" findNativeMode(DisplayCompat.getSupportedModes(mContext, secondDisplay)).get();"
errorLine2=" ~~~">
<location
@@ -66,7 +39,7 @@
<issue
id="NewApi"
- message="Call requires API level 24 (current min is 14): `java.util.Optional#get`"
+ message="Call requires API level 24 (current min is 19): `java.util.Optional#get`"
errorLine1=" findNativeMode(DisplayCompat.getSupportedModes(mContext, mDefaultDisplay)).get();"
errorLine2=" ~~~">
<location
@@ -75,7 +48,7 @@
<issue
id="NewApi"
- message="Call requires API level 24 (current min is 14): `java.util.Optional#get`"
+ message="Call requires API level 24 (current min is 19): `java.util.Optional#get`"
errorLine1=" findNativeMode(DisplayCompat.getSupportedModes(mContext, mDefaultDisplay)).get();"
errorLine2=" ~~~">
<location
@@ -84,43 +57,7 @@
<issue
id="NewApi"
- message="Cast from `OutputStream` to `AutoCloseable` requires API level 19 (current min is 14)"
- errorLine1=" closeQuietly(out);"
- errorLine2=" ~~~">
- <location
- file="src/androidTest/java/androidx/core/content/FileProviderTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Cast from `OutputStream` to `AutoCloseable` requires API level 19 (current min is 14)"
- errorLine1=" closeQuietly(out);"
- errorLine2=" ~~~">
- <location
- file="src/androidTest/java/androidx/core/content/FileProviderTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Cast from `InputStream` to `AutoCloseable` requires API level 19 (current min is 14)"
- errorLine1=" closeQuietly(in);"
- errorLine2=" ~~">
- <location
- file="src/androidTest/java/androidx/core/content/FileProviderTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `java.lang.AutoCloseable#close`"
- errorLine1=" closeable.close();"
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/core/content/FileProviderTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getImportance`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getImportance`"
errorLine1=" boolean equality = nc1.getImportance() == nc2.getImportance()"
errorLine2=" ~~~~~~~~~~~~~">
<location
@@ -129,7 +66,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getImportance`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getImportance`"
errorLine1=" boolean equality = nc1.getImportance() == nc2.getImportance()"
errorLine2=" ~~~~~~~~~~~~~">
<location
@@ -138,7 +75,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#canBypassDnd`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#canBypassDnd`"
errorLine1=" && nc1.canBypassDnd() == nc2.canBypassDnd()"
errorLine2=" ~~~~~~~~~~~~">
<location
@@ -147,7 +84,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#canBypassDnd`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#canBypassDnd`"
errorLine1=" && nc1.canBypassDnd() == nc2.canBypassDnd()"
errorLine2=" ~~~~~~~~~~~~">
<location
@@ -156,7 +93,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getLockscreenVisibility`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getLockscreenVisibility`"
errorLine1=" && nc1.getLockscreenVisibility() == nc2.getLockscreenVisibility()"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -165,7 +102,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getLockscreenVisibility`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getLockscreenVisibility`"
errorLine1=" && nc1.getLockscreenVisibility() == nc2.getLockscreenVisibility()"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -174,7 +111,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getLightColor`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getLightColor`"
errorLine1=" && nc1.getLightColor() == nc2.getLightColor()"
errorLine2=" ~~~~~~~~~~~~~">
<location
@@ -183,7 +120,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getLightColor`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getLightColor`"
errorLine1=" && nc1.getLightColor() == nc2.getLightColor()"
errorLine2=" ~~~~~~~~~~~~~">
<location
@@ -192,7 +129,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getId`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getId`"
errorLine1=" && Objects.equals(nc1.getId(), nc2.getId())"
errorLine2=" ~~~~~">
<location
@@ -201,7 +138,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getId`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getId`"
errorLine1=" && Objects.equals(nc1.getId(), nc2.getId())"
errorLine2=" ~~~~~">
<location
@@ -210,7 +147,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getName`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getName`"
errorLine1=" && Objects.equals(nc1.getName(), nc2.getName())"
errorLine2=" ~~~~~~~">
<location
@@ -219,7 +156,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getName`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getName`"
errorLine1=" && Objects.equals(nc1.getName(), nc2.getName())"
errorLine2=" ~~~~~~~">
<location
@@ -228,7 +165,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getDescription`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getDescription`"
errorLine1=" && Objects.equals(nc1.getDescription(), nc2.getDescription())"
errorLine2=" ~~~~~~~~~~~~~~">
<location
@@ -237,7 +174,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getDescription`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getDescription`"
errorLine1=" && Objects.equals(nc1.getDescription(), nc2.getDescription())"
errorLine2=" ~~~~~~~~~~~~~~">
<location
@@ -246,7 +183,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getSound`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getSound`"
errorLine1=" && Objects.equals(nc1.getSound(), nc2.getSound())"
errorLine2=" ~~~~~~~~">
<location
@@ -255,7 +192,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getSound`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getSound`"
errorLine1=" && Objects.equals(nc1.getSound(), nc2.getSound())"
errorLine2=" ~~~~~~~~">
<location
@@ -264,7 +201,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getVibrationPattern`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getVibrationPattern`"
errorLine1=" && Arrays.equals(nc1.getVibrationPattern(), nc2.getVibrationPattern())"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
@@ -273,7 +210,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getVibrationPattern`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getVibrationPattern`"
errorLine1=" && Arrays.equals(nc1.getVibrationPattern(), nc2.getVibrationPattern())"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
@@ -282,7 +219,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getGroup`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getGroup`"
errorLine1=" && Objects.equals(nc1.getGroup(), nc2.getGroup())"
errorLine2=" ~~~~~~~~">
<location
@@ -291,7 +228,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getGroup`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getGroup`"
errorLine1=" && Objects.equals(nc1.getGroup(), nc2.getGroup())"
errorLine2=" ~~~~~~~~">
<location
@@ -300,7 +237,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getAudioAttributes`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getAudioAttributes`"
errorLine1=" && Objects.equals(nc1.getAudioAttributes(), nc2.getAudioAttributes());"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
@@ -309,7 +246,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getAudioAttributes`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getAudioAttributes`"
errorLine1=" && Objects.equals(nc1.getAudioAttributes(), nc2.getAudioAttributes());"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
@@ -318,7 +255,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getImportance`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getImportance`"
errorLine1=" assertEquals(expected.getImportance(), actual.getImportance());"
errorLine2=" ~~~~~~~~~~~~~">
<location
@@ -327,7 +264,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getLightColor`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getLightColor`"
errorLine1=" assertEquals(expected.getLightColor(), actual.getLightColor());"
errorLine2=" ~~~~~~~~~~~~~">
<location
@@ -336,7 +273,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getId`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getId`"
errorLine1=" assertEquals(expected.getId(), actual.getId());"
errorLine2=" ~~~~~">
<location
@@ -345,7 +282,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getName`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getName`"
errorLine1=" assertEquals(expected.getName(), actual.getName());"
errorLine2=" ~~~~~~~">
<location
@@ -354,7 +291,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getDescription`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getDescription`"
errorLine1=" assertEquals(expected.getDescription(), actual.getDescription());"
errorLine2=" ~~~~~~~~~~~~~~">
<location
@@ -363,7 +300,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getSound`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getSound`"
errorLine1=" assertEquals(expected.getSound(), actual.getSound());"
errorLine2=" ~~~~~~~~">
<location
@@ -372,7 +309,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getVibrationPattern`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getVibrationPattern`"
errorLine1=" assertArrayEquals(expected.getVibrationPattern(), actual.getVibrationPattern());"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
@@ -381,7 +318,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getGroup`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getGroup`"
errorLine1=" assertEquals(expected.getGroup(), actual.getGroup());"
errorLine2=" ~~~~~~~~">
<location
@@ -390,7 +327,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannel#getAudioAttributes`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannel#getAudioAttributes`"
errorLine1=" assertEquals(expected.getAudioAttributes(), actual.getAudioAttributes());"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
@@ -399,7 +336,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannelGroup#getId`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannelGroup#getId`"
errorLine1=" assertEquals(expected.getId(), actual.getId());"
errorLine2=" ~~~~~">
<location
@@ -408,7 +345,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 14): `android.app.NotificationChannelGroup#getName`"
+ message="Call requires API level 26 (current min is 19): `android.app.NotificationChannelGroup#getName`"
errorLine1=" assertEquals(expected.getName(), actual.getName());"
errorLine2=" ~~~~~~~">
<location
@@ -417,7 +354,7 @@
<issue
id="NewApi"
- message="Call requires API level 21 (current min is 14): `addInvisibleAction`"
+ message="Call requires API level 21 (current min is 19): `addInvisibleAction`"
errorLine1=" Notification nWith = builder.addInvisibleAction(0, "testAction", null)"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
@@ -426,7 +363,7 @@
<issue
id="NewApi"
- message="Call requires API level 21 (current min is 14): `getInvisibleActions`"
+ message="Call requires API level 21 (current min is 19): `getInvisibleActions`"
errorLine1=" List<NotificationCompat.Action> actions = NotificationCompat.getInvisibleActions(nWith);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
@@ -471,7 +408,7 @@
<issue
id="NewApi"
- message="Call requires API level 30 (current min is 14): `Builder`"
+ message="Call requires API level 30 (current min is 19): `Builder`"
errorLine1=" new NotificationCompat.BubbleMetadata.Builder(shortcutId)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -480,7 +417,7 @@
<issue
id="NewApi"
- message="Call requires API level 21 (current min is 14): `getInvisibleActions`"
+ message="Call requires API level 21 (current min is 19): `getInvisibleActions`"
errorLine1=" NotificationCompat.getInvisibleActions(notification);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
@@ -489,25 +426,7 @@
<issue
id="NewApi"
- message="Field requires API level 19 (current min is 14): `android.app.Notification#extras`"
- errorLine1=" assertBundleEquals("Notification.extras", n2.extras, n2.extras)"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/core/app/NotificationTester.kt"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Field requires API level 19 (current min is 14): `android.app.Notification#extras`"
- errorLine1=" assertBundleEquals("Notification.extras", n2.extras, n2.extras)"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/core/app/NotificationTester.kt"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 23 (current min is 14): `setBreakStrategy`"
+ message="Call requires API level 23 (current min is 19): `setBreakStrategy`"
errorLine1=" .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE).build());"
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
@@ -516,7 +435,7 @@
<issue
id="NewApi"
- message="Call requires API level 23 (current min is 14): `setBreakStrategy`"
+ message="Call requires API level 23 (current min is 19): `setBreakStrategy`"
errorLine1=" .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE)"
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
@@ -525,7 +444,7 @@
<issue
id="NewApi"
- message="Call requires API level 23 (current min is 14): `setHyphenationFrequency`"
+ message="Call requires API level 23 (current min is 19): `setHyphenationFrequency`"
errorLine1=" .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL).build());"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -534,7 +453,7 @@
<issue
id="NewApi"
- message="Call requires API level 23 (current min is 14): `setBreakStrategy`"
+ message="Call requires API level 23 (current min is 19): `setBreakStrategy`"
errorLine1=" .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE)"
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
@@ -543,7 +462,7 @@
<issue
id="NewApi"
- message="Call requires API level 23 (current min is 14): `setHyphenationFrequency`"
+ message="Call requires API level 23 (current min is 19): `setHyphenationFrequency`"
errorLine1=" .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -552,25 +471,7 @@
<issue
id="NewApi"
- message="Call requires API level 18 (current min is 14): `setTextDirection`"
- errorLine1=" .setTextDirection(LTR).build());"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/core/text/PrecomputedTextCompatTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Field requires API level 18 (current min is 14): `android.text.TextDirectionHeuristics#LTR`"
- errorLine1=" .setTextDirection(LTR).build());"
- errorLine2=" ~~~">
- <location
- file="src/androidTest/java/androidx/core/text/PrecomputedTextCompatTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 23 (current min is 14): `getBreakStrategy`"
+ message="Call requires API level 23 (current min is 19): `getBreakStrategy`"
errorLine1=" .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE).build().getBreakStrategy());"
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
@@ -579,7 +480,7 @@
<issue
id="NewApi"
- message="Call requires API level 23 (current min is 14): `setBreakStrategy`"
+ message="Call requires API level 23 (current min is 19): `setBreakStrategy`"
errorLine1=" .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE).build().getBreakStrategy());"
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
@@ -588,7 +489,7 @@
<issue
id="NewApi"
- message="Call requires API level 23 (current min is 14): `setHyphenationFrequency`"
+ message="Call requires API level 23 (current min is 19): `setHyphenationFrequency`"
errorLine1=" .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE).build()"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -597,7 +498,7 @@
<issue
id="NewApi"
- message="Call requires API level 23 (current min is 14): `getHyphenationFrequency`"
+ message="Call requires API level 23 (current min is 19): `getHyphenationFrequency`"
errorLine1=" .getHyphenationFrequency());"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -606,43 +507,7 @@
<issue
id="NewApi"
- message="Call requires API level 18 (current min is 14): `setTextDirection`"
- errorLine1=" assertEquals(RTL, new Params.Builder(PAINT).setTextDirection(RTL).build()"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/core/text/PrecomputedTextCompatTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Field requires API level 18 (current min is 14): `android.text.TextDirectionHeuristics#RTL`"
- errorLine1=" assertEquals(RTL, new Params.Builder(PAINT).setTextDirection(RTL).build()"
- errorLine2=" ~~~">
- <location
- file="src/androidTest/java/androidx/core/text/PrecomputedTextCompatTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Field requires API level 18 (current min is 14): `android.text.TextDirectionHeuristics#RTL`"
- errorLine1=" assertEquals(RTL, new Params.Builder(PAINT).setTextDirection(RTL).build()"
- errorLine2=" ~~~">
- <location
- file="src/androidTest/java/androidx/core/text/PrecomputedTextCompatTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 18 (current min is 14): `getTextDirection`"
- errorLine1=" .getTextDirection());"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/core/text/PrecomputedTextCompatTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 25 (current min is 14): `toShortcutInfo`"
+ message="Call requires API level 25 (current min is 19): `toShortcutInfo`"
errorLine1=" .toShortcutInfo());"
errorLine2=" ~~~~~~~~~~~~~~">
<location
@@ -651,7 +516,7 @@
<issue
id="NewApi"
- message="Call requires API level 25 (current min is 14): `toShortcutInfo`"
+ message="Call requires API level 25 (current min is 19): `toShortcutInfo`"
errorLine1=" .toShortcutInfo());"
errorLine2=" ~~~~~~~~~~~~~~">
<location
@@ -660,7 +525,7 @@
<issue
id="NewApi"
- message="Call requires API level 25 (current min is 14): `toShortcutInfo`"
+ message="Call requires API level 25 (current min is 19): `toShortcutInfo`"
errorLine1=" .toShortcutInfo());"
errorLine2=" ~~~~~~~~~~~~~~">
<location
@@ -669,7 +534,7 @@
<issue
id="NewApi"
- message="Call requires API level 25 (current min is 14): `toShortcutInfo`"
+ message="Call requires API level 25 (current min is 19): `toShortcutInfo`"
errorLine1=" .toShortcutInfo());"
errorLine2=" ~~~~~~~~~~~~~~">
<location
@@ -678,7 +543,7 @@
<issue
id="NewApi"
- message="Call requires API level 25 (current min is 14): `toShortcutInfo`"
+ message="Call requires API level 25 (current min is 19): `toShortcutInfo`"
errorLine1=" .toShortcutInfo());"
errorLine2=" ~~~~~~~~~~~~~~">
<location
@@ -687,7 +552,7 @@
<issue
id="NewApi"
- message="Call requires API level 24 (current min is 14): `android.telephony.SubscriptionManager#getDefaultSubscriptionId`"
+ message="Call requires API level 24 (current min is 19): `android.telephony.SubscriptionManager#getDefaultSubscriptionId`"
errorLine1=" assertEquals(getDefaultSubscriptionId(), actual);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -696,7 +561,7 @@
<issue
id="NewApi"
- message="Call requires API level 24 (current min is 14): `android.telephony.SubscriptionManager#getDefaultSubscriptionId`"
+ message="Call requires API level 24 (current min is 19): `android.telephony.SubscriptionManager#getDefaultSubscriptionId`"
errorLine1=" assertEquals(expected, getDefaultSubscriptionId());"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -705,7 +570,7 @@
<issue
id="NewApi"
- message="Call requires API level 21 (current min is 14): `new android.widget.FrameLayout`"
+ message="Call requires API level 21 (current min is 19): `new android.widget.FrameLayout`"
errorLine1=" super(context, attrs, defStyleAttr, defStyleRes);"
errorLine2=" ~~~~~">
<location
@@ -714,7 +579,7 @@
<issue
id="NewApi"
- message="Class requires API level 26 (current min is 14): `OreoCallback`"
+ message="Class requires API level 26 (current min is 19): `OreoCallback`"
errorLine1=" if (callback instanceof OreoCallback && Build.VERSION.SDK_INT >= 26) {"
errorLine2=" ~~~~~~~~~~~~">
<location
@@ -723,7 +588,7 @@
<issue
id="NewApi"
- message="Call requires API level 20 (current min is 14): `android.view.View#requestApplyInsets`"
+ message="Call requires API level 20 (current min is 19): `android.view.View#requestApplyInsets`"
errorLine1=" post { requestApplyInsets() }"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
@@ -1011,51 +876,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return new CollectionInfoCompat(AccessibilityNodeInfo.CollectionInfo.obtain("
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return new CollectionInfoCompat(AccessibilityNodeInfo.CollectionInfo.obtain("
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return ((AccessibilityNodeInfo.CollectionInfo) mInfo).getColumnCount();"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return ((AccessibilityNodeInfo.CollectionInfo) mInfo).getRowCount();"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return ((AccessibilityNodeInfo.CollectionInfo) mInfo).isHierarchical();"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 21; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionInfoCompat is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" return ((AccessibilityNodeInfo.CollectionInfo) mInfo).getSelectionMode();"
errorLine2=" ~~~~~~~~~~~~~~~~">
@@ -1074,69 +894,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionItemInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return new CollectionItemInfoCompat(AccessibilityNodeInfo.CollectionItemInfo.obtain("
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionItemInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return new CollectionItemInfoCompat(AccessibilityNodeInfo.CollectionItemInfo.obtain("
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionItemInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return ((AccessibilityNodeInfo.CollectionItemInfo) mInfo).getColumnIndex();"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionItemInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return ((AccessibilityNodeInfo.CollectionItemInfo) mInfo).getColumnSpan();"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionItemInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return ((AccessibilityNodeInfo.CollectionItemInfo) mInfo).getRowIndex();"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionItemInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return ((AccessibilityNodeInfo.CollectionItemInfo) mInfo).getRowSpan();"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionItemInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return ((AccessibilityNodeInfo.CollectionItemInfo) mInfo).isHeading();"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 21; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionItemInfoCompat is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" return ((AccessibilityNodeInfo.CollectionItemInfo) mInfo).isSelected();"
errorLine2=" ~~~~~~~~~~">
@@ -1146,51 +903,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.RangeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" AccessibilityNodeInfo.RangeInfo.obtain(type, min, max, current));"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.RangeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return ((AccessibilityNodeInfo.RangeInfo) mInfo).getCurrent();"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.RangeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return ((AccessibilityNodeInfo.RangeInfo) mInfo).getMax();"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.RangeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return ((AccessibilityNodeInfo.RangeInfo) mInfo).getMin();"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.RangeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return ((AccessibilityNodeInfo.RangeInfo) mInfo).getType();"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 29; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat.TouchDelegateInfoCompat is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" mInfo = new TouchDelegateInfo(targetMap);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
@@ -1227,51 +939,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" AccessibilityNodeInfo.obtain(root, virtualDescendantId));"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setSource(root, virtualDescendantId);"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return AccessibilityNodeInfoCompat.wrapNonNullInstance(mInfo.findFocus(focus));"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return AccessibilityNodeInfoCompat.wrapNonNullInstance(mInfo.focusSearch(direction));"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.addChild(root, virtualDescendantId);"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 21; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" return mInfo.removeChild(child);"
errorLine2=" ~~~~~~~~~~~">
@@ -1308,78 +975,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return mInfo.performAction(action, arguments);"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setMovementGranularities(granularities);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return mInfo.getMovementGranularities();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setParent(root, virtualDescendantId);"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return mInfo.isVisibleToUser();"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setVisibleToUser(visibleToUser);"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return mInfo.isAccessibilityFocused();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setAccessibilityFocused(focused);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 24; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" return mInfo.isImportantForAccessibility();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -1398,42 +993,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 18; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setViewIdResourceName(viewId);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 18; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return mInfo.getViewIdResourceName();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return mInfo.getLiveRegion();"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setLiveRegion(mode);"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 24; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" return mInfo.getDrawingOrder();"
errorLine2=" ~~~~~~~~~~~~~~~">
@@ -1452,60 +1011,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" AccessibilityNodeInfo.CollectionInfo info = mInfo.getCollectionInfo();"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setCollectionInfo((collectionInfo == null) ? null"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setCollectionItemInfo((collectionItemInfo == null) ? null"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" AccessibilityNodeInfo.CollectionItemInfo info = mInfo.getCollectionItemInfo();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" AccessibilityNodeInfo.RangeInfo info = mInfo.getRangeInfo();"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setRangeInfo((AccessibilityNodeInfo.RangeInfo) rangeInfo.mInfo);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 21; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" actions = (List<Object>) (List<?>) mInfo.getActionList();"
errorLine2=" ~~~~~~~~~~~~~">
@@ -1515,24 +1020,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setContentInvalid(contentInvalid);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return mInfo.isContentInvalid();"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 23; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" return mInfo.isContextClickable();"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
@@ -1587,105 +1074,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setLabelFor(labeled);"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setLabelFor(root, virtualDescendantId);"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return AccessibilityNodeInfoCompat.wrapNonNullInstance(mInfo.getLabelFor());"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setLabeledBy(label);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setLabeledBy(root, virtualDescendantId);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return AccessibilityNodeInfoCompat.wrapNonNullInstance(mInfo.getLabeledBy());"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return mInfo.canOpenPopup();"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setCanOpenPopup(opensPopup);"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 18; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" List<AccessibilityNodeInfo> nodes = mInfo.findAccessibilityNodeInfosByViewId(viewId);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return mInfo.getInputType();"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setInputType(inputType);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 26; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" return mInfo.getAvailableExtraData();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
@@ -1722,33 +1110,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 18; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setTextSelection(start, end);"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 18; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return mInfo.getTextSelectionStart();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 18; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return mInfo.getTextSelectionEnd();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 22; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" return AccessibilityNodeInfoCompat.wrapNonNullInstance(mInfo.getTraversalBefore());"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
@@ -1812,60 +1173,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return mInfo.isDismissable();"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setDismissable(dismissable);"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 18; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return mInfo.isEditable();"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 18; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setEditable(editable);"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return mInfo.isMultiLine();"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mInfo.setMultiLine(multiLine);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 28; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" return mInfo.getTooltipText();"
errorLine2=" ~~~~~~~~~~~~~~">
@@ -1974,15 +1281,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 18; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return mInfo.refresh();"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 29; however, the containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" TouchDelegateInfo delegateInfo = mInfo.getTouchDelegateInfo();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
@@ -2001,33 +1299,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.core.accessibilityservice.AccessibilityServiceInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return info.loadDescription(packageManager);"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/accessibilityservice/AccessibilityServiceInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 18; however, the containing class androidx.core.accessibilityservice.AccessibilityServiceInfoCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return info.getCapabilities();"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/accessibilityservice/AccessibilityServiceInfoCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.app.ActivityManagerCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return activityManager.isLowRamDevice();"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/ActivityManagerCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 33; however, the containing class androidx.core.os.LocaleListCompat is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" return LocaleList.matchesLanguageAndScript(supported, desired);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -2181,24 +1452,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.core.text.PrecomputedTextCompat.Params is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" if (!mPaint.getTextLocale().equals(other.getTextPaint().getTextLocale())) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/text/PrecomputedTextCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.core.text.PrecomputedTextCompat.Params is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" if (!mPaint.getTextLocale().equals(other.getTextPaint().getTextLocale())) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/text/PrecomputedTextCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 21; however, the containing class androidx.core.text.PrecomputedTextCompat.Params is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" mPaint.getTextSkewX(), mPaint.getLetterSpacing(), mPaint.getFlags(),"
errorLine2=" ~~~~~~~~~~~~~~~~">
@@ -2235,15 +1488,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.core.text.PrecomputedTextCompat.Params is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mPaint.getTextLocale(), mPaint.getTypeface(), mPaint.isElegantTextHeight(),"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/text/PrecomputedTextCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 21; however, the containing class androidx.core.text.PrecomputedTextCompat.Params is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" mPaint.getTextLocale(), mPaint.getTypeface(), mPaint.isElegantTextHeight(),"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
@@ -2253,24 +1497,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.core.text.PrecomputedTextCompat.Params is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mPaint.getTextSkewX(), mPaint.getFlags(), mPaint.getTextLocale(),"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/text/PrecomputedTextCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.core.text.PrecomputedTextCompat.Params is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mPaint.getTextSkewX(), mPaint.getFlags(), mPaint.getTextLocale(),"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/text/PrecomputedTextCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 21; however, the containing class androidx.core.text.PrecomputedTextCompat.Params is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" sb.append(", letterSpacing=" + mPaint.getLetterSpacing());"
errorLine2=" ~~~~~~~~~~~~~~~~">
@@ -2298,15 +1524,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.core.text.PrecomputedTextCompat.Params is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" sb.append(", textLocale=" + mPaint.getTextLocale());"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/text/PrecomputedTextCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 26; however, the containing class androidx.core.text.PrecomputedTextCompat.Params is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" sb.append(", variationSettings=" + mPaint.getFontVariationSettings());"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -3324,15 +2541,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.content.pm.ShortcutManagerCompat is reachable from earlier API levels and will fail run-time class verification."
- 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="ClassVerificationFailure"
message="This call references a method added in API level 23; however, the containing class androidx.core.widget.TextViewCompat is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" textView.setTextAppearance(resId);"
errorLine2=" ~~~~~~~~~~~~~~~~~">
@@ -3350,6 +2558,4169 @@
</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 >= 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=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <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 >= 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
+ 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
+ file="src/main/java/androidx/core/graphics/drawable/DrawableCompat.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/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
+ file="src/main/java/androidx/core/view/GestureDetectorCompat.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 >= 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
+ 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 >= 17) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/os/HandlerCompat.java"/>
+ </issue>
+
+ <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=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/os/MessageCompat.java"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" if (sTryIsAsynchronous && Build.VERSION.SDK_INT >= 16) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/os/MessageCompat.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 >= 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
+ 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 && Build.VERSION.SDK_INT < 21) {"
+ 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=" if (mBuilder.mSubText != null && 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 (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
+ 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
+ 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 >= 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
+ 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=" 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
+ 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 >= 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"/>
+ </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"/>
+ </issue>
+
+ <issue
id="KotlinPropertyAccess"
message="The getter return type (`AccessibilityNodeInfoCompat`) and setter parameter type (`View`) getter and setter methods for property `parent` 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 AccessibilityNodeInfoCompat getParent() {"
@@ -4930,150 +8301,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 Path createPathFromPathData(String pathData) {"
- errorLine2=" ~~~~">
- <location
- file="src/main/java/androidx/core/graphics/PathParser.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 Path createPathFromPathData(String pathData) {"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/PathParser.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 PathDataNode[] createNodesFromPathData(String pathData) {"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/PathParser.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 PathDataNode[] createNodesFromPathData(String pathData) {"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/PathParser.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 PathDataNode[] deepCopyNodes(PathDataNode[] source) {"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/PathParser.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 PathDataNode[] deepCopyNodes(PathDataNode[] source) {"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/PathParser.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 updateNodes(PathDataNode[] target, PathDataNode[] source) {"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/PathParser.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 updateNodes(PathDataNode[] target, PathDataNode[] source) {"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/PathParser.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 boolean interpolatePathDataNodes(PathDataNode[] target, PathDataNode[] from,"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/PathParser.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 boolean interpolatePathDataNodes(PathDataNode[] target, PathDataNode[] from,"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/PathParser.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=" PathDataNode[] to, float fraction) {"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/PathParser.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 float[] mParams;"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/PathParser.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 nodesToPath(PathDataNode[] node, Path path) {"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/PathParser.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 nodesToPath(PathDataNode[] node, Path path) {"
- errorLine2=" ~~~~">
- <location
- file="src/main/java/androidx/core/graphics/PathParser.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 interpolatePathDataNode(PathDataNode nodeFrom, PathDataNode nodeTo,"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/PathParser.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 interpolatePathDataNode(PathDataNode nodeFrom, PathDataNode nodeTo,"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/PathParser.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 setBreakStrategy(int strategy) {"
errorLine2=" ~~~~~~~">
<location
diff --git a/core/core/src/main/java/androidx/core/content/IntentSanitizer.java b/core/core/src/main/java/androidx/core/content/IntentSanitizer.java
index 154a9fc..aab9a33 100644
--- a/core/core/src/main/java/androidx/core/content/IntentSanitizer.java
+++ b/core/core/src/main/java/androidx/core/content/IntentSanitizer.java
@@ -510,7 +510,9 @@
}
/**
- * Add a package to the allowed packages.
+ * Add a package to the allowed packages. This does not imply the intent can contain
+ * a component from the allowed package; instead, this value will be compared against
+ * the result returned from the Intent's {@link Intent#getPackage()} method.
* This method can be called multiple times and the result is additive. They will not
* overwrite each other.
*
@@ -524,7 +526,9 @@
}
/**
- * Add a filter for allowed packages.
+ * Add a filter for allowed packages. This does not imply the intent can contain
+ * a component from the allowed package; instead, this value will be compared against
+ * the result returned from the Intent's {@link Intent#getPackage()} method.
* This method can be called multiple times and the result is additive. They will not
* overwrite each other.
*
@@ -572,7 +576,8 @@
}
/**
- * Add a package to the allowed package list. Any component under this package is allowed.
+ * Allow any component under the specified package. Note this does not allow the
+ * package itself. If the intent contains a package, call allowPackage method.
* This method can be called multiple times and the result is additive. They will not
* overwrite each other.
*
diff --git a/core/core/src/test/java/androidx/core/content/IntentSanitizerTest.java b/core/core/src/test/java/androidx/core/content/IntentSanitizerTest.java
index 29399f5..dbbb31b 100644
--- a/core/core/src/test/java/androidx/core/content/IntentSanitizerTest.java
+++ b/core/core/src/test/java/androidx/core/content/IntentSanitizerTest.java
@@ -640,7 +640,6 @@
}
@Test
- @Config(minSdk = 16)
public void intentWithTextOnlyClipData_builderAllowsNoClipData_filterOut() {
Intent intent = basicIntent();
ClipDescription description = new ClipDescription("test",
@@ -655,7 +654,6 @@
}
@Test
- @Config(minSdk = 16)
public void intentWithTextOnlyClipData_builderAllowsClipDataText_filterIn() {
Intent intent = basicIntent();
ClipDescription description = new ClipDescription("test",
@@ -671,7 +669,6 @@
}
@Test
- @Config(minSdk = 16)
public void intentWithClipDataWithTextAndUri_builderAllowsClipDataText_filterInTextButOutUri() {
Intent intent = basicIntent();
ClipDescription description = new ClipDescription("test",
@@ -690,7 +687,6 @@
}
@Test
- @Config(minSdk = 16)
public void intentWithClipDataWithTextAndUri_builderAllowsClipDataUri_filterInUriButOutText() {
Intent intent = basicIntent();
ClipDescription description = new ClipDescription("test",
@@ -710,7 +706,6 @@
}
@Test
- @Config(minSdk = 16)
public void intentWithClipDataWithTextAndUri_builderAllowsClipDataTextAndUri_filterIn() {
Intent intent = basicIntent();
ClipDescription description = new ClipDescription("test",
@@ -730,7 +725,6 @@
}
@Test
- @Config(minSdk = 16)
public void intentWithClipDataMultiItems_builderAllowsTextAndUri_filterInItemPassUriFilter() {
Intent intent = basicIntent();
ClipDescription description = new ClipDescription("test",
@@ -751,7 +745,6 @@
}
@Test
- @Config(minSdk = 16)
public void intentWithClipDataWithPlainMimeType_builderAllowsHtmlMimeTypePredicate_filterOut() {
Intent intent = basicIntent();
ClipDescription description = new ClipDescription("test",
@@ -878,7 +871,6 @@
}
@Test
- @Config(minSdk = Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1)
public void intentWithSelector_builderAllowsNoSelector_filterOut() {
Intent intent = basicIntent();
Intent selector = new Intent(Intent.ACTION_VIEW);
@@ -891,7 +883,6 @@
}
@Test
- @Config(minSdk = Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1)
public void intentWithSelector_builderAllowsSelector_filterIn() {
Intent intent = basicIntent();
Intent selector = new Intent(Intent.ACTION_VIEW);
diff --git a/credentials/credentials/api/api_lint.ignore b/credentials/credentials/api/api_lint.ignore
index 74db66e..8d0b1d6 100644
--- a/credentials/credentials/api/api_lint.ignore
+++ b/credentials/credentials/api/api_lint.ignore
@@ -5,9 +5,3 @@
Invalid name for boolean property `preferIdentityDocUi`. Should start with one of `has`, `can`, `should`, `is`.
GetterSetterNames: field GetCredentialRequest.preferImmediatelyAvailableCredentials:
Invalid name for boolean property `preferImmediatelyAvailableCredentials`. Should start with one of `has`, `can`, `should`, `is`.
-
-
-MissingGetterMatchingBuilder: androidx.credentials.PrepareGetCredentialResponse.Builder#setFrameworkResponse(android.credentials.PrepareGetCredentialResponse):
- androidx.credentials.PrepareGetCredentialResponse does not declare a `getFrameworkResponse()` method matching method androidx.credentials.PrepareGetCredentialResponse.Builder.setFrameworkResponse(android.credentials.PrepareGetCredentialResponse)
-MissingGetterMatchingBuilder: androidx.credentials.PrepareGetCredentialResponse.Builder#setIsNullHandlesForTest(boolean):
- androidx.credentials.PrepareGetCredentialResponse does not declare a `isIsNullHandlesForTest()` method matching method androidx.credentials.PrepareGetCredentialResponse.Builder.setIsNullHandlesForTest(boolean)
diff --git a/customview/customview/api/api_lint.ignore b/customview/customview/api/api_lint.ignore
index d0f1400..00d5913 100644
--- a/customview/customview/api/api_lint.ignore
+++ b/customview/customview/api/api_lint.ignore
@@ -35,6 +35,10 @@
Missing nullability on parameter `info` in method `onInitializeAccessibilityNodeInfo`
+NotCloseable: androidx.customview.widget.Openable:
+ Classes that release resources (close()) should implement AutoCloseable and CloseGuard: class androidx.customview.widget.Openable
+
+
ParcelConstructor: androidx.customview.view.AbsSavedState#AbsSavedState(android.os.Parcel):
Parcelable inflation is exposed through CREATOR, not raw constructors, in androidx.customview.view.AbsSavedState
diff --git a/datastore/datastore-core/build.gradle b/datastore/datastore-core/build.gradle
index e36cf9f..2416171 100644
--- a/datastore/datastore-core/build.gradle
+++ b/datastore/datastore-core/build.gradle
@@ -81,11 +81,17 @@
api("androidx.annotation:annotation:1.7.0")
}
}
- jvmMain {
+
+ commonJvmMain {
dependsOn(commonMain)
}
+
androidMain {
- dependsOn(jvmMain)
+ dependsOn(commonJvmMain)
+ }
+
+ jvmMain {
+ dependsOn(commonJvmMain)
}
commonTest {
@@ -100,7 +106,8 @@
}
}
- jvmTest {
+ commonJvmTest {
+ dependsOn(commonTest)
dependencies {
implementation(libs.junit)
implementation(libs.kotlinTest)
@@ -112,15 +119,19 @@
}
}
+ jvmTest {
+ dependsOn(commonJvmTest)
+ }
+
androidUnitTest {
- dependsOn(jvmTest)
+ dependsOn(commonJvmTest)
dependencies {
implementation(libs.protobufLite)
}
}
androidInstrumentedTest {
- dependsOn(jvmTest)
+ dependsOn(commonJvmTest)
dependencies {
implementation(libs.protobufLite)
implementation(libs.truth)
@@ -134,10 +145,6 @@
}
}
- androidInstrumentedTest {
- dependsOn(androidUnitTest)
- }
-
if (enableNative) {
nativeMain {
dependsOn(commonMain)
diff --git a/datastore/datastore-core/src/jvmMain/kotlin/androidx/datastore/core/Actual.jvm.kt b/datastore/datastore-core/src/commonJvmMain/kotlin/androidx/datastore/core/Actual.jvm.kt
similarity index 100%
rename from datastore/datastore-core/src/jvmMain/kotlin/androidx/datastore/core/Actual.jvm.kt
rename to datastore/datastore-core/src/commonJvmMain/kotlin/androidx/datastore/core/Actual.jvm.kt
diff --git a/datastore/datastore-core/src/jvmMain/kotlin/androidx/datastore/core/DataStoreFactory.jvm.kt b/datastore/datastore-core/src/commonJvmMain/kotlin/androidx/datastore/core/DataStoreFactory.jvm.kt
similarity index 100%
rename from datastore/datastore-core/src/jvmMain/kotlin/androidx/datastore/core/DataStoreFactory.jvm.kt
rename to datastore/datastore-core/src/commonJvmMain/kotlin/androidx/datastore/core/DataStoreFactory.jvm.kt
diff --git a/datastore/datastore-core/src/jvmMain/kotlin/androidx/datastore/core/FileStorage.kt b/datastore/datastore-core/src/commonJvmMain/kotlin/androidx/datastore/core/FileStorage.kt
similarity index 100%
rename from datastore/datastore-core/src/jvmMain/kotlin/androidx/datastore/core/FileStorage.kt
rename to datastore/datastore-core/src/commonJvmMain/kotlin/androidx/datastore/core/FileStorage.kt
diff --git a/datastore/datastore-core/src/jvmMain/kotlin/androidx/datastore/core/InterProcessCoordinator.jvm.kt b/datastore/datastore-core/src/commonJvmMain/kotlin/androidx/datastore/core/InterProcessCoordinator.jvm.kt
similarity index 100%
rename from datastore/datastore-core/src/jvmMain/kotlin/androidx/datastore/core/InterProcessCoordinator.jvm.kt
rename to datastore/datastore-core/src/commonJvmMain/kotlin/androidx/datastore/core/InterProcessCoordinator.jvm.kt
diff --git a/datastore/datastore-core/src/jvmMain/kotlin/androidx/datastore/core/Serializer.kt b/datastore/datastore-core/src/commonJvmMain/kotlin/androidx/datastore/core/Serializer.kt
similarity index 100%
rename from datastore/datastore-core/src/jvmMain/kotlin/androidx/datastore/core/Serializer.kt
rename to datastore/datastore-core/src/commonJvmMain/kotlin/androidx/datastore/core/Serializer.kt
diff --git a/datastore/datastore-core/src/jvmMain/kotlin/androidx/datastore/core/UncloseableOutputStream.kt b/datastore/datastore-core/src/commonJvmMain/kotlin/androidx/datastore/core/UncloseableOutputStream.kt
similarity index 100%
rename from datastore/datastore-core/src/jvmMain/kotlin/androidx/datastore/core/UncloseableOutputStream.kt
rename to datastore/datastore-core/src/commonJvmMain/kotlin/androidx/datastore/core/UncloseableOutputStream.kt
diff --git a/datastore/datastore-core/src/jvmMain/kotlin/androidx/datastore/core/handlers/NoOpCorruptionHandler.jvm.kt b/datastore/datastore-core/src/commonJvmMain/kotlin/androidx/datastore/core/handlers/NoOpCorruptionHandler.jvm.kt
similarity index 100%
rename from datastore/datastore-core/src/jvmMain/kotlin/androidx/datastore/core/handlers/NoOpCorruptionHandler.jvm.kt
rename to datastore/datastore-core/src/commonJvmMain/kotlin/androidx/datastore/core/handlers/NoOpCorruptionHandler.jvm.kt
diff --git a/datastore/datastore-core/src/jvmMain/kotlin/androidx/datastore/core/handlers/ReplaceFileCorruptionHandler.jvm.kt b/datastore/datastore-core/src/commonJvmMain/kotlin/androidx/datastore/core/handlers/ReplaceFileCorruptionHandler.jvm.kt
similarity index 100%
rename from datastore/datastore-core/src/jvmMain/kotlin/androidx/datastore/core/handlers/ReplaceFileCorruptionHandler.jvm.kt
rename to datastore/datastore-core/src/commonJvmMain/kotlin/androidx/datastore/core/handlers/ReplaceFileCorruptionHandler.jvm.kt
diff --git a/datastore/datastore-core/src/jvmTest/kotlin/androidx/datastore/core/DataStoreFactoryTest.kt b/datastore/datastore-core/src/commonJvmTest/kotlin/androidx/datastore/core/DataStoreFactoryTest.kt
similarity index 100%
rename from datastore/datastore-core/src/jvmTest/kotlin/androidx/datastore/core/DataStoreFactoryTest.kt
rename to datastore/datastore-core/src/commonJvmTest/kotlin/androidx/datastore/core/DataStoreFactoryTest.kt
diff --git a/datastore/datastore-core/src/jvmTest/kotlin/androidx/datastore/core/FileStorageTest.kt b/datastore/datastore-core/src/commonJvmTest/kotlin/androidx/datastore/core/FileStorageTest.kt
similarity index 100%
rename from datastore/datastore-core/src/jvmTest/kotlin/androidx/datastore/core/FileStorageTest.kt
rename to datastore/datastore-core/src/commonJvmTest/kotlin/androidx/datastore/core/FileStorageTest.kt
diff --git a/datastore/datastore-core/src/jvmTest/kotlin/androidx/datastore/core/JvmTests.kt b/datastore/datastore-core/src/commonJvmTest/kotlin/androidx/datastore/core/JvmTests.kt
similarity index 100%
rename from datastore/datastore-core/src/jvmTest/kotlin/androidx/datastore/core/JvmTests.kt
rename to datastore/datastore-core/src/commonJvmTest/kotlin/androidx/datastore/core/JvmTests.kt
diff --git a/datastore/datastore-core/src/jvmTest/kotlin/androidx/datastore/core/SimpleActorTest.kt b/datastore/datastore-core/src/commonJvmTest/kotlin/androidx/datastore/core/SimpleActorTest.kt
similarity index 100%
rename from datastore/datastore-core/src/jvmTest/kotlin/androidx/datastore/core/SimpleActorTest.kt
rename to datastore/datastore-core/src/commonJvmTest/kotlin/androidx/datastore/core/SimpleActorTest.kt
diff --git a/datastore/datastore-core/src/jvmTest/kotlin/androidx/datastore/core/SingleProcessDataStoreStressTest.kt b/datastore/datastore-core/src/commonJvmTest/kotlin/androidx/datastore/core/SingleProcessDataStoreStressTest.kt
similarity index 100%
rename from datastore/datastore-core/src/jvmTest/kotlin/androidx/datastore/core/SingleProcessDataStoreStressTest.kt
rename to datastore/datastore-core/src/commonJvmTest/kotlin/androidx/datastore/core/SingleProcessDataStoreStressTest.kt
diff --git a/datastore/datastore-core/src/jvmTest/kotlin/androidx/datastore/core/handlers/ReplaceFileCorruptionHandlerTest.kt b/datastore/datastore-core/src/commonJvmTest/kotlin/androidx/datastore/core/handlers/ReplaceFileCorruptionHandlerTest.kt
similarity index 100%
rename from datastore/datastore-core/src/jvmTest/kotlin/androidx/datastore/core/handlers/ReplaceFileCorruptionHandlerTest.kt
rename to datastore/datastore-core/src/commonJvmTest/kotlin/androidx/datastore/core/handlers/ReplaceFileCorruptionHandlerTest.kt
diff --git a/datastore/datastore-preferences/build.gradle b/datastore/datastore-preferences/build.gradle
index e8cbf29..e0295f2c 100644
--- a/datastore/datastore-preferences/build.gradle
+++ b/datastore/datastore-preferences/build.gradle
@@ -51,24 +51,30 @@
implementation(libs.kotlinCoroutinesTest)
}
}
- jvmMain {
+ commonJvmMain {
dependsOn(commonMain)
}
- jvmTest {
+ commonJvmTest {
dependsOn(commonTest)
dependencies {
implementation(libs.junit)
implementation(libs.kotlinTest)
}
}
+ jvmMain {
+ dependsOn(commonJvmMain)
+ }
+ jvmTest {
+ dependsOn(commonJvmTest)
+ }
androidMain {
- dependsOn(jvmMain)
+ dependsOn(commonJvmMain)
}
androidUnitTest {
- dependsOn(jvmTest)
+ dependsOn(commonJvmTest)
}
androidInstrumentedTest {
- dependsOn(androidUnitTest)
+ dependsOn(commonJvmTest)
dependencies {
implementation(libs.testRunner)
implementation(libs.testCore)
diff --git a/datastore/datastore/api/api_lint.ignore b/datastore/datastore/api/api_lint.ignore
index 22f9203..18fc7f7 100644
--- a/datastore/datastore/api/api_lint.ignore
+++ b/datastore/datastore/api/api_lint.ignore
@@ -1,10 +1,4 @@
// Baseline format: 1.0
-InvalidNullabilityOverride: androidx.datastore.migrations.SharedPreferencesMigration#migrate(T, kotlin.coroutines.Continuation<? super T>):
- Invalid nullability on method `migrate` return. Overrides of unannotated super method cannot be Nullable.
-InvalidNullabilityOverride: androidx.datastore.migrations.SharedPreferencesMigration#shouldMigrate(T, kotlin.coroutines.Continuation<? super java.lang.Boolean>):
- Invalid nullability on method `shouldMigrate` return. Overrides of unannotated super method cannot be Nullable.
-
-
MissingJvmstatic: androidx.datastore.migrations.SharedPreferencesView#getString(String, String):
A Kotlin method with default parameter values should be annotated with @JvmOverloads for better Java interoperability; see https://android.github.io/kotlin-guides/interop.html#function-overloads-for-defaults
MissingJvmstatic: androidx.datastore.migrations.SharedPreferencesView#getStringSet(String, java.util.Set<java.lang.String>):
diff --git a/datastore/datastore/build.gradle b/datastore/datastore/build.gradle
index 0eaed8a..1170050 100644
--- a/datastore/datastore/build.gradle
+++ b/datastore/datastore/build.gradle
@@ -57,11 +57,10 @@
implementation(project(":internal-testutils-datastore"))
}
}
- jvmMain {
+ commonJvmMain {
dependsOn(commonMain)
-
}
- jvmTest {
+ commonJvmTest {
dependsOn(commonTest)
dependencies {
implementation(libs.kotlinTest)
@@ -69,14 +68,20 @@
implementation(project(":internal-testutils-datastore"))
}
}
+ jvmMain {
+ dependsOn(commonJvmMain)
+ }
+ jvmTest {
+ dependsOn(commonJvmTest)
+ }
androidMain {
- dependsOn(jvmMain)
+ dependsOn(commonJvmMain)
dependencies {
implementation(libs.okio)
}
}
androidInstrumentedTest {
- dependsOn(jvmTest)
+ dependsOn(commonJvmTest)
dependencies {
implementation(libs.junit)
implementation(libs.truth)
diff --git a/development/build_log_simplifier/messages.ignore b/development/build_log_simplifier/messages.ignore
index 2d303ae..7780842 100644
--- a/development/build_log_simplifier/messages.ignore
+++ b/development/build_log_simplifier/messages.ignore
@@ -484,6 +484,7 @@
WARN: .*\/unzippedMultiplatformSources\/commonMain\/androidx\/paging\/compose\/LazyPagingItems\.kt:[0-9]+ Failed to resolve See PagingSource\.invalidate in DFunction refresh\. Did you mean PagingSource#invalidate\?
WARN: .*\/unzippedMultiplatformSources\/desktopMain\/androidx\/compose\/material\/DesktopMenu\.desktop\.kt:[0-9]+ Missing @param tag for parameter `content` in DFunction DropdownMenuItem
WARN: .*\/unzippedMultiplatformSources\/jvmMain\/androidx\/datastore\/core\/Serializer\.kt:[0-9]+ Missing @param tag for parameter `output` in DFunction writeTo
+WARN: .*\/unzippedMultiplatformSources\/commonJvmMain\/androidx\/datastore\/core\/Serializer\.kt:[0-9]+ Missing @param tag for parameter `output` in DFunction writeTo
WARN: .*\/unzippedMultiplatformSources\/nonJvmMain\/androidx\/annotation\/RestrictTo\.nonJvm\.kt:UnknownLine Link does not resolve for @throws kotlin\.IllegalArgumentException in DFunction valueOf\. Is it from a package that the containing file does not import\? Are docs inherited by an un-documented override function, but the exception class is not in scope in the inheriting class\? The general fix for these is to fully qualify the exception name, e\.g\. `@throws java\.io\.IOException under some conditions`\.
WARN: File location could not be determined\. Failed to resolve See <a href="https:\/\/developer\.android\.com\/training\/transitions">Transition API Guide<\/a> in DPackage androidx\.transition
# > Task :compose:ui:ui-tooling:processDebugAndroidTestManifest
diff --git a/documentfile/documentfile/lint-baseline.xml b/documentfile/documentfile/lint-baseline.xml
new file mode 100644
index 0000000..523b7bb
--- /dev/null
+++ b/documentfile/documentfile/lint-baseline.xml
@@ -0,0 +1,31 @@
+<?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/api/api_lint.ignore b/drawerlayout/drawerlayout/api/api_lint.ignore
index 69b398e..e9d5461 100644
--- a/drawerlayout/drawerlayout/api/api_lint.ignore
+++ b/drawerlayout/drawerlayout/api/api_lint.ignore
@@ -17,8 +17,6 @@
Missing nullability on parameter `p` in method `checkLayoutParams`
MissingNullability: androidx.drawerlayout.widget.DrawerLayout#dispatchGenericMotionEvent(android.view.MotionEvent) parameter #0:
Missing nullability on parameter `event` in method `dispatchGenericMotionEvent`
-MissingNullability: androidx.drawerlayout.widget.DrawerLayout#drawChild(android.graphics.Canvas, android.view.View, long) parameter #0:
- Missing nullability on parameter `canvas` in method `drawChild`
MissingNullability: androidx.drawerlayout.widget.DrawerLayout#drawChild(android.graphics.Canvas, android.view.View, long) parameter #1:
Missing nullability on parameter `child` in method `drawChild`
MissingNullability: androidx.drawerlayout.widget.DrawerLayout#generateDefaultLayoutParams():
@@ -31,8 +29,6 @@
Missing nullability on method `generateLayoutParams` return
MissingNullability: androidx.drawerlayout.widget.DrawerLayout#generateLayoutParams(android.view.ViewGroup.LayoutParams) parameter #0:
Missing nullability on parameter `p` in method `generateLayoutParams`
-MissingNullability: androidx.drawerlayout.widget.DrawerLayout#onDraw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `c` in method `onDraw`
MissingNullability: androidx.drawerlayout.widget.DrawerLayout#onInterceptTouchEvent(android.view.MotionEvent) parameter #0:
Missing nullability on parameter `ev` in method `onInterceptTouchEvent`
MissingNullability: androidx.drawerlayout.widget.DrawerLayout#onKeyDown(int, android.view.KeyEvent) parameter #1:
@@ -49,6 +45,10 @@
Missing nullability on parameter `dest` in method `writeToParcel`
+NotCloseable: androidx.drawerlayout.widget.DrawerLayout:
+ Classes that release resources (close()) should implement AutoCloseable and CloseGuard: class androidx.drawerlayout.widget.DrawerLayout
+
+
ParcelCreator: androidx.drawerlayout.widget.DrawerLayout.SavedState:
Parcelable requires `public int describeContents()`; missing in androidx.drawerlayout.widget.DrawerLayout.SavedState
diff --git a/drawerlayout/drawerlayout/lint-baseline.xml b/drawerlayout/drawerlayout/lint-baseline.xml
new file mode 100644
index 0000000..86a0e10
--- /dev/null
+++ b/drawerlayout/drawerlayout/lint-baseline.xml
@@ -0,0 +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">
+
+ <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 63482d4..138871e 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.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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="BanThreadSleep"
@@ -47,6 +47,24 @@
</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
new file mode 100644
index 0000000..90a60bc
--- /dev/null
+++ b/emoji/emoji-bundled/lint-baseline.xml
@@ -0,0 +1,22 @@
+<?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 4555808..8980a86 100644
--- a/emoji/emoji/lint-baseline.xml
+++ b/emoji/emoji/lint-baseline.xml
@@ -1,320 +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">
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `DefaultGlyphChecker`"
- errorLine1=" GlyphChecker mGlyphChecker = new EmojiProcessor.DefaultGlyphChecker();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/text/EmojiCompat.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Class requires API level 19 (current min is 14): `EmojiMetadata`"
- errorLine1=" final EmojiMetadata metadata = mock(EmojiMetadata.class);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiEditableFactoryTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `TypefaceEmojiSpan`"
- errorLine1=" final EmojiSpan span = new TypefaceEmojiSpan(metadata);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiEditableFactoryTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Class requires API level 19 (current min is 14): `EmojiSpan`"
- errorLine1=" final EmojiSpan[] spans = editable.getSpans(0, 1, EmojiSpan.class);"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiEditableFactoryTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 15 (current min is 14): `android.view.View#hasOnClickListeners`"
- errorLine1=" assertTrue(extractButton.hasOnClickListeners());"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiExtractTextLayoutTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 15 (current min is 14): `android.view.View#hasOnClickListeners`"
- errorLine1=" assertFalse(extractButton.hasOnClickListeners());"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiExtractTextLayoutTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `EmojiInputFilter`"
- errorLine1=" mInputFilter = new EmojiInputFilter(textView);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiInputFilterTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `filter`"
- errorLine1=" assertNull(mInputFilter.filter(null, 0, 1, null, 0, 1));"
- errorLine2=" ~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiInputFilterTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `filter`"
- errorLine1=" final CharSequence result = mInputFilter.filter(testString, 0, 1, null, 0, 1);"
- errorLine2=" ~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiInputFilterTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `filter`"
- errorLine1=" final CharSequence result = mInputFilter.filter(testString, 0, 1, null, 0, 1);"
- errorLine2=" ~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiInputFilterTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `filter`"
- errorLine1=" final CharSequence result = mInputFilter.filter(testString, 0, 1, null, 0, 1);"
- errorLine2=" ~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiInputFilterTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `filter`"
- errorLine1=" final CharSequence result = mInputFilter.filter(testString, 0, 1, null, 0, 1);"
- errorLine2=" ~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiInputFilterTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `filter`"
- errorLine1=" final CharSequence result = mInputFilter.filter(testString, 0, 1, null, 0, 1);"
- errorLine2=" ~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiInputFilterTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Class requires API level 19 (current min is 14): `EmojiSpan`"
- errorLine1=" mSpans = ((Spanned) charSequence).getSpans(0, charSequence.length(), EmojiSpan.class);"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/util/EmojiMatcher.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Class requires API level 19 (current min is 14): `EmojiSpan`"
- errorLine1=" mSpans = ((Spanned) charSequence).getSpans(0, charSequence.length(), EmojiSpan.class);"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/util/EmojiMatcher.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Class requires API level 19 (current min is 14): `EmojiSpan`"
- errorLine1=" final EmojiSpan[] spans = spanned.getSpans(0, charSequence.length(), EmojiSpan.class);"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/util/EmojiMatcher.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `getId`"
- errorLine1=" if (mResId == spans[index].getId()) {"
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/util/EmojiMatcher.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `getId`"
- errorLine1=" if (mResId == -1 || mResId == spans[index].getId()) {"
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/util/EmojiMatcher.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `EmojiTransformationMethod`"
- errorLine1=" mTransformationMethod = new EmojiTransformationMethod(mWrappedTransformationMethod);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiTransformationMethodTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `getTransformation`"
- errorLine1=" assertNull(mTransformationMethod.getTransformation(null, mView));"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiTransformationMethodTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `getTransformation`"
- errorLine1=" mTransformationMethod.getTransformation("", null);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiTransformationMethodTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `EmojiTransformationMethod`"
- errorLine1=" mTransformationMethod = new EmojiTransformationMethod(null);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiTransformationMethodTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `getTransformation`"
- errorLine1=" final CharSequence result = mTransformationMethod.getTransformation(mTestString, mView);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiTransformationMethodTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `getTransformation`"
- errorLine1=" final CharSequence result = mTransformationMethod.getTransformation(mTestString, mView);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiTransformationMethodTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `getTransformation`"
- errorLine1=" final CharSequence result = mTransformationMethod.getTransformation(mTestString, mView);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiTransformationMethodTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `getTransformation`"
- errorLine1=" final CharSequence result = mTransformationMethod.getTransformation(mTestString, mView);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiTransformationMethodTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `getTransformation`"
- errorLine1=" final CharSequence result = mTransformationMethod.getTransformation(mTestString, mView);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/EmojiTransformationMethodTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Class requires API level 19 (current min is 14): `EmojiSpan`"
- errorLine1=" return span instanceof EmojiSpan;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/widget/SpannableBuilder.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Class requires API level 19 (current min is 14): `EmojiSpan`"
- errorLine1=" final EmojiSpan span = mock(EmojiSpan.class);"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/SpannableBuilderTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Class requires API level 19 (current min is 14): `EmojiSpan`"
- errorLine1=" EmojiSpan[] spans = spannable.getSpans(0, spannable.length(), EmojiSpan.class);"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/SpannableBuilderTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Class requires API level 19 (current min is 14): `EmojiSpan`"
- errorLine1=" final EmojiSpan span = mock(EmojiSpan.class);"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/SpannableBuilderTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Class requires API level 19 (current min is 14): `EmojiSpan`"
- errorLine1=" EmojiSpan[] spans = spannable.getSpans(0, spannable.length(), EmojiSpan.class);"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/widget/SpannableBuilderTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `MetadataRepo`"
- errorLine1=" loaderCallback.onLoaded(new MetadataRepo());"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/text/TestConfigBuilder.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `create`"
- errorLine1=" sMetadataRepo = MetadataRepo.create(assetManager, FONT_FILE);"
- errorLine2=" ~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/text/TestConfigBuilder.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `create`"
- errorLine1=" mMetadataRepo = MetadataRepo.create(assetManager, FONT_FILE);"
- errorLine2=" ~~~~~~">
- <location
- file="src/androidTest/java/androidx/emoji/text/TestConfigBuilder.java"/>
- </issue>
+<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="ClassVerificationFailure"
@@ -371,6 +56,213 @@
</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
index 594dde4..575575b 100644
--- a/emoji2/emoji2-bundled/lint-baseline.xml
+++ b/emoji2/emoji2-bundled/lint-baseline.xml
@@ -1,13 +1,22 @@
<?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-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 19 (current min is 14): `create`"
- errorLine1=" sMetadataRepo = MetadataRepo.create(assetManager, FONT_FILE);"
- errorLine2=" ~~~~~~">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" @RequiresApi(19)"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
<location
- file="src/androidTest/java/androidx/emoji2/bundled/TestConfigBuilder.java"/>
+ 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
new file mode 100644
index 0000000..d43ba3e
--- /dev/null
+++ b/emoji2/emoji2-views-helper/lint-baseline.xml
@@ -0,0 +1,112 @@
+<?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
index 8f8dcf7..105508c 100644
--- a/emoji2/emoji2/lint-baseline.xml
+++ b/emoji2/emoji2/lint-baseline.xml
@@ -1,13 +1,220 @@
<?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-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 19 (current min is 14): `EmojiSpan`"
- errorLine1=" return span instanceof EmojiSpan;"
- errorLine2=" ~~~~~~~~~">
+ 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/SpannableBuilder.java"/>
+ 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-ktx/api/api_lint.ignore b/fragment/fragment-ktx/api/api_lint.ignore
deleted file mode 100644
index e42cfe7..0000000
--- a/fragment/fragment-ktx/api/api_lint.ignore
+++ /dev/null
@@ -1,11 +0,0 @@
-// Baseline format: 1.0
-MissingNullability: androidx.fragment.app.FragmentTransactionKt#add(androidx.fragment.app.FragmentTransaction, String, android.os.Bundle):
- Missing nullability on method `add` return
-MissingNullability: androidx.fragment.app.FragmentTransactionKt#add(androidx.fragment.app.FragmentTransaction, int, String, android.os.Bundle):
- Missing nullability on method `add` return
-MissingNullability: androidx.fragment.app.FragmentTransactionKt#replace(androidx.fragment.app.FragmentTransaction, int, String, android.os.Bundle):
- Missing nullability on method `replace` return
-MissingNullability: androidx.fragment.app.FragmentViewModelLazyKt#activityViewModels(androidx.fragment.app.Fragment, kotlin.jvm.functions.Function0<? extends androidx.lifecycle.viewmodel.CreationExtras>, kotlin.jvm.functions.Function0<? extends androidx.lifecycle.ViewModelProvider.Factory>):
- Missing nullability on method `activityViewModels` return
-MissingNullability: androidx.fragment.app.FragmentViewModelLazyKt#viewModels(androidx.fragment.app.Fragment, kotlin.jvm.functions.Function0<? extends androidx.lifecycle.ViewModelStoreOwner>, kotlin.jvm.functions.Function0<? extends androidx.lifecycle.viewmodel.CreationExtras>, kotlin.jvm.functions.Function0<? extends androidx.lifecycle.ViewModelProvider.Factory>):
- Missing nullability on method `viewModels` return
diff --git a/fragment/fragment-testing/api/api_lint.ignore b/fragment/fragment-testing/api/api_lint.ignore
deleted file mode 100644
index f0f2d71..0000000
--- a/fragment/fragment-testing/api/api_lint.ignore
+++ /dev/null
@@ -1,9 +0,0 @@
-// Baseline format: 1.0
-MissingNullability: androidx.fragment.app.testing.FragmentScenarioKt#launchFragment(android.os.Bundle, int, androidx.lifecycle.Lifecycle.State, androidx.fragment.app.FragmentFactory):
- Missing nullability on method `launchFragment` return
-MissingNullability: androidx.fragment.app.testing.FragmentScenarioKt#launchFragment(android.os.Bundle, int, androidx.lifecycle.Lifecycle.State, kotlin.jvm.functions.Function0<? extends F>):
- Missing nullability on method `launchFragment` return
-MissingNullability: androidx.fragment.app.testing.FragmentScenarioKt#launchFragmentInContainer(android.os.Bundle, int, androidx.lifecycle.Lifecycle.State, androidx.fragment.app.FragmentFactory):
- Missing nullability on method `launchFragmentInContainer` return
-MissingNullability: androidx.fragment.app.testing.FragmentScenarioKt#launchFragmentInContainer(android.os.Bundle, int, androidx.lifecycle.Lifecycle.State, kotlin.jvm.functions.Function0<? extends F>):
- Missing nullability on method `launchFragmentInContainer` return
diff --git a/fragment/fragment/api/api_lint.ignore b/fragment/fragment/api/api_lint.ignore
index c35b358..3a537bf 100644
--- a/fragment/fragment/api/api_lint.ignore
+++ b/fragment/fragment/api/api_lint.ignore
@@ -35,10 +35,6 @@
Invalid nullability on parameter `child` in method `addView`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
InvalidNullabilityOverride: androidx.fragment.app.FragmentContainerView#dispatchApplyWindowInsets(android.view.WindowInsets) parameter #0:
Invalid nullability on parameter `insets` in method `dispatchApplyWindowInsets`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.fragment.app.FragmentContainerView#dispatchDraw(android.graphics.Canvas) parameter #0:
- Invalid nullability on parameter `canvas` in method `dispatchDraw`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.fragment.app.FragmentContainerView#drawChild(android.graphics.Canvas, android.view.View, long) parameter #0:
- Invalid nullability on parameter `canvas` in method `drawChild`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
InvalidNullabilityOverride: androidx.fragment.app.FragmentContainerView#drawChild(android.graphics.Canvas, android.view.View, long) parameter #1:
Invalid nullability on parameter `child` in method `drawChild`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
InvalidNullabilityOverride: androidx.fragment.app.FragmentContainerView#endViewTransition(android.view.View) parameter #0:
@@ -55,20 +51,8 @@
Invalid nullability on parameter `view` in method `startViewTransition`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-MissingNullability: androidx.fragment.app.Fragment#startActivity(android.content.Intent) parameter #0:
- Missing nullability on parameter `intent` in method `startActivity`
-MissingNullability: androidx.fragment.app.Fragment#startActivity(android.content.Intent, android.os.Bundle) parameter #0:
- Missing nullability on parameter `intent` in method `startActivity`
-MissingNullability: androidx.fragment.app.FragmentActivity#startActivityFromFragment(androidx.fragment.app.Fragment, android.content.Intent, int) parameter #1:
- Missing nullability on parameter `intent` in method `startActivityFromFragment`
-MissingNullability: androidx.fragment.app.FragmentActivity#startActivityFromFragment(androidx.fragment.app.Fragment, android.content.Intent, int, android.os.Bundle) parameter #1:
- Missing nullability on parameter `intent` in method `startActivityFromFragment`
MissingNullability: androidx.fragment.app.FragmentController#getActiveFragments(java.util.List<androidx.fragment.app.Fragment>) parameter #0:
Missing nullability on parameter `actives` in method `getActiveFragments`
-MissingNullability: androidx.fragment.app.FragmentHostCallback#onStartActivityFromFragment(androidx.fragment.app.Fragment, android.content.Intent, int) parameter #1:
- Missing nullability on parameter `intent` in method `onStartActivityFromFragment`
-MissingNullability: androidx.fragment.app.FragmentHostCallback#onStartActivityFromFragment(androidx.fragment.app.Fragment, android.content.Intent, int, android.os.Bundle) parameter #1:
- Missing nullability on parameter `intent` in method `onStartActivityFromFragment`
NullableCollection: androidx.fragment.app.Fragment#getArguments():
diff --git a/fragment/fragment/lint-baseline.xml b/fragment/fragment/lint-baseline.xml
new file mode 100644
index 0000000..047bc0e
--- /dev/null
+++ b/fragment/fragment/lint-baseline.xml
@@ -0,0 +1,31 @@
+<?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/glance/glance/api/api_lint.ignore b/glance/glance/api/api_lint.ignore
deleted file mode 100644
index 777b6e0..0000000
--- a/glance/glance/api/api_lint.ignore
+++ /dev/null
@@ -1,5 +0,0 @@
-// Baseline format: 1.0
-KotlinDefaultParameterOrder: androidx.glance.template.GalleryTemplateData#GalleryTemplateData(androidx.glance.template.HeaderBlock, androidx.glance.template.TextBlock, androidx.glance.template.ImageBlock, androidx.glance.template.ActionBlock, androidx.glance.template.ImageBlock) parameter #0:
- Parameter `header` has a default value and should come after all parameters without default values (except for a trailing lambda parameter)
-KotlinDefaultParameterOrder: androidx.glance.template.GalleryTemplateData#GalleryTemplateData(androidx.glance.template.HeaderBlock, androidx.glance.template.TextBlock, androidx.glance.template.ImageBlock, androidx.glance.template.ActionBlock, androidx.glance.template.ImageBlock) parameter #3:
- Parameter `mainActionBlock` has a default value and should come after all parameters without default values (except for a trailing lambda parameter)
diff --git a/graphics/graphics-core/api/api_lint.ignore b/graphics/graphics-core/api/api_lint.ignore
new file mode 100644
index 0000000..679511d
--- /dev/null
+++ b/graphics/graphics-core/api/api_lint.ignore
@@ -0,0 +1,13 @@
+// Baseline format: 1.0
+NotCloseable: androidx.graphics.lowlatency.CanvasFrontBufferedRenderer:
+ Classes that release resources (release(), release()) should implement AutoCloseable and CloseGuard: class androidx.graphics.lowlatency.CanvasFrontBufferedRenderer
+NotCloseable: androidx.graphics.lowlatency.GLFrontBufferedRenderer:
+ Classes that release resources (release(), release()) should implement AutoCloseable and CloseGuard: class androidx.graphics.lowlatency.GLFrontBufferedRenderer
+NotCloseable: androidx.graphics.opengl.GLFrameBufferRenderer:
+ Classes that release resources (release(), release()) should implement AutoCloseable and CloseGuard: class androidx.graphics.opengl.GLFrameBufferRenderer
+NotCloseable: androidx.graphics.opengl.GLRenderer:
+ Classes that release resources (stop(), stop()) should implement AutoCloseable and CloseGuard: class androidx.graphics.opengl.GLRenderer
+NotCloseable: androidx.graphics.opengl.egl.EGLManager:
+ Classes that release resources (release()) should implement AutoCloseable and CloseGuard: class androidx.graphics.opengl.egl.EGLManager
+NotCloseable: androidx.graphics.surface.SurfaceControlCompat:
+ Classes that release resources (release()) should implement AutoCloseable and CloseGuard: class androidx.graphics.surface.SurfaceControlCompat
diff --git a/graphics/graphics-core/build.gradle b/graphics/graphics-core/build.gradle
index aab94bb..f5a4f87 100644
--- a/graphics/graphics-core/build.gradle
+++ b/graphics/graphics-core/build.gradle
@@ -42,7 +42,6 @@
namespace 'androidx.graphics.core'
defaultConfig {
- minSdkVersion 17
externalNativeBuild {
def versionScript = file("src/main/cpp/jni.lds").getAbsolutePath()
diff --git a/graphics/graphics-core/lint-baseline.xml b/graphics/graphics-core/lint-baseline.xml
index 8fbd449..fc2cfd6 100644
--- a/graphics/graphics-core/lint-baseline.xml
+++ b/graphics/graphics-core/lint-baseline.xml
@@ -1,9 +1,9 @@
<?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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
+ message="Field requires API level 29 (current min is 19): `Companion`"
errorLine1=" Surface.ROTATION_0 -> SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_90"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
@@ -12,7 +12,7 @@
<issue
id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
+ message="Field requires API level 29 (current min is 19): `Companion`"
errorLine1=" Surface.ROTATION_90 -> SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_180"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
@@ -21,7 +21,7 @@
<issue
id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
+ message="Field requires API level 29 (current min is 19): `Companion`"
errorLine1=" Surface.ROTATION_180 -> SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_270"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
@@ -30,7 +30,7 @@
<issue
id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
+ message="Field requires API level 29 (current min is 19): `Companion`"
errorLine1=" Surface.ROTATION_270 -> SurfaceControlCompat.BUFFER_TRANSFORM_IDENTITY"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
@@ -39,7 +39,7 @@
<issue
id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
+ message="Field requires API level 29 (current min is 19): `Companion`"
errorLine1=" Surface.ROTATION_0 -> SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_180"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
@@ -48,7 +48,7 @@
<issue
id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
+ message="Field requires API level 29 (current min is 19): `Companion`"
errorLine1=" Surface.ROTATION_90 -> SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_270"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
@@ -57,7 +57,7 @@
<issue
id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
+ message="Field requires API level 29 (current min is 19): `Companion`"
errorLine1=" Surface.ROTATION_180 -> SurfaceControlCompat.BUFFER_TRANSFORM_IDENTITY"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
@@ -66,7 +66,7 @@
<issue
id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
+ message="Field requires API level 29 (current min is 19): `Companion`"
errorLine1=" Surface.ROTATION_270 -> SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_90"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
@@ -75,7 +75,7 @@
<issue
id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
+ message="Field requires API level 29 (current min is 19): `Companion`"
errorLine1=" Surface.ROTATION_0 -> SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_270"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
@@ -84,7 +84,7 @@
<issue
id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
+ message="Field requires API level 29 (current min is 19): `Companion`"
errorLine1=" Surface.ROTATION_90 -> SurfaceControlCompat.BUFFER_TRANSFORM_IDENTITY"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
@@ -93,7 +93,7 @@
<issue
id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
+ message="Field requires API level 29 (current min is 19): `Companion`"
errorLine1=" Surface.ROTATION_180 -> SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_90"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
@@ -102,7 +102,7 @@
<issue
id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
+ message="Field requires API level 29 (current min is 19): `Companion`"
errorLine1=" Surface.ROTATION_270 -> SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_180"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
@@ -111,7 +111,7 @@
<issue
id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
+ message="Field requires API level 29 (current min is 19): `Companion`"
errorLine1=" Surface.ROTATION_0 -> SurfaceControlCompat.BUFFER_TRANSFORM_IDENTITY"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
@@ -120,7 +120,7 @@
<issue
id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
+ message="Field requires API level 29 (current min is 19): `Companion`"
errorLine1=" Surface.ROTATION_90 -> SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_90"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
@@ -129,7 +129,7 @@
<issue
id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
+ message="Field requires API level 29 (current min is 19): `Companion`"
errorLine1=" Surface.ROTATION_180 -> SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_180"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
@@ -138,7 +138,7 @@
<issue
id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
+ message="Field requires API level 29 (current min is 19): `Companion`"
errorLine1=" Surface.ROTATION_270 -> SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_270"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
@@ -146,111 +146,75 @@
</issue>
<issue
- id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
- errorLine1=" SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_90 ->"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" @RequiresApi(Build.VERSION_CODES.KITKAT)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/java/androidx/graphics/lowlatency/BufferTransformer.kt"/>
+ file="src/main/java/androidx/opengl/EGLExt.kt"/>
</issue>
<issue
- id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
- errorLine1=" SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_270"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" @RequiresApi(Build.VERSION_CODES.KITKAT)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/java/androidx/graphics/lowlatency/BufferTransformer.kt"/>
+ file="src/main/java/androidx/opengl/EGLExt.kt"/>
</issue>
<issue
- id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
- errorLine1=" SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_180 ->"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" @RequiresApi(Build.VERSION_CODES.KITKAT)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/java/androidx/graphics/lowlatency/BufferTransformer.kt"/>
+ file="src/main/java/androidx/graphics/opengl/FrameBufferRenderer.kt"/>
</issue>
<issue
- id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
- errorLine1=" SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_180"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" @RequiresApi(Build.VERSION_CODES.KITKAT)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/java/androidx/graphics/lowlatency/BufferTransformer.kt"/>
+ file="src/main/java/androidx/graphics/opengl/FrameBufferRenderer.kt"/>
</issue>
<issue
- id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
- errorLine1=" SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_270 ->"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" @RequiresApi(Build.VERSION_CODES.KITKAT)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/java/androidx/graphics/lowlatency/BufferTransformer.kt"/>
+ file="src/main/java/androidx/graphics/lowlatency/FrontBufferSyncStrategy.kt"/>
</issue>
<issue
- id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
- errorLine1=" SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_90"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" @RequiresApi(Build.VERSION_CODES.KITKAT)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/java/androidx/graphics/lowlatency/BufferTransformer.kt"/>
+ file="src/main/java/androidx/graphics/surface/SurfaceControlImpl.kt"/>
</issue>
<issue
- id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
- errorLine1=" SurfaceControlCompat.BUFFER_TRANSFORM_IDENTITY ->"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1="@RequiresApi(Build.VERSION_CODES.KITKAT)"
+ errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/java/androidx/graphics/lowlatency/BufferTransformer.kt"/>
+ file="src/main/java/androidx/hardware/SyncFenceCompat.kt"/>
</issue>
<issue
- id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
- errorLine1=" SurfaceControlCompat.BUFFER_TRANSFORM_IDENTITY"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1="@RequiresApi(Build.VERSION_CODES.KITKAT)"
+ errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/java/androidx/graphics/lowlatency/BufferTransformer.kt"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
- errorLine1=" SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_90 -> {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/graphics/lowlatency/BufferTransformer.kt"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
- errorLine1=" SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_180 -> {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/graphics/lowlatency/BufferTransformer.kt"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
- errorLine1=" SurfaceControlCompat.BUFFER_TRANSFORM_ROTATE_270 -> {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/graphics/lowlatency/BufferTransformer.kt"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Field requires API level 29 (current min is 17): `Companion`"
- errorLine1=" SurfaceControlCompat.BUFFER_TRANSFORM_IDENTITY -> {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/graphics/lowlatency/BufferTransformer.kt"/>
+ file="src/main/java/androidx/hardware/SyncFenceV19.kt"/>
</issue>
</issues>
diff --git a/graphics/graphics-core/samples/build.gradle b/graphics/graphics-core/samples/build.gradle
index 0f841c0..cdf56a1 100644
--- a/graphics/graphics-core/samples/build.gradle
+++ b/graphics/graphics-core/samples/build.gradle
@@ -32,9 +32,6 @@
android {
namespace "androidx.graphics.core.samples"
- defaultConfig {
- minSdkVersion 17
- }
}
androidx {
diff --git a/graphics/integration-tests/testapp-compose/lint-baseline.xml b/graphics/integration-tests/testapp-compose/lint-baseline.xml
index e5a3396..b3f25c9 100644
--- a/graphics/integration-tests/testapp-compose/lint-baseline.xml
+++ b/graphics/integration-tests/testapp-compose/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="PrimitiveInCollection"
- message="variable sizedShapes with type Map<Size, Sequence<? extends Cubic>>: replace with LongObjectMap"
- errorLine1=" val sizedShapes = remember(polygon) { mutableMapOf<Size, Sequence<Cubic>>() }"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/graphics/shapes/testcompose/MainActivity.kt"/>
- </issue>
+<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="PrimitiveInLambda"
diff --git a/health/health-services-client/src/main/java/androidx/health/services/client/impl/ServiceBackedPassiveMonitoringClient.kt b/health/health-services-client/src/main/java/androidx/health/services/client/impl/ServiceBackedPassiveMonitoringClient.kt
index bbcd58e..c70f09f 100644
--- a/health/health-services-client/src/main/java/androidx/health/services/client/impl/ServiceBackedPassiveMonitoringClient.kt
+++ b/health/health-services-client/src/main/java/androidx/health/services/client/impl/ServiceBackedPassiveMonitoringClient.kt
@@ -79,7 +79,8 @@
)
} else {
resultFuture.setException(HealthServicesException(
- "DataType for the requested passive goal is not tracked"
+ "Service registration failed: DataType for the requested " +
+ "passive goal must be tracked"
))
}
},
@@ -116,7 +117,8 @@
} else {
result.setException(
HealthServicesException(
- "DataType for the requested passive goal is not tracked"
+ "Callback registration failed: DataType for the requested " +
+ "passive goal must be tracked"
)
)
}
diff --git a/health/health-services-client/src/main/java/androidx/health/services/client/impl/ipc/internal/ServiceConnection.java b/health/health-services-client/src/main/java/androidx/health/services/client/impl/ipc/internal/ServiceConnection.java
index e69936c..de270b0 100644
--- a/health/health-services-client/src/main/java/androidx/health/services/client/impl/ipc/internal/ServiceConnection.java
+++ b/health/health-services-client/src/main/java/androidx/health/services/client/impl/ipc/internal/ServiceConnection.java
@@ -163,7 +163,7 @@
if (mServiceConnectionRetry < MAX_RETRIES) {
Log.w(
TAG,
- "WCS SDK Client '"
+ "HealthServices SDK Client '"
+ mConnectionConfiguration.getClientName()
+ "' disconnected, retrying connection. Retry attempt: "
+ mServiceConnectionRetry,
diff --git a/health/health-services-client/src/test/java/androidx/health/services/client/impl/ServiceBackedPassiveMonitoringClientTest.kt b/health/health-services-client/src/test/java/androidx/health/services/client/impl/ServiceBackedPassiveMonitoringClientTest.kt
index 45260e8..cd408a3 100644
--- a/health/health-services-client/src/test/java/androidx/health/services/client/impl/ServiceBackedPassiveMonitoringClientTest.kt
+++ b/health/health-services-client/src/test/java/androidx/health/services/client/impl/ServiceBackedPassiveMonitoringClientTest.kt
@@ -140,7 +140,8 @@
assertThat(exception).isNotNull()
assertThat(exception?.cause).isInstanceOf(HealthServicesException::class.java)
assertThat(exception).hasMessageThat()
- .contains("DataType for the requested passive goal is not tracked")
+ .contains("Service registration failed: DataType for the requested " +
+ "passive goal must be tracked")
}
@Test
@@ -182,7 +183,8 @@
assertThat(fakeService.registerCallbackRequests).hasSize(0)
assertThat(callback.onRegistrationFailedThrowables).hasSize(1)
assertThat(callback.onRegistrationFailedThrowables[0]).hasMessageThat()
- .contains("DataType for the requested passive goal is not tracked")
+ .contains("Callback registration failed: DataType for the requested " +
+ "passive goal must be tracked")
}
@Test
diff --git a/leanback/leanback-grid/build.gradle b/leanback/leanback-grid/build.gradle
index 061ccf3..1836aa1 100644
--- a/leanback/leanback-grid/build.gradle
+++ b/leanback/leanback-grid/build.gradle
@@ -45,9 +45,6 @@
}
android {
- defaultConfig {
- minSdkVersion 17
- }
namespace "androidx.leanback.widget"
}
diff --git a/leanback/leanback/api/api_lint.ignore b/leanback/leanback/api/api_lint.ignore
index a568a48..19ff8fa 100644
--- a/leanback/leanback/api/api_lint.ignore
+++ b/leanback/leanback/api/api_lint.ignore
@@ -197,42 +197,8 @@
Missing nullability on parameter `savedInstanceState` in method `onCreate`
MissingNullability: androidx.leanback.app.BaseSupportFragment#runEntranceTransition(Object) parameter #0:
Missing nullability on parameter `entranceTransition` in method `runEntranceTransition`
-MissingNullability: androidx.leanback.app.BrandedFragment#getBadgeDrawable():
- Missing nullability on method `getBadgeDrawable` return
-MissingNullability: androidx.leanback.app.BrandedFragment#getSearchAffordanceColors():
- Missing nullability on method `getSearchAffordanceColors` return
-MissingNullability: androidx.leanback.app.BrandedFragment#getTitle():
- Missing nullability on method `getTitle` return
-MissingNullability: androidx.leanback.app.BrandedFragment#getTitleView():
- Missing nullability on method `getTitleView` return
-MissingNullability: androidx.leanback.app.BrandedFragment#getTitleViewAdapter():
- Missing nullability on method `getTitleViewAdapter` return
-MissingNullability: androidx.leanback.app.BrandedFragment#installTitleView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #0:
- Missing nullability on parameter `inflater` in method `installTitleView`
-MissingNullability: androidx.leanback.app.BrandedFragment#installTitleView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #1:
- Missing nullability on parameter `parent` in method `installTitleView`
-MissingNullability: androidx.leanback.app.BrandedFragment#installTitleView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #2:
- Missing nullability on parameter `savedInstanceState` in method `installTitleView`
-MissingNullability: androidx.leanback.app.BrandedFragment#onInflateTitleView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):
- Missing nullability on method `onInflateTitleView` return
-MissingNullability: androidx.leanback.app.BrandedFragment#onInflateTitleView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #0:
- Missing nullability on parameter `inflater` in method `onInflateTitleView`
-MissingNullability: androidx.leanback.app.BrandedFragment#onInflateTitleView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #1:
- Missing nullability on parameter `parent` in method `onInflateTitleView`
-MissingNullability: androidx.leanback.app.BrandedFragment#onInflateTitleView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #2:
- Missing nullability on parameter `savedInstanceState` in method `onInflateTitleView`
MissingNullability: androidx.leanback.app.BrandedFragment#onSaveInstanceState(android.os.Bundle) parameter #0:
Missing nullability on parameter `outState` in method `onSaveInstanceState`
-MissingNullability: androidx.leanback.app.BrandedFragment#setBadgeDrawable(android.graphics.drawable.Drawable) parameter #0:
- Missing nullability on parameter `drawable` in method `setBadgeDrawable`
-MissingNullability: androidx.leanback.app.BrandedFragment#setOnSearchClickedListener(android.view.View.OnClickListener) parameter #0:
- Missing nullability on parameter `listener` in method `setOnSearchClickedListener`
-MissingNullability: androidx.leanback.app.BrandedFragment#setSearchAffordanceColors(androidx.leanback.widget.SearchOrbView.Colors) parameter #0:
- Missing nullability on parameter `colors` in method `setSearchAffordanceColors`
-MissingNullability: androidx.leanback.app.BrandedFragment#setTitle(CharSequence) parameter #0:
- Missing nullability on parameter `title` in method `setTitle`
-MissingNullability: androidx.leanback.app.BrandedFragment#setTitleView(android.view.View) parameter #0:
- Missing nullability on parameter `titleView` in method `setTitleView`
MissingNullability: androidx.leanback.app.BrowseFragment#createArgs(android.os.Bundle, String, int):
Missing nullability on method `createArgs` return
MissingNullability: androidx.leanback.app.BrowseFragment#createArgs(android.os.Bundle, String, int) parameter #0:
@@ -261,12 +227,8 @@
Missing nullability on parameter `savedInstanceState` in method `onCreate`
MissingNullability: androidx.leanback.app.BrowseFragment#onCreateHeadersFragment():
Missing nullability on method `onCreateHeadersFragment` return
-MissingNullability: androidx.leanback.app.BrowseFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):
- Missing nullability on method `onCreateView` return
MissingNullability: androidx.leanback.app.BrowseFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #0:
Missing nullability on parameter `inflater` in method `onCreateView`
-MissingNullability: androidx.leanback.app.BrowseFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #1:
- Missing nullability on parameter `container` in method `onCreateView`
MissingNullability: androidx.leanback.app.BrowseFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #2:
Missing nullability on parameter `savedInstanceState` in method `onCreateView`
MissingNullability: androidx.leanback.app.BrowseFragment#onSaveInstanceState(android.os.Bundle) parameter #0:
@@ -347,14 +309,6 @@
Missing nullability on parameter `savedInstanceState` in method `onCreate`
MissingNullability: androidx.leanback.app.BrowseSupportFragment#onCreateHeadersSupportFragment():
Missing nullability on method `onCreateHeadersSupportFragment` return
-MissingNullability: androidx.leanback.app.BrowseSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):
- Missing nullability on method `onCreateView` return
-MissingNullability: androidx.leanback.app.BrowseSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #0:
- Missing nullability on parameter `inflater` in method `onCreateView`
-MissingNullability: androidx.leanback.app.BrowseSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #1:
- Missing nullability on parameter `container` in method `onCreateView`
-MissingNullability: androidx.leanback.app.BrowseSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #2:
- Missing nullability on parameter `savedInstanceState` in method `onCreateView`
MissingNullability: androidx.leanback.app.BrowseSupportFragment#runEntranceTransition(Object) parameter #0:
Missing nullability on parameter `entranceTransition` in method `runEntranceTransition`
MissingNullability: androidx.leanback.app.BrowseSupportFragment#setAdapter(androidx.leanback.widget.ObjectAdapter) parameter #0:
@@ -415,22 +369,10 @@
Missing nullability on method `getRowsFragment` return
MissingNullability: androidx.leanback.app.DetailsFragment#onCreate(android.os.Bundle) parameter #0:
Missing nullability on parameter `savedInstanceState` in method `onCreate`
-MissingNullability: androidx.leanback.app.DetailsFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):
- Missing nullability on method `onCreateView` return
MissingNullability: androidx.leanback.app.DetailsFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #0:
Missing nullability on parameter `inflater` in method `onCreateView`
-MissingNullability: androidx.leanback.app.DetailsFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #1:
- Missing nullability on parameter `container` in method `onCreateView`
MissingNullability: androidx.leanback.app.DetailsFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #2:
Missing nullability on parameter `savedInstanceState` in method `onCreateView`
-MissingNullability: androidx.leanback.app.DetailsFragment#onInflateTitleView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):
- Missing nullability on method `onInflateTitleView` return
-MissingNullability: androidx.leanback.app.DetailsFragment#onInflateTitleView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #0:
- Missing nullability on parameter `inflater` in method `onInflateTitleView`
-MissingNullability: androidx.leanback.app.DetailsFragment#onInflateTitleView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #1:
- Missing nullability on parameter `parent` in method `onInflateTitleView`
-MissingNullability: androidx.leanback.app.DetailsFragment#onInflateTitleView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #2:
- Missing nullability on parameter `savedInstanceState` in method `onInflateTitleView`
MissingNullability: androidx.leanback.app.DetailsFragment#onSetDetailsOverviewRowStatus(androidx.leanback.widget.FullWidthDetailsOverviewRowPresenter, androidx.leanback.widget.FullWidthDetailsOverviewRowPresenter.ViewHolder, int, int, int) parameter #0:
Missing nullability on parameter `presenter` in method `onSetDetailsOverviewRowStatus`
MissingNullability: androidx.leanback.app.DetailsFragment#onSetDetailsOverviewRowStatus(androidx.leanback.widget.FullWidthDetailsOverviewRowPresenter, androidx.leanback.widget.FullWidthDetailsOverviewRowPresenter.ViewHolder, int, int, int) parameter #1:
@@ -481,14 +423,6 @@
Missing nullability on method `getRowsSupportFragment` return
MissingNullability: androidx.leanback.app.DetailsSupportFragment#onCreate(android.os.Bundle) parameter #0:
Missing nullability on parameter `savedInstanceState` in method `onCreate`
-MissingNullability: androidx.leanback.app.DetailsSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):
- Missing nullability on method `onCreateView` return
-MissingNullability: androidx.leanback.app.DetailsSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #0:
- Missing nullability on parameter `inflater` in method `onCreateView`
-MissingNullability: androidx.leanback.app.DetailsSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #1:
- Missing nullability on parameter `container` in method `onCreateView`
-MissingNullability: androidx.leanback.app.DetailsSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #2:
- Missing nullability on parameter `savedInstanceState` in method `onCreateView`
MissingNullability: androidx.leanback.app.DetailsSupportFragment#onSetDetailsOverviewRowStatus(androidx.leanback.widget.FullWidthDetailsOverviewRowPresenter, androidx.leanback.widget.FullWidthDetailsOverviewRowPresenter.ViewHolder, int, int, int) parameter #0:
Missing nullability on parameter `presenter` in method `onSetDetailsOverviewRowStatus`
MissingNullability: androidx.leanback.app.DetailsSupportFragment#onSetDetailsOverviewRowStatus(androidx.leanback.widget.FullWidthDetailsOverviewRowPresenter, androidx.leanback.widget.FullWidthDetailsOverviewRowPresenter.ViewHolder, int, int, int) parameter #1:
@@ -527,126 +461,16 @@
Missing nullability on method `onCreateVideoSupportFragment` return
MissingNullability: androidx.leanback.app.DetailsSupportFragmentBackgroundController#setCoverBitmap(android.graphics.Bitmap) parameter #0:
Missing nullability on parameter `bitmap` in method `setCoverBitmap`
-MissingNullability: androidx.leanback.app.ErrorFragment#getBackgroundDrawable():
- Missing nullability on method `getBackgroundDrawable` return
-MissingNullability: androidx.leanback.app.ErrorFragment#getButtonClickListener():
- Missing nullability on method `getButtonClickListener` return
-MissingNullability: androidx.leanback.app.ErrorFragment#getButtonText():
- Missing nullability on method `getButtonText` return
-MissingNullability: androidx.leanback.app.ErrorFragment#getImageDrawable():
- Missing nullability on method `getImageDrawable` return
-MissingNullability: androidx.leanback.app.ErrorFragment#getMessage():
- Missing nullability on method `getMessage` return
-MissingNullability: androidx.leanback.app.ErrorFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):
- Missing nullability on method `onCreateView` return
MissingNullability: androidx.leanback.app.ErrorFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #0:
Missing nullability on parameter `inflater` in method `onCreateView`
-MissingNullability: androidx.leanback.app.ErrorFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #1:
- Missing nullability on parameter `container` in method `onCreateView`
MissingNullability: androidx.leanback.app.ErrorFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #2:
Missing nullability on parameter `savedInstanceState` in method `onCreateView`
-MissingNullability: androidx.leanback.app.ErrorFragment#setBackgroundDrawable(android.graphics.drawable.Drawable) parameter #0:
- Missing nullability on parameter `drawable` in method `setBackgroundDrawable`
-MissingNullability: androidx.leanback.app.ErrorFragment#setButtonClickListener(android.view.View.OnClickListener) parameter #0:
- Missing nullability on parameter `clickListener` in method `setButtonClickListener`
-MissingNullability: androidx.leanback.app.ErrorFragment#setButtonText(String) parameter #0:
- Missing nullability on parameter `text` in method `setButtonText`
-MissingNullability: androidx.leanback.app.ErrorFragment#setImageDrawable(android.graphics.drawable.Drawable) parameter #0:
- Missing nullability on parameter `drawable` in method `setImageDrawable`
-MissingNullability: androidx.leanback.app.ErrorFragment#setMessage(CharSequence) parameter #0:
- Missing nullability on parameter `message` in method `setMessage`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#add(android.app.FragmentManager, androidx.leanback.app.GuidedStepFragment) parameter #0:
- Missing nullability on parameter `fragmentManager` in method `add`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#add(android.app.FragmentManager, androidx.leanback.app.GuidedStepFragment) parameter #1:
- Missing nullability on parameter `fragment` in method `add`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#add(android.app.FragmentManager, androidx.leanback.app.GuidedStepFragment, int) parameter #0:
- Missing nullability on parameter `fragmentManager` in method `add`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#add(android.app.FragmentManager, androidx.leanback.app.GuidedStepFragment, int) parameter #1:
- Missing nullability on parameter `fragment` in method `add`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#addAsRoot(android.app.Activity, androidx.leanback.app.GuidedStepFragment, int) parameter #0:
- Missing nullability on parameter `activity` in method `addAsRoot`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#addAsRoot(android.app.Activity, androidx.leanback.app.GuidedStepFragment, int) parameter #1:
- Missing nullability on parameter `fragment` in method `addAsRoot`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#expandAction(androidx.leanback.widget.GuidedAction, boolean) parameter #0:
- Missing nullability on parameter `action` in method `expandAction`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#expandSubActions(androidx.leanback.widget.GuidedAction) parameter #0:
- Missing nullability on parameter `action` in method `expandSubActions`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#findActionById(long):
- Missing nullability on method `findActionById` return
-MissingNullability: androidx.leanback.app.GuidedStepFragment#findButtonActionById(long):
- Missing nullability on method `findButtonActionById` return
-MissingNullability: androidx.leanback.app.GuidedStepFragment#getActionItemView(int):
- Missing nullability on method `getActionItemView` return
-MissingNullability: androidx.leanback.app.GuidedStepFragment#getActions():
- Missing nullability on method `getActions` return
-MissingNullability: androidx.leanback.app.GuidedStepFragment#getButtonActionItemView(int):
- Missing nullability on method `getButtonActionItemView` return
-MissingNullability: androidx.leanback.app.GuidedStepFragment#getButtonActions():
- Missing nullability on method `getButtonActions` return
-MissingNullability: androidx.leanback.app.GuidedStepFragment#getCurrentGuidedStepFragment(android.app.FragmentManager):
- Missing nullability on method `getCurrentGuidedStepFragment` return
-MissingNullability: androidx.leanback.app.GuidedStepFragment#getCurrentGuidedStepFragment(android.app.FragmentManager) parameter #0:
- Missing nullability on parameter `fm` in method `getCurrentGuidedStepFragment`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#getGuidanceStylist():
- Missing nullability on method `getGuidanceStylist` return
-MissingNullability: androidx.leanback.app.GuidedStepFragment#getGuidedActionsStylist():
- Missing nullability on method `getGuidedActionsStylist` return
-MissingNullability: androidx.leanback.app.GuidedStepFragment#getGuidedButtonActionsStylist():
- Missing nullability on method `getGuidedButtonActionsStylist` return
-MissingNullability: androidx.leanback.app.GuidedStepFragment#onAddSharedElementTransition(android.app.FragmentTransaction, androidx.leanback.app.GuidedStepFragment) parameter #0:
- Missing nullability on parameter `ft` in method `onAddSharedElementTransition`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#onAddSharedElementTransition(android.app.FragmentTransaction, androidx.leanback.app.GuidedStepFragment) parameter #1:
- Missing nullability on parameter `disappearing` in method `onAddSharedElementTransition`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#onCreate(android.os.Bundle) parameter #0:
- Missing nullability on parameter `savedInstanceState` in method `onCreate`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#onCreateActions(java.util.List<androidx.leanback.widget.GuidedAction>, android.os.Bundle) parameter #1:
- Missing nullability on parameter `savedInstanceState` in method `onCreateActions`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#onCreateActionsStylist():
- Missing nullability on method `onCreateActionsStylist` return
-MissingNullability: androidx.leanback.app.GuidedStepFragment#onCreateBackgroundView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):
- Missing nullability on method `onCreateBackgroundView` return
-MissingNullability: androidx.leanback.app.GuidedStepFragment#onCreateBackgroundView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #0:
- Missing nullability on parameter `inflater` in method `onCreateBackgroundView`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#onCreateBackgroundView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #1:
- Missing nullability on parameter `container` in method `onCreateBackgroundView`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#onCreateBackgroundView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #2:
- Missing nullability on parameter `savedInstanceState` in method `onCreateBackgroundView`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#onCreateButtonActions(java.util.List<androidx.leanback.widget.GuidedAction>, android.os.Bundle) parameter #1:
- Missing nullability on parameter `savedInstanceState` in method `onCreateButtonActions`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#onCreateButtonActionsStylist():
- Missing nullability on method `onCreateButtonActionsStylist` return
-MissingNullability: androidx.leanback.app.GuidedStepFragment#onCreateGuidance(android.os.Bundle) parameter #0:
- Missing nullability on parameter `savedInstanceState` in method `onCreateGuidance`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#onCreateGuidanceStylist():
- Missing nullability on method `onCreateGuidanceStylist` return
-MissingNullability: androidx.leanback.app.GuidedStepFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):
- Missing nullability on method `onCreateView` return
MissingNullability: androidx.leanback.app.GuidedStepFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #0:
Missing nullability on parameter `inflater` in method `onCreateView`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #1:
- Missing nullability on parameter `container` in method `onCreateView`
MissingNullability: androidx.leanback.app.GuidedStepFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #2:
Missing nullability on parameter `savedInstanceState` in method `onCreateView`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#onGuidedActionClicked(androidx.leanback.widget.GuidedAction) parameter #0:
- Missing nullability on parameter `action` in method `onGuidedActionClicked`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#onGuidedActionEditCanceled(androidx.leanback.widget.GuidedAction) parameter #0:
- Missing nullability on parameter `action` in method `onGuidedActionEditCanceled`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#onGuidedActionEditedAndProceed(androidx.leanback.widget.GuidedAction) parameter #0:
- Missing nullability on parameter `action` in method `onGuidedActionEditedAndProceed`
MissingNullability: androidx.leanback.app.GuidedStepFragment#onSaveInstanceState(android.os.Bundle) parameter #0:
Missing nullability on parameter `outState` in method `onSaveInstanceState`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#onSubGuidedActionClicked(androidx.leanback.widget.GuidedAction) parameter #0:
- Missing nullability on parameter `action` in method `onSubGuidedActionClicked`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#openInEditMode(androidx.leanback.widget.GuidedAction) parameter #0:
- Missing nullability on parameter `action` in method `openInEditMode`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#popBackStackToGuidedStepFragment(Class<?>, int) parameter #0:
- Missing nullability on parameter `guidedStepFragmentClass` in method `popBackStackToGuidedStepFragment`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#setActions(java.util.List<androidx.leanback.widget.GuidedAction>) parameter #0:
- Missing nullability on parameter `actions` in method `setActions`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#setActionsDiffCallback(androidx.leanback.widget.DiffCallback<androidx.leanback.widget.GuidedAction>) parameter #0:
- Missing nullability on parameter `diffCallback` in method `setActionsDiffCallback`
-MissingNullability: androidx.leanback.app.GuidedStepFragment#setButtonActions(java.util.List<androidx.leanback.widget.GuidedAction>) parameter #0:
- Missing nullability on parameter `actions` in method `setButtonActions`
MissingNullability: androidx.leanback.app.HeadersFragment#setOnHeaderClickedListener(androidx.leanback.app.HeadersFragment.OnHeaderClickedListener) parameter #0:
Missing nullability on parameter `listener` in method `setOnHeaderClickedListener`
MissingNullability: androidx.leanback.app.HeadersFragment#setOnHeaderViewSelectedListener(androidx.leanback.app.HeadersFragment.OnHeaderViewSelectedListener) parameter #0:
@@ -671,50 +495,20 @@
Missing nullability on parameter `viewHolder` in method `onHeaderSelected`
MissingNullability: androidx.leanback.app.HeadersSupportFragment.OnHeaderViewSelectedListener#onHeaderSelected(androidx.leanback.widget.RowHeaderPresenter.ViewHolder, androidx.leanback.widget.Row) parameter #1:
Missing nullability on parameter `row` in method `onHeaderSelected`
-MissingNullability: androidx.leanback.app.OnboardingFragment#getPageDescription(int):
- Missing nullability on method `getPageDescription` return
-MissingNullability: androidx.leanback.app.OnboardingFragment#getPageTitle(int):
- Missing nullability on method `getPageTitle` return
-MissingNullability: androidx.leanback.app.OnboardingFragment#getStartButtonText():
- Missing nullability on method `getStartButtonText` return
-MissingNullability: androidx.leanback.app.OnboardingFragment#onCreateBackgroundView(android.view.LayoutInflater, android.view.ViewGroup) parameter #0:
- Missing nullability on parameter `inflater` in method `onCreateBackgroundView`
-MissingNullability: androidx.leanback.app.OnboardingFragment#onCreateBackgroundView(android.view.LayoutInflater, android.view.ViewGroup) parameter #1:
- Missing nullability on parameter `container` in method `onCreateBackgroundView`
-MissingNullability: androidx.leanback.app.OnboardingFragment#onCreateContentView(android.view.LayoutInflater, android.view.ViewGroup) parameter #0:
- Missing nullability on parameter `inflater` in method `onCreateContentView`
-MissingNullability: androidx.leanback.app.OnboardingFragment#onCreateContentView(android.view.LayoutInflater, android.view.ViewGroup) parameter #1:
- Missing nullability on parameter `container` in method `onCreateContentView`
-MissingNullability: androidx.leanback.app.OnboardingFragment#onCreateDescriptionAnimator():
- Missing nullability on method `onCreateDescriptionAnimator` return
-MissingNullability: androidx.leanback.app.OnboardingFragment#onCreateForegroundView(android.view.LayoutInflater, android.view.ViewGroup) parameter #0:
- Missing nullability on parameter `inflater` in method `onCreateForegroundView`
-MissingNullability: androidx.leanback.app.OnboardingFragment#onCreateForegroundView(android.view.LayoutInflater, android.view.ViewGroup) parameter #1:
- Missing nullability on parameter `container` in method `onCreateForegroundView`
-MissingNullability: androidx.leanback.app.OnboardingFragment#onCreateTitleAnimator():
- Missing nullability on method `onCreateTitleAnimator` return
MissingNullability: androidx.leanback.app.OnboardingFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #0:
Missing nullability on parameter `inflater` in method `onCreateView`
-MissingNullability: androidx.leanback.app.OnboardingFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #1:
- Missing nullability on parameter `container` in method `onCreateView`
MissingNullability: androidx.leanback.app.OnboardingFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #2:
Missing nullability on parameter `savedInstanceState` in method `onCreateView`
MissingNullability: androidx.leanback.app.OnboardingFragment#onSaveInstanceState(android.os.Bundle) parameter #0:
Missing nullability on parameter `outState` in method `onSaveInstanceState`
-MissingNullability: androidx.leanback.app.OnboardingFragment#setStartButtonText(CharSequence) parameter #0:
- Missing nullability on parameter `text` in method `setStartButtonText`
MissingNullability: androidx.leanback.app.PlaybackFragment#getAdapter():
Missing nullability on method `getAdapter` return
MissingNullability: androidx.leanback.app.PlaybackFragment#getProgressBarManager():
Missing nullability on method `getProgressBarManager` return
MissingNullability: androidx.leanback.app.PlaybackFragment#onCreate(android.os.Bundle) parameter #0:
Missing nullability on parameter `savedInstanceState` in method `onCreate`
-MissingNullability: androidx.leanback.app.PlaybackFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):
- Missing nullability on method `onCreateView` return
MissingNullability: androidx.leanback.app.PlaybackFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #0:
Missing nullability on parameter `inflater` in method `onCreateView`
-MissingNullability: androidx.leanback.app.PlaybackFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #1:
- Missing nullability on parameter `container` in method `onCreateView`
MissingNullability: androidx.leanback.app.PlaybackFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #2:
Missing nullability on parameter `savedInstanceState` in method `onCreateView`
MissingNullability: androidx.leanback.app.PlaybackFragment#onError(int, CharSequence) parameter #1:
@@ -759,14 +553,6 @@
Missing nullability on method `getProgressBarManager` return
MissingNullability: androidx.leanback.app.PlaybackSupportFragment#onCreate(android.os.Bundle) parameter #0:
Missing nullability on parameter `savedInstanceState` in method `onCreate`
-MissingNullability: androidx.leanback.app.PlaybackSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):
- Missing nullability on method `onCreateView` return
-MissingNullability: androidx.leanback.app.PlaybackSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #0:
- Missing nullability on parameter `inflater` in method `onCreateView`
-MissingNullability: androidx.leanback.app.PlaybackSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #1:
- Missing nullability on parameter `container` in method `onCreateView`
-MissingNullability: androidx.leanback.app.PlaybackSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #2:
- Missing nullability on parameter `savedInstanceState` in method `onCreateView`
MissingNullability: androidx.leanback.app.PlaybackSupportFragment#onError(int, CharSequence) parameter #1:
Missing nullability on parameter `errorMessage` in method `onError`
MissingNullability: androidx.leanback.app.PlaybackSupportFragment#setAdapter(androidx.leanback.widget.ObjectAdapter) parameter #0:
@@ -911,12 +697,8 @@
Missing nullability on parameter `query` in method `newInstance`
MissingNullability: androidx.leanback.app.SearchFragment#onCreate(android.os.Bundle) parameter #0:
Missing nullability on parameter `savedInstanceState` in method `onCreate`
-MissingNullability: androidx.leanback.app.SearchFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):
- Missing nullability on method `onCreateView` return
MissingNullability: androidx.leanback.app.SearchFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #0:
Missing nullability on parameter `inflater` in method `onCreateView`
-MissingNullability: androidx.leanback.app.SearchFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #1:
- Missing nullability on parameter `container` in method `onCreateView`
MissingNullability: androidx.leanback.app.SearchFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #2:
Missing nullability on parameter `savedInstanceState` in method `onCreateView`
MissingNullability: androidx.leanback.app.SearchFragment#onRequestPermissionsResult(int, String[], int[]) parameter #1:
@@ -979,14 +761,6 @@
Missing nullability on parameter `query` in method `newInstance`
MissingNullability: androidx.leanback.app.SearchSupportFragment#onCreate(android.os.Bundle) parameter #0:
Missing nullability on parameter `savedInstanceState` in method `onCreate`
-MissingNullability: androidx.leanback.app.SearchSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):
- Missing nullability on method `onCreateView` return
-MissingNullability: androidx.leanback.app.SearchSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #0:
- Missing nullability on parameter `inflater` in method `onCreateView`
-MissingNullability: androidx.leanback.app.SearchSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #1:
- Missing nullability on parameter `container` in method `onCreateView`
-MissingNullability: androidx.leanback.app.SearchSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #2:
- Missing nullability on parameter `savedInstanceState` in method `onCreateView`
MissingNullability: androidx.leanback.app.SearchSupportFragment#onRequestPermissionsResult(int, String[], int[]) parameter #1:
Missing nullability on parameter `permissions` in method `onRequestPermissionsResult`
MissingNullability: androidx.leanback.app.SearchSupportFragment#onRequestPermissionsResult(int, String[], int[]) parameter #2:
@@ -1015,40 +789,14 @@
Missing nullability on parameter `newQuery` in method `onQueryTextChange`
MissingNullability: androidx.leanback.app.SearchSupportFragment.SearchResultProvider#onQueryTextSubmit(String) parameter #0:
Missing nullability on parameter `query` in method `onQueryTextSubmit`
-MissingNullability: androidx.leanback.app.VerticalGridFragment#createEntranceTransition():
- Missing nullability on method `createEntranceTransition` return
-MissingNullability: androidx.leanback.app.VerticalGridFragment#getAdapter():
- Missing nullability on method `getAdapter` return
-MissingNullability: androidx.leanback.app.VerticalGridFragment#getGridPresenter():
- Missing nullability on method `getGridPresenter` return
-MissingNullability: androidx.leanback.app.VerticalGridFragment#getOnItemViewClickedListener():
- Missing nullability on method `getOnItemViewClickedListener` return
-MissingNullability: androidx.leanback.app.VerticalGridFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):
- Missing nullability on method `onCreateView` return
MissingNullability: androidx.leanback.app.VerticalGridFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #0:
Missing nullability on parameter `inflater` in method `onCreateView`
-MissingNullability: androidx.leanback.app.VerticalGridFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #1:
- Missing nullability on parameter `container` in method `onCreateView`
MissingNullability: androidx.leanback.app.VerticalGridFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #2:
Missing nullability on parameter `savedInstanceState` in method `onCreateView`
-MissingNullability: androidx.leanback.app.VerticalGridFragment#runEntranceTransition(Object) parameter #0:
- Missing nullability on parameter `entranceTransition` in method `runEntranceTransition`
-MissingNullability: androidx.leanback.app.VerticalGridFragment#setAdapter(androidx.leanback.widget.ObjectAdapter) parameter #0:
- Missing nullability on parameter `adapter` in method `setAdapter`
-MissingNullability: androidx.leanback.app.VerticalGridFragment#setGridPresenter(androidx.leanback.widget.VerticalGridPresenter) parameter #0:
- Missing nullability on parameter `gridPresenter` in method `setGridPresenter`
-MissingNullability: androidx.leanback.app.VerticalGridFragment#setOnItemViewClickedListener(androidx.leanback.widget.OnItemViewClickedListener) parameter #0:
- Missing nullability on parameter `listener` in method `setOnItemViewClickedListener`
-MissingNullability: androidx.leanback.app.VerticalGridFragment#setOnItemViewSelectedListener(androidx.leanback.widget.OnItemViewSelectedListener) parameter #0:
- Missing nullability on parameter `listener` in method `setOnItemViewSelectedListener`
MissingNullability: androidx.leanback.app.VideoFragment#getSurfaceView():
Missing nullability on method `getSurfaceView` return
-MissingNullability: androidx.leanback.app.VideoFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):
- Missing nullability on method `onCreateView` return
MissingNullability: androidx.leanback.app.VideoFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #0:
Missing nullability on parameter `inflater` in method `onCreateView`
-MissingNullability: androidx.leanback.app.VideoFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #1:
- Missing nullability on parameter `container` in method `onCreateView`
MissingNullability: androidx.leanback.app.VideoFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #2:
Missing nullability on parameter `savedInstanceState` in method `onCreateView`
MissingNullability: androidx.leanback.app.VideoFragment#setSurfaceHolderCallback(android.view.SurfaceHolder.Callback) parameter #0:
@@ -1059,14 +807,6 @@
Missing nullability on parameter `callback` in method `setSurfaceHolderCallback`
MissingNullability: androidx.leanback.app.VideoSupportFragment#getSurfaceView():
Missing nullability on method `getSurfaceView` return
-MissingNullability: androidx.leanback.app.VideoSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):
- Missing nullability on method `onCreateView` return
-MissingNullability: androidx.leanback.app.VideoSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #0:
- Missing nullability on parameter `inflater` in method `onCreateView`
-MissingNullability: androidx.leanback.app.VideoSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #1:
- Missing nullability on parameter `container` in method `onCreateView`
-MissingNullability: androidx.leanback.app.VideoSupportFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #2:
- Missing nullability on parameter `savedInstanceState` in method `onCreateView`
MissingNullability: androidx.leanback.app.VideoSupportFragment#setSurfaceHolderCallback(android.view.SurfaceHolder.Callback) parameter #0:
Missing nullability on parameter `callback` in method `setSurfaceHolderCallback`
MissingNullability: androidx.leanback.app.VideoSupportFragmentGlueHost#VideoSupportFragmentGlueHost(androidx.leanback.app.VideoSupportFragment) parameter #0:
@@ -1133,8 +873,6 @@
Missing nullability on field `TOP_FRACTION` in class `class androidx.leanback.graphics.CompositeDrawable.ChildDrawable`
MissingNullability: androidx.leanback.graphics.FitWidthBitmapDrawable#PROPERTY_VERTICAL_OFFSET:
Missing nullability on field `PROPERTY_VERTICAL_OFFSET` in class `class androidx.leanback.graphics.FitWidthBitmapDrawable`
-MissingNullability: androidx.leanback.graphics.FitWidthBitmapDrawable#draw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `draw`
MissingNullability: androidx.leanback.graphics.FitWidthBitmapDrawable#getBitmap():
Missing nullability on method `getBitmap` return
MissingNullability: androidx.leanback.graphics.FitWidthBitmapDrawable#getConstantState():
@@ -2189,8 +1927,6 @@
Missing nullability on parameter `context` in method `ShadowOverlayContainer`
MissingNullability: androidx.leanback.widget.ShadowOverlayContainer#ShadowOverlayContainer(android.content.Context, android.util.AttributeSet, int) parameter #1:
Missing nullability on parameter `attrs` in method `ShadowOverlayContainer`
-MissingNullability: androidx.leanback.widget.ShadowOverlayContainer#draw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `draw`
MissingNullability: androidx.leanback.widget.ShadowOverlayContainer#getWrappedView():
Missing nullability on method `getWrappedView` return
MissingNullability: androidx.leanback.widget.ShadowOverlayContainer#prepareParentForShadow(android.view.ViewGroup) parameter #0:
@@ -2361,6 +2097,14 @@
Bare field iconColor must be marked final, or moved behind accessors if mutable
+NotCloseable: androidx.leanback.app.BackgroundManager:
+ Classes that release resources (release()) should implement AutoCloseable and CloseGuard: class androidx.leanback.app.BackgroundManager
+NotCloseable: androidx.leanback.media.MediaPlayerAdapter:
+ Classes that release resources (release()) should implement AutoCloseable and CloseGuard: class androidx.leanback.media.MediaPlayerAdapter
+NotCloseable: androidx.leanback.widget.CursorObjectAdapter:
+ Classes that release resources (close()) should implement AutoCloseable and CloseGuard: class androidx.leanback.widget.CursorObjectAdapter
+
+
RegistrationName: androidx.leanback.media.PlaybackGlue#addPlayerCallback(androidx.leanback.media.PlaybackGlue.PlayerCallback):
Callback methods should be named register/unregister; was addPlayerCallback
RegistrationName: androidx.leanback.media.PlaybackGlue#removePlayerCallback(androidx.leanback.media.PlaybackGlue.PlayerCallback):
diff --git a/leanback/leanback/build.gradle b/leanback/leanback/build.gradle
index 018ffd4..222547c 100644
--- a/leanback/leanback/build.gradle
+++ b/leanback/leanback/build.gradle
@@ -39,10 +39,6 @@
}
android {
- defaultConfig {
- minSdkVersion 17
- }
-
sourceSets {
main.java.srcDirs += [
"common",
diff --git a/leanback/leanback/lint-baseline.xml b/leanback/leanback/lint-baseline.xml
index d5e9e66..233e326 100644
--- a/leanback/leanback/lint-baseline.xml
+++ b/leanback/leanback/lint-baseline.xml
@@ -1,23 +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">
-
- <issue
- id="NewApi"
- message="Call requires API level 18 (current min is 17): `android.view.ViewGroup#setLayoutMode`"
- errorLine1=" mGridView.setLayoutMode(ViewGroup.LAYOUT_MODE_OPTICAL_BOUNDS);"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/leanback/widget/GridActivity.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 18 (current min is 17): `android.view.ViewGroup#setLayoutMode`"
- errorLine1=" viewGroup.setLayoutMode(ViewGroup.LAYOUT_MODE_OPTICAL_BOUNDS);"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/leanback/widget/GridActivity.java"/>
- </issue>
+<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"
@@ -1344,24 +1326,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.leanback.widget.BackgroundHelper is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" drawable.setAlpha(view.getBackground().getAlpha());"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/widget/BackgroundHelper.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 18; however, the containing class androidx.leanback.widget.picker.DatePicker is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" yearPattern = android.text.format.DateFormat.getBestDateTimePattern(mConstant.locale,"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/widget/picker/DatePicker.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 23; however, the containing class androidx.leanback.widget.ForegroundHelper is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" return view.getForeground();"
errorLine2=" ~~~~~~~~~~~~~">
@@ -1461,42 +1425,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.leanback.transition.LeanbackTransitionHelper is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" slide.setInterpolator(AnimationUtils.loadInterpolator(context,"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/LeanbackTransitionHelper.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.leanback.transition.LeanbackTransitionHelper is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" slide.addTarget(R.id.browse_title_group);"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/LeanbackTransitionHelper.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.leanback.transition.LeanbackTransitionHelper is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" slide.setInterpolator(AnimationUtils.loadInterpolator(context,"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/LeanbackTransitionHelper.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.leanback.transition.LeanbackTransitionHelper is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" slide.addTarget(R.id.browse_title_group);"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/transition/LeanbackTransitionHelper.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 23; however, the containing class androidx.leanback.app.PermissionHelper is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" fragment.requestPermissions(permissions, requestCode);"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
@@ -1514,42 +1442,6 @@
</issue>
<issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.leanback.system.Settings is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mOutlineClippingDisabled = activityManager.isLowRamDevice();"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/system/Settings.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 18; however, the containing class androidx.leanback.widget.StaticShadowHelper is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" parent.setLayoutMode(ViewGroup.LAYOUT_MODE_OPTICAL_BOUNDS);"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/widget/StaticShadowHelper.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 18; however, the containing class androidx.leanback.widget.StaticShadowHelper is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" shadowContainer.setLayoutMode(ViewGroup.LAYOUT_MODE_OPTICAL_BOUNDS);"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/widget/StaticShadowHelper.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 18; however, the containing class androidx.leanback.widget.picker.TimePicker is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" hourPattern = DateFormat.getBestDateTimePattern(mConstant.locale, mIs24hFormat ? "Hma""
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/leanback/widget/picker/TimePicker.java"/>
- </issue>
-
- <issue
id="PrivateConstructorForUtilityClass"
message="Utility class is missing private constructor"
errorLine1="public class FocusHighlightHelper {"
@@ -1559,6 +1451,333 @@
</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/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"/>
+ </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"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="This folder configuration (`v19`) is unnecessary; `minSdkVersion` is 19. Merge all the resources in this folder into `values`.">
+ <location
+ file="src/main/res/values-v19"/>
+ </issue>
+
+ <issue
id="KotlinPropertyAccess"
message="This method should be called `getHasMediaRowSeparator` such that `hasMediaRowSeparator` can be accessed as a property from Kotlin; see https://android.github.io/kotlin-guides/interop.html#property-prefixes"
errorLine1=" public boolean hasMediaRowSeparator() {"
diff --git a/libraryversions.toml b/libraryversions.toml
index 1f82d4b..89d7b6a 100644
--- a/libraryversions.toml
+++ b/libraryversions.toml
@@ -12,7 +12,7 @@
BENCHMARK = "1.3.0-alpha01"
BIOMETRIC = "1.2.0-alpha06"
BLUETOOTH = "1.0.0-alpha01"
-BROWSER = "1.7.0-beta01"
+BROWSER = "1.7.0-rc01"
BUILDSRC_TESTS = "1.0.0-alpha01"
CAMERA = "1.4.0-alpha02"
CAMERA_PIPE = "1.0.0-alpha01"
@@ -21,7 +21,7 @@
COLLECTION = "1.4.0-alpha02"
COMPOSE = "1.6.0-alpha08"
COMPOSE_COMPILER = "1.5.3"
-COMPOSE_MATERIAL3 = "1.2.0-alpha10"
+COMPOSE_MATERIAL3 = "1.2.0-alpha11"
COMPOSE_MATERIAL3_ADAPTIVE = "1.0.0-alpha01"
COMPOSE_RUNTIME_TRACING = "1.0.0-alpha05"
CONSTRAINTLAYOUT = "2.2.0-alpha13"
diff --git a/lifecycle/lifecycle-common/api/api_lint.ignore b/lifecycle/lifecycle-common/api/api_lint.ignore
index e00af892..b22f657 100644
--- a/lifecycle/lifecycle-common/api/api_lint.ignore
+++ b/lifecycle/lifecycle-common/api/api_lint.ignore
@@ -5,17 +5,3 @@
Class should be named LifecycleEventCallback
CallbackName: androidx.lifecycle.LifecycleObserver:
Class should be named LifecycleCallback
-
-
-InvalidNullabilityOverride: androidx.lifecycle.DefaultLifecycleObserver#onCreate(androidx.lifecycle.LifecycleOwner) parameter #0:
- Invalid nullability on parameter `owner` in method `onCreate`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.lifecycle.DefaultLifecycleObserver#onDestroy(androidx.lifecycle.LifecycleOwner) parameter #0:
- Invalid nullability on parameter `owner` in method `onDestroy`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.lifecycle.DefaultLifecycleObserver#onPause(androidx.lifecycle.LifecycleOwner) parameter #0:
- Invalid nullability on parameter `owner` in method `onPause`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.lifecycle.DefaultLifecycleObserver#onResume(androidx.lifecycle.LifecycleOwner) parameter #0:
- Invalid nullability on parameter `owner` in method `onResume`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.lifecycle.DefaultLifecycleObserver#onStart(androidx.lifecycle.LifecycleOwner) parameter #0:
- Invalid nullability on parameter `owner` in method `onStart`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.lifecycle.DefaultLifecycleObserver#onStop(androidx.lifecycle.LifecycleOwner) parameter #0:
- Invalid nullability on parameter `owner` in method `onStop`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
diff --git a/lifecycle/lifecycle-livedata-ktx/api/api_lint.ignore b/lifecycle/lifecycle-livedata-ktx/api/api_lint.ignore
deleted file mode 100644
index eeddf93..0000000
--- a/lifecycle/lifecycle-livedata-ktx/api/api_lint.ignore
+++ /dev/null
@@ -1,5 +0,0 @@
-// Baseline format: 1.0
-KotlinDefaultParameterOrder: androidx.lifecycle.CoroutineLiveDataKt#liveData(kotlin.coroutines.CoroutineContext, java.time.Duration, kotlin.jvm.functions.Function2<? super androidx.lifecycle.LiveDataScope<T>,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>) parameter #0:
- Parameter `context` has a default value and should come after all parameters without default values (except for a trailing lambda parameter)
-KotlinDefaultParameterOrder: androidx.lifecycle.FlowLiveDataConversions#asLiveData(kotlinx.coroutines.flow.Flow<? extends T>, kotlin.coroutines.CoroutineContext, java.time.Duration) parameter #1:
- Parameter `context` has a default value and should come after all parameters without default values (except for a trailing lambda parameter)
diff --git a/lint-checks/integration-tests/lint-baseline.xml b/lint-checks/integration-tests/lint-baseline.xml
index c8f66aa..0377685 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.1.0-alpha11" type="baseline" client="gradle" dependencies="false" name="AGP (8.1.0-alpha11)" variant="all" version="8.1.0-alpha11">
+<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="MissingClass"
@@ -12,7 +12,7 @@
<issue
id="NewApi"
- message="Call requires API level 23 (current min is 14): `android.view.View#getAccessibilityClassName`"
+ message="Call requires API level 23 (current min is 19): `android.view.View#getAccessibilityClassName`"
errorLine1=" return view.getAccessibilityClassName();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -20,51 +20,6 @@
</issue>
<issue
- id="NewApi"
- message="Call requires API level 19 (current min is 16): `java.lang.Character#isSurrogate`"
- errorLine1=" Character.isSurrogate(c)"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/RequiresApiKotlin.kt"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `java.lang.Character#isSurrogate`"
- errorLine1=" Character.isSurrogate(c)"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/RequiresApiKotlin.kt"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 16): `java.lang.Character#isSurrogate`"
- errorLine1=" Character.isSurrogate(c)"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/RequiresApiKotlin.kt"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 16): `java.lang.Character#isSurrogate`"
- errorLine1=" Character.isSurrogate(c)"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/RequiresApiKotlin.kt"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 16): `java.lang.Character#isSurrogate`"
- errorLine1=" Character.isSurrogate(c)"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/RequiresApiKotlin.kt"/>
- </issue>
-
- <issue
id="BanKeepAnnotation"
message="Uses @Keep annotation"
errorLine1="@Keep"
@@ -273,15 +228,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.AutofixUnsafeCallWithImplicitParamCast is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" style.setBuilder(builder);"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/main/java/androidx/AutofixUnsafeCallWithImplicitParamCast.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 20; however, the containing class androidx.AutofixUnsafeCallWithImplicitParamCast is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" builder.extend(extender);"
errorLine2=" ~~~~~~">
@@ -363,15 +309,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.AutofixUnsafeMethodWithQualifiedClass is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return builder.setMediaSize(mediaSize);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/AutofixUnsafeMethodWithQualifiedClass.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 21; however, the containing class androidx.AutofixUnsafeReferenceWithExistingClassJava is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" view.setBackgroundTintList(new ColorStateList(null, null));"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
@@ -399,15 +336,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.AutofixUnsafeStaticMethodReferenceJava is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return View.generateViewId();"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/AutofixUnsafeStaticMethodReferenceJava.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 21; however, the containing class androidx.AutofixUnsafeVoidMethodReferenceJava is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" view.setBackgroundTintList(new ColorStateList(null, null));"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
@@ -426,15 +354,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.ClassVerificationFailureFromJava is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return View.generateViewId();"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/ClassVerificationFailureFromJava.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 23; however, the containing class androidx.ClassVerificationFailureFromJava is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" return view.getAccessibilityClassName();"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -443,78 +362,6 @@
</issue>
<issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.sample.core.widget.ListViewCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" listView.scrollListBy(y);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/sample/core/widget/ListViewCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.sample.core.widget.ListViewCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return listView.canScrollList(direction);"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/sample/core/widget/ListViewCompat.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.sample.core.widget.ListViewCompatKotlin is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" listView.scrollListBy(y)"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/sample/core/widget/ListViewCompatKotlin.kt"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.sample.core.widget.ListViewCompatKotlin is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" listView.canScrollList(direction)"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/sample/core/widget/ListViewCompatKotlin.kt"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.RequiresApiKotlinNoAnnotationFails.MyStaticClass is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" Character.isSurrogate(c)"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/RequiresApiKotlin.kt"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.RequiresApiKotlinOuter16Fails.MyStaticClass is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" Character.isSurrogate(c)"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/RequiresApiKotlin.kt"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.RequiresApiKotlinInner16Fails.MyStaticClass is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" Character.isSurrogate(c)"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/RequiresApiKotlin.kt"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.RequiresApiKotlinInner16Outer16Fails.MyStaticClass is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" Character.isSurrogate(c)"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/RequiresApiKotlin.kt"/>
- </issue>
-
- <issue
id="ImplicitCastClassVerificationFailure"
message="This expression has type android.app.Notification.CarExtender (introduced in API level 23) but it used as type android.app.Notification.Extender (introduced in API level 20). Run-time class verification will not be able to validate this implicit cast on devices between these API levels."
errorLine1=" builder.extend(extender);"
@@ -768,6 +615,105 @@
<issue
id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" @RequiresApi(19)"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/AutofixUnsafeMethodWithQualifiedClass.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/AutofixUnsafeStaticMethodReferenceJava.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/ClassVerificationFailureFromJava.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/sample/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/sample/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/sample/core/widget/ListViewCompatKotlin.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" return if (Build.VERSION.SDK_INT >= 19) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/sample/core/widget/ListViewCompatKotlin.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1="@RequiresApi(19)"
+ errorLine2="~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/RequiresApiJava.java"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1="@RequiresApi(19)"
+ errorLine2="~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/RequiresApiKotlin.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" @RequiresApi(19)"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/RequiresApiKotlin.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1="@RequiresApi(19)"
+ errorLine2="~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/RequiresApiKotlin.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
message="Unnecessary; SDK_INT is always >= 19 from outer annotation (`@RequiresApi(19)`)"
errorLine1=" @RequiresApi(16)"
errorLine2=" ~~~~~~~~~~~~~~~~">
@@ -776,6 +722,42 @@
</issue>
<issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 16"
+ errorLine1="@RequiresApi(16)"
+ errorLine2="~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/RequiresApiKotlin.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 16"
+ errorLine1=" @RequiresApi(16)"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/RequiresApiKotlin.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 16"
+ errorLine1="@RequiresApi(16)"
+ errorLine2="~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/RequiresApiKotlin.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 16"
+ errorLine1=" @RequiresApi(16)"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/RequiresApiKotlin.kt"/>
+ </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 callVarArgsMethodNoArgs(BaseAdapter adapter) {"
diff --git a/lint-checks/lint-baseline.xml b/lint-checks/lint-baseline.xml
deleted file mode 100644
index 5f67248..0000000
--- a/lint-checks/lint-baseline.xml
+++ /dev/null
@@ -1,2425 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.1.0-alpha11" type="baseline" client="gradle" dependencies="false" name="AGP (8.1.0-alpha11)" variant="all" version="8.1.0-alpha11">
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlAnnotationElement.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlAnnotationElement.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlAnnotationElement.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlAnnotationElementImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlAnnotationElementImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull AidlVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlAnnotationElementImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull PsiElementVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlAnnotationElementImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlAnnotationElementImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlAnnotationElementImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlAnnotationElementImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlBody.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlBody.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlBody.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlBody.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlBody.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlBodyImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlBodyImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull AidlVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlBodyImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull PsiElementVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlBodyImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlBodyImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlBodyImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlBodyImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlBodyImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlBodyImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlConstantDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlConstantDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlConstantDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlConstantDeclarationImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlConstantDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull AidlVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlConstantDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull PsiElementVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlConstantDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlConstantDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlConstantDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlConstantDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlDottedName.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlDottedName.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlDottedName.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlDottedNameImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlDottedNameImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull AidlVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlDottedNameImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull PsiElementVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlDottedNameImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlDottedNameImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlDottedNameImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlDottedNameImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlElementType(@NotNull @NonNls String debugName) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlElementType.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlEnumDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlEnumDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlEnumDeclarationImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlEnumDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull AidlVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlEnumDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull PsiElementVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlEnumDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlEnumDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlEnumDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlEnumeratorDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlEnumeratorDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlEnumeratorDeclarationImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlEnumeratorDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull AidlVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlEnumeratorDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull PsiElementVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlEnumeratorDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlEnumeratorDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlEnumeratorDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlExpression.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlExpression.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlExpression.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlExpression.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlExpression.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlExpression.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlExpressionImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlExpressionImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull AidlVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlExpressionImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull PsiElementVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlExpressionImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlExpressionImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlExpressionImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlExpressionImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlExpressionImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlExpressionImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlExpressionImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlFile.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlFile.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/AidlFileType.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/AidlFileType.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/AidlFileType.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/AidlFileType.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlImport.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlImport.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlImportImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlImportImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull AidlVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlImportImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull PsiElementVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlImportImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlImportImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlImportImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlInterfaceDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlInterfaceDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlInterfaceDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlInterfaceDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlInterfaceDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlInterfaceDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlInterfaceDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlInterfaceDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlInterfaceDeclarationImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlInterfaceDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull AidlVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlInterfaceDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull PsiElementVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlInterfaceDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlInterfaceDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlInterfaceDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlInterfaceDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlInterfaceDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlInterfaceDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlInterfaceDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlInterfaceDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlInterfaceDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlMethodDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlMethodDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlMethodDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlMethodDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlMethodDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlMethodDeclarationImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlMethodDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull AidlVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlMethodDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull PsiElementVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlMethodDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlMethodDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlMethodDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlMethodDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlMethodDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlMethodDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlNameComponent.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlNameComponentImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlNameComponentImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull AidlVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlNameComponentImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull PsiElementVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlNameComponentImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlNameComponentImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlNamedElementImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlNamedElementImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlNamedElementImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public PsiElement setName(@NonNls @NotNull String name) throws IncorrectOperationException {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlNamedElementImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlNamedElementImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlNamedElementImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlPackage.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlPackageImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlPackageImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull AidlVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlPackageImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull PsiElementVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlPackageImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlPackageImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlParameter.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlParameter.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlParameterImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlParameterImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull AidlVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlParameterImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull PsiElementVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlParameterImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlParameterImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlParameterImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlParcelableDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlParcelableDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlParcelableDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlParcelableDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlParcelableDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlParcelableDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlParcelableDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlParcelableDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlParcelableDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlParcelableDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlParcelableDeclarationImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlParcelableDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull AidlVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlParcelableDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull PsiElementVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlParcelableDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlParcelableDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlParcelableDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlParcelableDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlParcelableDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlParcelableDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlParcelableDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlParcelableDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlParcelableDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlParcelableDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlParcelableDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/AidlParserDefinition.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/AidlParserDefinition.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/AidlParserDefinition.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/AidlParserDefinition.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/AidlParserDefinition.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/AidlParserDefinition.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/AidlParserDefinition.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/AidlParserDefinition.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/AidlParserDefinition.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlPsiCompositeElementImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlPsiCompositeElementImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlQualifiedName.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlQualifiedName.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlQualifiedName.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlQualifiedName.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlQualifiedName.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlQualifiedNameImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlQualifiedNameImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull AidlVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlQualifiedNameImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull PsiElementVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlQualifiedNameImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlQualifiedNameImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlQualifiedNameImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlQualifiedNameImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlQualifiedNameImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlQualifiedNameImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlTokenType(@NotNull @NonNls String debugName) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/lexer/AidlTokenType.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlTypeElement.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlTypeElement.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlTypeElement.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlTypeElementImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlTypeElementImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull AidlVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlTypeElementImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull PsiElementVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlTypeElementImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlTypeElementImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlTypeElementImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlTypeElementImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlUnionDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlUnionDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlUnionDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlUnionDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlUnionDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlUnionDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlUnionDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlUnionDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlUnionDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlUnionDeclarationImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlUnionDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull AidlVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlUnionDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull PsiElementVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlUnionDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlUnionDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlUnionDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlUnionDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlUnionDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlUnionDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlUnionDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlUnionDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlUnionDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlUnionDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVariableDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVariableDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVariableDeclaration.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public AidlVariableDeclarationImpl(@NotNull ASTNode node) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlVariableDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull AidlVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlVariableDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void accept(@NotNull PsiElementVisitor visitor) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlVariableDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlVariableDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlVariableDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/impl/AidlVariableDeclarationImpl.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitAnnotationElement(@NotNull AidlAnnotationElement o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitBody(@NotNull AidlBody o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitConstantDeclaration(@NotNull AidlConstantDeclaration o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitDottedName(@NotNull AidlDottedName o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitEnumDeclaration(@NotNull AidlEnumDeclaration o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitEnumeratorDeclaration(@NotNull AidlEnumeratorDeclaration o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitExpression(@NotNull AidlExpression o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitImport(@NotNull AidlImport o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitInterfaceDeclaration(@NotNull AidlInterfaceDeclaration o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitMethodDeclaration(@NotNull AidlMethodDeclaration o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitNameComponent(@NotNull AidlNameComponent o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitPackage(@NotNull AidlPackage o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitParameter(@NotNull AidlParameter o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitParcelableDeclaration(@NotNull AidlParcelableDeclaration o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitQualifiedName(@NotNull AidlQualifiedName o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitTypeElement(@NotNull AidlTypeElement o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitUnionDeclaration(@NotNull AidlUnionDeclaration o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitVariableDeclaration(@NotNull AidlVariableDeclaration o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitDeclaration(@NotNull AidlDeclaration o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitNamedElement(@NotNull AidlNamedElement o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public void visitPsiCompositeElement(@NotNull AidlPsiCompositeElement o) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/psi/AidlVisitor.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/analysis/AnalysisBundle.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public static @Nls String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key,"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/analysis/AnalysisBundle.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull Object... params) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/analysis/AnalysisBundle.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public static boolean isWhitespaceOrComment(@NotNull PsiBuilder builder, @Nullable IElementType type) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/lang/parser/GeneratedParserUtilBase.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" public static boolean isWhitespaceOrComment(@NotNull PsiBuilder builder, @Nullable IElementType type) {"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/lang/parser/GeneratedParserUtilBase.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" private static boolean wasAutoSkipped(@NotNull PsiBuilder builder, int steps) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/lang/parser/GeneratedParserUtilBase.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable IElementType elementType,"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/lang/parser/GeneratedParserUtilBase.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable Parser eatMore) {"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/lang/parser/GeneratedParserUtilBase.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable IElementType elementType,"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/lang/parser/GeneratedParserUtilBase.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable Parser eatMore) {"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/lang/parser/GeneratedParserUtilBase.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" private static void run_hooks_impl_(PsiBuilder builder, ErrorState state, @Nullable IElementType elementType) {"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/lang/parser/GeneratedParserUtilBase.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable IElementType elementType,"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/lang/parser/GeneratedParserUtilBase.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable Parser eatMore) {"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/lang/parser/GeneratedParserUtilBase.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.Nullable` instead of `@org.jetbrains.annotations.Nullable`"
- errorLine1=" @Nullable"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/lang/parser/GeneratedParserUtilBase.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" private static PsiBuilderImpl.ProductionMarker getLatestExtensibleDoneMarker(@NotNull PsiBuilder builder) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/lang/parser/GeneratedParserUtilBase.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/lang/parser/GeneratedParserUtilBase.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/lang/parser/GeneratedParserUtilBase.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" public @NotNull String getExpected(int position, boolean expected) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/lang/parser/GeneratedParserUtilBase.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/lang/parser/GeneratedParserUtilBase.java"/>
- </issue>
-
- <issue
- id="NullabilityAnnotationsDetector"
- message="Use `@androidx.annotation.NonNull` instead of `@org.jetbrains.annotations.NotNull`"
- errorLine1=" @NotNull"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/lang/parser/GeneratedParserUtilBase.java"/>
- </issue>
-
- <issue
- id="PrivateConstructorForUtilityClass"
- message="Utility class is missing private constructor"
- errorLine1=" class Factory {"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/com/android/tools/idea/lang/aidl/lexer/AidlTokenTypes.java"/>
- </issue>
-
- <issue
- id="PrivateConstructorForUtilityClass"
- message="Utility class is missing private constructor"
- errorLine1="public class GeneratedParserUtilBase {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/com/intellij/lang/parser/GeneratedParserUtilBase.java"/>
- </issue>
-
-</issues>
diff --git a/media/media/api/api_lint.ignore b/media/media/api/api_lint.ignore
index 2a61822..fba27a9 100644
--- a/media/media/api/api_lint.ignore
+++ b/media/media/api/api_lint.ignore
@@ -661,6 +661,14 @@
Bare field volumeType must be marked final, or moved behind accessors if mutable
+NotCloseable: android.support.v4.media.MediaBrowserCompat:
+ Classes that release resources (disconnect()) should implement AutoCloseable and CloseGuard: class android.support.v4.media.MediaBrowserCompat
+NotCloseable: android.support.v4.media.session.MediaControllerCompat.TransportControls:
+ Classes that release resources (stop()) should implement AutoCloseable and CloseGuard: class android.support.v4.media.session.MediaControllerCompat.TransportControls
+NotCloseable: android.support.v4.media.session.MediaSessionCompat:
+ Classes that release resources (release()) should implement AutoCloseable and CloseGuard: class android.support.v4.media.session.MediaSessionCompat
+
+
NullableCollection: android.support.v4.media.MediaBrowserCompat#getExtras():
Return type of method android.support.v4.media.MediaBrowserCompat.getExtras() is a nullable collection (`android.os.Bundle`); must be non-null
NullableCollection: android.support.v4.media.MediaDescriptionCompat#getExtras():
diff --git a/media/media/api/restricted_1.7.0-beta01.txt b/media/media/api/restricted_1.7.0-beta01.txt
index 4f0864c..fa7d4db 100644
--- a/media/media/api/restricted_1.7.0-beta01.txt
+++ b/media/media/api/restricted_1.7.0-beta01.txt
@@ -650,6 +650,8 @@
method public void onLoadChildren(String, androidx.media.MediaBrowserServiceCompat.Result<java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem!>!>, android.os.Bundle);
method public void onLoadItem(String!, androidx.media.MediaBrowserServiceCompat.Result<android.support.v4.media.MediaBrowserCompat.MediaItem!>);
method public void onSearch(String, android.os.Bundle!, androidx.media.MediaBrowserServiceCompat.Result<java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem!>!>);
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public void onSubscribe(String!, android.os.Bundle!);
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public void onUnsubscribe(String!);
method public void setSessionToken(android.support.v4.media.session.MediaSessionCompat.Token!);
field public static final String SERVICE_INTERFACE = "android.media.browse.MediaBrowserService";
}
diff --git a/media/media/api/restricted_current.txt b/media/media/api/restricted_current.txt
index 4f0864c..fa7d4db 100644
--- a/media/media/api/restricted_current.txt
+++ b/media/media/api/restricted_current.txt
@@ -650,6 +650,8 @@
method public void onLoadChildren(String, androidx.media.MediaBrowserServiceCompat.Result<java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem!>!>, android.os.Bundle);
method public void onLoadItem(String!, androidx.media.MediaBrowserServiceCompat.Result<android.support.v4.media.MediaBrowserCompat.MediaItem!>);
method public void onSearch(String, android.os.Bundle!, androidx.media.MediaBrowserServiceCompat.Result<java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem!>!>);
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public void onSubscribe(String!, android.os.Bundle!);
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public void onUnsubscribe(String!);
method public void setSessionToken(android.support.v4.media.session.MediaSessionCompat.Token!);
field public static final String SERVICE_INTERFACE = "android.media.browse.MediaBrowserService";
}
diff --git a/media/media/lint-baseline.xml b/media/media/lint-baseline.xml
index 80dd31ec..8f842ee 100644
--- a/media/media/lint-baseline.xml
+++ b/media/media/lint-baseline.xml
@@ -1,94 +1,121 @@
<?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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="oneway interface IMediaControllerCallback {"
- errorLine2="^">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is never < 19"
+ errorLine1=" if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/aidl/android/support/v4/media/session/IMediaControllerCallback.aidl"/>
+ file="src/main/java/androidx/media/AudioFocusRequestCompat.java"/>
</issue>
<issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="interface IMediaSession {"
- errorLine2="^">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" if (Build.VERSION.SDK_INT >= 16) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/aidl/android/support/v4/media/session/IMediaSession.aidl"/>
+ file="src/main/java/androidx/media/session/MediaButtonReceiver.java"/>
</issue>
<issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="@JavaOnlyStableParcelable parcelable MediaDescriptionCompat;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/aidl/android/support/v4/media/MediaDescriptionCompat.aidl"/>
+ file="src/main/java/android/support/v4/media/MediaMetadataCompat.java"/>
</issue>
<issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="@JavaOnlyStableParcelable parcelable MediaMetadataCompat;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/aidl/android/support/v4/media/MediaMetadataCompat.aidl"/>
+ file="src/main/java/android/support/v4/media/MediaMetadataCompat.java"/>
</issue>
<issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="@JavaOnlyStableParcelable parcelable MediaSessionCompat.Token;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" } else if (android.os.Build.VERSION.SDK_INT >= 19) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/aidl/android/support/v4/media/session/MediaSessionCompat.aidl"/>
+ file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"/>
</issue>
<issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="@JavaOnlyStableParcelable parcelable MediaSessionCompat.QueueItem;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" } else if (android.os.Build.VERSION.SDK_INT >= 18) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/aidl/android/support/v4/media/session/MediaSessionCompat.aidl"/>
+ file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"/>
</issue>
<issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="@JavaOnlyStableParcelable parcelable MediaSessionCompat.ResultReceiverWrapper;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 18"
+ errorLine1=" @RequiresApi(18)"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
<location
- file="src/main/aidl/android/support/v4/media/session/MediaSessionCompat.aidl"/>
+ file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"/>
</issue>
<issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="@JavaOnlyStableParcelable parcelable ParcelableVolumeInfo;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" @RequiresApi(19)"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
<location
- file="src/main/aidl/android/support/v4/media/session/ParcelableVolumeInfo.aidl"/>
+ file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"/>
</issue>
<issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="@JavaOnlyStableParcelable parcelable PlaybackStateCompat;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" if (Build.VERSION.SDK_INT >= 15) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/aidl/android/support/v4/media/session/PlaybackStateCompat.aidl"/>
+ file="src/main/java/androidx/media/app/NotificationCompat.java"/>
</issue>
<issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="@JavaOnlyStableParcelable parcelable RatingCompat;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 15"
+ errorLine1=" @RequiresApi(15)"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
<location
- file="src/main/aidl/android/support/v4/media/RatingCompat.aidl"/>
+ 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>
<issue
diff --git a/media/media/src/main/java/androidx/media/MediaBrowserServiceCompat.java b/media/media/src/main/java/androidx/media/MediaBrowserServiceCompat.java
index c01a837..db98259 100644
--- a/media/media/src/main/java/androidx/media/MediaBrowserServiceCompat.java
+++ b/media/media/src/main/java/androidx/media/MediaBrowserServiceCompat.java
@@ -402,8 +402,20 @@
new Result<List<MediaBrowserCompat.MediaItem>>(parentId) {
@Override
void onResultSent(@Nullable List<MediaBrowserCompat.MediaItem> list) {
- List<Parcel> parcelList = null;
- if (list != null) {
+ List<Parcel> parcelList;
+ if (list == null) {
+ // A null children list here indicates that the requested parentId
+ // is invalid. Unfortunately before API 24 the platform
+ // MediaBrowserService's implementation of Result inside
+ // performLoadChildren (invoked below) throws an exception if
+ // given a null list (b/19127753). This means there's no clear
+ // way to communicate an invalid parentId, so in order to avoid
+ // an exception below API 24 we transform null to an empty list
+ // here (meaning it looks like parentId is valid but has no
+ // children).
+ parcelList = Build.VERSION.SDK_INT >= 24
+ ? null : Collections.emptyList();
+ } else {
parcelList = new ArrayList<>(list.size());
for (MediaBrowserCompat.MediaItem item : list) {
Parcel parcel = Parcel.obtain();
@@ -1357,7 +1369,7 @@
* @param id id
* @param option option
*/
- @RestrictTo(LIBRARY)
+ @RestrictTo(LIBRARY_GROUP_PREFIX)
public void onSubscribe(String id, Bundle option) {
}
@@ -1366,7 +1378,7 @@
*
* @param id
*/
- @RestrictTo(LIBRARY)
+ @RestrictTo(LIBRARY_GROUP_PREFIX)
public void onUnsubscribe(String id) {
}
diff --git a/media/version-compat-tests/current/client/src/androidTest/java/android/support/mediacompat/client/MediaBrowserTest.java b/media/version-compat-tests/current/client/src/androidTest/java/android/support/mediacompat/client/MediaBrowserTest.java
index aa2a0a6..e112dd9 100644
--- a/media/version-compat-tests/current/client/src/androidTest/java/android/support/mediacompat/client/MediaBrowserTest.java
+++ b/media/version-compat-tests/current/client/src/androidTest/java/android/support/mediacompat/client/MediaBrowserTest.java
@@ -28,6 +28,7 @@
import static android.support.mediacompat.testlib.MediaBrowserConstants.SEND_DELAYED_NOTIFY_CHILDREN_CHANGED;
import static android.support.mediacompat.testlib.MediaBrowserConstants.SET_SESSION_TOKEN;
import static android.support.mediacompat.testlib.VersionConstants.KEY_SERVICE_VERSION;
+import static android.support.mediacompat.testlib.VersionConstants.VERSION_TOT;
import static android.support.mediacompat.testlib.util.IntentUtil.SERVICE_PACKAGE_NAME;
import static android.support.mediacompat.testlib.util.IntentUtil.callMediaBrowserServiceMethod;
@@ -41,6 +42,7 @@
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
import android.content.ComponentName;
import android.content.Context;
@@ -54,6 +56,7 @@
import android.util.Log;
import androidx.annotation.NonNull;
+import androidx.annotation.RequiresApi;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.filters.MediumTest;
@@ -66,9 +69,11 @@
import org.junit.runner.RunWith;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
/**
* Test connection between framework {@link MediaBrowser} and
@@ -77,7 +82,7 @@
* TODO: Lower the minSdkVersion of this test to LOLLIPOP.
*/
@RunWith(AndroidJUnit4.class)
-@SdkSuppress(minSdkVersion = 28)
+@SdkSuppress(minSdkVersion = 21)
public class MediaBrowserTest {
private static final String TAG = "MediaBrowserTest";
@@ -112,7 +117,6 @@
private MediaBrowser mMediaBrowser;
private StubConnectionCallback mConnectionCallback;
private StubSubscriptionCallback mSubscriptionCallback;
- private StubItemCallback mItemCallback;
private Bundle mRootHints;
@Before
@@ -123,7 +127,6 @@
mConnectionCallback = new StubConnectionCallback();
mSubscriptionCallback = new StubSubscriptionCallback();
- mItemCallback = new StubItemCallback();
mRootHints = new Bundle();
mRootHints.putBoolean(MediaBrowserService.BrowserRoot.EXTRA_RECENT, true);
@@ -227,6 +230,7 @@
@Test
@MediumTest
+ @SdkSuppress(minSdkVersion = 23)
public void testReconnection() throws Exception {
getInstrumentation().runOnMainSync(new Runnable() {
@Override
@@ -247,27 +251,28 @@
mSubscriptionCallback.reset(1);
mMediaBrowser.subscribe(MEDIA_ID_ROOT, mSubscriptionCallback);
mSubscriptionCallback.await(TIME_OUT_MS);
- assertEquals(1, mSubscriptionCallback.mChildrenLoadedCount);
+ assertEquals(1, mSubscriptionCallback.mChildrenLoadedCount.get());
assertEquals(MEDIA_ID_ROOT, mSubscriptionCallback.mLastParentId);
- synchronized (mItemCallback.mWaitLock) {
+ StubItemCallback itemCallback = new StubItemCallback();
+ synchronized (itemCallback.mWaitLock) {
// Test getItem.
- mItemCallback.reset();
- mMediaBrowser.getItem(MEDIA_ID_CHILDREN[0], mItemCallback);
- mItemCallback.mWaitLock.wait(TIME_OUT_MS);
- assertEquals(MEDIA_ID_CHILDREN[0], mItemCallback.mLastMediaItem.getMediaId());
+ itemCallback.reset();
+ mMediaBrowser.getItem(MEDIA_ID_CHILDREN[0], itemCallback);
+ itemCallback.mWaitLock.wait(TIME_OUT_MS);
+ assertEquals(MEDIA_ID_CHILDREN[0], itemCallback.mLastMediaItem.getMediaId());
}
// Reconnect after connection was established.
mMediaBrowser.disconnect();
connectMediaBrowserService();
- synchronized (mItemCallback.mWaitLock) {
+ synchronized (itemCallback.mWaitLock) {
// Test getItem.
- mItemCallback.reset();
- mMediaBrowser.getItem(MEDIA_ID_CHILDREN[0], mItemCallback);
- mItemCallback.mWaitLock.wait(TIME_OUT_MS);
- assertEquals(MEDIA_ID_CHILDREN[0], mItemCallback.mLastMediaItem.getMediaId());
+ itemCallback.reset();
+ mMediaBrowser.getItem(MEDIA_ID_CHILDREN[0], itemCallback);
+ itemCallback.mWaitLock.wait(TIME_OUT_MS);
+ assertEquals(MEDIA_ID_CHILDREN[0], itemCallback.mLastMediaItem.getMediaId());
}
}
@@ -349,7 +354,7 @@
mSubscriptionCallback.reset(1);
mMediaBrowser.subscribe(MEDIA_ID_ROOT, mSubscriptionCallback);
mSubscriptionCallback.await(TIME_OUT_MS);
- assertEquals(1, mSubscriptionCallback.mChildrenLoadedCount);
+ assertEquals(1, mSubscriptionCallback.mChildrenLoadedCount.get());
assertEquals(MEDIA_ID_ROOT, mSubscriptionCallback.mLastParentId);
assertEquals(MEDIA_ID_CHILDREN.length, mSubscriptionCallback.mLastChildMediaItems.size());
for (int i = 0; i < MEDIA_ID_CHILDREN.length; ++i) {
@@ -362,7 +367,7 @@
callMediaBrowserServiceMethod(NOTIFY_CHILDREN_CHANGED, MEDIA_ID_ROOT,
getApplicationContext());
mSubscriptionCallback.await(TIME_OUT_MS);
- assertEquals(1, mSubscriptionCallback.mChildrenLoadedCount);
+ assertEquals(1, mSubscriptionCallback.mChildrenLoadedCount.get());
// Test unsubscribe.
mSubscriptionCallback.reset(1);
@@ -375,7 +380,7 @@
mSubscriptionCallback.await(WAIT_TIME_FOR_NO_RESPONSE_MS);
// onChildrenLoaded should not be called.
- assertEquals(0, mSubscriptionCallback.mChildrenLoadedCount);
+ assertEquals(0, mSubscriptionCallback.mChildrenLoadedCount.get());
}
@Test
@@ -393,7 +398,7 @@
options.putInt(MediaBrowser.EXTRA_PAGE, page);
mMediaBrowser.subscribe(MEDIA_ID_ROOT, options, mSubscriptionCallback);
assertTrue(mSubscriptionCallback.await(TIME_OUT_MS));
- assertEquals(1, mSubscriptionCallback.mChildrenLoadedWithOptionCount);
+ assertEquals(1, mSubscriptionCallback.mChildrenLoadedWithOptionCount.get());
assertEquals(MEDIA_ID_ROOT, mSubscriptionCallback.mLastParentId);
if (page != lastPage) {
assertEquals(pageSize, mSubscriptionCallback.mLastChildMediaItems.size());
@@ -412,7 +417,7 @@
callMediaBrowserServiceMethod(NOTIFY_CHILDREN_CHANGED, MEDIA_ID_ROOT,
getApplicationContext());
assertTrue(mSubscriptionCallback.await(TIME_OUT_MS * (page + 1)));
- assertEquals(page + 1, mSubscriptionCallback.mChildrenLoadedWithOptionCount);
+ assertEquals(page + 1, mSubscriptionCallback.mChildrenLoadedWithOptionCount.get());
}
// Test unsubscribe with callback argument.
@@ -429,7 +434,7 @@
fail("Unexpected InterruptedException occurred.");
}
// onChildrenLoaded should not be called.
- assertEquals(0, mSubscriptionCallback.mChildrenLoadedCount);
+ assertEquals(0, mSubscriptionCallback.mChildrenLoadedCount.get());
}
@Test
@@ -440,24 +445,37 @@
mSubscriptionCallback.reset(1);
mMediaBrowser.subscribe(MEDIA_ID_CHILDREN_DELAYED, mSubscriptionCallback);
assertFalse(mSubscriptionCallback.await(WAIT_TIME_FOR_NO_RESPONSE_MS));
- assertEquals(0, mSubscriptionCallback.mChildrenLoadedCount);
+ assertEquals(0, mSubscriptionCallback.mChildrenLoadedCount.get());
callMediaBrowserServiceMethod(
SEND_DELAYED_NOTIFY_CHILDREN_CHANGED, MEDIA_ID_CHILDREN_DELAYED,
getApplicationContext());
assertTrue(mSubscriptionCallback.await(TIME_OUT_MS));
- assertEquals(1, mSubscriptionCallback.mChildrenLoadedCount);
+ assertEquals(1, mSubscriptionCallback.mChildrenLoadedCount.get());
}
@Test
@SmallTest
+ @SdkSuppress(minSdkVersion = 21)
public void testSubscribeInvalidItem() throws Exception {
+ // TODO: Remove this when the 'previous' service version contains the fix in
+ // http://r.android.com/2794937.
+ assumeTrue(Build.VERSION.SDK_INT >= 24 || mServiceVersion.equals(VERSION_TOT));
+
connectMediaBrowserService();
mSubscriptionCallback.reset(1);
mMediaBrowser.subscribe(MEDIA_ID_INVALID, mSubscriptionCallback);
mSubscriptionCallback.await(TIME_OUT_MS);
- assertEquals(MEDIA_ID_INVALID, mSubscriptionCallback.mLastErrorId);
+ if (Build.VERSION.SDK_INT < 24) {
+ // There's no way to communicate an invalid media ID on API < 24 because the documented
+ // way of emitting children = null from MediaBrowserService.onLoadChildren throws an
+ // exception from inside MediaBrowserService (b/19127753). Therefore we return an empty
+ // list of children, which is technically incorrect but avoids the exception.
+ assertEquals(Collections.emptyList(), mSubscriptionCallback.mLastChildMediaItems);
+ } else {
+ assertEquals(MEDIA_ID_INVALID, mSubscriptionCallback.mLastErrorId);
+ }
}
@Test
@@ -504,7 +522,7 @@
callback.await(TIME_OUT_MS);
// Each onChildrenLoaded() must be called.
- assertEquals(1, callback.mChildrenLoadedWithOptionCount);
+ assertEquals(1, callback.mChildrenLoadedWithOptionCount.get());
}
// Reset callbacks and unsubscribe.
@@ -525,7 +543,7 @@
// onChildrenLoaded should not be called.
for (StubSubscriptionCallback callback : subscriptionCallbacks) {
- assertEquals(0, callback.mChildrenLoadedWithOptionCount);
+ assertEquals(0, callback.mChildrenLoadedWithOptionCount.get());
}
}
@@ -550,7 +568,7 @@
callback.await(TIME_OUT_MS);
// Each onChildrenLoaded() must be called.
- assertEquals(1, callback.mChildrenLoadedWithOptionCount);
+ assertEquals(1, callback.mChildrenLoadedWithOptionCount.get());
}
// Unsubscribe existing subscriptions one-by-one.
@@ -575,7 +593,7 @@
StubSubscriptionCallback callback = subscriptionCallbacks
.get(orderOfRemovingCallbacks[j]);
assertTrue(callback.await(TIME_OUT_MS * remaining));
- assertEquals(1, callback.mChildrenLoadedWithOptionCount);
+ assertEquals(1, callback.mChildrenLoadedWithOptionCount.get());
}
try {
@@ -588,68 +606,78 @@
for (int j = 0; j <= i; j++) {
StubSubscriptionCallback callback = subscriptionCallbacks
.get(orderOfRemovingCallbacks[j]);
- assertEquals(0, callback.mChildrenLoadedWithOptionCount);
+ assertEquals(0, callback.mChildrenLoadedWithOptionCount.get());
}
}
}
@Test
@SmallTest
+ @SdkSuppress(minSdkVersion = 23)
public void testGetItem() throws Exception {
connectMediaBrowserService();
- synchronized (mItemCallback.mWaitLock) {
- mMediaBrowser.getItem(MEDIA_ID_CHILDREN[0], mItemCallback);
- mItemCallback.mWaitLock.wait(TIME_OUT_MS);
- assertNotNull(mItemCallback.mLastMediaItem);
- assertEquals(MEDIA_ID_CHILDREN[0], mItemCallback.mLastMediaItem.getMediaId());
+ StubItemCallback itemCallback = new StubItemCallback();
+ synchronized (itemCallback.mWaitLock) {
+ mMediaBrowser.getItem(MEDIA_ID_CHILDREN[0], itemCallback);
+ itemCallback.mWaitLock.wait(TIME_OUT_MS);
+ assertNotNull(itemCallback.mLastMediaItem);
+ assertEquals(MEDIA_ID_CHILDREN[0], itemCallback.mLastMediaItem.getMediaId());
}
}
@Test
@MediumTest
+ @SdkSuppress(minSdkVersion = 23)
public void testGetItemDelayed() throws Exception {
connectMediaBrowserService();
- synchronized (mItemCallback.mWaitLock) {
- mMediaBrowser.getItem(MEDIA_ID_CHILDREN_DELAYED, mItemCallback);
- mItemCallback.mWaitLock.wait(WAIT_TIME_FOR_NO_RESPONSE_MS);
- assertNull(mItemCallback.mLastMediaItem);
+ StubItemCallback itemCallback = new StubItemCallback();
+ synchronized (itemCallback.mWaitLock) {
+ mMediaBrowser.getItem(MEDIA_ID_CHILDREN_DELAYED, itemCallback);
+ itemCallback.mWaitLock.wait(WAIT_TIME_FOR_NO_RESPONSE_MS);
+ assertNull(itemCallback.mLastMediaItem);
- mItemCallback.reset();
+ itemCallback.reset();
callMediaBrowserServiceMethod(SEND_DELAYED_ITEM_LOADED, new Bundle(),
getApplicationContext());
- mItemCallback.mWaitLock.wait(TIME_OUT_MS);
- assertNotNull(mItemCallback.mLastMediaItem);
- assertEquals(MEDIA_ID_CHILDREN_DELAYED, mItemCallback.mLastMediaItem.getMediaId());
+ itemCallback.mWaitLock.wait(TIME_OUT_MS);
+ assertNotNull(itemCallback.mLastMediaItem);
+ assertEquals(MEDIA_ID_CHILDREN_DELAYED, itemCallback.mLastMediaItem.getMediaId());
}
}
@Test
@SmallTest
+ @SdkSuppress(minSdkVersion = 23)
public void testGetItemWhenOnLoadItemIsNotImplemented() throws Exception {
connectMediaBrowserService();
- synchronized (mItemCallback.mWaitLock) {
- mMediaBrowser.getItem(MEDIA_ID_ON_LOAD_ITEM_NOT_IMPLEMENTED, mItemCallback);
- mItemCallback.mWaitLock.wait(TIME_OUT_MS);
+ StubItemCallback itemCallback = new StubItemCallback();
+ synchronized (itemCallback.mWaitLock) {
+ mMediaBrowser.getItem(MEDIA_ID_ON_LOAD_ITEM_NOT_IMPLEMENTED, itemCallback);
+ itemCallback.mWaitLock.wait(TIME_OUT_MS);
// Limitation: Framework media browser gets onItemLoaded() call with null media item,
// instead of onError().
- // assertEquals(MEDIA_ID_ON_LOAD_ITEM_NOT_IMPLEMENTED, mItemCallback.mLastErrorId);
+ // assertEquals(MEDIA_ID_ON_LOAD_ITEM_NOT_IMPLEMENTED, itemCallback.mLastErrorId);
}
}
@Test
@SmallTest
+ // TODO: Lower this to 23. This test fails because mLastMediaItem below is not null on API
+ // levels 23, 24 and 25.
+ @SdkSuppress(minSdkVersion = 26)
public void testGetItemWhenMediaIdIsInvalid() throws Exception {
- mItemCallback.mLastMediaItem = new MediaItem(new MediaDescription.Builder()
+ StubItemCallback itemCallback = new StubItemCallback();
+ itemCallback.mLastMediaItem = new MediaItem(new MediaDescription.Builder()
.setMediaId("dummy_id").build(), MediaItem.FLAG_BROWSABLE);
connectMediaBrowserService();
- synchronized (mItemCallback.mWaitLock) {
- mMediaBrowser.getItem(MEDIA_ID_INVALID, mItemCallback);
- mItemCallback.mWaitLock.wait(TIME_OUT_MS);
- assertNull(mItemCallback.mLastMediaItem);
- assertNull(mItemCallback.mLastErrorId);
+ synchronized (itemCallback.mWaitLock) {
+ mMediaBrowser.getItem(MEDIA_ID_INVALID, itemCallback);
+ itemCallback.mWaitLock.wait(TIME_OUT_MS);
+ assertNull(itemCallback.mLastMediaItem);
+ assertNull(itemCallback.mLastErrorId);
}
}
@@ -696,7 +724,7 @@
}
}
- private class StubConnectionCallback extends MediaBrowser.ConnectionCallback {
+ private static class StubConnectionCallback extends MediaBrowser.ConnectionCallback {
final Object mWaitLock = new Object();
volatile int mConnectedCount;
volatile int mConnectionFailedCount;
@@ -733,10 +761,10 @@
}
}
- private class StubSubscriptionCallback extends MediaBrowser.SubscriptionCallback {
+ private static class StubSubscriptionCallback extends MediaBrowser.SubscriptionCallback {
+ private final AtomicInteger mChildrenLoadedCount = new AtomicInteger();
+ private final AtomicInteger mChildrenLoadedWithOptionCount = new AtomicInteger();
private volatile CountDownLatch mLatch;
- private volatile int mChildrenLoadedCount;
- private volatile int mChildrenLoadedWithOptionCount;
private volatile String mLastErrorId;
private volatile String mLastParentId;
private volatile Bundle mLastOptions;
@@ -744,8 +772,8 @@
public void reset(int count) {
mLatch = new CountDownLatch(count);
- mChildrenLoadedCount = 0;
- mChildrenLoadedWithOptionCount = 0;
+ mChildrenLoadedCount.set(0);
+ mChildrenLoadedWithOptionCount.set(0);
mLastErrorId = null;
mLastParentId = null;
mLastOptions = null;
@@ -763,7 +791,7 @@
@Override
public void onChildrenLoaded(@NonNull String parentId, @NonNull List<MediaItem> children) {
- mChildrenLoadedCount++;
+ mChildrenLoadedCount.incrementAndGet();
mLastParentId = parentId;
mLastChildMediaItems = children;
mLatch.countDown();
@@ -772,7 +800,7 @@
@Override
public void onChildrenLoaded(@NonNull String parentId, @NonNull List<MediaItem> children,
@NonNull Bundle options) {
- mChildrenLoadedWithOptionCount++;
+ mChildrenLoadedWithOptionCount.incrementAndGet();
mLastParentId = parentId;
mLastOptions = options;
mLastChildMediaItems = children;
@@ -793,7 +821,8 @@
}
}
- private class StubItemCallback extends MediaBrowser.ItemCallback {
+ @RequiresApi(23)
+ private static class StubItemCallback extends MediaBrowser.ItemCallback {
final Object mWaitLock = new Object();
private volatile MediaItem mLastMediaItem;
private volatile String mLastErrorId;
@@ -820,7 +849,8 @@
}
}
- private class ConnectionCallbackForDelayedMediaSession extends MediaBrowser.ConnectionCallback {
+ private static class ConnectionCallbackForDelayedMediaSession
+ extends MediaBrowser.ConnectionCallback {
final Object mWaitLock = new Object();
private int mConnectedCount = 0;
diff --git a/media/version-compat-tests/lib/lint-baseline.xml b/media/version-compat-tests/lib/lint-baseline.xml
index 6ce321a..42ca34d 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.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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="BanThreadSleep"
@@ -11,6 +11,42 @@
</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/media2-common/build.gradle b/media2/media2-common/build.gradle
index 6af878c..27f8bef 100644
--- a/media2/media2-common/build.gradle
+++ b/media2/media2-common/build.gradle
@@ -45,9 +45,6 @@
}
android {
- defaultConfig {
- minSdkVersion 16
- }
buildFeatures {
aidl = true
}
diff --git a/media2/media2-common/lint-baseline.xml b/media2/media2-common/lint-baseline.xml
index 37d6a19..bb07e11 100644
--- a/media2/media2-common/lint-baseline.xml
+++ b/media2/media2-common/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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="RestrictedApiAndroidX"
@@ -47,6 +47,15 @@
</issue>
<issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 18"
+ errorLine1=" @RequiresApi(18)"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/common/ClassVerificationHelper.java"/>
+ </issue>
+
+ <issue
id="KotlinPropertyAccess"
message="This method should be called `getMediaItem` such that `mediaItem` can be accessed as a property from Kotlin; see https://android.github.io/kotlin-guides/interop.html#property-prefixes"
errorLine1=" public abstract MediaItem getCurrentMediaItem();"
diff --git a/media2/media2-player/build.gradle b/media2/media2-player/build.gradle
index 230e6d5..70a7c6f 100644
--- a/media2/media2-player/build.gradle
+++ b/media2/media2-player/build.gradle
@@ -42,9 +42,6 @@
}
android {
- defaultConfig {
- minSdkVersion 16
- }
namespace "androidx.media2.player"
}
diff --git a/media2/media2-player/lint-baseline.xml b/media2/media2-player/lint-baseline.xml
index 675ab6e..98ca85a 100644
--- a/media2/media2-player/lint-baseline.xml
+++ b/media2/media2-player/lint-baseline.xml
@@ -1,9 +1,9 @@
<?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-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 27 (current min is 16): `android.app.Activity#setTurnScreenOn`"
+ message="Call requires API level 27 (current min is 19): `android.app.Activity#setTurnScreenOn`"
errorLine1=" mActivity.setTurnScreenOn(true);"
errorLine2=" ~~~~~~~~~~~~~~~">
<location
@@ -12,7 +12,7 @@
<issue
id="NewApi"
- message="Call requires API level 27 (current min is 16): `android.app.Activity#setShowWhenLocked`"
+ message="Call requires API level 27 (current min is 19): `android.app.Activity#setShowWhenLocked`"
errorLine1=" mActivity.setShowWhenLocked(true);"
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
@@ -21,7 +21,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 16): `android.app.KeyguardManager#requestDismissKeyguard`"
+ message="Call requires API level 26 (current min is 19): `android.app.KeyguardManager#requestDismissKeyguard`"
errorLine1=" mKeyguardManager.requestDismissKeyguard(mActivity, null);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -30,16 +30,7 @@
<issue
id="NewApi"
- message="Call requires API level 18 (current min is 16): `android.media.MediaDrm.KeyRequest#getData`"
- errorLine1=" if (0 == getKeyIds(keyRequest.getData(), keyIds)) {"
- errorLine2=" ~~~~~~~">
- <location
- file="src/androidTest/java/androidx/media2/player/MediaPlayer2DrmTestBase.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 27 (current min is 16): `android.app.Activity#setTurnScreenOn`"
+ message="Call requires API level 27 (current min is 19): `android.app.Activity#setTurnScreenOn`"
errorLine1=" mActivity.setTurnScreenOn(true);"
errorLine2=" ~~~~~~~~~~~~~~~">
<location
@@ -48,7 +39,7 @@
<issue
id="NewApi"
- message="Call requires API level 27 (current min is 16): `android.app.Activity#setShowWhenLocked`"
+ message="Call requires API level 27 (current min is 19): `android.app.Activity#setShowWhenLocked`"
errorLine1=" mActivity.setShowWhenLocked(true);"
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
@@ -57,7 +48,7 @@
<issue
id="NewApi"
- message="Call requires API level 26 (current min is 16): `android.app.KeyguardManager#requestDismissKeyguard`"
+ message="Call requires API level 26 (current min is 19): `android.app.KeyguardManager#requestDismissKeyguard`"
errorLine1=" mKeyguardManager.requestDismissKeyguard(mActivity, null);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -65,15 +56,6 @@
</issue>
<issue
- id="NewApi"
- message="Call requires API level 18 (current min is 16): `android.media.MediaDrm.KeyRequest#getData`"
- errorLine1=" if (0 == getKeyIds(keyRequest.getData(), keyIds)) {"
- errorLine2=" ~~~~~~~">
- <location
- file="src/androidTest/java/androidx/media2/player/MediaPlayerDrmTest.java"/>
- </issue>
-
- <issue
id="WrongConstant"
message="Must be one of: BaseResult.RESULT_SUCCESS, DrmResult.RESULT_ERROR_PROVISIONING_NETWORK_ERROR, DrmResult.RESULT_ERROR_PROVISIONING_SERVER_ERROR, DrmResult.RESULT_ERROR_PREPARATION_ERROR, DrmResult.RESULT_ERROR_UNSUPPORTED_SCHEME, DrmResult.RESULT_ERROR_RESOURCE_BUSY"
errorLine1=" return super.getResultCode();"
diff --git a/media2/media2-session/build.gradle b/media2/media2-session/build.gradle
index 25d2493..dbb6e4d 100644
--- a/media2/media2-session/build.gradle
+++ b/media2/media2-session/build.gradle
@@ -41,9 +41,6 @@
}
android {
- defaultConfig {
- minSdkVersion 16
- }
buildFeatures {
aidl = true
}
diff --git a/media2/media2-session/lint-baseline.xml b/media2/media2-session/lint-baseline.xml
index 089c752..910c728 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.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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="WrongConstant"
@@ -65,6 +65,42 @@
</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/media2/session/MediaControllerImplLegacy.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/media2/session/MediaSessionImplBase.java"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" || (Build.VERSION.SDK_INT >= 19 && value instanceof android.media.Rating)) {"
+ 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=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <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 void setTimeDiff(Long timeDiff) {"
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 8f6116c..67787e2 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.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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="BanThreadSleep"
@@ -11,48 +11,12 @@
</issue>
<issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="interface IRemoteMediaBrowserCompat {"
- errorLine2="^">
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/aidl/androidx/media2/test/common/IRemoteMediaBrowserCompat.aidl"/>
- </issue>
-
- <issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="interface IRemoteMediaController {"
- errorLine2="^">
- <location
- file="src/main/aidl/androidx/media2/test/common/IRemoteMediaController.aidl"/>
- </issue>
-
- <issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="interface IRemoteMediaControllerCompat {"
- errorLine2="^">
- <location
- file="src/main/aidl/androidx/media2/test/common/IRemoteMediaControllerCompat.aidl"/>
- </issue>
-
- <issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="interface IRemoteMediaSession {"
- errorLine2="^">
- <location
- file="src/main/aidl/androidx/media2/test/common/IRemoteMediaSession.aidl"/>
- </issue>
-
- <issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="interface IRemoteMediaSessionCompat {"
- errorLine2="^">
- <location
- file="src/main/aidl/androidx/media2/test/common/IRemoteMediaSessionCompat.aidl"/>
+ file="src/main/java/androidx/media2/test/common/TestUtils.java"/>
</issue>
<issue
diff --git a/media2/media2-session/version-compat-tests/current/client/build.gradle b/media2/media2-session/version-compat-tests/current/client/build.gradle
index 147a6a7..9f0c72d 100644
--- a/media2/media2-session/version-compat-tests/current/client/build.gradle
+++ b/media2/media2-session/version-compat-tests/current/client/build.gradle
@@ -30,9 +30,6 @@
}
android {
- defaultConfig {
- minSdkVersion 16
- }
namespace "androidx.media2.test.client"
}
diff --git a/media2/media2-session/version-compat-tests/current/service/build.gradle b/media2/media2-session/version-compat-tests/current/service/build.gradle
index 61b94fc..2984c33 100644
--- a/media2/media2-session/version-compat-tests/current/service/build.gradle
+++ b/media2/media2-session/version-compat-tests/current/service/build.gradle
@@ -29,9 +29,6 @@
}
android {
- defaultConfig {
- minSdkVersion 16
- }
namespace "androidx.media2.test.service"
}
diff --git a/media2/media2-session/version-compat-tests/previous/client/build.gradle b/media2/media2-session/version-compat-tests/previous/client/build.gradle
index 634a725..5ca0a2c 100644
--- a/media2/media2-session/version-compat-tests/previous/client/build.gradle
+++ b/media2/media2-session/version-compat-tests/previous/client/build.gradle
@@ -30,9 +30,6 @@
}
android {
- defaultConfig {
- minSdkVersion 16
- }
namespace "androidx.media2.test.client"
}
diff --git a/media2/media2-session/version-compat-tests/previous/service/build.gradle b/media2/media2-session/version-compat-tests/previous/service/build.gradle
index 48791a6..0f6afc1 100644
--- a/media2/media2-session/version-compat-tests/previous/service/build.gradle
+++ b/media2/media2-session/version-compat-tests/previous/service/build.gradle
@@ -29,9 +29,6 @@
}
android {
- defaultConfig {
- minSdkVersion 16
- }
namespace "androidx.media2.test.service"
}
diff --git a/media2/media2-widget/build.gradle b/media2/media2-widget/build.gradle
index b247d61..8089619 100644
--- a/media2/media2-widget/build.gradle
+++ b/media2/media2-widget/build.gradle
@@ -40,7 +40,6 @@
android {
defaultConfig {
- minSdkVersion 16
multiDexEnabled true
}
sourceSets {
diff --git a/media2/media2-widget/lint-baseline.xml b/media2/media2-widget/lint-baseline.xml
index 0b8527f..1ad87ad 100644
--- a/media2/media2-widget/lint-baseline.xml
+++ b/media2/media2-widget/lint-baseline.xml
@@ -1,9 +1,9 @@
<?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-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 24 (current min is 16): `android.view.PixelCopy.OnPixelCopyFinishedListener`"
+ message="Class requires API level 24 (current min is 19): `android.view.PixelCopy.OnPixelCopyFinishedListener`"
errorLine1=" PixelCopy.request(source, dest, new PixelCopy.OnPixelCopyFinishedListener() {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -82,4 +82,157 @@
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/api/api_lint.ignore b/mediarouter/mediarouter/api/api_lint.ignore
index e52c8a2..83bd524 100644
--- a/mediarouter/mediarouter/api/api_lint.ignore
+++ b/mediarouter/mediarouter/api/api_lint.ignore
@@ -97,8 +97,6 @@
Inconsistent interface constant; expected 'androidx.mediarouter.media.MediaRouteProviderService'`
-InvalidNullabilityOverride: androidx.mediarouter.app.MediaRouteButton#onDraw(android.graphics.Canvas) parameter #0:
- Invalid nullability on parameter `canvas` in method `onDraw`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
InvalidNullabilityOverride: androidx.mediarouter.app.MediaRouteControllerDialog#onKeyDown(int, android.view.KeyEvent) parameter #1:
Invalid nullability on parameter `event` in method `onKeyDown`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
InvalidNullabilityOverride: androidx.mediarouter.app.MediaRouteControllerDialog#onKeyUp(int, android.view.KeyEvent) parameter #1:
@@ -139,6 +137,10 @@
Missing nullability on field `EMPTY` in class `class androidx.mediarouter.media.MediaRouteSelector`
+NotCloseable: androidx.mediarouter.media.RemotePlaybackClient:
+ Classes that release resources (release(), stop()) should implement AutoCloseable and CloseGuard: class androidx.mediarouter.media.RemotePlaybackClient
+
+
NullableCollection: androidx.mediarouter.media.MediaItemStatus#getExtras():
Return type of method androidx.mediarouter.media.MediaItemStatus.getExtras() is a nullable collection (`android.os.Bundle`); must be non-null
NullableCollection: androidx.mediarouter.media.MediaRouteDescriptor#getExtras():
diff --git a/mediarouter/mediarouter/lint-baseline.xml b/mediarouter/mediarouter/lint-baseline.xml
index db47a78..a65aeb4 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.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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="BanThreadSleep"
@@ -29,42 +29,6 @@
</issue>
<issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.mediarouter.app.MediaRouteDynamicControllerDialog is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" ScriptIntrinsicBlur blurScript = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs));"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/app/MediaRouteDynamicControllerDialog.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.mediarouter.app.MediaRouteDynamicControllerDialog is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" blurScript.setRadius(radius);"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/app/MediaRouteDynamicControllerDialog.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.mediarouter.app.MediaRouteDynamicControllerDialog is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" blurScript.setInput(allocation);"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/app/MediaRouteDynamicControllerDialog.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.mediarouter.app.MediaRouteDynamicControllerDialog is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" blurScript.forEach(blurAllocation);"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/app/MediaRouteDynamicControllerDialog.java"/>
- </issue>
-
- <issue
id="MissingTestSizeAnnotation"
message="Missing test size annotation"
errorLine1=" public void testReset() {"
@@ -82,4 +46,184 @@
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 ab6db8e..136717c 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.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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="BanThreadSleep"
@@ -19,4 +19,49 @@
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/integration-tests/testapp/lint-baseline.xml b/navigation/integration-tests/testapp/lint-baseline.xml
index acc57fc..5c97efc 100644
--- a/navigation/integration-tests/testapp/lint-baseline.xml
+++ b/navigation/integration-tests/testapp/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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="ClassVerificationFailure"
@@ -21,33 +21,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.navigation.testapp.HelpActivity is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" val fade = Fade()"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/navigation/testapp/HelpActivity.kt"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.navigation.testapp.HelpActivity is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" fade.excludeTarget(android.R.id.statusBarBackground, true)"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/navigation/testapp/HelpActivity.kt"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.navigation.testapp.HelpActivity is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" fade.excludeTarget(android.R.id.navigationBarBackground, true)"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/navigation/testapp/HelpActivity.kt"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 21; however, the containing class androidx.navigation.testapp.HelpActivity is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" window.exitTransition = fade"
errorLine2=" ~~~~~~~~~~~~~~">
diff --git a/navigation/navigation-common/lint-baseline.xml b/navigation/navigation-common/lint-baseline.xml
index b2e8e58..f57c19e 100644
--- a/navigation/navigation-common/lint-baseline.xml
+++ b/navigation/navigation-common/lint-baseline.xml
@@ -1,9 +1,9 @@
<?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-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 14): `android.os.BaseBundle#get`"
+ message="Call requires API level 21 (current min is 19): `android.os.BaseBundle#get`"
errorLine1=" if (!isNullable && bundle.containsKey(name) && bundle[name] == null) {"
errorLine2=" ~~">
<location
diff --git a/navigation/navigation-fragment/api/api_lint.ignore b/navigation/navigation-fragment/api/api_lint.ignore
index b57faea..05fb76a 100644
--- a/navigation/navigation-fragment/api/api_lint.ignore
+++ b/navigation/navigation-fragment/api/api_lint.ignore
@@ -1,11 +1,3 @@
// Baseline format: 1.0
DocumentExceptions: androidx.navigation.fragment.FragmentNavArgsLazyKt#navArgs(androidx.fragment.app.Fragment):
Method FragmentNavArgsLazyKt.navArgs appears to be throwing java.lang.IllegalStateException; this should be listed in the documentation; see https://android.github.io/kotlin-guides/interop.html#document-exceptions
-
-
-MissingNullability: androidx.navigation.NavGraphViewModelLazyKt#navGraphViewModels(androidx.fragment.app.Fragment, String, kotlin.jvm.functions.Function0<? extends androidx.lifecycle.viewmodel.CreationExtras>, kotlin.jvm.functions.Function0<? extends androidx.lifecycle.ViewModelProvider.Factory>):
- Missing nullability on method `navGraphViewModels` return
-MissingNullability: androidx.navigation.NavGraphViewModelLazyKt#navGraphViewModels(androidx.fragment.app.Fragment, int, kotlin.jvm.functions.Function0<? extends androidx.lifecycle.viewmodel.CreationExtras>, kotlin.jvm.functions.Function0<? extends androidx.lifecycle.ViewModelProvider.Factory>):
- Missing nullability on method `navGraphViewModels` return
-MissingNullability: androidx.navigation.fragment.FragmentNavArgsLazyKt#navArgs(androidx.fragment.app.Fragment):
- Missing nullability on method `navArgs` return
diff --git a/navigation/navigation-runtime/api/api_lint.ignore b/navigation/navigation-runtime/api/api_lint.ignore
index 0f5a137..787c8db 100644
--- a/navigation/navigation-runtime/api/api_lint.ignore
+++ b/navigation/navigation-runtime/api/api_lint.ignore
@@ -17,10 +17,6 @@
A Kotlin method with default parameter values should be annotated with @JvmOverloads for better Java interoperability; see https://android.github.io/kotlin-guides/interop.html#function-overloads-for-defaults
-MissingNullability: androidx.navigation.ActivityNavArgsLazyKt#navArgs(android.app.Activity):
- Missing nullability on method `navArgs` return
-
-
NullableCollection: androidx.navigation.NavController#saveState():
Return type of method androidx.navigation.NavController.saveState() is a nullable collection (`android.os.Bundle`); must be non-null
NullableCollection: androidx.navigation.NavController.OnDestinationChangedListener#onDestinationChanged(androidx.navigation.NavController, androidx.navigation.NavDestination, android.os.Bundle) parameter #2:
diff --git a/paging/integration-tests/testapp/build.gradle b/paging/integration-tests/testapp/build.gradle
index 97d3651..dd6fc23 100644
--- a/paging/integration-tests/testapp/build.gradle
+++ b/paging/integration-tests/testapp/build.gradle
@@ -22,6 +22,8 @@
}
dependencies {
+ implementation(libs.multidex)
+
implementation("androidx.arch.core:core-runtime:2.2.0")
implementation(projectOrArtifact(":room:room-ktx"))
implementation(projectOrArtifact(":room:room-rxjava2"))
@@ -44,10 +46,14 @@
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.truth)
+ androidTestImplementation(project(":annotation:annotation"))
}
android {
namespace "androidx.paging.integration.testapp"
+ defaultConfig {
+ multiDexEnabled = true
+ }
}
// Enable parameter names to support Room incremental when its a project() dep.
diff --git a/paging/paging-testing/build.gradle b/paging/paging-testing/build.gradle
index a17e9a1..2955b5f 100644
--- a/paging/paging-testing/build.gradle
+++ b/paging/paging-testing/build.gradle
@@ -46,8 +46,16 @@
}
}
+ commonJvmMain {
+ dependsOn(commonMain)
+ }
+
+ jvmMain {
+ dependsOn(commonJvmMain)
+ }
+
androidMain {
- dependsOn(jvmMain)
+ dependsOn(commonJvmMain)
}
commonTest {
@@ -59,15 +67,19 @@
}
}
- jvmTest {
+ commonJvmTest {
dependsOn(commonTest)
dependencies {
implementation(libs.junit)
}
}
+ jvmTest {
+ dependsOn(commonJvmTest)
+ }
+
androidInstrumentedTest {
- dependsOn(jvmTest)
+ dependsOn(commonJvmTest)
dependencies {
implementation(libs.testRunner)
}
diff --git a/paging/paging-testing/src/jvmMain/kotlin/androidx/paging/testing/internal/Atomics.jvm.kt b/paging/paging-testing/src/commonJvmMain/kotlin/androidx/paging/testing/internal/Atomics.jvm.kt
similarity index 100%
rename from paging/paging-testing/src/jvmMain/kotlin/androidx/paging/testing/internal/Atomics.jvm.kt
rename to paging/paging-testing/src/commonJvmMain/kotlin/androidx/paging/testing/internal/Atomics.jvm.kt
diff --git a/percentlayout/percentlayout/lint-baseline.xml b/percentlayout/percentlayout/lint-baseline.xml
new file mode 100644
index 0000000..0ce4092
--- /dev/null
+++ b/percentlayout/percentlayout/lint-baseline.xml
@@ -0,0 +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">
+
+ <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/playground.properties b/playground-common/playground.properties
index e8268ef..b314955 100644
--- a/playground-common/playground.properties
+++ b/playground-common/playground.properties
@@ -26,5 +26,5 @@
# Disable docs
androidx.enableDocumentation=false
androidx.playground.snapshotBuildId=10956675
-androidx.playground.metalavaBuildId=10910286
+androidx.playground.metalavaBuildId=10969629
androidx.studio.type=playground
\ No newline at end of file
diff --git a/print/print/lint-baseline.xml b/print/print/lint-baseline.xml
new file mode 100644
index 0000000..f6d68dc
--- /dev/null
+++ b/print/print/lint-baseline.xml
@@ -0,0 +1,94 @@
+<?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/sdkruntime/sdkruntime-client/lint-baseline.xml b/privacysandbox/sdkruntime/sdkruntime-client/lint-baseline.xml
index 61827de..fdc15ae 100644
--- a/privacysandbox/sdkruntime/sdkruntime-client/lint-baseline.xml
+++ b/privacysandbox/sdkruntime/sdkruntime-client/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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="BanThreadSleep"
@@ -64,4 +64,22 @@
file="src/main/java/androidx/privacysandbox/sdkruntime/client/SdkSandboxManagerCompat.kt"/>
</issue>
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" if (Build.VERSION.SDK_INT >= JELLY_BEAN_MR2) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/privacysandbox/sdkruntime/client/loader/storage/CachedLocalSdkStorage.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 18"
+ errorLine1=" @RequiresApi(JELLY_BEAN_MR2)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/privacysandbox/sdkruntime/client/loader/storage/CachedLocalSdkStorage.kt"/>
+ </issue>
+
</issues>
diff --git a/privacysandbox/ui/integration-tests/testaidl/lint-baseline.xml b/privacysandbox/ui/integration-tests/testaidl/lint-baseline.xml
deleted file mode 100644
index 53c1983..0000000
--- a/privacysandbox/ui/integration-tests/testaidl/lint-baseline.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?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">
-
- <issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="interface ISdkApi {"
- errorLine2="^">
- <location
- file="src/main/aidl/androidx/privacysandbox/ui/integration/testaidl/ISdkApi.aidl"/>
- </issue>
-
-</issues>
diff --git a/privacysandbox/ui/ui-core/lint-baseline.xml b/privacysandbox/ui/ui-core/lint-baseline.xml
deleted file mode 100644
index 263abb0..0000000
--- a/privacysandbox/ui/ui-core/lint-baseline.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?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">
-
- <issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="oneway interface IRemoteSessionClient {"
- errorLine2="^">
- <location
- file="src/main/aidl/androidx/privacysandbox/ui/core/IRemoteSessionClient.aidl"/>
- </issue>
-
- <issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="oneway interface IRemoteSessionController {"
- errorLine2="^">
- <location
- file="src/main/aidl/androidx/privacysandbox/ui/core/IRemoteSessionController.aidl"/>
- </issue>
-
- <issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="oneway interface ISandboxedUiAdapter {"
- errorLine2="^">
- <location
- file="src/main/aidl/androidx/privacysandbox/ui/core/ISandboxedUiAdapter.aidl"/>
- </issue>
-
- <issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="oneway interface ISdkActivityLauncher {"
- errorLine2="^">
- <location
- file="src/main/aidl/androidx/privacysandbox/ui/core/ISdkActivityLauncher.aidl"/>
- </issue>
-
- <issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="oneway interface ISdkActivityLauncherCallback {"
- errorLine2="^">
- <location
- file="src/main/aidl/androidx/privacysandbox/ui/core/ISdkActivityLauncherCallback.aidl"/>
- </issue>
-
-</issues>
diff --git a/profileinstaller/profileinstaller/lint-baseline.xml b/profileinstaller/profileinstaller/lint-baseline.xml
new file mode 100644
index 0000000..480387a
--- /dev/null
+++ b/profileinstaller/profileinstaller/lint-baseline.xml
@@ -0,0 +1,58 @@
+<?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/api/api_lint.ignore b/recyclerview/recyclerview/api/api_lint.ignore
index 463599f..66d9027 100644
--- a/recyclerview/recyclerview/api/api_lint.ignore
+++ b/recyclerview/recyclerview/api/api_lint.ignore
@@ -161,36 +161,6 @@
Internal field mLayoutManager must not be exposed
-InvalidNullabilityOverride: androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate.ItemDelegate#dispatchPopulateAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent) parameter #0:
- Invalid nullability on parameter `host` in method `dispatchPopulateAccessibilityEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate.ItemDelegate#dispatchPopulateAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent) parameter #1:
- Invalid nullability on parameter `event` in method `dispatchPopulateAccessibilityEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate.ItemDelegate#getAccessibilityNodeProvider(android.view.View):
- Invalid nullability on method `getAccessibilityNodeProvider` return. Overrides of unannotated super method cannot be Nullable.
-InvalidNullabilityOverride: androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate.ItemDelegate#getAccessibilityNodeProvider(android.view.View) parameter #0:
- Invalid nullability on parameter `host` in method `getAccessibilityNodeProvider`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate.ItemDelegate#onInitializeAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent) parameter #0:
- Invalid nullability on parameter `host` in method `onInitializeAccessibilityEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate.ItemDelegate#onInitializeAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent) parameter #1:
- Invalid nullability on parameter `event` in method `onInitializeAccessibilityEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate.ItemDelegate#onPopulateAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent) parameter #0:
- Invalid nullability on parameter `host` in method `onPopulateAccessibilityEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate.ItemDelegate#onPopulateAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent) parameter #1:
- Invalid nullability on parameter `event` in method `onPopulateAccessibilityEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate.ItemDelegate#onRequestSendAccessibilityEvent(android.view.ViewGroup, android.view.View, android.view.accessibility.AccessibilityEvent) parameter #0:
- Invalid nullability on parameter `host` in method `onRequestSendAccessibilityEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate.ItemDelegate#onRequestSendAccessibilityEvent(android.view.ViewGroup, android.view.View, android.view.accessibility.AccessibilityEvent) parameter #1:
- Invalid nullability on parameter `child` in method `onRequestSendAccessibilityEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate.ItemDelegate#onRequestSendAccessibilityEvent(android.view.ViewGroup, android.view.View, android.view.accessibility.AccessibilityEvent) parameter #2:
- Invalid nullability on parameter `event` in method `onRequestSendAccessibilityEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate.ItemDelegate#sendAccessibilityEvent(android.view.View, int) parameter #0:
- Invalid nullability on parameter `host` in method `sendAccessibilityEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate.ItemDelegate#sendAccessibilityEventUnchecked(android.view.View, android.view.accessibility.AccessibilityEvent) parameter #0:
- Invalid nullability on parameter `host` in method `sendAccessibilityEventUnchecked`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate.ItemDelegate#sendAccessibilityEventUnchecked(android.view.View, android.view.accessibility.AccessibilityEvent) parameter #1:
- Invalid nullability on parameter `event` in method `sendAccessibilityEventUnchecked`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-
-
KotlinOperator: androidx.recyclerview.widget.RecyclerView.State#get(int):
Method can be invoked with an indexing operator from Kotlin: `get` (this is usually desirable; just make sure it makes sense for this type of object)
KotlinOperator: androidx.recyclerview.widget.SortedList#get(int):
@@ -545,10 +515,6 @@
Missing nullability on parameter `container` in method `dispatchRestoreInstanceState`
MissingNullability: androidx.recyclerview.widget.RecyclerView#dispatchSaveInstanceState(android.util.SparseArray<android.os.Parcelable>) parameter #0:
Missing nullability on parameter `container` in method `dispatchSaveInstanceState`
-MissingNullability: androidx.recyclerview.widget.RecyclerView#draw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `c` in method `draw`
-MissingNullability: androidx.recyclerview.widget.RecyclerView#drawChild(android.graphics.Canvas, android.view.View, long) parameter #0:
- Missing nullability on parameter `canvas` in method `drawChild`
MissingNullability: androidx.recyclerview.widget.RecyclerView#drawChild(android.graphics.Canvas, android.view.View, long) parameter #1:
Missing nullability on parameter `child` in method `drawChild`
MissingNullability: androidx.recyclerview.widget.RecyclerView#findViewHolderForItemId(long):
@@ -571,8 +537,6 @@
Missing nullability on method `getAccessibilityClassName` return
MissingNullability: androidx.recyclerview.widget.RecyclerView#getChildViewHolder(android.view.View):
Missing nullability on method `getChildViewHolder` return
-MissingNullability: androidx.recyclerview.widget.RecyclerView#onDraw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `c` in method `onDraw`
MissingNullability: androidx.recyclerview.widget.RecyclerView#onGenericMotionEvent(android.view.MotionEvent) parameter #0:
Missing nullability on parameter `event` in method `onGenericMotionEvent`
MissingNullability: androidx.recyclerview.widget.RecyclerView#onInterceptTouchEvent(android.view.MotionEvent) parameter #0:
@@ -891,6 +855,10 @@
Bare field stackFromEnd must be marked final, or moved behind accessors if mutable
+NotCloseable: androidx.recyclerview.widget.RecyclerView.SmoothScroller:
+ Classes that release resources (stop()) should implement AutoCloseable and CloseGuard: class androidx.recyclerview.widget.RecyclerView.SmoothScroller
+
+
PublicTypedef: androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory.EdgeDirection:
Don't expose @IntDef: EdgeDirection must be hidden.
PublicTypedef: androidx.recyclerview.widget.RecyclerView.ItemAnimator.AdapterChanges:
diff --git a/recyclerview/recyclerview/lint-baseline.xml b/recyclerview/recyclerview/lint-baseline.xml
index 8431f20..1e9ffd1 100644
--- a/recyclerview/recyclerview/lint-baseline.xml
+++ b/recyclerview/recyclerview/lint-baseline.xml
@@ -1,32 +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">
-
- <issue
- id="NewApi"
- message="Call requires API level 16 (current min is 14): `android.view.View#getMinimumWidth`"
- errorLine1=" getMinimumWidth()),"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/recyclerview/widget/TestedFrameLayout.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 16 (current min is 14): `android.view.View#getMinimumHeight`"
- errorLine1=" getMinimumHeight()));"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/recyclerview/widget/TestedFrameLayout.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `new android.widget.FrameLayout.LayoutParams`"
- errorLine1=" super(source);"
- errorLine2=" ~~~~~">
- <location
- file="src/androidTest/java/androidx/recyclerview/widget/TestedFrameLayout.java"/>
- </issue>
+<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"
@@ -290,6 +263,60 @@
</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/recyclerview/widget/GridLayoutManager.java"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is never < 19"
+ errorLine1=" static final boolean FORCE_INVALIDATE_DISPLAY_LIST = Build.VERSION.SDK_INT == 18"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/recyclerview/widget/RecyclerView.java"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" static final boolean POST_UPDATES_ON_ANIMATION = Build.VERSION.SDK_INT >= 16;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/recyclerview/widget/RecyclerView.java"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is never < 19"
+ errorLine1=" private static final boolean FORCE_ABS_FOCUS_SEARCH_DIRECTION = Build.VERSION.SDK_INT <= 15;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/recyclerview/widget/RecyclerView.java"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is never < 19"
+ errorLine1=" private static final boolean IGNORE_DETACHED_FOCUSED_CHILD = Build.VERSION.SDK_INT <= 15;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/recyclerview/widget/RecyclerView.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/recyclerview/widget/RecyclerView.java"/>
+ </issue>
+
+ <issue
id="KotlinPropertyAccess"
message="This method should be called `getHasFixedSize` such that `hasFixedSize` can be accessed as a property from Kotlin; see https://android.github.io/kotlin-guides/interop.html#property-prefixes"
errorLine1=" public boolean hasFixedSize() {"
diff --git a/room/integration-tests/noappcompattestapp/build.gradle b/room/integration-tests/noappcompattestapp/build.gradle
index 07dfb8c7..0bc9959 100644
--- a/room/integration-tests/noappcompattestapp/build.gradle
+++ b/room/integration-tests/noappcompattestapp/build.gradle
@@ -30,6 +30,7 @@
androidTestImplementation(libs.testCore)
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.espressoCore)
+ androidTestImplementation(project(":annotation:annotation"))
testImplementation(libs.junit)
}
diff --git a/room/integration-tests/testapp/lint-baseline.xml b/room/integration-tests/testapp/lint-baseline.xml
index 2867962..92e25cf 100644
--- a/room/integration-tests/testapp/lint-baseline.xml
+++ b/room/integration-tests/testapp/lint-baseline.xml
@@ -1,41 +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">
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `new java.lang.AssertionError`"
- errorLine1=" throw new AssertionError("interrupted", e);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/room/integration/testapp/test/QueryTransactionTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `new java.lang.AssertionError`"
- errorLine1=" throw new AssertionError("drain timed out", e);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/room/integration/testapp/test/QueryTransactionTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `new java.lang.AssertionError`"
- errorLine1=" throw new AssertionError("interrupted", e);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/room/integration/testapp/test/QueryTransactionTest.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 19 (current min is 14): `new java.lang.AssertionError`"
- errorLine1=" throw new AssertionError("execution error", e);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/room/integration/testapp/test/QueryTransactionTest.java"/>
- </issue>
+<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"
@@ -164,15 +128,6 @@
</issue>
<issue
- id="RequireUnstableAidlAnnotation"
- message="Unstable AIDL files must be annotated with `@RequiresOptIn` marker"
- errorLine1="interface ISampleDatabaseService {"
- errorLine2="^">
- <location
- file="src/main/aidl/androidx/room/integration/testapp/ISampleDatabaseService.aidl"/>
- </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 String getName() {"
diff --git a/room/room-common/api/current.txt b/room/room-common/api/current.txt
index a00c4db..fd67b3b 100644
--- a/room/room-common/api/current.txt
+++ b/room/room-common/api/current.txt
@@ -104,23 +104,31 @@
property public abstract Class<?> entity;
}
- @java.lang.annotation.Repeatable(DeleteColumn.Entries::class) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface DeleteColumn {
+ @kotlin.annotation.Repeatable @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface DeleteColumn {
method public abstract String columnName();
method public abstract String tableName();
property public abstract String columnName;
property public abstract String tableName;
}
+ @kotlin.annotation.Repeatable @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public static @interface DeleteColumn.Container {
+ method public abstract androidx.room.DeleteColumn[] value();
+ }
+
@kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public static @interface DeleteColumn.Entries {
method public abstract androidx.room.DeleteColumn[] value();
property public abstract androidx.room.DeleteColumn[] value;
}
- @java.lang.annotation.Repeatable(DeleteTable.Entries::class) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface DeleteTable {
+ @kotlin.annotation.Repeatable @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface DeleteTable {
method public abstract String tableName();
property public abstract String tableName;
}
+ @kotlin.annotation.Repeatable @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public static @interface DeleteTable.Container {
+ method public abstract androidx.room.DeleteTable[] value();
+ }
+
@kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public static @interface DeleteTable.Entries {
method public abstract androidx.room.DeleteTable[] value();
property public abstract androidx.room.DeleteTable[] value;
@@ -334,7 +342,7 @@
property public abstract String[] projection;
}
- @java.lang.annotation.Repeatable(RenameColumn.Entries::class) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface RenameColumn {
+ @kotlin.annotation.Repeatable @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface RenameColumn {
method public abstract String fromColumnName();
method public abstract String tableName();
method public abstract String toColumnName();
@@ -343,18 +351,26 @@
property public abstract String toColumnName;
}
+ @kotlin.annotation.Repeatable @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public static @interface RenameColumn.Container {
+ method public abstract androidx.room.RenameColumn[] value();
+ }
+
@kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public static @interface RenameColumn.Entries {
method public abstract androidx.room.RenameColumn[] value();
property public abstract androidx.room.RenameColumn[] value;
}
- @java.lang.annotation.Repeatable(RenameTable.Entries::class) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface RenameTable {
+ @kotlin.annotation.Repeatable @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface RenameTable {
method public abstract String fromTableName();
method public abstract String toTableName();
property public abstract String fromTableName;
property public abstract String toTableName;
}
+ @kotlin.annotation.Repeatable @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public static @interface RenameTable.Container {
+ method public abstract androidx.room.RenameTable[] value();
+ }
+
@kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public static @interface RenameTable.Entries {
method public abstract androidx.room.RenameTable[] value();
property public abstract androidx.room.RenameTable[] value;
diff --git a/room/room-common/api/restricted_current.txt b/room/room-common/api/restricted_current.txt
index 4512daa..32582e2 100644
--- a/room/room-common/api/restricted_current.txt
+++ b/room/room-common/api/restricted_current.txt
@@ -104,23 +104,31 @@
property public abstract Class<?> entity;
}
- @java.lang.annotation.Repeatable(DeleteColumn.Entries::class) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface DeleteColumn {
+ @kotlin.annotation.Repeatable @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface DeleteColumn {
method public abstract String columnName();
method public abstract String tableName();
property public abstract String columnName;
property public abstract String tableName;
}
+ @kotlin.annotation.Repeatable @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public static @interface DeleteColumn.Container {
+ method public abstract androidx.room.DeleteColumn[] value();
+ }
+
@kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public static @interface DeleteColumn.Entries {
method public abstract androidx.room.DeleteColumn[] value();
property public abstract androidx.room.DeleteColumn[] value;
}
- @java.lang.annotation.Repeatable(DeleteTable.Entries::class) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface DeleteTable {
+ @kotlin.annotation.Repeatable @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface DeleteTable {
method public abstract String tableName();
property public abstract String tableName;
}
+ @kotlin.annotation.Repeatable @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public static @interface DeleteTable.Container {
+ method public abstract androidx.room.DeleteTable[] value();
+ }
+
@kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public static @interface DeleteTable.Entries {
method public abstract androidx.room.DeleteTable[] value();
property public abstract androidx.room.DeleteTable[] value;
@@ -334,7 +342,7 @@
property public abstract String[] projection;
}
- @java.lang.annotation.Repeatable(RenameColumn.Entries::class) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface RenameColumn {
+ @kotlin.annotation.Repeatable @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface RenameColumn {
method public abstract String fromColumnName();
method public abstract String tableName();
method public abstract String toColumnName();
@@ -343,18 +351,26 @@
property public abstract String toColumnName;
}
+ @kotlin.annotation.Repeatable @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public static @interface RenameColumn.Container {
+ method public abstract androidx.room.RenameColumn[] value();
+ }
+
@kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public static @interface RenameColumn.Entries {
method public abstract androidx.room.RenameColumn[] value();
property public abstract androidx.room.RenameColumn[] value;
}
- @java.lang.annotation.Repeatable(RenameTable.Entries::class) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface RenameTable {
+ @kotlin.annotation.Repeatable @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface RenameTable {
method public abstract String fromTableName();
method public abstract String toTableName();
property public abstract String fromTableName;
property public abstract String toTableName;
}
+ @kotlin.annotation.Repeatable @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public static @interface RenameTable.Container {
+ method public abstract androidx.room.RenameTable[] value();
+ }
+
@kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public static @interface RenameTable.Entries {
method public abstract androidx.room.RenameTable[] value();
property public abstract androidx.room.RenameTable[] value;
diff --git a/room/room-common/build.gradle b/room/room-common/build.gradle
index 49e5177..cdbee57 100644
--- a/room/room-common/build.gradle
+++ b/room/room-common/build.gradle
@@ -41,14 +41,27 @@
commonMain {
dependencies {
api(libs.kotlinStdlib)
- api("androidx.annotation:annotation:1.3.0")
+ api(projectOrArtifact(":annotation:annotation"))
+
}
}
+
commonTest {
dependencies {
implementation(project(":kruth:kruth"))
- implementation(libs.junit)
+ implementation(libs.kotlinTest)
+ }
+ }
+
+ jvmMain {
+ dependsOn(commonMain)
+ }
+
+ jvmTest {
+ dependsOn(commonTest)
+ dependencies {
implementation(libs.guava)
+ implementation(libs.kotlinTestJunit)
}
}
}
diff --git a/room/room-common/src/commonMain/kotlin/androidx/room/AmbiguousColumnResolver.kt b/room/room-common/src/commonMain/kotlin/androidx/room/AmbiguousColumnResolver.kt
index ed818bf..a1c8345 100644
--- a/room/room-common/src/commonMain/kotlin/androidx/room/AmbiguousColumnResolver.kt
+++ b/room/room-common/src/commonMain/kotlin/androidx/room/AmbiguousColumnResolver.kt
@@ -17,7 +17,7 @@
package androidx.room
import androidx.annotation.RestrictTo
-import java.util.Locale
+import kotlin.jvm.JvmStatic
/**
* Utility class for resolving and mapping ambiguous columns from a query result.
@@ -73,11 +73,11 @@
column.substring(1, column.length - 1)
} else {
column
- }.lowercase(Locale.US)
+ }.lowercase()
}
for (i in mappings.indices) {
for (j in mappings[i].indices) {
- mappings[i][j] = mappings[i][j].lowercase(Locale.US)
+ mappings[i][j] = mappings[i][j].lowercase()
}
}
diff --git a/room/room-common/src/commonMain/kotlin/androidx/room/ColumnInfo.kt b/room/room-common/src/commonMain/kotlin/androidx/room/ColumnInfo.kt
index 0c4561f..72b7d8f 100644
--- a/room/room-common/src/commonMain/kotlin/androidx/room/ColumnInfo.kt
+++ b/room/room-common/src/commonMain/kotlin/androidx/room/ColumnInfo.kt
@@ -45,7 +45,7 @@
* @return The type affinity of the column. This is either [UNDEFINED], [TEXT],
* [INTEGER], [REAL], or [BLOB].
*/
- @SuppressWarnings("unused")
+ @Suppress("unused")
@get:SQLiteTypeAffinity
val typeAffinity: Int = UNDEFINED,
diff --git a/room/room-common/src/commonMain/kotlin/androidx/room/DeleteColumn.kt b/room/room-common/src/commonMain/kotlin/androidx/room/DeleteColumn.kt
index 1f90a85..79c3623 100644
--- a/room/room-common/src/commonMain/kotlin/androidx/room/DeleteColumn.kt
+++ b/room/room-common/src/commonMain/kotlin/androidx/room/DeleteColumn.kt
@@ -22,7 +22,7 @@
*
* @see AutoMigration
*/
-@JvmRepeatable(DeleteColumn.Entries::class)
+@Repeatable
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
public annotation class DeleteColumn(
diff --git a/room/room-common/src/commonMain/kotlin/androidx/room/DeleteTable.kt b/room/room-common/src/commonMain/kotlin/androidx/room/DeleteTable.kt
index 7aaaf51..c35bf9bd 100644
--- a/room/room-common/src/commonMain/kotlin/androidx/room/DeleteTable.kt
+++ b/room/room-common/src/commonMain/kotlin/androidx/room/DeleteTable.kt
@@ -22,7 +22,7 @@
*
* @see AutoMigration
*/
-@JvmRepeatable(DeleteTable.Entries::class)
+@Repeatable
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
public annotation class DeleteTable(
diff --git a/room/room-common/src/commonMain/kotlin/androidx/room/FtsOptions.kt b/room/room-common/src/commonMain/kotlin/androidx/room/FtsOptions.kt
index 109d38a..1a88b21 100644
--- a/room/room-common/src/commonMain/kotlin/androidx/room/FtsOptions.kt
+++ b/room/room-common/src/commonMain/kotlin/androidx/room/FtsOptions.kt
@@ -19,6 +19,7 @@
package androidx.room
import androidx.annotation.RequiresApi
+import kotlin.jvm.JvmName
/**
* Available option values that can be used with [Fts3] & [Fts4].
diff --git a/room/room-common/src/commonMain/kotlin/androidx/room/RenameColumn.kt b/room/room-common/src/commonMain/kotlin/androidx/room/RenameColumn.kt
index f52f790..5ba8b44 100644
--- a/room/room-common/src/commonMain/kotlin/androidx/room/RenameColumn.kt
+++ b/room/room-common/src/commonMain/kotlin/androidx/room/RenameColumn.kt
@@ -22,7 +22,7 @@
*
* @see AutoMigration
*/
-@JvmRepeatable(RenameColumn.Entries::class)
+@Repeatable
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
public annotation class RenameColumn(
diff --git a/room/room-common/src/commonMain/kotlin/androidx/room/RenameTable.kt b/room/room-common/src/commonMain/kotlin/androidx/room/RenameTable.kt
index 2783e86..440b8ef 100644
--- a/room/room-common/src/commonMain/kotlin/androidx/room/RenameTable.kt
+++ b/room/room-common/src/commonMain/kotlin/androidx/room/RenameTable.kt
@@ -22,7 +22,7 @@
* @see [AutoMigration]
*
*/
-@JvmRepeatable(RenameTable.Entries::class)
+@Repeatable
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
public annotation class RenameTable(
diff --git a/room/room-common/src/commonMain/kotlin/androidx/room/RoomMasterTable.kt b/room/room-common/src/commonMain/kotlin/androidx/room/RoomMasterTable.kt
index 4af3272..e316ed6 100644
--- a/room/room-common/src/commonMain/kotlin/androidx/room/RoomMasterTable.kt
+++ b/room/room-common/src/commonMain/kotlin/androidx/room/RoomMasterTable.kt
@@ -18,12 +18,14 @@
package androidx.room
import androidx.annotation.RestrictTo
+import kotlin.jvm.JvmName
+import kotlin.jvm.JvmStatic
/**
* Schema information about Room's master table.
*
*/
-@SuppressWarnings("WeakerAccess")
+@Suppress("WeakerAccess")
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
public object RoomMasterTable {
/**
diff --git a/room/room-common/src/commonMain/kotlin/androidx/room/RoomWarnings.kt b/room/room-common/src/commonMain/kotlin/androidx/room/RoomWarnings.kt
index 8031af0..3a9645a 100644
--- a/room/room-common/src/commonMain/kotlin/androidx/room/RoomWarnings.kt
+++ b/room/room-common/src/commonMain/kotlin/androidx/room/RoomWarnings.kt
@@ -21,7 +21,7 @@
* You can use these values inside a [SuppressWarnings] annotation to disable the warnings.
*/
// If you change this, don't forget to change androidx.room.vo.Warning
-@SuppressWarnings("unused", "WeakerAccess")
+@Suppress("unused", "WeakerAccess")
public open class RoomWarnings {
public companion object {
/**
@@ -210,6 +210,6 @@
}
@Deprecated("This type should not be instantiated as it contains only static methods. ")
- @SuppressWarnings("PrivateConstructorForUtilityClass")
+ @Suppress("PrivateConstructorForUtilityClass")
public constructor()
}
diff --git a/room/room-common/src/commonTest/kotlin/androidx/room/AmbiguousColumnResolverTest.kt b/room/room-common/src/commonTest/kotlin/androidx/room/AmbiguousColumnResolverTest.kt
index 403b226..2d8a5fb 100644
--- a/room/room-common/src/commonTest/kotlin/androidx/room/AmbiguousColumnResolverTest.kt
+++ b/room/room-common/src/commonTest/kotlin/androidx/room/AmbiguousColumnResolverTest.kt
@@ -1,3 +1,4 @@
+
/*
* Copyright 2021 The Android Open Source Project
*
@@ -13,16 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package androidx.room
-
import androidx.kruth.assertThat
-import java.util.Locale
-import org.junit.Ignore
-import org.junit.Test
+import kotlin.test.Ignore
+import kotlin.test.Test
class AmbiguousColumnResolverTest {
-
@Test
fun simple() {
// query: SELECT * FROM T1 JOIN T2
@@ -41,7 +38,6 @@
)
)
}
-
@Test
fun simple_pojoSwapped() {
// query: SELECT * FROM T1 JOIN T2
@@ -60,9 +56,8 @@
)
)
}
-
@Test
- @Ignore("Algorithm can't solve this as expected.")
+ @Ignore // Algorithm can't solve this as expected.
fun simple_oddResultOrder() {
// query: SELECT User.id, Comment.id, userId, text, name FROM User JOIN Comment
// return: Map<User, Comment>
@@ -84,7 +79,6 @@
)
)
}
-
@Test
fun dupeColumnMigrated_one() {
// Star projection query where 'A' (a dupe column) was added via migration
@@ -102,7 +96,6 @@
)
)
}
-
@Test
fun dupeColumnMigrated_both() {
// Star projection query where both dupe columns 'A' were added via migration
@@ -120,7 +113,6 @@
)
)
}
-
@Test
fun multiple_duplicates() {
// Mapping multiple dupe columns ('A' and 'C')
@@ -138,7 +130,6 @@
)
)
}
-
@Test
fun multiple_duplicates_noUnique() {
// Mapping multiple dupe columns and one of the tables have no unique column, i.e. in the
@@ -157,9 +148,8 @@
)
)
}
-
@Test
- @Ignore("Algorithm can't solve this as expected.")
+ @Ignore // Algorithm can't solve this as expected.
fun multiple_duplicates_noUnique_swapped() {
// Mapping multiple dupe columns and one of the tables have no unique column, i.e. in the
// result they are all dupes. However, the order of mappings given to the algorithm is
@@ -179,7 +169,6 @@
)
)
}
-
@Test
fun extraResultColumns() {
// Extra results columns are ignored
@@ -197,7 +186,6 @@
)
)
}
-
@Test
fun extraResultColumns_withGap() {
// Extra results columns, including causing gaps between POJO columns are ignored
@@ -215,7 +203,6 @@
)
)
}
-
@Test
fun firstChoice() {
// When resolving a single solo duplicate column, the algorithm will choose the first one
@@ -234,7 +221,6 @@
)
)
}
-
@Test
fun firstChoice_resultOrderSwapped() {
// Not what we want, but its likely that in practice either the columns will
@@ -253,7 +239,6 @@
)
)
}
-
@Test
fun firstChoice_bothSolo() {
// With the current information this is impossible to resolve, it'll be a first found
@@ -272,7 +257,6 @@
)
)
}
-
@Test
fun dupesInMapping() {
// This input shouldn't happen since a single POJO (even with embedded) is not allowed
@@ -291,7 +275,6 @@
)
)
}
-
@Test
fun repeatedColumn() {
// Both POJOs map the same result (non dupe) column
@@ -309,7 +292,6 @@
)
)
}
-
@Test
fun repeatedColumn_firstChoice() {
val result = AmbiguousColumnResolver.resolve(
@@ -326,7 +308,6 @@
)
)
}
-
@Test
fun repeatedColumn_withDuplicate() {
val result = AmbiguousColumnResolver.resolve(
@@ -343,7 +324,6 @@
)
)
}
-
@Test
fun repeatedColumn_withDuplicate_pojoSwapped() {
val result = AmbiguousColumnResolver.resolve(
@@ -360,9 +340,8 @@
)
)
}
-
@Test
- @Ignore("Algorithm can't solve this as expected.")
+ @Ignore // Algorithm can't solve this as expected.
fun repeatedColumn_withDuplicate_withGap() {
// The algorithm finds two solutions but both have the same cost.
val result = AmbiguousColumnResolver.resolve(
@@ -379,7 +358,6 @@
)
)
}
-
@Test
fun case_insensitive() {
val result = AmbiguousColumnResolver.resolve(
@@ -396,30 +374,6 @@
)
)
}
-
- @Test
- fun case_insensitive_tr() {
- val originalLocale = Locale.getDefault()
- try {
- Locale.setDefault(Locale("tr")) // Turkish has special upper/lowercase i chars
- val result = AmbiguousColumnResolver.resolve(
- arrayOf("i̇", "B", "İ", "C", "D"),
- arrayOf(
- arrayOf("Ä°", "b"),
- arrayOf("i̇", "C", "d")
- )
- )
- assertThat(result).isEqualTo(
- arrayOf(
- intArrayOf(0, 1),
- intArrayOf(2, 3, 4),
- )
- )
- } finally {
- Locale.setDefault(originalLocale)
- }
- }
-
@Test
fun case_backticks() {
val result = AmbiguousColumnResolver.resolve(
diff --git a/room/room-common/src/jvmTest/kotlin/androidx/room/AmbiguousColumnResolverTurkishLocaleTest.kt b/room/room-common/src/jvmTest/kotlin/androidx/room/AmbiguousColumnResolverTurkishLocaleTest.kt
new file mode 100644
index 0000000..a0bd1ec
--- /dev/null
+++ b/room/room-common/src/jvmTest/kotlin/androidx/room/AmbiguousColumnResolverTurkishLocaleTest.kt
@@ -0,0 +1,46 @@
+/*
+ * 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
+
+import androidx.kruth.assertThat
+import java.util.Locale
+import org.junit.Test
+
+class AmbiguousColumnResolverTurkishLocaleTest {
+ @Test
+ fun case_insensitive_tr() {
+ val originalLocale = Locale.getDefault()
+ try {
+ Locale.setDefault(Locale("tr")) // Turkish has special upper/lowercase i chars
+ val result = AmbiguousColumnResolver.resolve(
+ arrayOf("i̇", "B", "İ", "C", "D"),
+ arrayOf(
+ arrayOf("Ä°", "b"),
+ arrayOf("i̇", "C", "d")
+ )
+ )
+ assertThat(result).isEqualTo(
+ arrayOf(
+ intArrayOf(0, 1),
+ intArrayOf(2, 3, 4),
+ )
+ )
+ } finally {
+ Locale.setDefault(originalLocale)
+ }
+ }
+}
diff --git a/room/room-common/src/commonTest/kotlin/androidx/room/AnnotationRetentionPolicyTest.kt b/room/room-common/src/jvmTest/kotlin/androidx/room/AnnotationRetentionPolicyTest.kt
similarity index 100%
rename from room/room-common/src/commonTest/kotlin/androidx/room/AnnotationRetentionPolicyTest.kt
rename to room/room-common/src/jvmTest/kotlin/androidx/room/AnnotationRetentionPolicyTest.kt
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt b/room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
index e79616a..fda482f 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
@@ -317,6 +317,10 @@
"null"
} else if (this == XTypeName.PRIMITIVE_BOOLEAN) {
"false"
+ } else if (this == XTypeName.PRIMITIVE_DOUBLE) {
+ "0.0"
+ } else if (this == XTypeName.PRIMITIVE_FLOAT) {
+ "0f"
} else {
"0"
}
diff --git a/room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt b/room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
index 8a9f49f..0950112 100644
--- a/room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
+++ b/room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
@@ -942,6 +942,8 @@
data class MyEntity(
@PrimaryKey
val pk: Long,
+ val doubleColumn: Double,
+ val floatColumn: Float,
)
""".trimIndent()
)
diff --git a/room/room-compiler/src/test/test-data/kotlinCodeGen/rawQuery.kt b/room/room-compiler/src/test/test-data/kotlinCodeGen/rawQuery.kt
index 2361e59..4472909 100644
--- a/room/room-compiler/src/test/test-data/kotlinCodeGen/rawQuery.kt
+++ b/room/room-compiler/src/test/test-data/kotlinCodeGen/rawQuery.kt
@@ -5,6 +5,8 @@
import androidx.sqlite.db.SupportSQLiteQuery
import java.lang.Class
import javax.`annotation`.processing.Generated
+import kotlin.Double
+import kotlin.Float
import kotlin.Int
import kotlin.Long
import kotlin.Suppress
@@ -40,13 +42,27 @@
private fun __entityCursorConverter_MyEntity(cursor: Cursor): MyEntity {
val _entity: MyEntity
val _cursorIndexOfPk: Int = getColumnIndex(cursor, "pk")
+ val _cursorIndexOfDoubleColumn: Int = getColumnIndex(cursor, "doubleColumn")
+ val _cursorIndexOfFloatColumn: Int = getColumnIndex(cursor, "floatColumn")
val _tmpPk: Long
if (_cursorIndexOfPk == -1) {
_tmpPk = 0
} else {
_tmpPk = cursor.getLong(_cursorIndexOfPk)
}
- _entity = MyEntity(_tmpPk)
+ val _tmpDoubleColumn: Double
+ if (_cursorIndexOfDoubleColumn == -1) {
+ _tmpDoubleColumn = 0.0
+ } else {
+ _tmpDoubleColumn = cursor.getDouble(_cursorIndexOfDoubleColumn)
+ }
+ val _tmpFloatColumn: Float
+ if (_cursorIndexOfFloatColumn == -1) {
+ _tmpFloatColumn = 0f
+ } else {
+ _tmpFloatColumn = cursor.getFloat(_cursorIndexOfFloatColumn)
+ }
+ _entity = MyEntity(_tmpPk,_tmpDoubleColumn,_tmpFloatColumn)
return _entity
}
diff --git a/room/room-guava/lint-baseline.xml b/room/room-guava/lint-baseline.xml
index 4e529ae..5dc0618b 100644
--- a/room/room-guava/lint-baseline.xml
+++ b/room/room-guava/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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="RestrictedApiAndroidX"
@@ -20,6 +20,15 @@
</issue>
<issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" if (cancellationSignal != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/room/guava/GuavaRoom.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 <T> ListenableFuture<T> createListenableFuture("
diff --git a/room/room-ktx/lint-baseline.xml b/room/room-ktx/lint-baseline.xml
index 99873f6..56671f7 100644
--- a/room/room-ktx/lint-baseline.xml
+++ b/room/room-ktx/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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="RestrictedApiAndroidX"
@@ -37,4 +37,22 @@
file="src/main/java/androidx/room/CoroutinesRoom.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/main/java/androidx/room/CoroutinesRoom.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/main/java/androidx/room/CoroutinesRoom.kt"/>
+ </issue>
+
</issues>
diff --git a/room/room-runtime/api/api_lint.ignore b/room/room-runtime/api/api_lint.ignore
index ae12646..d11ad55 100644
--- a/room/room-runtime/api/api_lint.ignore
+++ b/room/room-runtime/api/api_lint.ignore
@@ -49,6 +49,10 @@
T does not declare a `getJournalMode()` method matching method androidx.room.RoomDatabase.Builder.setJournalMode(androidx.room.RoomDatabase.JournalMode)
+NotCloseable: androidx.room.RoomDatabase:
+ Classes that release resources (close()) should implement AutoCloseable and CloseGuard: class androidx.room.RoomDatabase
+
+
NullableCollection: androidx.room.DatabaseConfiguration#callbacks:
Type of field androidx.room.DatabaseConfiguration.callbacks is a nullable collection (`java.util.List`); must be non-null
NullableCollection: androidx.room.RoomDatabase.MigrationContainer#findMigrationPath(int, int):
diff --git a/room/room-runtime/lint-baseline.xml b/room/room-runtime/lint-baseline.xml
index 5b31a9b..d9c8463 100644
--- a/room/room-runtime/lint-baseline.xml
+++ b/room/room-runtime/lint-baseline.xml
@@ -1,9 +1,9 @@
<?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-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 14): `java.util.Locale#forLanguageTag`"
+ message="Call requires API level 21 (current min is 19): `java.util.Locale#forLanguageTag`"
errorLine1=" Locale.setDefault(Locale.forLanguageTag("tr-TR"))"
errorLine2=" ~~~~~~~~~~~~~~">
<location
@@ -424,4 +424,139 @@
file="src/main/java/androidx/room/SQLiteCopyOpenHelper.kt"/>
</issue>
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 16"
+ errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/room/AutoClosingRoomOpenHelper.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/main/java/androidx/room/AutoClosingRoomOpenHelper.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/main/java/androidx/room/AutoClosingRoomOpenHelper.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/main/java/androidx/room/AutoClosingRoomOpenHelper.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" @RequiresApi(api = Build.VERSION_CODES.KITKAT)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/room/AutoClosingRoomOpenHelper.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/main/java/androidx/room/util/CursorUtil.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/room/util/DBUtil.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/main/java/androidx/room/InvalidationTracker.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" val wal = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/room/RoomDatabase.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" return if (signal != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/room/RoomDatabase.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" return if (signal != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/room/RoomDatabase.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/main/java/androidx/room/RoomDatabase.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/main/java/androidx/room/RoomDatabase.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/room/RoomDatabase.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 16"
+ errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/room/SQLiteCopyOpenHelper.kt"/>
+ </issue>
+
</issues>
diff --git a/room/room-testing/api/api_lint.ignore b/room/room-testing/api/api_lint.ignore
deleted file mode 100644
index 8ba24dc..0000000
--- a/room/room-testing/api/api_lint.ignore
+++ /dev/null
@@ -1,19 +0,0 @@
-// Baseline format: 1.0
-MissingNullability: androidx.room.testing.MigrationTestHelper#closeWhenFinished(androidx.room.RoomDatabase) parameter #0:
- Missing nullability on parameter `db` in method `closeWhenFinished`
-MissingNullability: androidx.room.testing.MigrationTestHelper#closeWhenFinished(androidx.sqlite.db.SupportSQLiteDatabase) parameter #0:
- Missing nullability on parameter `db` in method `closeWhenFinished`
-MissingNullability: androidx.room.testing.MigrationTestHelper#createDatabase(String, int):
- Missing nullability on method `createDatabase` return
-MissingNullability: androidx.room.testing.MigrationTestHelper#createDatabase(String, int) parameter #0:
- Missing nullability on parameter `name` in method `createDatabase`
-MissingNullability: androidx.room.testing.MigrationTestHelper#finished(org.junit.runner.Description) parameter #0:
- Missing nullability on parameter `description` in method `finished`
-MissingNullability: androidx.room.testing.MigrationTestHelper#runMigrationsAndValidate(String, int, boolean, androidx.room.migration.Migration...):
- Missing nullability on method `runMigrationsAndValidate` return
-MissingNullability: androidx.room.testing.MigrationTestHelper#runMigrationsAndValidate(String, int, boolean, androidx.room.migration.Migration...) parameter #0:
- Missing nullability on parameter `name` in method `runMigrationsAndValidate`
-MissingNullability: androidx.room.testing.MigrationTestHelper#runMigrationsAndValidate(String, int, boolean, androidx.room.migration.Migration...) parameter #3:
- Missing nullability on parameter `migrations` in method `runMigrationsAndValidate`
-MissingNullability: androidx.room.testing.MigrationTestHelper#starting(org.junit.runner.Description) parameter #0:
- Missing nullability on parameter `description` in method `starting`
diff --git a/samples/AndroidXDemos/lint-baseline.xml b/samples/AndroidXDemos/lint-baseline.xml
index d52b634..aae5073 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-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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="OnClick"
@@ -51,7 +51,7 @@
<issue
id="NewApi"
- message="Call requires API level 29 (current min is 14): `android.os.StrictMode.VmPolicy.Builder#detectImplicitDirectBoot`"
+ message="Call requires API level 29 (current min is 19): `android.os.StrictMode.VmPolicy.Builder#detectImplicitDirectBoot`"
errorLine1=" .detectImplicitDirectBoot()"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -60,142 +60,7 @@
<issue
id="NewApi"
- message="Call requires API level 17 (current min is 14): `setLocalNightMode`"
- errorLine1=" getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/app/AppCompatLocalNightModeActivity.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `setLocalNightMode`"
- errorLine1=" getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_NO);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/app/AppCompatLocalNightModeActivity.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `setLocalNightMode`"
- errorLine1=" getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_YES);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/app/AppCompatLocalNightModeActivity.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `setLocalNightMode`"
- errorLine1=" getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_AUTO_TIME);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/app/AppCompatLocalNightModeActivity.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `setLocalNightMode`"
- errorLine1=" getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/app/AppCompatLocalNightModeActivity.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `setLocalNightMode`"
- errorLine1=" dialog.getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/app/AppCompatNightModeAlertDialog.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `setLocalNightMode`"
- errorLine1=" dialog.getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_NO);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/app/AppCompatNightModeAlertDialog.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `setLocalNightMode`"
- errorLine1=" dialog.getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_YES);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/app/AppCompatNightModeAlertDialog.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `setLocalNightMode`"
- errorLine1=" dialog.getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_AUTO_TIME);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/app/AppCompatNightModeAlertDialog.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `setLocalNightMode`"
- errorLine1=" dialog.getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/app/AppCompatNightModeAlertDialog.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `setLocalNightMode`"
- errorLine1=" dialog.getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/app/AppCompatNightModeDialog.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `setLocalNightMode`"
- errorLine1=" dialog.getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_NO);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/app/AppCompatNightModeDialog.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `setLocalNightMode`"
- errorLine1=" dialog.getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_YES);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/app/AppCompatNightModeDialog.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `setLocalNightMode`"
- errorLine1=" dialog.getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_AUTO_TIME);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/app/AppCompatNightModeDialog.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Call requires API level 17 (current min is 14): `setLocalNightMode`"
- errorLine1=" dialog.getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/androidx/app/AppCompatNightModeDialog.java"/>
- </issue>
-
- <issue
- id="NewApi"
- message="`<class>` requires API level 24 (current min is 14)"
+ message="`<class>` requires API level 24 (current min is 19)"
errorLine1=" class="com.example.androidx.drawable.MyDrawable""
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -348,12 +213,28 @@
<issue
id="ObsoleteSdkInt"
- message="This folder configuration (`v11`) is unnecessary; `minSdkVersion` is 14. Merge all the resources in this folder into `layout`.">
+ 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"/>
</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"/>
+ </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=" protected void onCreate(Bundle savedInstanceState) {"
diff --git a/samples/MediaRoutingDemo/lint-baseline.xml b/samples/MediaRoutingDemo/lint-baseline.xml
index 96b93f7..7030d15 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.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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="RestrictedApiAndroidX"
@@ -127,4 +127,173 @@
file="src/main/java/com/example/androidx/mediarouting/providers/SampleDynamicGroupMediaRouteProvider.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/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"/>
+ </issue>
+
</issues>
diff --git a/samples/Support4Demos/lint-baseline.xml b/samples/Support4Demos/lint-baseline.xml
index 8d63c2f..76a73d5 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.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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="MissingPermission"
@@ -138,15 +138,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class com.example.android.supportv4.widget.SlidingPaneLayoutActivity.FirstLayoutListener is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" mSlidingLayout.getViewTreeObserver().removeOnGlobalLayoutListener(this);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/example/android/supportv4/widget/SlidingPaneLayoutActivity.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 21; however, the containing class com.example.android.supportv4.view.WindowInsetsPlayground is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" getWindow().setStatusBarColor(0x80000000);"
errorLine2=" ~~~~~~~~~~~~~~~~~">
@@ -210,7 +201,16 @@
<issue
id="ObsoleteSdkInt"
- message="This folder configuration (`v11`) is unnecessary; `minSdkVersion` is 14. Merge all the resources in this folder into `values`.">
+ 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"/>
</issue>
diff --git a/settings.gradle b/settings.gradle
index 9c56c24..edb7537 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -864,7 +864,7 @@
includeProject(":room:integration-tests:room-testapp-kotlin", "room/integration-tests/kotlintestapp", [BuildType.MAIN])
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])
+includeProject(":room:room-common", [BuildType.MAIN, BuildType.COMPOSE, BuildType.KMP, BuildType.INFRAROGUE])
includeProject(":room:room-compiler", [BuildType.MAIN, BuildType.COMPOSE])
includeProject(":room:room-compiler-processing", [BuildType.MAIN, BuildType.COMPOSE, BuildType.FLAN])
includeProject(":room:room-compiler-processing-testing", [BuildType.MAIN, BuildType.COMPOSE, BuildType.FLAN])
diff --git a/sharetarget/sharetarget/lint-baseline.xml b/sharetarget/sharetarget/lint-baseline.xml
index 7e05b5c..af0b6b0 100644
--- a/sharetarget/sharetarget/lint-baseline.xml
+++ b/sharetarget/sharetarget/lint-baseline.xml
@@ -1,5 +1,14 @@
<?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-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>
<issue
id="UnknownNullness"
diff --git a/slice/slice-builders-ktx/api/api_lint.ignore b/slice/slice-builders-ktx/api/api_lint.ignore
deleted file mode 100644
index a13b245..0000000
--- a/slice/slice-builders-ktx/api/api_lint.ignore
+++ /dev/null
@@ -1,5 +0,0 @@
-// Baseline format: 1.0
-KotlinDefaultParameterOrder: androidx.slice.builders.ListBuilderKt#tapSliceAction(android.app.PendingIntent, androidx.core.graphics.drawable.IconCompat, int, CharSequence) parameter #2:
- Parameter `imageMode` has a default value and should come after all parameters without default values (except for a trailing lambda parameter)
-KotlinDefaultParameterOrder: androidx.slice.builders.ListBuilderKt#toggleSliceAction(android.app.PendingIntent, androidx.core.graphics.drawable.IconCompat, CharSequence, boolean) parameter #1:
- Parameter `icon` has a default value and should come after all parameters without default values (except for a trailing lambda parameter)
diff --git a/slice/slice-builders/api/api_lint.ignore b/slice/slice-builders/api/api_lint.ignore
index 2e064a2..6c77427 100644
--- a/slice/slice-builders/api/api_lint.ignore
+++ b/slice/slice-builders/api/api_lint.ignore
@@ -41,22 +41,6 @@
Listeners should always be at end of argument list (method `createToggle`)
-MissingBuildMethod: androidx.slice.builders.GridRowBuilder:
- androidx.slice.builders.GridRowBuilder does not declare a `build()` method, but builder classes are expected to
-MissingBuildMethod: androidx.slice.builders.GridRowBuilder.CellBuilder:
- androidx.slice.builders.GridRowBuilder.CellBuilder does not declare a `build()` method, but builder classes are expected to
-MissingBuildMethod: androidx.slice.builders.ListBuilder.HeaderBuilder:
- androidx.slice.builders.ListBuilder.HeaderBuilder does not declare a `build()` method, but builder classes are expected to
-MissingBuildMethod: androidx.slice.builders.ListBuilder.InputRangeBuilder:
- androidx.slice.builders.ListBuilder.InputRangeBuilder does not declare a `build()` method, but builder classes are expected to
-MissingBuildMethod: androidx.slice.builders.ListBuilder.RangeBuilder:
- androidx.slice.builders.ListBuilder.RangeBuilder does not declare a `build()` method, but builder classes are expected to
-MissingBuildMethod: androidx.slice.builders.ListBuilder.RowBuilder:
- androidx.slice.builders.ListBuilder.RowBuilder does not declare a `build()` method, but builder classes are expected to
-MissingBuildMethod: androidx.slice.builders.SelectionBuilder:
- androidx.slice.builders.SelectionBuilder does not declare a `build()` method, but builder classes are expected to
-
-
MissingNullability: androidx.slice.builders.SelectionBuilder#addOption(String, CharSequence):
Missing nullability on method `addOption` return
MissingNullability: androidx.slice.builders.SelectionBuilder#addOption(String, CharSequence) parameter #0:
@@ -97,29 +81,3 @@
Missing nullability on method `createToggle` return
MissingNullability: androidx.slice.builders.SliceAction#createToggle(androidx.remotecallback.RemoteCallback, androidx.core.graphics.drawable.IconCompat, CharSequence, boolean):
Missing nullability on method `createToggle` return
-
-
-StaticFinalBuilder: androidx.slice.builders.GridRowBuilder:
- Builder must be final: androidx.slice.builders.GridRowBuilder
-StaticFinalBuilder: androidx.slice.builders.GridRowBuilder.CellBuilder:
- Builder must be final: androidx.slice.builders.GridRowBuilder.CellBuilder
-StaticFinalBuilder: androidx.slice.builders.ListBuilder.HeaderBuilder:
- Builder must be final: androidx.slice.builders.ListBuilder.HeaderBuilder
-StaticFinalBuilder: androidx.slice.builders.ListBuilder.InputRangeBuilder:
- Builder must be final: androidx.slice.builders.ListBuilder.InputRangeBuilder
-StaticFinalBuilder: androidx.slice.builders.ListBuilder.RangeBuilder:
- Builder must be final: androidx.slice.builders.ListBuilder.RangeBuilder
-StaticFinalBuilder: androidx.slice.builders.ListBuilder.RowBuilder:
- Builder must be final: androidx.slice.builders.ListBuilder.RowBuilder
-StaticFinalBuilder: androidx.slice.builders.SelectionBuilder:
- Builder must be final: androidx.slice.builders.SelectionBuilder
-StaticFinalBuilder: androidx.slice.builders.TemplateSliceBuilder:
- Builder must be final: androidx.slice.builders.TemplateSliceBuilder
-
-
-TopLevelBuilder: androidx.slice.builders.GridRowBuilder:
- Builder should be defined as inner class: androidx.slice.builders.GridRowBuilder
-TopLevelBuilder: androidx.slice.builders.SelectionBuilder:
- Builder should be defined as inner class: androidx.slice.builders.SelectionBuilder
-TopLevelBuilder: androidx.slice.builders.TemplateSliceBuilder:
- Builder should be defined as inner class: androidx.slice.builders.TemplateSliceBuilder
diff --git a/slice/slice-builders/lint-baseline.xml b/slice/slice-builders/lint-baseline.xml
index 3679718..b323b06 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-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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="WrongConstant"
@@ -28,4 +28,166 @@
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 4b5f8f1..5c15d65 100644
--- a/slice/slice-core/lint-baseline.xml
+++ b/slice/slice-core/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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="BanUncheckedReflection"
@@ -10,4 +10,382 @@
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 9003689..78e8941 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.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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="UnspecifiedImmutableFlag"
@@ -11,6 +11,24 @@
</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 688d705..bf96be3 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-alpha02" type="baseline" client="cli" dependencies="false" name="AGP (8.3.0-alpha02)" variant="all" version="8.3.0-alpha02">
+<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="BanSynchronizedMethods"
@@ -30,15 +30,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class null is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" view.performAccessibilityAction(ACTION_ACCESSIBILITY_FOCUS, null);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/LocationBasedViewTracker.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 21; however, the containing class androidx.slice.widget.LocationBasedViewTracker is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" if (child.isAccessibilityFocused()) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
@@ -73,4 +64,256 @@
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/slidingpanelayout/slidingpanelayout/api/api_lint.ignore b/slidingpanelayout/slidingpanelayout/api/api_lint.ignore
index a288bd0..ff43af9 100644
--- a/slidingpanelayout/slidingpanelayout/api/api_lint.ignore
+++ b/slidingpanelayout/slidingpanelayout/api/api_lint.ignore
@@ -9,31 +9,5 @@
Listeners should be an interface, or otherwise renamed Callback: SimplePanelSlideListener
-MissingNullability: androidx.slidingpanelayout.widget.SlidingPaneLayout#checkLayoutParams(android.view.ViewGroup.LayoutParams) parameter #0:
- Missing nullability on parameter `p` in method `checkLayoutParams`
-MissingNullability: androidx.slidingpanelayout.widget.SlidingPaneLayout#draw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `c` in method `draw`
-MissingNullability: androidx.slidingpanelayout.widget.SlidingPaneLayout#drawChild(android.graphics.Canvas, android.view.View, long) parameter #0:
- Missing nullability on parameter `canvas` in method `drawChild`
-MissingNullability: androidx.slidingpanelayout.widget.SlidingPaneLayout#drawChild(android.graphics.Canvas, android.view.View, long) parameter #1:
- Missing nullability on parameter `child` in method `drawChild`
-MissingNullability: androidx.slidingpanelayout.widget.SlidingPaneLayout#generateDefaultLayoutParams():
- Missing nullability on method `generateDefaultLayoutParams` return
-MissingNullability: androidx.slidingpanelayout.widget.SlidingPaneLayout#generateLayoutParams(android.util.AttributeSet):
- Missing nullability on method `generateLayoutParams` return
-MissingNullability: androidx.slidingpanelayout.widget.SlidingPaneLayout#generateLayoutParams(android.util.AttributeSet) parameter #0:
- Missing nullability on parameter `attrs` in method `generateLayoutParams`
-MissingNullability: androidx.slidingpanelayout.widget.SlidingPaneLayout#generateLayoutParams(android.view.ViewGroup.LayoutParams):
- Missing nullability on method `generateLayoutParams` return
-MissingNullability: androidx.slidingpanelayout.widget.SlidingPaneLayout#generateLayoutParams(android.view.ViewGroup.LayoutParams) parameter #0:
- Missing nullability on parameter `p` in method `generateLayoutParams`
-MissingNullability: androidx.slidingpanelayout.widget.SlidingPaneLayout#onInterceptTouchEvent(android.view.MotionEvent) parameter #0:
- Missing nullability on parameter `ev` in method `onInterceptTouchEvent`
-MissingNullability: androidx.slidingpanelayout.widget.SlidingPaneLayout#onRestoreInstanceState(android.os.Parcelable) parameter #0:
- Missing nullability on parameter `state` in method `onRestoreInstanceState`
-MissingNullability: androidx.slidingpanelayout.widget.SlidingPaneLayout#onTouchEvent(android.view.MotionEvent) parameter #0:
- Missing nullability on parameter `ev` in method `onTouchEvent`
-MissingNullability: androidx.slidingpanelayout.widget.SlidingPaneLayout#requestChildFocus(android.view.View, android.view.View) parameter #0:
- Missing nullability on parameter `child` in method `requestChildFocus`
-MissingNullability: androidx.slidingpanelayout.widget.SlidingPaneLayout#requestChildFocus(android.view.View, android.view.View) parameter #1:
- Missing nullability on parameter `focused` in method `requestChildFocus`
+NotCloseable: androidx.slidingpanelayout.widget.SlidingPaneLayout:
+ Classes that release resources (close()) should implement AutoCloseable and CloseGuard: class androidx.slidingpanelayout.widget.SlidingPaneLayout
diff --git a/slidingpanelayout/slidingpanelayout/lint-baseline.xml b/slidingpanelayout/slidingpanelayout/lint-baseline.xml
new file mode 100644
index 0000000..feb3cd1
--- /dev/null
+++ b/slidingpanelayout/slidingpanelayout/lint-baseline.xml
@@ -0,0 +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">
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" if (Build.VERSION.SDK_INT >= 18) return false"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/slidingpanelayout/widget/SlidingPaneLayout.kt"/>
+ </issue>
+
+</issues>
diff --git a/sqlite/sqlite-framework/lint-baseline.xml b/sqlite/sqlite-framework/lint-baseline.xml
index 711185c..2f7cd12 100644
--- a/sqlite/sqlite-framework/lint-baseline.xml
+++ b/sqlite/sqlite-framework/lint-baseline.xml
@@ -1,50 +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">
-
- <issue
- id="NewApi"
- message="Implicit cast from `Cursor` to `Closeable` requires API level 16 (current min is 14)"
- errorLine1=" db.query("SELECT * FROM sqlite_master WHERE name = 'Foo'").use {"
- errorLine2=" ~~~">
- <location
- file="src/androidTest/java/androidx/sqlite/db/framework/OpenHelperRecoveryTest.kt"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Implicit cast from `Cursor` to `Closeable` requires API level 16 (current min is 14)"
- errorLine1=" db.query("SELECT * FROM sqlite_master WHERE name = 'Foo'").use {"
- errorLine2=" ~~~">
- <location
- file="src/androidTest/java/androidx/sqlite/db/framework/OpenHelperRecoveryTest.kt"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Implicit cast from `Cursor` to `Closeable` requires API level 16 (current min is 14)"
- errorLine1=" db.query("SELECT * FROM sqlite_master WHERE name = 'Foo'").use {"
- errorLine2=" ~~~">
- <location
- file="src/androidTest/java/androidx/sqlite/db/framework/OpenHelperRecoveryTest.kt"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Implicit cast from `Cursor` to `Closeable` requires API level 16 (current min is 14)"
- errorLine1=" db.query("SELECT * FROM sqlite_master WHERE name = 'Foo'").use {"
- errorLine2=" ~~~">
- <location
- file="src/androidTest/java/androidx/sqlite/db/framework/OpenHelperRecoveryTest.kt"/>
- </issue>
-
- <issue
- id="NewApi"
- message="Implicit cast from `Cursor` to `Closeable` requires API level 16 (current min is 14)"
- errorLine1=" db.query("SELECT * FROM sqlite_master WHERE name = 'Foo'").use {"
- errorLine2=" ~~~">
- <location
- file="src/androidTest/java/androidx/sqlite/db/framework/OpenHelperRecoveryTest.kt"/>
- </issue>
+<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"
@@ -55,4 +10,58 @@
file="src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelper.kt"/>
</issue>
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 16"
+ errorLine1=" @RequiresApi(16)"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 16"
+ errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 16"
+ errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.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/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.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/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelper.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 16"
+ errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelper.kt"/>
+ </issue>
+
</issues>
diff --git a/sqlite/sqlite/api/api_lint.ignore b/sqlite/sqlite/api/api_lint.ignore
index d4e0d2f..b71f90d 100644
--- a/sqlite/sqlite/api/api_lint.ignore
+++ b/sqlite/sqlite/api/api_lint.ignore
@@ -79,42 +79,6 @@
androidx.sqlite.db.SupportSQLiteQueryBuilder does not declare a `build()` method, but builder classes are expected to
-MissingNullability: androidx.sqlite.db.SupportSQLiteQueryBuilder#builder(String):
- Missing nullability on method `builder` return
-MissingNullability: androidx.sqlite.db.SupportSQLiteQueryBuilder#builder(String) parameter #0:
- Missing nullability on parameter `tableName` in method `builder`
-MissingNullability: androidx.sqlite.db.SupportSQLiteQueryBuilder#columns(String[]):
- Missing nullability on method `columns` return
-MissingNullability: androidx.sqlite.db.SupportSQLiteQueryBuilder#columns(String[]) parameter #0:
- Missing nullability on parameter `columns` in method `columns`
-MissingNullability: androidx.sqlite.db.SupportSQLiteQueryBuilder#create():
- Missing nullability on method `create` return
-MissingNullability: androidx.sqlite.db.SupportSQLiteQueryBuilder#distinct():
- Missing nullability on method `distinct` return
-MissingNullability: androidx.sqlite.db.SupportSQLiteQueryBuilder#groupBy(String):
- Missing nullability on method `groupBy` return
-MissingNullability: androidx.sqlite.db.SupportSQLiteQueryBuilder#groupBy(String) parameter #0:
- Missing nullability on parameter `groupBy` in method `groupBy`
-MissingNullability: androidx.sqlite.db.SupportSQLiteQueryBuilder#having(String):
- Missing nullability on method `having` return
-MissingNullability: androidx.sqlite.db.SupportSQLiteQueryBuilder#having(String) parameter #0:
- Missing nullability on parameter `having` in method `having`
-MissingNullability: androidx.sqlite.db.SupportSQLiteQueryBuilder#limit(String):
- Missing nullability on method `limit` return
-MissingNullability: androidx.sqlite.db.SupportSQLiteQueryBuilder#limit(String) parameter #0:
- Missing nullability on parameter `limit` in method `limit`
-MissingNullability: androidx.sqlite.db.SupportSQLiteQueryBuilder#orderBy(String):
- Missing nullability on method `orderBy` return
-MissingNullability: androidx.sqlite.db.SupportSQLiteQueryBuilder#orderBy(String) parameter #0:
- Missing nullability on parameter `orderBy` in method `orderBy`
-MissingNullability: androidx.sqlite.db.SupportSQLiteQueryBuilder#selection(String, Object[]):
- Missing nullability on method `selection` return
-MissingNullability: androidx.sqlite.db.SupportSQLiteQueryBuilder#selection(String, Object[]) parameter #0:
- Missing nullability on parameter `selection` in method `selection`
-MissingNullability: androidx.sqlite.db.SupportSQLiteQueryBuilder#selection(String, Object[]) parameter #1:
- Missing nullability on parameter `bindArgs` in method `selection`
-
-
StaticFinalBuilder: androidx.sqlite.db.SupportSQLiteOpenHelper.Configuration.Builder:
Builder must be final: androidx.sqlite.db.SupportSQLiteOpenHelper.Configuration.Builder
diff --git a/sqlite/sqlite/lint-baseline.xml b/sqlite/sqlite/lint-baseline.xml
new file mode 100644
index 0000000..ca86ac7
--- /dev/null
+++ b/sqlite/sqlite/lint-baseline.xml
@@ -0,0 +1,76 @@
+<?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 >= 16"
+ errorLine1=" @RequiresApi(16)"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/sqlite/db/SupportSQLiteCompat.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" @RequiresApi(19)"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/sqlite/db/SupportSQLiteCompat.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 16"
+ errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/sqlite/db/SupportSQLiteDatabase.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 16"
+ errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/sqlite/db/SupportSQLiteDatabase.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 16"
+ errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/sqlite/db/SupportSQLiteDatabase.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/main/java/androidx/sqlite/db/SupportSQLiteDatabase.kt"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 16"
+ errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/sqlite/db/SupportSQLiteOpenHelper.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/main/java/androidx/sqlite/db/SupportSQLiteOpenHelper.kt"/>
+ </issue>
+
+</issues>
diff --git a/stableaidl/stableaidl-gradle-plugin/lint-baseline.xml b/stableaidl/stableaidl-gradle-plugin/lint-baseline.xml
deleted file mode 100644
index ac07c56..0000000
--- a/stableaidl/stableaidl-gradle-plugin/lint-baseline.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.0.0-alpha07" type="baseline" client="gradle" dependencies="false" name="AGP (8.0.0-alpha07)" variant="all" version="8.0.0-alpha07">
-
- <issue
- id="BanSynchronizedMethods"
- message="Use of synchronized methods is not recommended"
- errorLine1=" @Override"
- errorLine2=" ^">
- <location
- file="src/main/java/androidx/stableaidl/internal/LoggerWrapper.java"/>
- </issue>
-
-</issues>
diff --git a/swiperefreshlayout/swiperefreshlayout/api/api_lint.ignore b/swiperefreshlayout/swiperefreshlayout/api/api_lint.ignore
index 25a9da5..d026b7d 100644
--- a/swiperefreshlayout/swiperefreshlayout/api/api_lint.ignore
+++ b/swiperefreshlayout/swiperefreshlayout/api/api_lint.ignore
@@ -13,8 +13,6 @@
Internal field mOriginalOffsetTop must not be exposed
-MissingNullability: androidx.swiperefreshlayout.widget.CircularProgressDrawable#draw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `draw`
MissingNullability: androidx.swiperefreshlayout.widget.CircularProgressDrawable#setColorFilter(android.graphics.ColorFilter) parameter #0:
Missing nullability on parameter `colorFilter` in method `setColorFilter`
MissingNullability: androidx.swiperefreshlayout.widget.SwipeRefreshLayout#onInterceptTouchEvent(android.view.MotionEvent) parameter #0:
@@ -49,3 +47,7 @@
Bare field mFrom must be marked final, or moved behind accessors if mutable
MutableBareField: androidx.swiperefreshlayout.widget.SwipeRefreshLayout#mOriginalOffsetTop:
Bare field mOriginalOffsetTop must be marked final, or moved behind accessors if mutable
+
+
+NotCloseable: androidx.swiperefreshlayout.widget.CircularProgressDrawable:
+ Classes that release resources (stop()) should implement AutoCloseable and CloseGuard: class androidx.swiperefreshlayout.widget.CircularProgressDrawable
diff --git a/test/ext/junit-gtest/build.gradle b/test/ext/junit-gtest/build.gradle
index f68ed86..ea12d35 100644
--- a/test/ext/junit-gtest/build.gradle
+++ b/test/ext/junit-gtest/build.gradle
@@ -45,7 +45,6 @@
android {
defaultConfig {
- minSdkVersion 18
externalNativeBuild {
cmake {
arguments "-DANDROID_STL=c++_shared"
diff --git a/test/integration-tests/junit-gtest-test/build.gradle b/test/integration-tests/junit-gtest-test/build.gradle
index c76cbce..7d9a45d 100644
--- a/test/integration-tests/junit-gtest-test/build.gradle
+++ b/test/integration-tests/junit-gtest-test/build.gradle
@@ -37,7 +37,6 @@
android {
defaultConfig {
- minSdkVersion 18
externalNativeBuild {
cmake {
arguments "-DANDROID_STL=c++_shared"
diff --git a/test/uiautomator/integration-tests/testapp/build.gradle b/test/uiautomator/integration-tests/testapp/build.gradle
index c4c98ec..4a2d98d 100644
--- a/test/uiautomator/integration-tests/testapp/build.gradle
+++ b/test/uiautomator/integration-tests/testapp/build.gradle
@@ -30,9 +30,5 @@
}
android {
- defaultConfig {
- minSdkVersion 18
- }
-
namespace "androidx.test.uiautomator.testapp"
}
diff --git a/test/uiautomator/integration-tests/testapp/src/main/AndroidManifest.xml b/test/uiautomator/integration-tests/testapp/src/main/AndroidManifest.xml
index 07c501e..d259e2c 100644
--- a/test/uiautomator/integration-tests/testapp/src/main/AndroidManifest.xml
+++ b/test/uiautomator/integration-tests/testapp/src/main/AndroidManifest.xml
@@ -15,9 +15,6 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
-
- <uses-sdk android:minSdkVersion="18" />
-
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<queries>
diff --git a/test/uiautomator/uiautomator/build.gradle b/test/uiautomator/uiautomator/build.gradle
index 6ad79ca..aeb61bc 100644
--- a/test/uiautomator/uiautomator/build.gradle
+++ b/test/uiautomator/uiautomator/build.gradle
@@ -34,10 +34,6 @@
}
android {
- defaultConfig {
- minSdkVersion 18
- }
-
useLibrary "android.test.runner"
useLibrary "android.test.base"
useLibrary "android.test.mock"
diff --git a/testutils/testutils-runtime/lint-baseline.xml b/testutils/testutils-runtime/lint-baseline.xml
index 057c512..a1a835e 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.0.0-beta03" type="baseline" client="cli" dependencies="false" name="AGP (8.0.0-beta03)" variant="all" version="8.0.0-beta03">
+<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"
@@ -56,19 +56,37 @@
</issue>
<issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.testutils.LocaleTestUtils is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" newConfig.setLocale(locales.get(0))"
- errorLine2=" ~~~~~~~~~">
+ 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="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class androidx.fragment.app.StrictFragment is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" check(!requireActivity().isDestroyed)"
- errorLine2=" ~~~~~~~~~~~">
+ 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>
diff --git a/tracing/tracing/lint-baseline.xml b/tracing/tracing/lint-baseline.xml
new file mode 100644
index 0000000..0391a7b
--- /dev/null
+++ b/tracing/tracing/lint-baseline.xml
@@ -0,0 +1,76 @@
+<?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 >= 18 && Build.VERSION.SDK_INT < 31) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/tracing/Trace.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/tracing/Trace.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/tracing/Trace.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/tracing/Trace.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/tracing/Trace.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/tracing/Trace.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/tracing/Trace.java"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 18"
+ errorLine1="@RequiresApi(18)"
+ errorLine2="~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/tracing/TraceApi18Impl.java"/>
+ </issue>
+
+</issues>
diff --git a/transition/transition/lint-baseline.xml b/transition/transition/lint-baseline.xml
index 29f82c2..be7cc6f4 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.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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="ResourceType"
@@ -217,4 +217,166 @@
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/api/api_lint.ignore b/tv/tv-foundation/api/api_lint.ignore
index 8fe1f4b..599cbcc 100644
--- a/tv/tv-foundation/api/api_lint.ignore
+++ b/tv/tv-foundation/api/api_lint.ignore
@@ -1,8 +1,4 @@
// Baseline format: 1.0
-GetterSetterNames: androidx.tv.foundation.TvScrollState#getCanScrollBackward():
- Getter for boolean property `canScrollBackward` is named `getCanScrollBackward` but should match the property name. Use `@get:JvmName` to rename.
-GetterSetterNames: androidx.tv.foundation.TvScrollState#getCanScrollForward():
- Getter for boolean property `canScrollForward` is named `getCanScrollForward` but should match the property name. Use `@get:JvmName` to rename.
GetterSetterNames: androidx.tv.foundation.lazy.grid.TvLazyGridState#getCanScrollBackward():
Getter for boolean property `canScrollBackward` is named `getCanScrollBackward` but should match the property name. Use `@get:JvmName` to rename.
GetterSetterNames: androidx.tv.foundation.lazy.grid.TvLazyGridState#getCanScrollForward():
diff --git a/tv/tv-material/api/api_lint.ignore b/tv/tv-material/api/api_lint.ignore
deleted file mode 100644
index 5954166..0000000
--- a/tv/tv-material/api/api_lint.ignore
+++ /dev/null
@@ -1,4 +0,0 @@
-// Baseline format: 1.0
-
-GetterSetterNames: field NavigationDrawerScope.doesNavigationDrawerHaveFocus:
- Invalid name for boolean property `doesNavigationDrawerHaveFocus`. Should start with one of `has`, `can`, `should`, `is`.
\ No newline at end of file
diff --git a/tvprovider/tvprovider/api/api_lint.ignore b/tvprovider/tvprovider/api/api_lint.ignore
index 16230a6..3aa47b0 100644
--- a/tvprovider/tvprovider/api/api_lint.ignore
+++ b/tvprovider/tvprovider/api/api_lint.ignore
@@ -73,14 +73,6 @@
Must avoid boxed primitives (`java.lang.Long`)
-HiddenSuperclass: androidx.tvprovider.media.tv.PreviewProgram:
- Public class androidx.tvprovider.media.tv.PreviewProgram stripped of unavailable superclass androidx.tvprovider.media.tv.BasePreviewProgram
-HiddenSuperclass: androidx.tvprovider.media.tv.Program:
- Public class androidx.tvprovider.media.tv.Program stripped of unavailable superclass androidx.tvprovider.media.tv.BaseProgram
-HiddenSuperclass: androidx.tvprovider.media.tv.WatchNextProgram:
- Public class androidx.tvprovider.media.tv.WatchNextProgram stripped of unavailable superclass androidx.tvprovider.media.tv.BasePreviewProgram
-
-
IntentName: androidx.tvprovider.media.tv.TvContractCompat.PreviewProgramColumns#COLUMN_INTERACTION_COUNT:
Intent action constant name must be ACTION_FOO: COLUMN_INTERACTION_COUNT
IntentName: androidx.tvprovider.media.tv.TvContractCompat.PreviewProgramColumns#COLUMN_INTERACTION_TYPE:
diff --git a/vectordrawable/integration-tests/testapp/lint-baseline.xml b/vectordrawable/integration-tests/testapp/lint-baseline.xml
index 7ed06df..7b5d464 100644
--- a/vectordrawable/integration-tests/testapp/lint-baseline.xml
+++ b/vectordrawable/integration-tests/testapp/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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="NewApi"
- message="`<animated-vector>` requires API level 21 (current min is 14)"
+ message="`<animated-vector>` requires API level 21 (current min is 19)"
errorLine1="<animated-vector xmlns:android="http://schemas.android.com/apk/res/android""
errorLine2=" ~~~~~~~~~~~~~~~">
<location
@@ -12,7 +12,7 @@
<issue
id="NewApi"
- message="`<animated-vector>` requires API level 21 (current min is 14)"
+ message="`<animated-vector>` requires API level 21 (current min is 19)"
errorLine1="<animated-vector xmlns:android="http://schemas.android.com/apk/res/android""
errorLine2=" ~~~~~~~~~~~~~~~">
<location
@@ -21,7 +21,7 @@
<issue
id="NewApi"
- message="`<animated-vector>` requires API level 21 (current min is 14)"
+ message="`<animated-vector>` requires API level 21 (current min is 19)"
errorLine1="<animated-vector xmlns:android="http://schemas.android.com/apk/res/android""
errorLine2=" ~~~~~~~~~~~~~~~">
<location
@@ -30,7 +30,7 @@
<issue
id="NewApi"
- message="`<animated-vector>` requires API level 21 (current min is 14)"
+ message="`<animated-vector>` requires API level 21 (current min is 19)"
errorLine1="<animated-vector xmlns:android="http://schemas.android.com/apk/res/android""
errorLine2=" ~~~~~~~~~~~~~~~">
<location
@@ -39,7 +39,7 @@
<issue
id="NewApi"
- message="`<animated-vector>` requires API level 21 (current min is 14)"
+ message="`<animated-vector>` requires API level 21 (current min is 19)"
errorLine1="<animated-vector xmlns:android="http://schemas.android.com/apk/res/android""
errorLine2=" ~~~~~~~~~~~~~~~">
<location
@@ -48,7 +48,7 @@
<issue
id="NewApi"
- message="`<animated-vector>` requires API level 21 (current min is 14)"
+ message="`<animated-vector>` requires API level 21 (current min is 19)"
errorLine1="<animated-vector xmlns:android="http://schemas.android.com/apk/res/android""
errorLine2=" ~~~~~~~~~~~~~~~">
<location
@@ -57,7 +57,7 @@
<issue
id="NewApi"
- message="`<animated-vector>` requires API level 21 (current min is 14)"
+ message="`<animated-vector>` requires API level 21 (current min is 19)"
errorLine1="<animated-vector xmlns:aapt="http://schemas.android.com/aapt""
errorLine2=" ~~~~~~~~~~~~~~~">
<location
@@ -66,7 +66,7 @@
<issue
id="NewApi"
- message="`<animated-vector>` requires API level 21 (current min is 14)"
+ message="`<animated-vector>` requires API level 21 (current min is 19)"
errorLine1="<animated-vector xmlns:android="http://schemas.android.com/apk/res/android""
errorLine2=" ~~~~~~~~~~~~~~~">
<location
@@ -75,7 +75,7 @@
<issue
id="NewApi"
- message="`<animated-vector>` requires API level 21 (current min is 14)"
+ message="`<animated-vector>` requires API level 21 (current min is 19)"
errorLine1="<animated-vector xmlns:android="http://schemas.android.com/apk/res/android""
errorLine2=" ~~~~~~~~~~~~~~~">
<location
@@ -84,7 +84,7 @@
<issue
id="NewApi"
- message="Using theme references in XML drawables requires API level 21 (current min is 14)"
+ message="Using theme references in XML drawables requires API level 21 (current min is 19)"
errorLine1=" android:fillColor="?android:attr/colorForeground""
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -93,7 +93,7 @@
<issue
id="NewApi"
- message="Using theme references in XML drawables requires API level 21 (current min is 14)"
+ message="Using theme references in XML drawables requires API level 21 (current min is 19)"
errorLine1=" android:strokeColor="?android:attr/colorForeground""
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -102,7 +102,7 @@
<issue
id="NewApi"
- message="Using theme references in XML drawables requires API level 21 (current min is 14)"
+ message="Using theme references in XML drawables requires API level 21 (current min is 19)"
errorLine1=" android:fillColor="?android:attr/colorForeground""
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -111,7 +111,7 @@
<issue
id="NewApi"
- message="Using theme references in XML drawables requires API level 21 (current min is 14)"
+ message="Using theme references in XML drawables requires API level 21 (current min is 19)"
errorLine1=" android:strokeColor="?android:attr/colorForeground""
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
diff --git a/vectordrawable/vectordrawable-animated/api/api_lint.ignore b/vectordrawable/vectordrawable-animated/api/api_lint.ignore
index 357c7df..ffe6f52 100644
--- a/vectordrawable/vectordrawable-animated/api/api_lint.ignore
+++ b/vectordrawable/vectordrawable-animated/api/api_lint.ignore
@@ -3,3 +3,7 @@
Missing nullability on parameter `bounds` in method `onBoundsChange`
MissingNullability: androidx.vectordrawable.graphics.drawable.AnimatedVectorDrawableCompat#onStateChange(int[]) parameter #0:
Missing nullability on parameter `state` in method `onStateChange`
+
+
+NotCloseable: androidx.vectordrawable.graphics.drawable.AnimatedVectorDrawableCompat:
+ Classes that release resources (stop()) should implement AutoCloseable and CloseGuard: class androidx.vectordrawable.graphics.drawable.AnimatedVectorDrawableCompat
diff --git a/vectordrawable/vectordrawable-seekable/api/api_lint.ignore b/vectordrawable/vectordrawable-seekable/api/api_lint.ignore
new file mode 100644
index 0000000..cecf462
--- /dev/null
+++ b/vectordrawable/vectordrawable-seekable/api/api_lint.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+NotCloseable: androidx.vectordrawable.graphics.drawable.SeekableAnimatedVectorDrawable:
+ Classes that release resources (stop()) should implement AutoCloseable and CloseGuard: class androidx.vectordrawable.graphics.drawable.SeekableAnimatedVectorDrawable
diff --git a/vectordrawable/vectordrawable/lint-baseline.xml b/vectordrawable/vectordrawable/lint-baseline.xml
index f647f1f..bcb268b 100644
--- a/vectordrawable/vectordrawable/lint-baseline.xml
+++ b/vectordrawable/vectordrawable/lint-baseline.xml
@@ -1,5 +1,14 @@
<?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-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>
<issue
id="UnknownNullness"
diff --git a/viewpager/viewpager/api/api_lint.ignore b/viewpager/viewpager/api/api_lint.ignore
index 908ecb2..de6c3f68 100644
--- a/viewpager/viewpager/api/api_lint.ignore
+++ b/viewpager/viewpager/api/api_lint.ignore
@@ -13,8 +13,6 @@
Listeners should be an interface, or otherwise renamed Callback: SimpleOnPageChangeListener
-MissingNullability: androidx.viewpager.widget.PagerTabStrip#onDraw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `onDraw`
MissingNullability: androidx.viewpager.widget.PagerTabStrip#onTouchEvent(android.view.MotionEvent) parameter #0:
Missing nullability on parameter `ev` in method `onTouchEvent`
MissingNullability: androidx.viewpager.widget.PagerTabStrip#setBackgroundDrawable(android.graphics.drawable.Drawable) parameter #0:
@@ -33,8 +31,6 @@
Missing nullability on parameter `event` in method `dispatchKeyEvent`
MissingNullability: androidx.viewpager.widget.ViewPager#dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent) parameter #0:
Missing nullability on parameter `event` in method `dispatchPopulateAccessibilityEvent`
-MissingNullability: androidx.viewpager.widget.ViewPager#draw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `draw`
MissingNullability: androidx.viewpager.widget.ViewPager#generateDefaultLayoutParams():
Missing nullability on method `generateDefaultLayoutParams` return
MissingNullability: androidx.viewpager.widget.ViewPager#generateLayoutParams(android.util.AttributeSet):
@@ -45,8 +41,6 @@
Missing nullability on method `generateLayoutParams` return
MissingNullability: androidx.viewpager.widget.ViewPager#generateLayoutParams(android.view.ViewGroup.LayoutParams) parameter #0:
Missing nullability on parameter `p` in method `generateLayoutParams`
-MissingNullability: androidx.viewpager.widget.ViewPager#onDraw(android.graphics.Canvas) parameter #0:
- Missing nullability on parameter `canvas` in method `onDraw`
MissingNullability: androidx.viewpager.widget.ViewPager#onInterceptTouchEvent(android.view.MotionEvent) parameter #0:
Missing nullability on parameter `ev` in method `onInterceptTouchEvent`
MissingNullability: androidx.viewpager.widget.ViewPager#onRequestFocusInDescendants(int, android.graphics.Rect) parameter #1:
diff --git a/viewpager2/integration-tests/testapp/lint-baseline.xml b/viewpager2/integration-tests/testapp/lint-baseline.xml
index 2120164..0ae775c 100644
--- a/viewpager2/integration-tests/testapp/lint-baseline.xml
+++ b/viewpager2/integration-tests/testapp/lint-baseline.xml
@@ -1,29 +1,20 @@
<?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-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 19 (current min is 14): `java.lang.AssertionError()`"
- errorLine1=" throw AssertionError("Block hit bad state $n times", e)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/androidTest/java/androidx/viewpager2/integration/testapp/test/util/RetryBlock.kt"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class null is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" textDirection = View.TEXT_DIRECTION_LOCALE"
- errorLine2=" ~~~~~~~~~~~~~">
+ 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="ClassVerificationFailure"
- message="This call references a method added in API level 17; however, the containing class null is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" textDirection = View.TEXT_DIRECTION_LOCALE"
- errorLine2=" ~~~~~~~~~~~~~">
+ 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>
diff --git a/viewpager2/viewpager2/lint-baseline.xml b/viewpager2/viewpager2/lint-baseline.xml
index 0020cc5..cbf2f21 100644
--- a/viewpager2/viewpager2/lint-baseline.xml
+++ b/viewpager2/viewpager2/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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="BanThreadSleep"
@@ -19,4 +19,31 @@
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/compose/compose-foundation/lint-baseline.xml b/wear/compose/compose-foundation/lint-baseline.xml
index 7d8acbf..8d1a56a 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-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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="PrimitiveInCollection"
@@ -210,24 +210,6 @@
<issue
id="PrimitiveInLambda"
- message="Use a functional interface instead of lambda syntax for lambdas with primitive values in method expandableItems has parameter 'key' with type Function1<? super Integer, ? extends Object>."
- errorLine1=" key: ((index: Int) -> Any)? = null,"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/wear/compose/foundation/Expandable.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInLambda"
- message="Use a functional interface instead of lambda syntax for lambdas with primitive values in method expandableItems has parameter 'itemContent' with type Function2<? super BoxScope, ? super Integer, Unit>."
- errorLine1=" itemContent: @Composable BoxScope.(index: Int) -> Unit"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/wear/compose/foundation/Expandable.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInLambda"
message="Use a functional interface instead of lambda syntax for lambdas with primitive values in method items has parameter 'key' with type Function1<? super Integer, ? extends Object>."
errorLine1=" key: ((index: Int) -> Any)? = null,"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
diff --git a/wear/compose/compose-foundation/src/main/java/androidx/wear/compose/foundation/CurvedComposable.kt b/wear/compose/compose-foundation/src/main/java/androidx/wear/compose/foundation/CurvedComposable.kt
index 64fc086..22a6db3 100644
--- a/wear/compose/compose-foundation/src/main/java/androidx/wear/compose/foundation/CurvedComposable.kt
+++ b/wear/compose/compose-foundation/src/main/java/androidx/wear/compose/foundation/CurvedComposable.kt
@@ -151,7 +151,9 @@
val radiusToTopLeft = outerRadius
// Distance from the center of the CurvedRow to the top center of the component.
- val radiusToTopCenter = sqrt(pow2(radiusToTopLeft) - pow2(placeable.width / 2f))
+ val radiusToTopCenter = sqrt(
+ (pow2(radiusToTopLeft) - pow2(placeable.width / 2f)).coerceAtLeast(0f)
+ )
// To position this child, we move its center rotating it around the CurvedRow's center.
val radiusToCenter = radiusToTopCenter - placeable.height / 2f
diff --git a/wear/compose/compose-material/lint-baseline.xml b/wear/compose/compose-material/lint-baseline.xml
index 4818b317..6e73454 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.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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="PrimitiveInCollection"
@@ -336,15 +336,6 @@
<issue
id="PrimitiveInLambda"
- message="Use a functional interface instead of lambda syntax for lambdas with primitive values in method PositionIndicator has parameter 'value' with type Function0<Float>."
- errorLine1=" value: () -> Float,"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/wear/compose/material/PositionIndicator.kt"/>
- </issue>
-
- <issue
- id="PrimitiveInLambda"
message="Use a functional interface instead of lambda syntax for lambdas with primitive values in variable 'boundsSize' with type Function1<? super Density, ? extends IntSize>."
errorLine1=" val boundsSize: Density.() -> IntSize = {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
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 2c3cb43..afd00b2 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
@@ -383,6 +383,32 @@
* Represents the different container and content colors used for toggle buttons
* ([ToggleButton], [IconToggleButton], and [TextToggleButton]) in various states,
* that are checked, unchecked, enabled and disabled.
+ *
+ * @constructor [ToggleButtonColors] constructor to be used with [ToggleButton]
+ * @param checkedContainerColor Container or background color when the toggle button is checked
+ * @param checkedContentColor Color of the content like label when the toggle button is checked
+ * @param checkedSecondaryContentColor Color of the secondary content like secondary label when the
+ * toggle button is checked
+ * @param checkedIconColor Color of the icon when the toggle button is checked
+ * @param uncheckedContainerColor Container or background color when the toggle button is unchecked
+ * @param uncheckedContentColor Color of the content like label when the toggle button is unchecked
+ * @param uncheckedSecondaryContentColor Color of the secondary content like secondary label when
+ * the toggle button is unchecked
+ * @param uncheckedIconColor Color of the icon when the toggle button is unchecked
+ * @param disabledCheckedContainerColor Container or background color when the toggle button is
+ * disabled and checked
+ * @param disabledCheckedContentColor Color of content like label when the toggle button is
+ * disabled and checked
+ * @param disabledCheckedSecondaryContentColor Color of the secondary content like secondary label
+ * when the toggle button is disabled and checked
+ * @param disabledCheckedIconColor Icon color when the toggle button is disabled and checked
+ * @param disabledUncheckedContainerColor Container or background color when the toggle button is
+ * disabled and unchecked
+ * @param disabledUncheckedContentColor Color of the content like label when the toggle button is
+ * disabled and unchecked
+ * @param disabledUncheckedSecondaryContentColor Color of the secondary content like secondary label
+ * when the toggle button is disabled and unchecked
+ * @param disabledUncheckedIconColor Icon color when the toggle button is disabled and unchecked
*/
@Immutable
class ToggleButtonColors constructor(
@@ -403,6 +429,25 @@
val disabledUncheckedSecondaryContentColor: Color,
val disabledUncheckedIconColor: Color,
) {
+ /**
+ * [ToggleButtonColors] constructor for [IconToggleButton] and [TextToggleButton].
+ *
+ * @param checkedContainerColor Container or background color of the toggle button when checked
+ * @param checkedContentColor Color of the content (text or icon) of the toggle button when
+ * checked
+ * @param uncheckedContainerColor Container or background color of the toggle button when
+ * unchecked
+ * @param uncheckedContentColor Color of the content (text or icon) of the toggle button when
+ * unchecked
+ * @param disabledCheckedContainerColor Container or background color of the toggle button when
+ * disabled and checked
+ * @param disabledCheckedContentColor Color of the content (icon or text) toggle button when
+ * disabled and unchecked
+ * @param disabledUncheckedContainerColor Container or background color of the toggle button
+ * when disabled and unchecked
+ * @param disabledUncheckedContentColor Color of the content (icon or text) toggle button when
+ * disabled and unchecked
+ */
constructor(
checkedContainerColor: Color,
checkedContentColor: Color,
@@ -563,6 +608,39 @@
/**
* Represents the different colors used in [SplitToggleButton] in different states.
+ *
+ * @constructor [SplitToggleButtonColors] constructor to be used with [SplitToggleButton]
+ * @param checkedContainerColor Container or background color when the split toggle button is
+ * checked
+ * @param checkedContentColor Color of the content like label when the split toggle button is
+ * checked
+ * @param checkedSecondaryContentColor Color of the secondary content like secondary label when the
+ * split toggle button is checked
+ * @param checkedSplitContainerColor Split container color when the split toggle button is checked
+ * @param uncheckedContainerColor Container or background color when the split toggle button is
+ * unchecked
+ * @param uncheckedContentColor Color of the content like label when the split toggle button is
+ * unchecked
+ * @param uncheckedSecondaryContentColor Color of the secondary content like secondary label when
+ * the split toggle button is unchecked
+ * @param uncheckedSplitContainerColor Split container color when the split toggle button is
+ * unchecked
+ * @param disabledCheckedContainerColor Container color when the split toggle button is disabled
+ * and checked
+ * @param disabledCheckedContentColor Color of the content like label when the split toggle button
+ * is disabled and checked
+ * @param disabledCheckedSecondaryContentColor Color of the secondary content like secondary label
+ * when the split toggle button is disabled and checked
+ * @param disabledCheckedSplitContainerColor Split container color when the split toggle button is
+ * disabled and checked
+ * @param disabledUncheckedContainerColor Container color when the split toggle button is unchecked
+ * and disabled
+ * @param disabledUncheckedContentColor Color of the content like label when the split toggle
+ * button is unchecked and disabled
+ * @param disabledUncheckedSecondaryContentColor Color of the secondary content like secondary
+ * label when the split toggle button is unchecked and disabled
+ * @param disabledUncheckedSplitContainerColor Split container color when the split toggle button
+ * is unchecked and disabled
*/
class SplitToggleButtonColors constructor(
val checkedContainerColor: Color,
diff --git a/wear/protolayout/protolayout-proto/src/main/proto/color.proto b/wear/protolayout/protolayout-proto/src/main/proto/color.proto
index d2377f0..1addb4d 100644
--- a/wear/protolayout/protolayout-proto/src/main/proto/color.proto
+++ b/wear/protolayout/protolayout-proto/src/main/proto/color.proto
@@ -53,7 +53,7 @@
//
// A color stop is a pair of a color and its offset in the gradient.
// The offset is the relative position of the color, beginning with 0 from the
- // start angle and ending with 1.0 after spanning 360 degrees clockwise.
+ // start angle and ending with 1.0 at the end angle, spanning clockwise.
//
// There must be at least 2 colors.
//
@@ -64,11 +64,23 @@
// results.
repeated ColorStop color_stops = 1;
- // The angular shift relative to the element's parent base angle. This is used
- // to shift the start angle of the gradient.
+ // The start angle of the gradient relative to the element's base angle. If
+ // not set, defaults to zero.
//
- // For ArcLine, the base angle is the angle where the line starts.
- DegreesProp angular_shift = 2;
+ // For ArcLine, the base angle is the angle where the line starts. The value
+ // represents a relative position in the line's length span. Values greater
+ // than 360 degrees correspond to upper layers of the arc line as it wraps
+ // over itself.
+ DegreesProp start_angle = 2;
+
+ // The end angle of the gradient, relative to the element's base angle. If not
+ // set, defaults to 360 degrees.
+ //
+ // For ArcLine, the base angle is the angle where the line starts. The value
+ // represents a relative position in the line's length span. Values greater
+ // than 360 degrees correspond to upper layers of the arc line as it wraps
+ // over itself.
+ DegreesProp end_angle = 3;
}
// A Brush describes how something is drawn on screen.
diff --git a/wear/protolayout/protolayout-proto/src/main/proto/layout.proto b/wear/protolayout/protolayout-proto/src/main/proto/layout.proto
index f248a31..ab3c6c2 100644
--- a/wear/protolayout/protolayout-proto/src/main/proto/layout.proto
+++ b/wear/protolayout/protolayout-proto/src/main/proto/layout.proto
@@ -83,9 +83,29 @@
// The styling of a font (e.g. font size, and metrics).
message FontStyle {
- // The size of the font, in scaled pixels (sp). If not specified, defaults to
- // the size of the system's "body" font.
- SpProp size = 1;
+ // The available sizes of the font, in scaled pixels (sp). If not specified, defaults to the size
+ // of the system's "body" font.
+ //
+ // If more than one size is specified and this FontStyle is applied to a Text element with static
+ // text, the text size will be automatically picked from the provided sizes to try to perfectly
+ // fit within its parent bounds. In other words, the largest size from the specified preset sizes
+ // that can fit the most text within the parent bounds will be used.
+ //
+ // The specified sizes don't have to be sorted. The maximum number of sizes used is limited to 10.
+ //
+ // Note that, if multiple sizes are set, 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.
+ //
+ // If this FontStyle is set to any other element besides Text, or that Text element has dynamic
+ // field, only the last added size will be use.
+ //
+ // Any previously added values with this method or #setSize will be cleared.
+ //
+ // While this field is accessible from 1.0 as singular, it only accepts multiple values since
+ // version 1.3 and renderers supporting version 1.3 will use the multiple values to automatically
+ // scale text. Renderers who don't support this version will use the first size among multiple
+ // values.
+ repeated SpProp size = 1;
// Whether the text should be rendered in a italic typeface. If not specified,
// defaults to "false".
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 8dc3111..00bb2ab 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
@@ -16,6 +16,8 @@
package androidx.wear.protolayout.renderer.inflater;
+import static android.util.TypedValue.COMPLEX_UNIT_SP;
+
import static androidx.core.util.Preconditions.checkNotNull;
import static androidx.wear.protolayout.renderer.common.ProtoLayoutDiffer.FIRST_CHILD_INDEX;
import static androidx.wear.protolayout.renderer.common.ProtoLayoutDiffer.ROOT_NODE_ID;
@@ -245,6 +247,8 @@
private static final int TEXT_COLOR_DEFAULT = 0xFFFFFFFF;
private static final int TEXT_MAX_LINES_DEFAULT = 1;
+ @VisibleForTesting
+ static final int TEXT_AUTOSIZES_LIMIT = 10;
private static final int TEXT_MIN_LINES = 1;
private static final ContainerDimension CONTAINER_DIMENSION_DEFAULT =
@@ -1145,7 +1149,7 @@
private float toPx(SpProp spField) {
return TypedValue.applyDimension(
- TypedValue.COMPLEX_UNIT_SP,
+ COMPLEX_UNIT_SP,
spField.getValue(),
mUiContext.getResources().getDisplayMetrics());
}
@@ -1154,7 +1158,8 @@
FontStyle style,
TextView textView,
String posId,
- Optional<ProtoLayoutDynamicDataPipeline.PipelineMaker> pipelineMaker) {
+ Optional<ProtoLayoutDynamicDataPipeline.PipelineMaker> pipelineMaker,
+ boolean isAutoSizeAllowed) {
// Note: Underline must be applied as a Span to work correctly (as opposed to using
// TextPaint#setTextUnderline). This is applied in the caller instead.
@@ -1163,8 +1168,43 @@
// flags in Paint if they're not supported by the given typeface).
textView.setTypeface(createTypeface(style), fontStyleToTypefaceStyle(style));
- if (style.hasSize()) {
- textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, style.getSize().getValue());
+ if (fontStyleHasSize(style)) {
+ List<SpProp> sizes = style.getSizeList();
+ int sizesCnt = sizes.size();
+
+ if (sizesCnt == 1) {
+ // No autosizing needed.
+ textView.setTextSize(COMPLEX_UNIT_SP, sizes.get(0).getValue());
+ } else if (isAutoSizeAllowed && sizesCnt <= TEXT_AUTOSIZES_LIMIT) {
+ // Max size is needed so that TextView leaves enough space for it. Otherwise,
+ // the text won't be able to grow.
+ int maxSize =
+ sizes.stream().mapToInt(sp -> (int) sp.getValue()).max().getAsInt();
+ textView.setTextSize(COMPLEX_UNIT_SP, maxSize);
+
+ // No need for sorting, TextView does that.
+ textView.setAutoSizeTextTypeUniformWithPresetSizes(
+ sizes.stream().mapToInt(spProp -> (int) spProp.getValue()).toArray(),
+ COMPLEX_UNIT_SP);
+ } else {
+ // Fallback where multiple values can't be used and the last value would be used.
+ // This can happen in two cases.
+ if (!isAutoSizeAllowed) {
+ // There is more than 1 size specified, but autosizing is not allowed.
+ Log.w(
+ TAG,
+ "Trying to autosize text with multiple font sizes where it's not "
+ + "allowed. Ignoring all other sizes and using the last one.");
+ } else {
+ Log.w(
+ TAG,
+ "More than " + TEXT_AUTOSIZES_LIMIT + " sizes has been added for the "
+ + "text autosizing. Ignoring values after the "
+ + TEXT_AUTOSIZES_LIMIT + " one.");
+ }
+
+ textView.setTextSize(COMPLEX_UNIT_SP, sizes.get(sizesCnt - 1).getValue());
+ }
}
if (style.hasLetterSpacing()) {
@@ -1184,10 +1224,16 @@
// flags in Paint if they're not supported by the given typeface).
textView.setTypeface(createTypeface(style), fontStyleToTypefaceStyle(style));
- // underline. We can implement this later by drawing a line under the text ourselves though.
-
- if (style.hasSize()) {
- textView.setTextSize(toPx(style.getSize()));
+ if (fontStyleHasSize(style)) {
+ // We are using the last added size in the FontStyle because ArcText doesn't support
+ // autosizing. This is the same behaviour as it was before size has made repeated.
+ if (style.getSizeList().size() > 1) {
+ Log.w(
+ TAG,
+ "Font size with multiple values has been used on Arc Text. Ignoring "
+ + "all size except the first one.");
+ }
+ textView.setTextSize(toPx(style.getSize(style.getSizeCount() - 1)));
}
}
@@ -2239,12 +2285,24 @@
}
applyTextOverflow(textView, text.getOverflow(), text.getMarqueeParameters());
+ // Text auto size is not supported for dynamic text.
+ boolean isAutoSizeAllowed = !(text.hasText() && text.getText().hasDynamicValue());
// Setting colours **must** go after setting the Text Appearance, otherwise it will get
// immediately overridden.
if (text.hasFontStyle()) {
- applyFontStyle(text.getFontStyle(), textView, posId, pipelineMaker);
+ applyFontStyle(
+ text.getFontStyle(),
+ textView,
+ posId,
+ pipelineMaker,
+ isAutoSizeAllowed);
} else {
- applyFontStyle(FontStyle.getDefaultInstance(), textView, posId, pipelineMaker);
+ applyFontStyle(
+ FontStyle.getDefaultInstance(),
+ textView,
+ posId,
+ pipelineMaker,
+ isAutoSizeAllowed);
}
boolean excludeFontPadding = false;
@@ -2842,8 +2900,17 @@
private void applyStylesToSpan(
SpannableStringBuilder builder, int start, int end, FontStyle fontStyle) {
- if (fontStyle.hasSize()) {
- AbsoluteSizeSpan span = new AbsoluteSizeSpan(round(toPx(fontStyle.getSize())));
+ if (fontStyleHasSize(fontStyle)) {
+ // We are using the last added size in the FontStyle because ArcText doesn't support
+ // autosizing. This is the same behaviour as it was before size has made repeated.
+ if (fontStyle.getSizeList().size() > 1) {
+ Log.w(
+ TAG,
+ "Font size with multiple values has been used on Span Text. Ignoring "
+ + "all size except the first one.");
+ }
+ AbsoluteSizeSpan span = new AbsoluteSizeSpan(round(toPx(
+ fontStyle.getSize(fontStyle.getSizeCount() - 1))));
builder.setSpan(span, start, end, Spanned.SPAN_MARK_MARK);
}
@@ -2872,6 +2939,10 @@
builder.setSpan(colorSpan, start, end, Spanned.SPAN_MARK_MARK);
}
+ private static boolean fontStyleHasSize(FontStyle fontStyle) {
+ return !fontStyle.getSizeList().isEmpty();
+ }
+
private void applyModifiersToSpan(
SpannableStringBuilder builder, int start, int end, SpanModifiers modifiers) {
if (modifiers.hasClickable()) {
@@ -3016,7 +3087,12 @@
// Setting colours **must** go after setting the Text Appearance, otherwise it will get
// immediately overridden.
if (mApplyFontVariantBodyAsDefault) {
- applyFontStyle(FontStyle.getDefaultInstance(), tv, posId, pipelineMaker);
+ applyFontStyle(
+ FontStyle.getDefaultInstance(),
+ tv,
+ posId,
+ pipelineMaker,
+ /* isAutoSizeAllowed= */ false);
}
LayoutParams layoutParams = generateDefaultLayoutParams();
diff --git a/wear/protolayout/protolayout-renderer/src/test/java/androidx/wear/protolayout/renderer/common/ProtoLayoutDifferTest.java b/wear/protolayout/protolayout-renderer/src/test/java/androidx/wear/protolayout/renderer/common/ProtoLayoutDifferTest.java
index deb6dbc..57b5b72 100644
--- a/wear/protolayout/protolayout-renderer/src/test/java/androidx/wear/protolayout/renderer/common/ProtoLayoutDifferTest.java
+++ b/wear/protolayout/protolayout-renderer/src/test/java/androidx/wear/protolayout/renderer/common/ProtoLayoutDifferTest.java
@@ -16,7 +16,6 @@
package androidx.wear.protolayout.renderer.common;
-import static androidx.wear.protolayout.renderer.common.ProtoLayoutDiffer.DISCARDED_FINGERPRINT_VALUE;
import static androidx.wear.protolayout.renderer.helper.TestDsl.arc;
import static androidx.wear.protolayout.renderer.helper.TestDsl.arcText;
import static androidx.wear.protolayout.renderer.helper.TestDsl.column;
@@ -29,8 +28,6 @@
import static com.google.common.truth.Truth.assertThat;
import androidx.test.ext.junit.runners.AndroidJUnit4;
-import androidx.wear.protolayout.proto.FingerprintProto.NodeFingerprint;
-import androidx.wear.protolayout.proto.FingerprintProto.TreeFingerprint;
import androidx.wear.protolayout.proto.LayoutElementProto.ArcLayoutElement;
import androidx.wear.protolayout.proto.LayoutElementProto.Layout;
import androidx.wear.protolayout.proto.LayoutElementProto.LayoutElement;
@@ -38,13 +35,9 @@
import androidx.wear.protolayout.renderer.common.ProtoLayoutDiffer.LayoutDiff;
import androidx.wear.protolayout.renderer.common.ProtoLayoutDiffer.TreeNodeWithChange;
-import com.google.common.collect.ImmutableList;
-
import org.junit.Test;
import org.junit.runner.RunWith;
-import java.util.List;
-
@RunWith(AndroidJUnit4.class)
public class ProtoLayoutDifferTest {
@Test
@@ -102,93 +95,6 @@
}
@Test
- public void getChangedNodes_bothFingerprintsDiscarded_allDiffs() {
- Layout layout =
- layout(
- column( // 1
- row( // 1.1
- text("Foo"), // 1.1.1
- text("Bar") // 1.1.2
- )));
- NodeFingerprint discardedFingerPrintRoot =
- buildShadowDiscardedFingerprint(
- layout.getFingerprint().getRoot(),
- "1",
- ImmutableList.of("1", "1.1", "1.1.1", "1.1.2"),
- ImmutableList.of("1", "1.1"));
-
- Layout discardedFingerprintLayout =
- Layout.newBuilder()
- .setRoot(layout.getRoot())
- .setFingerprint(
- TreeFingerprint.newBuilder().setRoot(discardedFingerPrintRoot))
- .build();
-
- LayoutDiff diff =
- ProtoLayoutDiffer.getDiff(
- discardedFingerprintLayout.getFingerprint(), discardedFingerprintLayout);
- assertThat(diff.getChangedNodes()).hasSize(1);
- }
-
- @Test
- public void getChangedNodes_selfChange_childrenUnaffected() {
- Layout layout =
- layout(
- column( // 1
- row( // 1.1
- text("Foo"), // 1.1.1
- text("Bar") // 1.1.2
- )));
- NodeFingerprint discardedFingerPrintRoot =
- buildShadowDiscardedFingerprint(
- layout.getFingerprint().getRoot(),
- "1",
- ImmutableList.of("1.1"),
- ImmutableList.of());
-
- Layout discardedFingerprintLayout =
- Layout.newBuilder()
- .setRoot(layout.getRoot())
- .setFingerprint(
- TreeFingerprint.newBuilder().setRoot(discardedFingerPrintRoot))
- .build();
-
- LayoutDiff diff =
- ProtoLayoutDiffer.getDiff(layout.getFingerprint(), discardedFingerprintLayout);
- assertThat(diff.getChangedNodes()).hasSize(1);
- assertThat(diff.getChangedNodes().get(0).isSelfOnlyChange()).isTrue();
- }
-
- @Test
- public void getChangedNodes_selfChangeAndChildren_isAllChange() {
- Layout layout =
- layout(
- column( // 1
- row( // 1.1
- text("Foo"), // 1.1.1
- text("Bar") // 1.1.2
- )));
- NodeFingerprint discardedFingerPrintRoot =
- buildShadowDiscardedFingerprint(
- layout.getFingerprint().getRoot(),
- "1",
- ImmutableList.of("1.1"),
- ImmutableList.of("1.1"));
-
- Layout discardedFingerprintLayout =
- Layout.newBuilder()
- .setRoot(layout.getRoot())
- .setFingerprint(
- TreeFingerprint.newBuilder().setRoot(discardedFingerPrintRoot))
- .build();
-
- LayoutDiff diff =
- ProtoLayoutDiffer.getDiff(layout.getFingerprint(), discardedFingerprintLayout);
- assertThat(diff.getChangedNodes()).hasSize(1);
- assertThat(diff.getChangedNodes().get(0).isSelfOnlyChange()).isFalse();
- }
-
- @Test
public void getChangedNodes_withOneUpdatedNode() {
LayoutDiff diff =
ProtoLayoutDiffer.getDiff(
@@ -340,42 +246,6 @@
assertThat(ProtoLayoutDiffer.isDescendantOf(childPosId, parentPosId)).isFalse();
}
- private NodeFingerprint buildShadowDiscardedFingerprint(
- NodeFingerprint fingerprintRoot,
- String rootPosId,
- List<String> discardedNodes,
- List<String> discardedChilds) {
- NodeFingerprint.Builder shadowNodeBuilder = NodeFingerprint.newBuilder();
- shadowNodeBuilder.setSelfTypeValue(fingerprintRoot.getSelfTypeValue());
- if (discardedNodes.contains(rootPosId)) {
- shadowNodeBuilder.setSelfPropsValue(DISCARDED_FINGERPRINT_VALUE);
- } else {
- shadowNodeBuilder.setSelfPropsValue(fingerprintRoot.getSelfPropsValue());
- }
- boolean discardChildren = discardedChilds.contains(rootPosId);
- if (discardChildren) {
- shadowNodeBuilder.setChildNodesValue(DISCARDED_FINGERPRINT_VALUE);
- } else {
- shadowNodeBuilder.setChildNodesValue(fingerprintRoot.getChildNodesValue());
- }
- int childIndex = 1;
- for (NodeFingerprint childNode : fingerprintRoot.getChildNodesList()) {
- NodeFingerprint childNodeFingerprint =
- buildShadowDiscardedFingerprint(
- childNode,
- rootPosId + "." + childIndex++,
- discardedNodes,
- discardedChilds);
- if (!discardChildren) {
- shadowNodeBuilder.addChildNodes(childNodeFingerprint);
- }
- if (childNodeFingerprint.getSelfPropsValue() == DISCARDED_FINGERPRINT_VALUE) {
- shadowNodeBuilder.setChildNodesValue(DISCARDED_FINGERPRINT_VALUE);
- }
- }
- return shadowNodeBuilder.build();
- }
-
private static Layout referenceLayout() {
return layout(
column( // 1
diff --git a/wear/protolayout/protolayout-renderer/src/test/java/androidx/wear/protolayout/renderer/helper/TestDsl.java b/wear/protolayout/protolayout-renderer/src/test/java/androidx/wear/protolayout/renderer/helper/TestDsl.java
index a291354..520b0b4 100644
--- a/wear/protolayout/protolayout-renderer/src/test/java/androidx/wear/protolayout/renderer/helper/TestDsl.java
+++ b/wear/protolayout/protolayout-renderer/src/test/java/androidx/wear/protolayout/renderer/helper/TestDsl.java
@@ -124,7 +124,7 @@
private LayoutElementProto.FontStyle toProto() {
return LayoutElementProto.FontStyle.newBuilder()
- .setSize(sp(sizeSp))
+ .addSize(sp(sizeSp))
.setItalic(bool(italic))
.setColor(color(colorArgb))
.build();
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 ae20ddc..214c868e 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
@@ -31,6 +31,7 @@
import static androidx.wear.protolayout.renderer.helper.TestDsl.layout;
import static androidx.wear.protolayout.renderer.helper.TestDsl.row;
import static androidx.wear.protolayout.renderer.helper.TestDsl.text;
+import static androidx.wear.protolayout.renderer.inflater.ProtoLayoutInflater.TEXT_AUTOSIZES_LIMIT;
import static androidx.wear.protolayout.renderer.inflater.ProtoLayoutInflater.getFrameLayoutGravity;
import static androidx.wear.protolayout.renderer.inflater.ProtoLayoutInflater.getRenderedMetadata;
import static androidx.wear.protolayout.renderer.test.R.drawable.android_animated_24dp;
@@ -114,6 +115,7 @@
import androidx.wear.protolayout.proto.AlignmentProto.VerticalAlignment;
import androidx.wear.protolayout.proto.AlignmentProto.VerticalAlignmentProp;
import androidx.wear.protolayout.proto.ColorProto.ColorProp;
+import androidx.wear.protolayout.proto.DimensionProto;
import androidx.wear.protolayout.proto.DimensionProto.ArcLineLength;
import androidx.wear.protolayout.proto.DimensionProto.ArcSpacerLength;
import androidx.wear.protolayout.proto.DimensionProto.ContainerDimension;
@@ -1125,6 +1127,31 @@
}
@Test
+ public void inflate_arc_withText_autoSize_notSet() {
+ int lastSize = 12;
+ FontStyle.Builder style = FontStyle.newBuilder()
+ .addAllSize(buildSizesList(new int[]{10, 20, lastSize}));
+ LayoutElement root =
+ LayoutElement.newBuilder()
+ .setArc(
+ Arc.newBuilder()
+ .setAnchorAngle(degrees(0).build())
+ .addContents(
+ ArcLayoutElement.newBuilder()
+ .setText(
+ ArcText.newBuilder()
+ .setText(string("text1"))
+ .setFontStyle(style))))
+ .build();
+
+ FrameLayout rootLayout = renderer(fingerprintedLayout(root)).inflate();
+ ArcLayout arcLayout = (ArcLayout) rootLayout.getChildAt(0);
+ CurvedTextView tv = (CurvedTextView) arcLayout.getChildAt(0);
+ assertThat(tv.getText()).isEqualTo("text1");
+ expect.that(tv.getTextSize()).isEqualTo(lastSize);
+ }
+
+ @Test
public void inflate_arc_withSpacer() {
LayoutElement root =
LayoutElement.newBuilder()
@@ -1935,6 +1962,137 @@
}
@Test
+ public void inflate_textView_autosize_set() {
+ String text = "Test text";
+ int[] presetSizes = new int[]{12, 20, 10};
+ List<DimensionProto.SpProp> sizes = buildSizesList(presetSizes);
+
+ LayoutElement textElement =
+ LayoutElement.newBuilder()
+ .setText(
+ Text.newBuilder()
+ .setText(string(text))
+ .setFontStyle(
+ FontStyle.newBuilder()
+ .addAllSize(sizes)))
+ .build();
+ LayoutElement root =
+ LayoutElement.newBuilder().setBox(
+ Box.newBuilder()
+ .setWidth(expand())
+ .setHeight(expand())
+ .addContents(textElement)).build();
+
+ FrameLayout rootLayout = renderer(fingerprintedLayout(root)).inflate();
+ ViewGroup firstChild = (ViewGroup) rootLayout.getChildAt(0);
+ TextView tv = (TextView) firstChild.getChildAt(0);
+
+ // TextView sorts preset sizes.
+ Arrays.sort(presetSizes);
+ expect.that(tv.getAutoSizeTextType()).isEqualTo(TextView.AUTO_SIZE_TEXT_TYPE_UNIFORM);
+ expect.that(tv.getAutoSizeTextAvailableSizes()).isEqualTo(presetSizes);
+ expect.that(tv.getTextSize()).isEqualTo(20);
+ }
+
+ @Test
+ public void inflate_textView_autosize_setLimit_usesSingleSize() {
+ String text = "Test text";
+ int sizesLength = TEXT_AUTOSIZES_LIMIT + 5;
+ int[] presetSizes = new int[sizesLength];
+ int expectedLastSize = 120;
+ for (int i = 0; i < sizesLength - 1; i++) {
+ presetSizes[i] = i + 1;
+ }
+ presetSizes[sizesLength - 1] = expectedLastSize;
+ List<DimensionProto.SpProp> sizes = buildSizesList(presetSizes);
+
+ LayoutElement textElement =
+ LayoutElement.newBuilder()
+ .setText(
+ Text.newBuilder()
+ .setText(string(text))
+ .setMaxLines(Int32Prop.newBuilder().setValue(4))
+ .setFontStyle(
+ FontStyle.newBuilder()
+ .addAllSize(sizes)))
+ .build();
+ LayoutElement root =
+ LayoutElement.newBuilder().setBox(
+ Box.newBuilder()
+ .setWidth(expand())
+ .setHeight(expand())
+ .addContents(textElement)).build();
+
+ FrameLayout rootLayout = renderer(fingerprintedLayout(root)).inflate();
+ ViewGroup firstChild = (ViewGroup) rootLayout.getChildAt(0);
+ TextView tv = (TextView) firstChild.getChildAt(0);
+ expect.that(tv.getAutoSizeTextType()).isEqualTo(TextView.AUTO_SIZE_TEXT_TYPE_NONE);
+ expect.that(tv.getAutoSizeTextAvailableSizes()).isEmpty();
+ expect.that(tv.getTextSize()).isEqualTo(expectedLastSize);
+ }
+
+ @Test
+ public void inflate_textView_autosize_notSet() {
+ String text = "Test text";
+ int size = 24;
+ List<DimensionProto.SpProp> sizes = buildSizesList(new int[]{size});
+
+ LayoutElement textElement =
+ LayoutElement.newBuilder()
+ .setText(
+ Text.newBuilder()
+ .setText(string(text))
+ .setFontStyle(
+ FontStyle.newBuilder()
+ .addAllSize(sizes)))
+ .build();
+ LayoutElement root =
+ LayoutElement.newBuilder().setBox(
+ Box.newBuilder()
+ .setWidth(expand())
+ .setHeight(expand())
+ .addContents(textElement)).build();
+
+ FrameLayout rootLayout = renderer(fingerprintedLayout(root)).inflate();
+ ViewGroup firstChild = (ViewGroup) rootLayout.getChildAt(0);
+ TextView tv = (TextView) firstChild.getChildAt(0);
+ expect.that(tv.getAutoSizeTextType()).isEqualTo(TextView.AUTO_SIZE_TEXT_TYPE_NONE);
+ expect.that(tv.getAutoSizeTextAvailableSizes()).isEmpty();
+ expect.that(tv.getTextSize()).isEqualTo(size);
+ }
+
+ @Test
+ public void inflate_textView_autosize_setDynamic_noop() {
+ String text = "Test text";
+ int lastSize = 24;
+ List<DimensionProto.SpProp> sizes = buildSizesList(new int[]{10, 30, lastSize});
+
+ LayoutElement textElement =
+ LayoutElement.newBuilder()
+ .setText(
+ Text.newBuilder()
+ .setText(dynamicString(text))
+ .setFontStyle(
+ FontStyle.newBuilder()
+ .addAllSize(sizes)))
+ .build();
+ LayoutElement root =
+ LayoutElement.newBuilder().setBox(
+ Box.newBuilder()
+ .setWidth(expand())
+ .setHeight(expand())
+ .addContents(textElement)).build();
+
+ FrameLayout rootLayout = renderer(fingerprintedLayout(root)).inflate();
+ ArrayList<View> textChildren = new ArrayList<>();
+ rootLayout.findViewsWithText(textChildren, text, View.FIND_VIEWS_WITH_TEXT);
+ TextView tv = (TextView) textChildren.get(0);
+ expect.that(tv.getAutoSizeTextType()).isEqualTo(TextView.AUTO_SIZE_TEXT_TYPE_NONE);
+ expect.that(tv.getAutoSizeTextAvailableSizes()).isEmpty();
+ expect.that(tv.getTextSize()).isEqualTo(lastSize);
+ }
+
+ @Test
public void inflate_spannable_marqueeAnimation() {
String text = "Marquee Animation";
LayoutElement root =
@@ -1965,6 +2123,29 @@
}
@Test
+ public void inflate_spantext_ignoresMultipleSizes() {
+ String text = "Test text";
+ int firstSize = 12;
+ FontStyle.Builder style = FontStyle.newBuilder()
+ .addAllSize(buildSizesList(new int[]{firstSize, 10, 20}));
+ LayoutElement root =
+ LayoutElement.newBuilder()
+ .setSpannable(
+ Spannable.newBuilder()
+ .addSpans(
+ Span.newBuilder()
+ .setText(
+ SpanText.newBuilder()
+ .setText(string(text))
+ .setFontStyle(style))))
+ .build();
+
+ FrameLayout rootLayout = renderer(fingerprintedLayout(root)).inflate();
+ TextView tv = (TextView) rootLayout.getChildAt(0);
+ expect.that(tv.getAutoSizeTextType()).isEqualTo(TextView.AUTO_SIZE_TEXT_TYPE_NONE);
+ }
+
+ @Test
public void inflate_spannable_marqueeAnimation_repeatLimit() {
String text = "Marquee Animation";
int marqueeIterations = 5;
@@ -4506,6 +4687,11 @@
}
@NonNull
+ private static DimensionProto.SpProp sp(float value) {
+ return DimensionProto.SpProp.newBuilder().setValue(value).build();
+ }
+
+ @NonNull
private static ContainerDimension.Builder expand() {
return ContainerDimension.newBuilder()
.setExpandedDimension(ExpandedDimensionProp.getDefaultInstance());
@@ -4534,8 +4720,26 @@
}
@NonNull
+ private static StringProp.Builder dynamicString(String value) {
+ return StringProp.newBuilder()
+ .setValue(value)
+ .setDynamicValue(
+ DynamicString.newBuilder()
+ .setFixed(FixedString.newBuilder().setValue(value)));
+ }
+
+ @NonNull
private static ImageDimension.Builder expandImage() {
return ImageDimension.newBuilder()
.setExpandedDimension(ExpandedDimensionProp.getDefaultInstance());
}
+
+ @NonNull
+ private static List<DimensionProto.SpProp> buildSizesList(int[] presetSizes) {
+ List<DimensionProto.SpProp> sizes = new ArrayList<>(3);
+ for (int s: presetSizes) {
+ sizes.add(sp(s));
+ }
+ return sizes;
+ }
}
diff --git a/wear/protolayout/protolayout/api/current.txt b/wear/protolayout/protolayout/api/current.txt
index 6b9b160..72af032 100644
--- a/wear/protolayout/protolayout/api/current.txt
+++ b/wear/protolayout/protolayout/api/current.txt
@@ -129,14 +129,16 @@
}
public static final class ColorBuilders.SweepGradient implements androidx.wear.protolayout.ColorBuilders.Brush {
- method public androidx.wear.protolayout.DimensionBuilders.DegreesProp? getAngularShift();
method public java.util.List<androidx.wear.protolayout.ColorBuilders.ColorStop!> getColorStops();
+ method public androidx.wear.protolayout.DimensionBuilders.DegreesProp getEndAngle();
+ method public androidx.wear.protolayout.DimensionBuilders.DegreesProp getStartAngle();
}
public static final class ColorBuilders.SweepGradient.Builder {
ctor @java.lang.SafeVarargs public ColorBuilders.SweepGradient.Builder(androidx.wear.protolayout.ColorBuilders.ColorStop!...);
method public androidx.wear.protolayout.ColorBuilders.SweepGradient build();
- method public androidx.wear.protolayout.ColorBuilders.SweepGradient.Builder setAngularShift(androidx.wear.protolayout.DimensionBuilders.DegreesProp);
+ method public androidx.wear.protolayout.ColorBuilders.SweepGradient.Builder setEndAngle(androidx.wear.protolayout.DimensionBuilders.DegreesProp);
+ method public androidx.wear.protolayout.ColorBuilders.SweepGradient.Builder setStartAngle(androidx.wear.protolayout.DimensionBuilders.DegreesProp);
}
public final class DeviceParametersBuilders {
@@ -551,6 +553,7 @@
method public androidx.wear.protolayout.TypeBuilders.BoolProp? getItalic();
method public androidx.wear.protolayout.DimensionBuilders.EmProp? getLetterSpacing();
method public androidx.wear.protolayout.DimensionBuilders.SpProp? getSize();
+ method @SuppressCompatibility @androidx.wear.protolayout.expression.ProtoLayoutExperimental public java.util.List<androidx.wear.protolayout.DimensionBuilders.SpProp!> getSizes();
method public androidx.wear.protolayout.TypeBuilders.BoolProp? getUnderline();
method @SuppressCompatibility @androidx.wear.protolayout.expression.ProtoLayoutExperimental public androidx.wear.protolayout.LayoutElementBuilders.FontVariantProp? getVariant();
method public androidx.wear.protolayout.LayoutElementBuilders.FontWeightProp? getWeight();
@@ -564,6 +567,7 @@
method public androidx.wear.protolayout.LayoutElementBuilders.FontStyle.Builder setItalic(boolean);
method public androidx.wear.protolayout.LayoutElementBuilders.FontStyle.Builder setLetterSpacing(androidx.wear.protolayout.DimensionBuilders.EmProp);
method public androidx.wear.protolayout.LayoutElementBuilders.FontStyle.Builder setSize(androidx.wear.protolayout.DimensionBuilders.SpProp);
+ method @SuppressCompatibility @androidx.wear.protolayout.expression.ProtoLayoutExperimental public androidx.wear.protolayout.LayoutElementBuilders.FontStyle.Builder setSizes(androidx.wear.protolayout.DimensionBuilders.SpProp!...);
method public androidx.wear.protolayout.LayoutElementBuilders.FontStyle.Builder setUnderline(androidx.wear.protolayout.TypeBuilders.BoolProp);
method public androidx.wear.protolayout.LayoutElementBuilders.FontStyle.Builder setUnderline(boolean);
method @SuppressCompatibility @androidx.wear.protolayout.expression.ProtoLayoutExperimental public androidx.wear.protolayout.LayoutElementBuilders.FontStyle.Builder setVariant(androidx.wear.protolayout.LayoutElementBuilders.FontVariantProp);
diff --git a/wear/protolayout/protolayout/api/restricted_current.txt b/wear/protolayout/protolayout/api/restricted_current.txt
index 6b9b160..72af032 100644
--- a/wear/protolayout/protolayout/api/restricted_current.txt
+++ b/wear/protolayout/protolayout/api/restricted_current.txt
@@ -129,14 +129,16 @@
}
public static final class ColorBuilders.SweepGradient implements androidx.wear.protolayout.ColorBuilders.Brush {
- method public androidx.wear.protolayout.DimensionBuilders.DegreesProp? getAngularShift();
method public java.util.List<androidx.wear.protolayout.ColorBuilders.ColorStop!> getColorStops();
+ method public androidx.wear.protolayout.DimensionBuilders.DegreesProp getEndAngle();
+ method public androidx.wear.protolayout.DimensionBuilders.DegreesProp getStartAngle();
}
public static final class ColorBuilders.SweepGradient.Builder {
ctor @java.lang.SafeVarargs public ColorBuilders.SweepGradient.Builder(androidx.wear.protolayout.ColorBuilders.ColorStop!...);
method public androidx.wear.protolayout.ColorBuilders.SweepGradient build();
- method public androidx.wear.protolayout.ColorBuilders.SweepGradient.Builder setAngularShift(androidx.wear.protolayout.DimensionBuilders.DegreesProp);
+ method public androidx.wear.protolayout.ColorBuilders.SweepGradient.Builder setEndAngle(androidx.wear.protolayout.DimensionBuilders.DegreesProp);
+ method public androidx.wear.protolayout.ColorBuilders.SweepGradient.Builder setStartAngle(androidx.wear.protolayout.DimensionBuilders.DegreesProp);
}
public final class DeviceParametersBuilders {
@@ -551,6 +553,7 @@
method public androidx.wear.protolayout.TypeBuilders.BoolProp? getItalic();
method public androidx.wear.protolayout.DimensionBuilders.EmProp? getLetterSpacing();
method public androidx.wear.protolayout.DimensionBuilders.SpProp? getSize();
+ method @SuppressCompatibility @androidx.wear.protolayout.expression.ProtoLayoutExperimental public java.util.List<androidx.wear.protolayout.DimensionBuilders.SpProp!> getSizes();
method public androidx.wear.protolayout.TypeBuilders.BoolProp? getUnderline();
method @SuppressCompatibility @androidx.wear.protolayout.expression.ProtoLayoutExperimental public androidx.wear.protolayout.LayoutElementBuilders.FontVariantProp? getVariant();
method public androidx.wear.protolayout.LayoutElementBuilders.FontWeightProp? getWeight();
@@ -564,6 +567,7 @@
method public androidx.wear.protolayout.LayoutElementBuilders.FontStyle.Builder setItalic(boolean);
method public androidx.wear.protolayout.LayoutElementBuilders.FontStyle.Builder setLetterSpacing(androidx.wear.protolayout.DimensionBuilders.EmProp);
method public androidx.wear.protolayout.LayoutElementBuilders.FontStyle.Builder setSize(androidx.wear.protolayout.DimensionBuilders.SpProp);
+ method @SuppressCompatibility @androidx.wear.protolayout.expression.ProtoLayoutExperimental public androidx.wear.protolayout.LayoutElementBuilders.FontStyle.Builder setSizes(androidx.wear.protolayout.DimensionBuilders.SpProp!...);
method public androidx.wear.protolayout.LayoutElementBuilders.FontStyle.Builder setUnderline(androidx.wear.protolayout.TypeBuilders.BoolProp);
method public androidx.wear.protolayout.LayoutElementBuilders.FontStyle.Builder setUnderline(boolean);
method @SuppressCompatibility @androidx.wear.protolayout.expression.ProtoLayoutExperimental public androidx.wear.protolayout.LayoutElementBuilders.FontStyle.Builder setVariant(androidx.wear.protolayout.LayoutElementBuilders.FontVariantProp);
diff --git a/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/ColorBuilders.java b/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/ColorBuilders.java
index d183294..6a61f55 100644
--- a/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/ColorBuilders.java
+++ b/wear/protolayout/protolayout/src/main/java/androidx/wear/protolayout/ColorBuilders.java
@@ -378,7 +378,7 @@
*
* <p>A color stop is a pair of a color and its offset in the gradient. The offset is the
* relative position of the color, beginning with 0 from the start angle and ending with 1.0
- * after spanning 360 degrees clockwise.
+ * at the end angle, spanning clockwise.
*
* <p>There must be at least 2 colors.
*
@@ -398,20 +398,42 @@
}
/**
- * Gets the angular shift relative to the element's parent base angle. This is used to shift
- * the start angle of the gradient.
+ * Gets the start angle of the gradient relative to the element's base angle. If not set,
+ * defaults to zero.
*
* <p>For {@link androidx.wear.protolayout.LayoutElementBuilders.ArcLine}, the base angle is
- * the angle where the line starts.
+ * the angle where the line starts. The value represents a relative position in the line's
+ * length span. Values greater than 360 degrees correspond to upper layers of the arc line
+ * as it wraps over itself.
*
* @since 1.3
*/
- @Nullable
- public DegreesProp getAngularShift() {
- if (mImpl.hasAngularShift()) {
- return DegreesProp.fromProto(mImpl.getAngularShift());
+ @NonNull
+ public DegreesProp getStartAngle() {
+ if (mImpl.hasStartAngle()) {
+ return DegreesProp.fromProto(mImpl.getStartAngle());
} else {
- return null;
+ return new DegreesProp.Builder(0f).build();
+ }
+ }
+
+ /**
+ * Gets the end angle of the gradient, relative to the element's base angle. If not set,
+ * defaults to 360 degrees.
+ *
+ * <p>For {@link androidx.wear.protolayout.LayoutElementBuilders.ArcLine}, the base angle is
+ * the angle where the line starts. The value represents a relative position in the line's
+ * length span. Values greater than 360 degrees correspond to upper layers of the arc line
+ * as it wraps over itself.
+ *
+ * @since 1.3
+ */
+ @NonNull
+ public DegreesProp getEndAngle() {
+ if (mImpl.hasEndAngle()) {
+ return DegreesProp.fromProto(mImpl.getEndAngle());
+ } else {
+ return new DegreesProp.Builder(360f).build();
}
}
@@ -454,8 +476,10 @@
return "SweepGradient{"
+ "colorStops="
+ getColorStops()
- + ", angularShift="
- + getAngularShift()
+ + ", startAngle="
+ + getStartAngle()
+ + ", endAngle="
+ + getEndAngle()
+ "}";
}
@@ -472,7 +496,7 @@
*
* <p>A color stop is a pair of a color and its offset in the gradient. The offset is
* the relative position of the color, beginning with 0 from the start angle and ending
- * with 1.0 after spanning 360 degrees clockwise.
+ * with 1.0 at the end angle, spanning clockwise.
*
* <p>There must be at least 2 colors.
*
@@ -492,25 +516,52 @@
}
/**
- * Sets the angular shift relative to the element's parent base angle. This is used to
- * shift the start angle of the gradient.
+ * Sets the start angle of the gradient relative to the element's base angle. If not
+ * set, defaults to zero.
*
* <p>For {@link androidx.wear.protolayout.LayoutElementBuilders.ArcLine}, the base
- * angle is the angle where the line starts.
+ * angle is the angle where the line starts. The value represents a relative position in
+ * the line's length span. Values greater than 360 degrees correspond to upper layers of
+ * the arc line as it wraps over itself.
*
* <p>Note that this field only supports static values.
*
* @since 1.3
*/
@NonNull
- public Builder setAngularShift(@NonNull DegreesProp angularShift) {
- if (angularShift.getDynamicValue() != null) {
+ public Builder setStartAngle(@NonNull DegreesProp startAngle) {
+ if (startAngle.getDynamicValue() != null) {
throw new IllegalArgumentException(
- "setAngularShift doesn't support dynamic values.");
+ "setStartAngle doesn't support dynamic values.");
}
- mImpl.setAngularShift(angularShift.toProto());
+ mImpl.setStartAngle(startAngle.toProto());
mFingerprint.recordPropertyUpdate(
- 2, checkNotNull(angularShift.getFingerprint()).aggregateValueAsInt());
+ 2, checkNotNull(startAngle.getFingerprint()).aggregateValueAsInt());
+ return this;
+ }
+
+ /**
+ * Sets the end angle of the gradient, relative to the element's base angle. If not set,
+ * defaults to 360 degrees.
+ *
+ * <p>For {@link androidx.wear.protolayout.LayoutElementBuilders.ArcLine}, the base
+ * angle is the angle where the line starts. The value represents a relative position in
+ * the line's length span. Values greater than 360 degrees correspond to upper layers of
+ * the arc line as it wraps over itself.
+ *
+ * <p>Note that this field only supports static values.
+ *
+ * @since 1.3
+ */
+ @NonNull
+ public Builder setEndAngle(@NonNull DegreesProp endAngle) {
+ if (endAngle.getDynamicValue() != null) {
+ throw new IllegalArgumentException(
+ "setEndAngle doesn't support dynamic values.");
+ }
+ mImpl.setEndAngle(endAngle.toProto());
+ mFingerprint.recordPropertyUpdate(
+ 3, checkNotNull(endAngle.getFingerprint()).aggregateValueAsInt());
return this;
}
@@ -522,7 +573,7 @@
* degrees clockwise, finishing at the same angle.
* <p>A color stop is composed of a color and its offset in the gradient. The offset
* is the relative position of the color, beginning with 0 from the start angle and
- * ending with 1.0 after spanning 360 degrees clockwise.
+ * ending with 1.0 at the end angle, spanning clockwise.
* <p>If offsets are not set, the colors are evenly distributed in the gradient.
* <p>If the offset values are not monotonic, the drawing may produce unexpected
* results.
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 80c73df..1cf6bce 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
@@ -27,6 +27,7 @@
import androidx.annotation.OptIn;
import androidx.annotation.RestrictTo;
import androidx.annotation.RestrictTo.Scope;
+import androidx.annotation.VisibleForTesting;
import androidx.wear.protolayout.ColorBuilders.Brush;
import androidx.wear.protolayout.ColorBuilders.ColorProp;
import androidx.wear.protolayout.DeviceParametersBuilders.DeviceParameters;
@@ -608,21 +609,6 @@
}
/**
- * Gets the size of the font, in scaled pixels (sp). If not specified, defaults to the size
- * of the system's "body" font.
- *
- * @since 1.0
- */
- @Nullable
- public SpProp getSize() {
- if (mImpl.hasSize()) {
- return SpProp.fromProto(mImpl.getSize());
- } else {
- return null;
- }
- }
-
- /**
* Gets whether the text should be rendered in a italic typeface. If not specified, defaults
* to "false".
*
@@ -713,6 +699,35 @@
}
}
+ /**
+ * Gets the size of the font, in scaled pixels (sp). If not specified, defaults to the size
+ * of the system's "body" font. If more than one size was originally added, it will
+ * return the last one.
+ *
+ * @since 1.0
+ */
+ @Nullable
+ public SpProp getSize() {
+ List<DimensionProto.SpProp> sizes = mImpl.getSizeList();
+ return !sizes.isEmpty() ? SpProp.fromProto(sizes.get(sizes.size() - 1)) : null;
+ }
+
+ /**
+ * Gets the available sizes of the font, in scaled pixels (sp). If not specified, defaults
+ * to the size of the system's "body" font.
+ *
+ * @since 1.3
+ */
+ @NonNull
+ @ProtoLayoutExperimental
+ public List<SpProp> getSizes() {
+ List<SpProp> list = new ArrayList<>();
+ for (DimensionProto.SpProp item : mImpl.getSizeList()) {
+ list.add(SpProp.fromProto(item));
+ }
+ return Collections.unmodifiableList(list);
+ }
+
/** Get the fingerprint for this object, or null if unknown. */
@RestrictTo(Scope.LIBRARY_GROUP)
@Nullable
@@ -764,6 +779,7 @@
/** Builder for {@link FontStyle} */
public static final class Builder {
+ @VisibleForTesting static final int TEXT_SIZES_LIMIT = 10;
private final LayoutElementProto.FontStyle.Builder mImpl =
LayoutElementProto.FontStyle.newBuilder();
private final Fingerprint mFingerprint = new Fingerprint(-374492482);
@@ -771,16 +787,48 @@
public Builder() {}
/**
- * Sets the size of the font, in scaled pixels (sp). If not specified, defaults to the
- * size of the system's "body" font.
+ * Sets the available sizes of the font, in scaled pixels (sp). If not specified,
+ * defaults to the size of the system's "body" font.
*
- * @since 1.0
+ * <p>If more than one size is specified and this {@link FontStyle} is applied to a
+ * {@link Text} element with static text, the text size will be automatically picked
+ * from the provided sizes to try to perfectly fit within its parent bounds. In other
+ * words, the largest size from the specified preset sizes that can fit the most text
+ * within the parent bounds will be used.
+ *
+ * <p>The specified sizes don't have to be sorted. The maximum number of sizes used is
+ * limited to 10.
+ *
+ * <p>Note that, if multiple sizes are set, 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.
+ *
+ * <p>If this {@link FontStyle} is set to any other element besides {@link Text} or
+ * that {@link Text} element has dynamic field, only the last added size will be use.
+ *
+ * <p>Any previously added values with this method or {@link #setSize} will be cleared.
+ *
+ * <p>While this field is accessible from 1.0 as singular, it only accepts multiple
+ * values since version 1.3 and renderers supporting version 1.3 will use the multiple
+ * values to automatically scale text. Renderers who don't support this version will
+ * use the last size among multiple values.
+ *
+ * @throws IllegalArgumentException if the number of available sizes is larger than 10.
+ * @since 1.3
*/
@NonNull
- public Builder setSize(@NonNull SpProp size) {
- mImpl.setSize(size.toProto());
- mFingerprint.recordPropertyUpdate(
- 1, checkNotNull(size.getFingerprint()).aggregateValueAsInt());
+ @ProtoLayoutExperimental
+ public Builder setSizes(@NonNull SpProp... sizes) {
+ if (sizes.length > TEXT_SIZES_LIMIT) {
+ throw new IllegalArgumentException(
+ "Number of available sizes can't be larger than 10.");
+ }
+ mImpl.clearSize();
+ for (SpProp size: sizes) {
+ mImpl.addSize(size.toProto());
+ mFingerprint.recordPropertyUpdate(
+ 1, checkNotNull(size.getFingerprint()).aggregateValueAsInt());
+ }
return this;
}
@@ -830,6 +878,23 @@
}
/**
+ * Sets the size of the font, in scaled pixels (sp). If not specified, defaults to the
+ * size of the system's "body" font.
+ *
+ * <p>Any previously added values with this method or {@link #setSizes} will be cleared.
+ *
+ * @since 1.0
+ */
+ @NonNull
+ public Builder setSize(@NonNull SpProp size) {
+ mImpl.clearSize();
+ mImpl.addSize(size.toProto());
+ mFingerprint.recordPropertyUpdate(
+ 1, checkNotNull(size.getFingerprint()).aggregateValueAsInt());
+ return this;
+ }
+
+ /**
* Sets the text color. If not defined, defaults to white.
*
* <p>While this field is statically accessible from 1.0, it's only bindable since
diff --git a/wear/protolayout/protolayout/src/test/java/androidx/wear/protolayout/LayoutElementBuildersTest.java b/wear/protolayout/protolayout/src/test/java/androidx/wear/protolayout/LayoutElementBuildersTest.java
index a30c860..6f10e5a 100644
--- a/wear/protolayout/protolayout/src/test/java/androidx/wear/protolayout/LayoutElementBuildersTest.java
+++ b/wear/protolayout/protolayout/src/test/java/androidx/wear/protolayout/LayoutElementBuildersTest.java
@@ -16,6 +16,8 @@
package androidx.wear.protolayout;
+import static androidx.wear.protolayout.DimensionBuilders.sp;
+
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertThrows;
@@ -203,6 +205,84 @@
}
@Test
+ public void testFontStyleSetMultipleSizes() {
+ int size1 = 12;
+ int size2 = 30;
+ int lastSize = 20;
+ int[] expectedSizes = {size1, size2, lastSize};
+ LayoutElementBuilders.FontStyle fontStyle =
+ new LayoutElementBuilders.FontStyle.Builder()
+ .setSizes(sp(size1), sp(size2), sp(lastSize))
+ .build();
+
+ LayoutElementProto.FontStyle fontStyleProto = fontStyle.toProto();
+
+ assertThat(
+ fontStyleProto.getSizeList().stream().mapToInt(sp -> (int) sp.getValue()).toArray())
+ .isEqualTo(expectedSizes);
+ // Make sure that if 1 size is used than it's the last one.
+ assertThat(fontStyle.getSize().getValue()).isEqualTo(lastSize);
+ assertThat(
+ fontStyle.getSizes().stream().mapToInt(sp -> (int) sp.getValue()).toArray())
+ .isEqualTo(expectedSizes);
+ }
+
+ @Test
+ public void testFontStyleSetSize_moreTimes_usesLastOne() {
+ int lastSize = 20;
+ LayoutElementBuilders.FontStyle fontStyle =
+ new LayoutElementBuilders.FontStyle.Builder()
+ .setSize(sp(12))
+ .setSize(sp(30))
+ .setSize(sp(lastSize))
+ .build();
+
+ LayoutElementProto.FontStyle fontStyleProto = fontStyle.toProto();
+
+ assertThat(fontStyleProto.getSizeList().size()).isEqualTo(1);
+ assertThat(fontStyleProto.getSizeList().get(0).getValue()).isEqualTo(lastSize);
+ // Make sure that if 1 size is used than it's the last one.
+ assertThat(fontStyle.getSize().getValue()).isEqualTo(lastSize);
+ assertThat(fontStyle.getSizes().size()).isEqualTo(1);
+ assertThat(fontStyle.getSizes().get(0).getValue()).isEqualTo(lastSize);
+ }
+
+ @Test
+ public void testFontStyleSetSize_setSizes_overrides() {
+ int size1 = 12;
+ int size2 = 30;
+ int[] expectedSizes = {size1, size2};
+ LayoutElementBuilders.FontStyle fontStyle =
+ new LayoutElementBuilders.FontStyle.Builder()
+ .setSize(sp(20))
+ .setSizes(sp(size1), sp(size2))
+ .build();
+
+ LayoutElementProto.FontStyle fontStyleProto = fontStyle.toProto();
+
+ assertThat(
+ fontStyleProto.getSizeList().stream().mapToInt(sp -> (int) sp.getValue()).toArray())
+ .isEqualTo(expectedSizes);
+ // Make sure that if 1 size is used than it's the last one.
+ assertThat(fontStyle.getSize().getValue()).isEqualTo(size2);
+ assertThat(
+ fontStyle.getSizes().stream().mapToInt(sp -> (int) sp.getValue()).toArray())
+ .isEqualTo(expectedSizes);
+ }
+
+ @Test
+ public void testFontStyleSetSize_tooManySizes_throws() {
+ DimensionBuilders.SpProp[] sizes =
+ new DimensionBuilders.SpProp[
+ LayoutElementBuilders.FontStyle.Builder.TEXT_SIZES_LIMIT + 1];
+ assertThrows(
+ IllegalArgumentException.class,
+ () -> new LayoutElementBuilders.FontStyle.Builder()
+ .setSizes(sizes)
+ .build());
+ }
+
+ @Test
public void textSetText_withoutLayoutConstraint_throws() {
assertThrows(
IllegalStateException.class,
diff --git a/wear/tiles/tiles-renderer/api/api_lint.ignore b/wear/tiles/tiles-renderer/api/api_lint.ignore
index 93c6574..d7c58fd 100644
--- a/wear/tiles/tiles-renderer/api/api_lint.ignore
+++ b/wear/tiles/tiles-renderer/api/api_lint.ignore
@@ -1,8 +1,6 @@
// Baseline format: 1.0
AsyncSuffixFuture: androidx.wear.tiles.client.TileClient#requestApiVersion():
Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
-AsyncSuffixFuture: androidx.wear.tiles.client.TileClient#requestResources(androidx.wear.tiles.RequestBuilders.ResourcesRequest):
- Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
AsyncSuffixFuture: androidx.wear.tiles.client.TileClient#requestTile(androidx.wear.tiles.RequestBuilders.TileRequest):
Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
AsyncSuffixFuture: androidx.wear.tiles.client.TileClient#sendOnTileAddedEvent():
@@ -15,8 +13,6 @@
Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
AsyncSuffixFuture: androidx.wear.tiles.connection.DefaultTileClient#requestApiVersion():
Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
-AsyncSuffixFuture: androidx.wear.tiles.connection.DefaultTileClient#requestResources(androidx.wear.tiles.RequestBuilders.ResourcesRequest):
- Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
AsyncSuffixFuture: androidx.wear.tiles.connection.DefaultTileClient#requestTile(androidx.wear.tiles.RequestBuilders.TileRequest):
Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
AsyncSuffixFuture: androidx.wear.tiles.connection.DefaultTileClient#sendOnTileAddedEvent():
diff --git a/wear/tiles/tiles-testing/api/api_lint.ignore b/wear/tiles/tiles-testing/api/api_lint.ignore
index 0af6fa5..77dd871 100644
--- a/wear/tiles/tiles-testing/api/api_lint.ignore
+++ b/wear/tiles/tiles-testing/api/api_lint.ignore
@@ -1,8 +1,6 @@
// Baseline format: 1.0
AsyncSuffixFuture: androidx.wear.tiles.testing.TestTileClient#requestApiVersion():
Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
-AsyncSuffixFuture: androidx.wear.tiles.testing.TestTileClient#requestResources(androidx.wear.tiles.RequestBuilders.ResourcesRequest):
- Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
AsyncSuffixFuture: androidx.wear.tiles.testing.TestTileClient#requestTile(androidx.wear.tiles.RequestBuilders.TileRequest):
Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
AsyncSuffixFuture: androidx.wear.tiles.testing.TestTileClient#sendOnTileAddedEvent():
diff --git a/wear/tiles/tiles/api/api_lint.ignore b/wear/tiles/tiles/api/api_lint.ignore
index 0ddbac4..02fb040 100644
--- a/wear/tiles/tiles/api/api_lint.ignore
+++ b/wear/tiles/tiles/api/api_lint.ignore
@@ -1,6 +1,4 @@
// Baseline format: 1.0
-AsyncSuffixFuture: androidx.wear.tiles.TileService#onResourcesRequest(androidx.wear.tiles.RequestBuilders.ResourcesRequest):
- Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
AsyncSuffixFuture: androidx.wear.tiles.TileService#onTileRequest(androidx.wear.tiles.RequestBuilders.TileRequest):
Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
diff --git a/wear/tiles/tiles/lint-baseline.xml b/wear/tiles/tiles/lint-baseline.xml
index eb4c7b5..faa4a6b 100644
--- a/wear/tiles/tiles/lint-baseline.xml
+++ b/wear/tiles/tiles/lint-baseline.xml
@@ -1803,18 +1803,9 @@
<issue
id="RestrictedApiAndroidX"
- message="FontStyle.hasSize can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
- errorLine1=" if (mImpl.hasSize()) {"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="FontStyle.getSize can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
- errorLine1=" return DimensionBuilders.SpProp.fromProto(mImpl.getSize());"
- errorLine2=" ~~~~~~~">
+ 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=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
</issue>
@@ -1947,8 +1938,17 @@
<issue
id="RestrictedApiAndroidX"
- message="Builder.setSize can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
- errorLine1=" mImpl.setSize(size.toProto());"
+ message="Builder.clearSize can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" mImpl.clearSize();"
+ errorLine2=" ~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
+ </issue>
+
+ <issue
+ id="RestrictedApiAndroidX"
+ message="Builder.addSize can only be called from within the same library group (referenced groupId=`androidx.wear.protolayout` from groupId=`androidx.wear.tiles`)"
+ errorLine1=" mImpl.addSize(size.toProto());"
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/wear/tiles/LayoutElementBuilders.java"/>
diff --git a/wear/tiles/tiles/src/main/java/androidx/wear/tiles/LayoutElementBuilders.java b/wear/tiles/tiles/src/main/java/androidx/wear/tiles/LayoutElementBuilders.java
index a089888..259bddf 100644
--- a/wear/tiles/tiles/src/main/java/androidx/wear/tiles/LayoutElementBuilders.java
+++ b/wear/tiles/tiles/src/main/java/androidx/wear/tiles/LayoutElementBuilders.java
@@ -31,6 +31,7 @@
import androidx.annotation.RestrictTo.Scope;
import androidx.wear.protolayout.expression.Fingerprint;
import androidx.wear.protolayout.proto.AlignmentProto;
+import androidx.wear.protolayout.proto.DimensionProto;
import androidx.wear.protolayout.proto.FingerprintProto;
import androidx.wear.protolayout.proto.FingerprintProto.TreeFingerprint;
import androidx.wear.protolayout.proto.LayoutElementProto;
@@ -622,8 +623,9 @@
*/
@Nullable
public DimensionBuilders.SpProp getSize() {
- if (mImpl.hasSize()) {
- return DimensionBuilders.SpProp.fromProto(mImpl.getSize());
+ List<DimensionProto.SpProp> sizes = mImpl.getSizeList();
+ if (!sizes.isEmpty()) {
+ return DimensionBuilders.SpProp.fromProto(sizes.get(0));
} else {
return null;
}
@@ -744,7 +746,8 @@
*/
@NonNull
public Builder setSize(@NonNull DimensionBuilders.SpProp size) {
- mImpl.setSize(size.toProto());
+ mImpl.clearSize();
+ mImpl.addSize(size.toProto());
mFingerprint.recordPropertyUpdate(
1, checkNotNull(size.getFingerprint()).aggregateValueAsInt());
return this;
diff --git a/wear/watchface/watchface-client-guava/api/api_lint.ignore b/wear/watchface/watchface-client-guava/api/api_lint.ignore
index b966a0a..2449cb9 100644
--- a/wear/watchface/watchface-client-guava/api/api_lint.ignore
+++ b/wear/watchface/watchface-client-guava/api/api_lint.ignore
@@ -3,7 +3,3 @@
Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
AsyncSuffixFuture: androidx.wear.watchface.client.ListenableWatchFaceControlClient.Companion#createWatchFaceControlClient(android.content.Context, String):
Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
-
-
-ListenerLast: androidx.wear.watchface.client.ListenableWatchFaceControlClient#getOrCreateInteractiveWatchFaceClient(String, androidx.wear.watchface.client.DeviceConfig, androidx.wear.watchface.client.WatchUiState, androidx.wear.watchface.style.UserStyleData, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>, java.util.concurrent.Executor, androidx.wear.watchface.client.WatchFaceControlClient.PreviewImageUpdateRequestedListener, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.InteractiveWatchFaceClient>) parameter #7:
- Listeners should always be at end of argument list (method `getOrCreateInteractiveWatchFaceClient`)
diff --git a/wear/wear/api/api_lint.ignore b/wear/wear/api/api_lint.ignore
index 61244fa..4784ca5 100644
--- a/wear/wear/api/api_lint.ignore
+++ b/wear/wear/api/api_lint.ignore
@@ -33,8 +33,6 @@
InvalidNullabilityOverride: androidx.wear.widget.ArcLayout#checkLayoutParams(android.view.ViewGroup.LayoutParams) parameter #0:
Invalid nullability on parameter `p` in method `checkLayoutParams`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.wear.widget.ArcLayout#drawChild(android.graphics.Canvas, android.view.View, long) parameter #0:
- Invalid nullability on parameter `canvas` in method `drawChild`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
InvalidNullabilityOverride: androidx.wear.widget.ArcLayout#drawChild(android.graphics.Canvas, android.view.View, long) parameter #1:
Invalid nullability on parameter `child` in method `drawChild`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
InvalidNullabilityOverride: androidx.wear.widget.ArcLayout#generateLayoutParams(android.util.AttributeSet) parameter #0:
@@ -45,10 +43,6 @@
Invalid nullability on parameter `event` in method `onInterceptTouchEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
InvalidNullabilityOverride: androidx.wear.widget.ArcLayout#onTouchEvent(android.view.MotionEvent) parameter #0:
Invalid nullability on parameter `event` in method `onTouchEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.wear.widget.CurvedTextView#draw(android.graphics.Canvas) parameter #0:
- Invalid nullability on parameter `canvas` in method `draw`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
-InvalidNullabilityOverride: androidx.wear.widget.CurvedTextView#onDraw(android.graphics.Canvas) parameter #0:
- Invalid nullability on parameter `canvas` in method `onDraw`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
InvalidNullabilityOverride: androidx.wear.widget.CurvedTextView#onInitializeAccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo) parameter #0:
Invalid nullability on parameter `info` in method `onInitializeAccessibilityNodeInfo`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
InvalidNullabilityOverride: androidx.wear.widget.CurvedTextView#onPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent) parameter #0:
diff --git a/webkit/integration-tests/instrumentation/src/androidTest/java/androidx/webkit/WebSettingsCompatUserAgentMetadataTest.java b/webkit/integration-tests/instrumentation/src/androidTest/java/androidx/webkit/WebSettingsCompatUserAgentMetadataTest.java
index 86f4dd9..d7f9d73 100644
--- a/webkit/integration-tests/instrumentation/src/androidTest/java/androidx/webkit/WebSettingsCompatUserAgentMetadataTest.java
+++ b/webkit/integration-tests/instrumentation/src/androidTest/java/androidx/webkit/WebSettingsCompatUserAgentMetadataTest.java
@@ -18,6 +18,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
import android.os.Build;
@@ -153,6 +154,38 @@
}
@Test
+ public void testSetUserAgentMetadataExplicitlyDefault() throws Throwable {
+ WebkitUtils.checkFeature(WebViewFeature.USER_AGENT_METADATA);
+
+ WebSettings settings = mWebViewOnUiThread.getSettings();
+ UserAgentMetadata uaMetadata = new UserAgentMetadata.Builder()
+ .setBrandVersionList(new ArrayList<>())
+ .setArchitecture(null)
+ .setFullVersion(null)
+ .setPlatform(null)
+ .setPlatformVersion(null)
+ .setModel(null).build();
+ WebSettingsCompat.setUserAgentMetadata(settings, uaMetadata);
+
+ UserAgentMetadata userAgentMetadata = WebSettingsCompat.getUserAgentMetadata(settings);
+ // Check brand version list.
+ List<String> brands = new ArrayList<>();
+ Assert.assertNotNull(userAgentMetadata.getBrandVersionList());
+ for (UserAgentMetadata.BrandVersion bv : userAgentMetadata.getBrandVersionList()) {
+ brands.add(bv.getBrand());
+ }
+ Assert.assertTrue("The default brand should contains Android WebView.",
+ brands.contains("Android WebView"));
+ assertEquals("The default platform is Android.", "Android",
+ userAgentMetadata.getPlatform());
+ assertNotNull(userAgentMetadata.getArchitecture());
+ assertNotNull(userAgentMetadata.getFullVersion());
+ assertNotNull(userAgentMetadata.getPlatform());
+ assertNotNull(userAgentMetadata.getPlatformVersion());
+ assertNotNull(userAgentMetadata.getModel());
+ }
+
+ @Test
public void testSetUserAgentMetadataDefaultHttpHeader() throws Throwable {
WebkitUtils.checkFeature(WebViewFeature.USER_AGENT_METADATA);
@@ -207,10 +240,10 @@
WebSettings settings = mWebViewOnUiThread.getSettings();
// Overrides user-agent metadata.
+ UserAgentMetadata.BrandVersion brandVersion = new UserAgentMetadata.BrandVersion.Builder()
+ .setBrand("myBrand").setMajorVersion("1").setFullVersion("1.1.1.1").build();
UserAgentMetadata overrideSetting = new UserAgentMetadata.Builder()
- .setBrandVersionList(Collections.singletonList(
- new UserAgentMetadata.BrandVersion(
- "myBrand", "1", "1.1.1.1")))
+ .setBrandVersionList(Collections.singletonList(brandVersion))
.setFullVersion("1.1.1.1")
.setPlatform("myPlatform").setPlatformVersion("2.2.2.2").setArchitecture("myArch")
.setMobile(true).setModel("myModel").setBitness(32)
@@ -232,10 +265,10 @@
settings.setJavaScriptEnabled(true);
// Overrides user-agent metadata.
+ UserAgentMetadata.BrandVersion brandVersion = new UserAgentMetadata.BrandVersion.Builder()
+ .setBrand("myBrand").setMajorVersion("1").setFullVersion("1.1.1.1").build();
UserAgentMetadata overrideSetting = new UserAgentMetadata.Builder()
- .setBrandVersionList(Collections.singletonList(
- new UserAgentMetadata.BrandVersion(
- "myBrand", "1", "1.1.1.1")))
+ .setBrandVersionList(Collections.singletonList(brandVersion))
.setFullVersion("1.1.1.1").setPlatform("myPlatform")
.setPlatformVersion("2.2.2.2").setArchitecture("myArch")
.setMobile(true).setModel("myModel").setBitness(32)
@@ -294,10 +327,10 @@
WebSettings settings = mWebViewOnUiThread.getSettings();
// Overrides without setting user-agent metadata platform and bitness.
+ UserAgentMetadata.BrandVersion brandVersion = new UserAgentMetadata.BrandVersion.Builder()
+ .setBrand("myBrand").setMajorVersion("1").setFullVersion("1.1.1.1").build();
UserAgentMetadata overrideSetting = new UserAgentMetadata.Builder()
- .setBrandVersionList(Collections.singletonList(
- new UserAgentMetadata.BrandVersion(
- "myBrand", "1", "1.1.1.1")))
+ .setBrandVersionList(Collections.singletonList(brandVersion))
.setFullVersion("1.1.1.1")
.setPlatformVersion("2.2.2.2").setArchitecture("myArch").setMobile(true)
.setModel("myModel").setWow64(false).build();
@@ -320,10 +353,10 @@
settings.setJavaScriptEnabled(true);
// Overrides without setting user-agent metadata platform and bitness.
+ UserAgentMetadata.BrandVersion brandVersion = new UserAgentMetadata.BrandVersion.Builder()
+ .setBrand("myBrand").setMajorVersion("1").setFullVersion("1.1.1.1").build();
UserAgentMetadata overrideSetting = new UserAgentMetadata.Builder()
- .setBrandVersionList(Collections.singletonList(
- new UserAgentMetadata.BrandVersion(
- "myBrand", "1", "1.1.1.1")))
+ .setBrandVersionList(Collections.singletonList(brandVersion))
.setFullVersion("1.1.1.1").setPlatformVersion("2.2.2.2")
.setArchitecture("myArch").setMobile(true).setModel("myModel").setWow64(false)
.build();
@@ -377,30 +410,27 @@
try {
WebSettings settings = mWebViewOnUiThread.getSettings();
+ UserAgentMetadata.BrandVersion brandVersion = new UserAgentMetadata.BrandVersion
+ .Builder().setBrand("myBrand").build();
UserAgentMetadata uaMetadata = new UserAgentMetadata.Builder()
- .setBrandVersionList(Collections.singletonList(
- new UserAgentMetadata.BrandVersion(
- "", "", ""))).build();
+ .setBrandVersionList(Collections.singletonList(brandVersion)).build();
WebSettingsCompat.setUserAgentMetadata(settings, uaMetadata);
Assert.fail("Should have thrown exception.");
- } catch (IllegalArgumentException e) {
+ } catch (IllegalStateException e) {
Assert.assertEquals("Brand name, major version and full version should not "
- + "be blank.", e.getMessage());
+ + "be null or blank.", e.getMessage());
}
- }
-
- @Test
- public void testSetUserAgentMetadataEmptyBrandVersionList() throws Throwable {
- WebkitUtils.checkFeature(WebViewFeature.USER_AGENT_METADATA);
try {
WebSettings settings = mWebViewOnUiThread.getSettings();
+ UserAgentMetadata.BrandVersion brandVersion = new UserAgentMetadata.BrandVersion
+ .Builder().setBrand("").build();
UserAgentMetadata uaMetadata = new UserAgentMetadata.Builder()
- .setBrandVersionList(new ArrayList<>()).build();
+ .setBrandVersionList(Collections.singletonList(brandVersion)).build();
WebSettingsCompat.setUserAgentMetadata(settings, uaMetadata);
Assert.fail("Should have thrown exception.");
} catch (IllegalArgumentException e) {
- Assert.assertEquals("Brand version list should not be empty.", e.getMessage());
+ Assert.assertEquals("Brand should not be blank.", e.getMessage());
}
}
diff --git a/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/UserAgentMetadataActivity.java b/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/UserAgentMetadataActivity.java
index e1213a7..e3c908f 100644
--- a/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/UserAgentMetadataActivity.java
+++ b/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/UserAgentMetadataActivity.java
@@ -109,10 +109,11 @@
private void refreshView(boolean setOverrides) {
UserAgentMetadata overrideSetting;
if (setOverrides) {
+ UserAgentMetadata.BrandVersion brandVersion = new UserAgentMetadata.BrandVersion
+ .Builder().setBrand("myBrand").setMajorVersion("1").setFullVersion("1.1.1.1")
+ .build();
overrideSetting = new UserAgentMetadata.Builder()
- .setBrandVersionList(Collections.singletonList(
- new UserAgentMetadata.BrandVersion(
- "myBrand", "1", "1.1.1.1")))
+ .setBrandVersionList(Collections.singletonList(brandVersion))
.setFullVersion("1.1.1.1").setPlatform("myPlatform")
.setPlatformVersion("2.2.2.2").setArchitecture("myArch")
.setMobile(true).setModel("myModel").setBitness(32)
diff --git a/webkit/webkit/api/api_lint.ignore b/webkit/webkit/api/api_lint.ignore
index 15a029d..f0dc80d 100644
--- a/webkit/webkit/api/api_lint.ignore
+++ b/webkit/webkit/api/api_lint.ignore
@@ -69,6 +69,12 @@
androidx.webkit.WebViewAssetLoader does not declare a `isHttpAllowed()` method matching method androidx.webkit.WebViewAssetLoader.Builder.setHttpAllowed(boolean)
+NotCloseable: androidx.webkit.TracingController:
+ Classes that release resources (stop()) should implement AutoCloseable and CloseGuard: class androidx.webkit.TracingController
+NotCloseable: androidx.webkit.WebMessagePortCompat:
+ Classes that release resources (close()) should implement AutoCloseable and CloseGuard: class androidx.webkit.WebMessagePortCompat
+
+
NullableCollection: androidx.webkit.WebMessageCompat#getPorts():
Return type of method androidx.webkit.WebMessageCompat.getPorts() is a nullable collection (`androidx.webkit.WebMessagePortCompat[]`); must be non-null
diff --git a/webkit/webkit/api/current.txt b/webkit/webkit/api/current.txt
index a747afd..c7ac4d8 100644
--- a/webkit/webkit/api/current.txt
+++ b/webkit/webkit/api/current.txt
@@ -147,7 +147,7 @@
public final class UserAgentMetadata {
method public String? getArchitecture();
method public int getBitness();
- method public java.util.List<androidx.webkit.UserAgentMetadata.BrandVersion!>? getBrandVersionList();
+ method public java.util.List<androidx.webkit.UserAgentMetadata.BrandVersion!> getBrandVersionList();
method public String? getFullVersion();
method public String? getModel();
method public String? getPlatform();
@@ -158,24 +158,32 @@
}
public static final class UserAgentMetadata.BrandVersion {
- ctor public UserAgentMetadata.BrandVersion(String, String, String);
method public String getBrand();
method public String getFullVersion();
method public String getMajorVersion();
}
+ public static final class UserAgentMetadata.BrandVersion.Builder {
+ ctor public UserAgentMetadata.BrandVersion.Builder();
+ ctor public UserAgentMetadata.BrandVersion.Builder(androidx.webkit.UserAgentMetadata.BrandVersion);
+ method public androidx.webkit.UserAgentMetadata.BrandVersion build();
+ method public androidx.webkit.UserAgentMetadata.BrandVersion.Builder setBrand(String);
+ method public androidx.webkit.UserAgentMetadata.BrandVersion.Builder setFullVersion(String);
+ method public androidx.webkit.UserAgentMetadata.BrandVersion.Builder setMajorVersion(String);
+ }
+
public static final class UserAgentMetadata.Builder {
ctor public UserAgentMetadata.Builder();
ctor public UserAgentMetadata.Builder(androidx.webkit.UserAgentMetadata);
method public androidx.webkit.UserAgentMetadata build();
- method public androidx.webkit.UserAgentMetadata.Builder setArchitecture(String);
+ method public androidx.webkit.UserAgentMetadata.Builder setArchitecture(String?);
method public androidx.webkit.UserAgentMetadata.Builder setBitness(int);
method public androidx.webkit.UserAgentMetadata.Builder setBrandVersionList(java.util.List<androidx.webkit.UserAgentMetadata.BrandVersion!>);
- method public androidx.webkit.UserAgentMetadata.Builder setFullVersion(String);
+ method public androidx.webkit.UserAgentMetadata.Builder setFullVersion(String?);
method public androidx.webkit.UserAgentMetadata.Builder setMobile(boolean);
- method public androidx.webkit.UserAgentMetadata.Builder setModel(String);
- method public androidx.webkit.UserAgentMetadata.Builder setPlatform(String);
- method public androidx.webkit.UserAgentMetadata.Builder setPlatformVersion(String);
+ method public androidx.webkit.UserAgentMetadata.Builder setModel(String?);
+ method public androidx.webkit.UserAgentMetadata.Builder setPlatform(String?);
+ method public androidx.webkit.UserAgentMetadata.Builder setPlatformVersion(String?);
method public androidx.webkit.UserAgentMetadata.Builder setWow64(boolean);
}
diff --git a/webkit/webkit/api/restricted_current.txt b/webkit/webkit/api/restricted_current.txt
index a747afd..c7ac4d8 100644
--- a/webkit/webkit/api/restricted_current.txt
+++ b/webkit/webkit/api/restricted_current.txt
@@ -147,7 +147,7 @@
public final class UserAgentMetadata {
method public String? getArchitecture();
method public int getBitness();
- method public java.util.List<androidx.webkit.UserAgentMetadata.BrandVersion!>? getBrandVersionList();
+ method public java.util.List<androidx.webkit.UserAgentMetadata.BrandVersion!> getBrandVersionList();
method public String? getFullVersion();
method public String? getModel();
method public String? getPlatform();
@@ -158,24 +158,32 @@
}
public static final class UserAgentMetadata.BrandVersion {
- ctor public UserAgentMetadata.BrandVersion(String, String, String);
method public String getBrand();
method public String getFullVersion();
method public String getMajorVersion();
}
+ public static final class UserAgentMetadata.BrandVersion.Builder {
+ ctor public UserAgentMetadata.BrandVersion.Builder();
+ ctor public UserAgentMetadata.BrandVersion.Builder(androidx.webkit.UserAgentMetadata.BrandVersion);
+ method public androidx.webkit.UserAgentMetadata.BrandVersion build();
+ method public androidx.webkit.UserAgentMetadata.BrandVersion.Builder setBrand(String);
+ method public androidx.webkit.UserAgentMetadata.BrandVersion.Builder setFullVersion(String);
+ method public androidx.webkit.UserAgentMetadata.BrandVersion.Builder setMajorVersion(String);
+ }
+
public static final class UserAgentMetadata.Builder {
ctor public UserAgentMetadata.Builder();
ctor public UserAgentMetadata.Builder(androidx.webkit.UserAgentMetadata);
method public androidx.webkit.UserAgentMetadata build();
- method public androidx.webkit.UserAgentMetadata.Builder setArchitecture(String);
+ method public androidx.webkit.UserAgentMetadata.Builder setArchitecture(String?);
method public androidx.webkit.UserAgentMetadata.Builder setBitness(int);
method public androidx.webkit.UserAgentMetadata.Builder setBrandVersionList(java.util.List<androidx.webkit.UserAgentMetadata.BrandVersion!>);
- method public androidx.webkit.UserAgentMetadata.Builder setFullVersion(String);
+ method public androidx.webkit.UserAgentMetadata.Builder setFullVersion(String?);
method public androidx.webkit.UserAgentMetadata.Builder setMobile(boolean);
- method public androidx.webkit.UserAgentMetadata.Builder setModel(String);
- method public androidx.webkit.UserAgentMetadata.Builder setPlatform(String);
- method public androidx.webkit.UserAgentMetadata.Builder setPlatformVersion(String);
+ method public androidx.webkit.UserAgentMetadata.Builder setModel(String?);
+ method public androidx.webkit.UserAgentMetadata.Builder setPlatform(String?);
+ method public androidx.webkit.UserAgentMetadata.Builder setPlatformVersion(String?);
method public androidx.webkit.UserAgentMetadata.Builder setWow64(boolean);
}
diff --git a/webkit/webkit/src/main/java/androidx/webkit/UserAgentMetadata.java b/webkit/webkit/src/main/java/androidx/webkit/UserAgentMetadata.java
index f799f505..1517f41 100644
--- a/webkit/webkit/src/main/java/androidx/webkit/UserAgentMetadata.java
+++ b/webkit/webkit/src/main/java/androidx/webkit/UserAgentMetadata.java
@@ -16,12 +16,11 @@
package androidx.webkit;
-import android.annotation.SuppressLint;
-
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
+import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@@ -51,7 +50,7 @@
private boolean mWow64 = false;
@RestrictTo(RestrictTo.Scope.LIBRARY)
- private UserAgentMetadata(@Nullable List<BrandVersion> brandVersionList,
+ private UserAgentMetadata(@NonNull List<BrandVersion> brandVersionList,
@Nullable String fullVersion, @Nullable String platform,
@Nullable String platformVersion, @Nullable String architecture,
@Nullable String model,
@@ -77,8 +76,7 @@
* @see Builder#setBrandVersionList
*
*/
- @SuppressLint("NullableCollection")
- @Nullable
+ @NonNull
public List<BrandVersion> getBrandVersionList() {
return mBrandVersionList;
}
@@ -211,13 +209,9 @@
private final String mMajorVersion;
private final String mFullVersion;
- public BrandVersion(@NonNull String brand, @NonNull String majorVersion,
+ @RestrictTo(RestrictTo.Scope.LIBRARY)
+ private BrandVersion(@NonNull String brand, @NonNull String majorVersion,
@NonNull String fullVersion) {
- if (brand.trim().isEmpty() || majorVersion.trim().isEmpty()
- || fullVersion.trim().isEmpty()) {
- throw new IllegalArgumentException("Brand name, major version and full version "
- + "should not be blank.");
- }
mBrand = brand;
mMajorVersion = majorVersion;
mFullVersion = fullVersion;
@@ -273,6 +267,106 @@
public int hashCode() {
return Objects.hash(mBrand, mMajorVersion, mFullVersion);
}
+
+ /**
+ * Builder used to create {@link BrandVersion} objects.
+ * <p>
+ * Examples:
+ * <pre class="prettyprint">
+ * // Create a setting with a brand version contains brand name: myBrand,
+ * // major version: 100, full version: 100.1.1.1.
+ * new BrandVersion.Builder().setBrand("myBrand")
+ * .setMajorVersion("100")
+ * .setFullVersion("100.1.1.1")
+ * .build();
+ * </pre>
+ */
+ public static final class Builder {
+ private String mBrand;
+ private String mMajorVersion;
+ private String mFullVersion;
+
+ /**
+ * Create an empty BrandVersion Builder.
+ */
+ public Builder() {
+ }
+
+ /**
+ * Create a BrandVersion Builder from an existing BrandVersion object.
+ */
+ public Builder(@NonNull BrandVersion brandVersion) {
+ mBrand = brandVersion.getBrand();
+ mMajorVersion = brandVersion.getMajorVersion();
+ mFullVersion = brandVersion.getFullVersion();
+ }
+
+ /**
+ * Builds the current brand, majorVersion and fullVersion into a BrandVersion object.
+ *
+ * @return The BrandVersion object represented by this Builder.
+ * @throws IllegalStateException If any of the value in brand, majorVersion and
+ * fullVersion is null or blank.
+ */
+ @NonNull
+ public BrandVersion build() {
+ if (mBrand == null || mBrand.trim().isEmpty()
+ || mMajorVersion == null || mMajorVersion.trim().isEmpty()
+ || mFullVersion == null || mFullVersion.trim().isEmpty()) {
+ throw new IllegalStateException("Brand name, major version and full version "
+ + "should not be null or blank.");
+ }
+ return new BrandVersion(mBrand, mMajorVersion, mFullVersion);
+ }
+
+ /**
+ * Sets the BrandVersion's brand. The brand should not be blank.
+ *
+ * @param brand The brand is used to generate user-agent client hint
+ * {@code sec-ch-ua} and {@code sec-ch-ua-full-version-list}.
+ *
+ */
+ @NonNull
+ public BrandVersion.Builder setBrand(@NonNull String brand) {
+ if (brand.trim().isEmpty()) {
+ throw new IllegalArgumentException("Brand should not be blank.");
+ }
+ mBrand = brand;
+ return this;
+ }
+
+ /**
+ * Sets the BrandVersion's majorVersion. The majorVersion should not be blank.
+ *
+ * @param majorVersion The majorVersion is used to generate user-agent client hint
+ * {@code sec-ch-ua}.
+ *
+ */
+ @NonNull
+ public BrandVersion.Builder setMajorVersion(@NonNull String majorVersion) {
+ if (majorVersion.trim().isEmpty()) {
+ throw new IllegalArgumentException("MajorVersion should not be blank.");
+ }
+ mMajorVersion = majorVersion;
+ return this;
+ }
+
+ /**
+ * Sets the BrandVersion's fullVersion. The fullVersion should not be blank.
+ *
+ * @param fullVersion The brand is used to generate user-agent client hint
+ * {@code sec-ch-ua-full-version-list}.
+ *
+ */
+ @NonNull
+ public BrandVersion.Builder setFullVersion(@NonNull String fullVersion) {
+ if (fullVersion.trim().isEmpty()) {
+ throw new IllegalArgumentException("FullVersion should not be blank.");
+ }
+ mFullVersion = fullVersion;
+ return this;
+ }
+ }
}
/**
@@ -280,25 +374,28 @@
* <p>
* Examples:
* <pre class="prettyprint">
- * // Create a setting with default options.
- * new UserAgentMetadata.Builder().build();
+ * // Create a setting with default options.
+ * new UserAgentMetadata.Builder().build();
*
- * // Create a setting with a brand version contains brand name: myBrand, major version: 100,
- * // full version: 100.1.1.1.
- * new UserAgentMetadata.Builder().setBrandVersionList(
- * Collections.singletonList(new BrandVersion("myBrand", "100", "100.1.1.1"))).build();
+ * // Create a setting with a brand version contains brand name: myBrand, major version: 100,
+ * // full version: 100.1.1.1.
+ * BrandVersion brandVersion = new BrandVersion.Builder().setBrand("myBrand")
+ * .setMajorVersion("100")
+ * .setFullVersion("100.1.1.1")
+ * .build();
+ * new UserAgentMetadata.Builder().setBrandVersionList(Collections.singletonList(brandVersion))
+ * .build();
*
- * // Create a setting brand version, platform, platform version and bitness.
- * new UserAgentMetadata.Builder().setBrandVersionList(
- * Collections.singletonList(new BrandVersion("myBrand", "100", "100.1.1.1")))
- * .setPlatform("myPlatform")
- * .setPlatform("1.1.1.1")
- * .setBitness(BITNESS_64)
- * .build();
+ * // Create a setting brand version, platform, platform version and bitness.
+ * new UserAgentMetadata.Builder().setBrandVersionList(Collections.singletonList(brandVersion))
+ * .setPlatform("myPlatform")
+ * .setPlatform("1.1.1.1")
+ * .setBitness(BITNESS_64)
+ * .build();
* </pre>
*/
public static final class Builder {
- private List<BrandVersion> mBrandVersionList;
+ private List<BrandVersion> mBrandVersionList = new ArrayList<>();
private String mFullVersion;
private String mPlatform;
private String mPlatformVersion;
@@ -342,8 +439,8 @@
/**
* Sets user-agent metadata brands and their versions. The brand name, major version and
- * full version should not be blank. The default value is null which means the system
- * default user-agent metadata brands and versions will be used to generate the
+ * full version should not be blank. The default value is an empty list which means the
+ * system default user-agent metadata brands and versions will be used to generate the
* user-agent client hints.
*
* @param brandVersions a list of {@link BrandVersion} used to generated user-agent client
@@ -352,9 +449,6 @@
*/
@NonNull
public Builder setBrandVersionList(@NonNull List<BrandVersion> brandVersions) {
- if (brandVersions.isEmpty()) {
- throw new IllegalArgumentException("Brand version list should not be empty.");
- }
mBrandVersionList = brandVersions;
return this;
}
@@ -362,16 +456,21 @@
/**
* Sets the user-agent metadata full version. The full version should not be blank, even
* though the <a href="https://wicg.github.io/ua-client-hints">spec<a/> about brand full
- * version could be empty. The blank full version could cause inconsistent brands when
- * generating brand version related user-agent client hints. It also gives bad experience
- * for developers when processing the brand full version.
+ * version could be empty. A blank full version could cause inconsistent brands when
+ * generating brand version related user-agent client hints. It also provides a bad
+ * experience for developers when processing the brand full version. If null is provided,
+ * the system default value will be used to generate the client hint.
*
* @param fullVersion The full version is used to generate user-agent client hint
* {@code sec-ch-ua-full-version}.
*
*/
@NonNull
- public Builder setFullVersion(@NonNull String fullVersion) {
+ public Builder setFullVersion(@Nullable String fullVersion) {
+ if (fullVersion == null) {
+ mFullVersion = null;
+ return this;
+ }
if (fullVersion.trim().isEmpty()) {
throw new IllegalArgumentException("Full version should not be blank.");
}
@@ -380,14 +479,19 @@
}
/**
- * Sets the user-agent metadata platform. The platform should not be blank.
+ * Sets the user-agent metadata platform. The platform should not be blank. If null is
+ * provided, the system default value will be used to generate the client hint.
*
* @param platform The platform is used to generate user-agent client hint
* {@code sec-ch-ua-platform}.
*
*/
@NonNull
- public Builder setPlatform(@NonNull String platform) {
+ public Builder setPlatform(@Nullable String platform) {
+ if (platform == null) {
+ mPlatform = null;
+ return this;
+ }
if (platform.trim().isEmpty()) {
throw new IllegalArgumentException("Platform should not be blank.");
}
@@ -396,42 +500,43 @@
}
/**
- * Sets the user-agent metadata platform version. The value should not be null but can be
- * empty string.
+ * Sets the user-agent metadata platform version. If null is provided, the system default
+ * value will be used to generate the client hint.
*
* @param platformVersion The platform version is used to generate user-agent client
* hint {@code sec-ch-ua-platform-version}.
*
*/
@NonNull
- public Builder setPlatformVersion(@NonNull String platformVersion) {
+ public Builder setPlatformVersion(@Nullable String platformVersion) {
mPlatformVersion = platformVersion;
return this;
}
/**
- * Sets the user-agent metadata architecture. The value should not be null but can be
- * empty string.
+ * Sets the user-agent metadata architecture. If null is provided, the system default
+ * value will be used to generate the client hint.
*
* @param architecture The architecture is used to generate user-agent client hint
* {@code sec-ch-ua-arch}.
*
*/
@NonNull
- public Builder setArchitecture(@NonNull String architecture) {
+ public Builder setArchitecture(@Nullable String architecture) {
mArchitecture = architecture;
return this;
}
/**
- * Sets the user-agent metadata model. The value should not be null but can be empty string.
+ * Sets the user-agent metadata model. If null is provided, the system default value will
+ * be used to generate the client hint.
*
* @param model The model is used to generate user-agent client hint
* {@code sec-ch-ua-model}.
*
*/
@NonNull
- public Builder setModel(@NonNull String model) {
+ public Builder setModel(@Nullable String model) {
mModel = model;
return this;
}
diff --git a/webkit/webkit/src/main/java/androidx/webkit/internal/UserAgentMetadataInternal.java b/webkit/webkit/src/main/java/androidx/webkit/internal/UserAgentMetadataInternal.java
index dfd9747..d238bc1 100644
--- a/webkit/webkit/src/main/java/androidx/webkit/internal/UserAgentMetadataInternal.java
+++ b/webkit/webkit/src/main/java/androidx/webkit/internal/UserAgentMetadataInternal.java
@@ -117,7 +117,9 @@
private static String[][] getBrandVersionArray(
List<UserAgentMetadata.BrandVersion> brandVersionList) {
- if (brandVersionList == null) {
+ // If user's input of brand version list is empty, we consider to use system default value.
+ // This means passing null to chromium.
+ if (brandVersionList == null || brandVersionList.isEmpty()) {
return null;
}
@@ -145,12 +147,15 @@
Object brandVersionValue = uaMetadataMap.get(BRAND_VERSION_LIST);
if (brandVersionValue != null) {
String[][] overrideBrandVersionList = (String[][]) brandVersionValue;
- List<UserAgentMetadata.BrandVersion> branVersionList = new ArrayList<>();
+ List<UserAgentMetadata.BrandVersion> brandVersionList = new ArrayList<>();
for (String[] brandVersionInfo : overrideBrandVersionList) {
- branVersionList.add(new UserAgentMetadata.BrandVersion(brandVersionInfo[0],
- brandVersionInfo[1], brandVersionInfo[2]));
+ brandVersionList.add(new UserAgentMetadata.BrandVersion.Builder()
+ .setBrand(brandVersionInfo[0])
+ .setMajorVersion(brandVersionInfo[1])
+ .setFullVersion(brandVersionInfo[2])
+ .build());
}
- builder.setBrandVersionList(branVersionList);
+ builder.setBrandVersionList(brandVersionList);
}
String fullVersion = (String) uaMetadataMap.get(FULL_VERSION);
diff --git a/window/window-rxjava2/api/api_lint.ignore b/window/window-rxjava2/api/api_lint.ignore
deleted file mode 100644
index 636cfcc..0000000
--- a/window/window-rxjava2/api/api_lint.ignore
+++ /dev/null
@@ -1,5 +0,0 @@
-// Baseline format: 1.0
-ContextFirst: androidx.window.rxjava2.layout.WindowInfoTrackerRx#windowLayoutInfoFlowable(androidx.window.layout.WindowInfoTracker, android.content.Context) parameter #1:
- Context is distinct, so it must be the first argument (method `windowLayoutInfoFlowable`)
-ContextFirst: androidx.window.rxjava2.layout.WindowInfoTrackerRx#windowLayoutInfoObservable(androidx.window.layout.WindowInfoTracker, android.content.Context) parameter #1:
- Context is distinct, so it must be the first argument (method `windowLayoutInfoObservable`)
diff --git a/window/window-rxjava3/api/api_lint.ignore b/window/window-rxjava3/api/api_lint.ignore
deleted file mode 100644
index 8c55c33..0000000
--- a/window/window-rxjava3/api/api_lint.ignore
+++ /dev/null
@@ -1,5 +0,0 @@
-// Baseline format: 1.0
-ContextFirst: androidx.window.rxjava3.layout.WindowInfoTrackerRx#windowLayoutInfoFlowable(androidx.window.layout.WindowInfoTracker, android.content.Context) parameter #1:
- Context is distinct, so it must be the first argument (method `windowLayoutInfoFlowable`)
-ContextFirst: androidx.window.rxjava3.layout.WindowInfoTrackerRx#windowLayoutInfoObservable(androidx.window.layout.WindowInfoTracker, android.content.Context) parameter #1:
- Context is distinct, so it must be the first argument (method `windowLayoutInfoObservable`)
diff --git a/window/window-testing/lint-baseline.xml b/window/window-testing/lint-baseline.xml
new file mode 100644
index 0000000..d5df726
--- /dev/null
+++ b/window/window-testing/lint-baseline.xml
@@ -0,0 +1,22 @@
+<?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 >= Build.VERSION_CODES.JELLY_BEAN_MR1) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/window/testing/layout/StubWindowMetricsCalculator.kt"/>
+ </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/window/testing/layout/StubWindowMetricsCalculator.kt"/>
+ </issue>
+
+</issues>
diff --git a/window/window/api/api_lint.ignore b/window/window/api/api_lint.ignore
index d427dda..964a9de 100644
--- a/window/window/api/api_lint.ignore
+++ b/window/window/api/api_lint.ignore
@@ -1,9 +1,11 @@
// Baseline format: 1.0
-ContextFirst: androidx.window.embedding.ActivityEmbeddingOptions#setLaunchingActivityStack(android.app.ActivityOptions, android.content.Context, androidx.window.embedding.ActivityStack) parameter #1:
- Context is distinct, so it must be the first argument (method `windowLayoutInfoFlowable`)
GetterSetterNames: field ActivityRule.alwaysExpand:
Invalid name for boolean property `alwaysExpand`. Should start with one of `has`, `can`, `should`, `is`.
GetterSetterNames: field SplitAttributesCalculatorParams.areDefaultConstraintsSatisfied:
Invalid name for boolean property `areDefaultConstraintsSatisfied`. Should start with one of `has`, `can`, `should`, `is`.
GetterSetterNames: field SplitPairRule.clearTop:
Invalid name for boolean property `clearTop`. Should start with one of `has`, `can`, `should`, `is`.
+
+
+NotCloseable: androidx.window.area.WindowAreaSession:
+ Classes that release resources (close()) should implement AutoCloseable and CloseGuard: class androidx.window.area.WindowAreaSession
diff --git a/window/window/lint-baseline.xml b/window/window/lint-baseline.xml
new file mode 100644
index 0000000..b2b40e7
--- /dev/null
+++ b/window/window/lint-baseline.xml
@@ -0,0 +1,49 @@
+<?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 >= 17"
+ errorLine1="@RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)"
+ errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/window/area/utils/DeviceMetrics.kt"/>
+ </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/window/area/utils/DeviceUtils.kt"/>
+ </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/window/area/utils/DeviceMetricsCompatUtils.kt"/>
+ </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/window/layout/util/DisplayCompatHelper.kt"/>
+ </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/window/layout/WindowMetricsCalculatorCompat.kt"/>
+ </issue>
+
+</issues>
diff --git a/work/integration-tests/testapp/lint-baseline.xml b/work/integration-tests/testapp/lint-baseline.xml
index 20fb715..2444eb3 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.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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="BanThreadSleep"
@@ -20,33 +20,6 @@
</issue>
<issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.work.integration.testapp.imageprocessing.ImageProcessingActivity is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" && Build.VERSION.SDK_INT >= 16 && data.getClipData() != null) {"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/integration/testapp/imageprocessing/ImageProcessingActivity.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.work.integration.testapp.imageprocessing.ImageProcessingActivity is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" int count = data.getClipData().getItemCount();"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/integration/testapp/imageprocessing/ImageProcessingActivity.java"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.work.integration.testapp.imageprocessing.ImageProcessingActivity is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" String uriString = data.getClipData().getItemAt(i).getUri().toString();"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/integration/testapp/imageprocessing/ImageProcessingActivity.java"/>
- </issue>
-
- <issue
id="RestrictedApiAndroidX"
message="ListenableFutureKt.await can only be called from within the same library group (referenced groupId=`androidx.work` from groupId=`androidx.work.integration-tests`)"
errorLine1=" remoteWorkManager.enqueue(listOf(request)).await()"
@@ -119,6 +92,24 @@
</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/work/integration/testapp/imageprocessing/ImageProcessingActivity.java"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" && Build.VERSION.SDK_INT >= 16 && data.getClipData() != null) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/work/integration/testapp/imageprocessing/ImageProcessingActivity.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=" protected void onCreate(final Bundle savedInstanceState) {"
diff --git a/work/work-runtime/lint-baseline.xml b/work/work-runtime/lint-baseline.xml
index 8527d1f..27db603 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.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-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
id="BanSynchronizedMethods"
@@ -182,6 +182,42 @@
</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/work/impl/background/systemalarm/Alarms.java"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" @RequiresApi(19)"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/work/impl/background/systemalarm/Alarms.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/work/impl/utils/ForceStopRunnable.java"/>
+ </issue>
+
+ <issue
+ id="ObsoleteSdkInt"
+ message="Unnecessary; SDK_INT is always >= 19"
+ errorLine1=" val packageName = if (Build.VERSION.SDK_INT >= 18) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/work/impl/utils/ProcessUtils.kt"/>
+ </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 final void addListener(Runnable listener, Executor executor) {"
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/WorkContinuationImpl.java b/work/work-runtime/src/main/java/androidx/work/impl/WorkContinuationImpl.java
index 481f2a4..8e7b786 100644
--- a/work/work-runtime/src/main/java/androidx/work/impl/WorkContinuationImpl.java
+++ b/work/work-runtime/src/main/java/androidx/work/impl/WorkContinuationImpl.java
@@ -180,11 +180,8 @@
@NonNull
@Override
public ListenableFuture<List<WorkInfo>> getWorkInfos() {
- StatusRunnable<List<WorkInfo>> runnable =
- StatusRunnable.forStringIds(mWorkManagerImpl, mAllIds);
-
- mWorkManagerImpl.getWorkTaskExecutor().executeOnTaskThread(runnable);
- return runnable.getFuture();
+ return StatusRunnable.forStringIds(mWorkManagerImpl.getWorkDatabase(),
+ mWorkManagerImpl.getWorkTaskExecutor(), mAllIds);
}
@Override
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/WorkManagerImpl.java b/work/work-runtime/src/main/java/androidx/work/impl/WorkManagerImpl.java
index 2b69d59..fb282a9 100644
--- a/work/work-runtime/src/main/java/androidx/work/impl/WorkManagerImpl.java
+++ b/work/work-runtime/src/main/java/androidx/work/impl/WorkManagerImpl.java
@@ -496,9 +496,7 @@
@Override
public @NonNull ListenableFuture<WorkInfo> getWorkInfoById(@NonNull UUID id) {
- StatusRunnable<WorkInfo> runnable = StatusRunnable.forUUID(this, id);
- mWorkTaskExecutor.getSerialTaskExecutor().execute(runnable);
- return runnable.getFuture();
+ return StatusRunnable.forUUID(mWorkDatabase, mWorkTaskExecutor, id);
}
@NonNull
@@ -522,9 +520,7 @@
@Override
public @NonNull ListenableFuture<List<WorkInfo>> getWorkInfosByTag(@NonNull String tag) {
- StatusRunnable<List<WorkInfo>> runnable = StatusRunnable.forTag(this, tag);
- mWorkTaskExecutor.getSerialTaskExecutor().execute(runnable);
- return runnable.getFuture();
+ return StatusRunnable.forTag(mWorkDatabase, mWorkTaskExecutor, tag);
}
@Override
@@ -552,10 +548,7 @@
@NonNull
public ListenableFuture<List<WorkInfo>> getWorkInfosForUniqueWork(
@NonNull String uniqueWorkName) {
- StatusRunnable<List<WorkInfo>> runnable =
- StatusRunnable.forUniqueWork(this, uniqueWorkName);
- mWorkTaskExecutor.getSerialTaskExecutor().execute(runnable);
- return runnable.getFuture();
+ return StatusRunnable.forUniqueWork(mWorkDatabase, mWorkTaskExecutor, uniqueWorkName);
}
@NonNull
@@ -582,12 +575,8 @@
@NonNull
@Override
- public ListenableFuture<List<WorkInfo>> getWorkInfos(
- @NonNull WorkQuery workQuery) {
- StatusRunnable<List<WorkInfo>> runnable =
- StatusRunnable.forWorkQuerySpec(this, workQuery);
- mWorkTaskExecutor.getSerialTaskExecutor().execute(runnable);
- return runnable.getFuture();
+ public ListenableFuture<List<WorkInfo>> getWorkInfos(@NonNull WorkQuery workQuery) {
+ return StatusRunnable.forWorkQuerySpec(mWorkDatabase, mWorkTaskExecutor, workQuery);
}
@NonNull
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/utils/StatusRunnable.java b/work/work-runtime/src/main/java/androidx/work/impl/utils/StatusRunnable.java
deleted file mode 100644
index 4a3caeb..0000000
--- a/work/work-runtime/src/main/java/androidx/work/impl/utils/StatusRunnable.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Copyright 2018 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.work.impl.utils;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.RestrictTo;
-import androidx.annotation.WorkerThread;
-import androidx.work.WorkInfo;
-import androidx.work.WorkQuery;
-import androidx.work.impl.WorkDatabase;
-import androidx.work.impl.WorkManagerImpl;
-import androidx.work.impl.model.WorkSpec;
-import androidx.work.impl.utils.futures.SettableFuture;
-
-import com.google.common.util.concurrent.ListenableFuture;
-
-import java.util.List;
-import java.util.UUID;
-
-/**
- * A {@link Runnable} to get {@link WorkInfo}es.
- *
- * @param <T> The expected return type for the {@link ListenableFuture}.
- */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
-public abstract class StatusRunnable<T> implements Runnable {
- private final SettableFuture<T> mFuture = SettableFuture.create();
-
- @Override
- public void run() {
- try {
- final T value = runInternal();
- mFuture.set(value);
- } catch (Throwable throwable) {
- mFuture.setException(throwable);
- }
- }
-
- @WorkerThread
- abstract T runInternal();
-
- @NonNull
- public ListenableFuture<T> getFuture() {
- return mFuture;
- }
-
- /**
- * Creates a {@link StatusRunnable} which can get statuses for a given {@link List} of
- * {@link String} workSpec ids.
- *
- * @param workManager The {@link WorkManagerImpl} to use
- * @param ids The {@link List} of {@link String} ids
- * @return an instance of {@link StatusRunnable}
- */
- @NonNull
- public static StatusRunnable<List<WorkInfo>> forStringIds(
- @NonNull final WorkManagerImpl workManager,
- @NonNull final List<String> ids) {
-
- return new StatusRunnable<List<WorkInfo>>() {
- @Override
- public List<WorkInfo> runInternal() {
- WorkDatabase workDatabase = workManager.getWorkDatabase();
- List<WorkSpec.WorkInfoPojo> workInfoPojos =
- workDatabase.workSpecDao().getWorkStatusPojoForIds(ids);
-
- return WorkSpec.WORK_INFO_MAPPER.apply(workInfoPojos);
- }
- };
- }
-
- /**
- * Creates a {@link StatusRunnable} which can get statuses for a specific {@link UUID}
- * workSpec id.
- *
- * @param workManager The {@link WorkManagerImpl} to use
- * @param id The workSpec {@link UUID}
- * @return an instance of {@link StatusRunnable}
- */
- @NonNull
- public static StatusRunnable<WorkInfo> forUUID(
- @NonNull final WorkManagerImpl workManager,
- @NonNull final UUID id) {
-
- return new StatusRunnable<WorkInfo>() {
- @Override
- WorkInfo runInternal() {
- WorkDatabase workDatabase = workManager.getWorkDatabase();
- WorkSpec.WorkInfoPojo workInfoPojo =
- workDatabase.workSpecDao().getWorkStatusPojoForId(id.toString());
-
- return workInfoPojo != null ? workInfoPojo.toWorkInfo() : null;
- }
- };
- }
-
- /**
- * Creates a {@link StatusRunnable} which can get statuses for {@link WorkSpec}s annotated with
- * the given {@link String} tag.
- *
- * @param workManager The {@link WorkManagerImpl} to use
- * @param tag The {@link String} tag
- * @return an instance of {@link StatusRunnable}
- */
- @NonNull
- public static StatusRunnable<List<WorkInfo>> forTag(
- @NonNull final WorkManagerImpl workManager,
- @NonNull final String tag) {
-
- return new StatusRunnable<List<WorkInfo>>() {
- @Override
- List<WorkInfo> runInternal() {
- WorkDatabase workDatabase = workManager.getWorkDatabase();
- List<WorkSpec.WorkInfoPojo> workInfoPojos =
- workDatabase.workSpecDao().getWorkStatusPojoForTag(tag);
-
- return WorkSpec.WORK_INFO_MAPPER.apply(workInfoPojos);
- }
- };
- }
-
- /**
- * Creates a {@link StatusRunnable} which can get statuses for {@link WorkSpec}s annotated with
- * the given {@link String} unique name.
- *
- * @param workManager The {@link WorkManagerImpl} to use
- * @param name The {@link String} unique name
- * @return an instance of {@link StatusRunnable}
- */
- @NonNull
- public static StatusRunnable<List<WorkInfo>> forUniqueWork(
- @NonNull final WorkManagerImpl workManager,
- @NonNull final String name) {
-
- return new StatusRunnable<List<WorkInfo>>() {
- @Override
- List<WorkInfo> runInternal() {
- WorkDatabase workDatabase = workManager.getWorkDatabase();
- List<WorkSpec.WorkInfoPojo> workInfoPojos =
- workDatabase.workSpecDao().getWorkStatusPojoForName(name);
-
- return WorkSpec.WORK_INFO_MAPPER.apply(workInfoPojos);
- }
- };
- }
-
- /**
- * Creates a {@link StatusRunnable} which can get statuses for {@link WorkSpec}s referenced
- * by a given {@link WorkQuery}.
- *
- * @param workManager The {@link WorkManagerImpl} to use
- * @param querySpec The {@link WorkQuery} to use
- * @return an instance of {@link StatusRunnable}
- */
- @NonNull
- public static StatusRunnable<List<WorkInfo>> forWorkQuerySpec(
- @NonNull final WorkManagerImpl workManager,
- @NonNull final WorkQuery querySpec) {
-
- return new StatusRunnable<List<WorkInfo>>() {
- @Override
- List<WorkInfo> runInternal() {
- WorkDatabase workDatabase = workManager.getWorkDatabase();
- List<WorkSpec.WorkInfoPojo> workInfoPojos =
- workDatabase.rawWorkInfoDao().getWorkInfoPojos(
- RawQueries.toRawQuery(querySpec));
- return WorkSpec.WORK_INFO_MAPPER.apply(workInfoPojos);
- }
- };
- }
-}
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/utils/StatusRunnable.kt b/work/work-runtime/src/main/java/androidx/work/impl/utils/StatusRunnable.kt
new file mode 100644
index 0000000..75e8411
--- /dev/null
+++ b/work/work-runtime/src/main/java/androidx/work/impl/utils/StatusRunnable.kt
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2018 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("StatusRunnable")
+
+package androidx.work.impl.utils
+
+import androidx.work.WorkInfo
+import androidx.work.WorkQuery
+import androidx.work.impl.WorkDatabase
+import androidx.work.impl.model.WorkSpec.Companion.WORK_INFO_MAPPER
+import androidx.work.impl.utils.futures.SettableFuture
+import androidx.work.impl.utils.taskexecutor.TaskExecutor
+import com.google.common.util.concurrent.ListenableFuture
+import java.util.UUID
+
+internal fun WorkDatabase.forStringIds(
+ executor: TaskExecutor,
+ ids: List<String>,
+): ListenableFuture<List<WorkInfo>> = loadStatusFuture(executor) { db ->
+ WORK_INFO_MAPPER.apply(db.workSpecDao().getWorkStatusPojoForIds(ids))
+}
+
+internal fun WorkDatabase.forUUID(
+ executor: TaskExecutor,
+ id: UUID,
+): ListenableFuture<WorkInfo?> = loadStatusFuture(executor) { db ->
+ db.workSpecDao().getWorkStatusPojoForId(id.toString())?.toWorkInfo()
+}
+
+internal fun WorkDatabase.forTag(
+ executor: TaskExecutor,
+ tag: String
+): ListenableFuture<List<WorkInfo>> = loadStatusFuture(executor) { db ->
+ WORK_INFO_MAPPER.apply(db.workSpecDao().getWorkStatusPojoForTag(tag))
+}
+
+internal fun WorkDatabase.forUniqueWork(
+ executor: TaskExecutor,
+ name: String,
+): ListenableFuture<List<WorkInfo>> = loadStatusFuture(executor) { db ->
+ WORK_INFO_MAPPER.apply(db.workSpecDao().getWorkStatusPojoForName(name))
+}
+
+internal fun WorkDatabase.forWorkQuerySpec(
+ executor: TaskExecutor,
+ querySpec: WorkQuery
+): ListenableFuture<List<WorkInfo>> = loadStatusFuture(executor) { db ->
+ WORK_INFO_MAPPER.apply(db.rawWorkInfoDao().getWorkInfoPojos(querySpec.toRawQuery()))
+}
+
+// it should be rewritten via SuspendToFutureAdapter.launchFuture once it is stable.
+private fun <T> WorkDatabase.loadStatusFuture(
+ executor: TaskExecutor,
+ block: (WorkDatabase) -> T
+): ListenableFuture<T> = SettableFuture.create<T>().apply {
+ executor.serialTaskExecutor.execute {
+ try {
+ set(block(this@loadStatusFuture))
+ } catch (throwable: Throwable) {
+ setException(throwable)
+ }
+ }
+}
diff --git a/work/work-testing/api/api_lint.ignore b/work/work-testing/api/api_lint.ignore
index d107b77..a4667ce 100644
--- a/work/work-testing/api/api_lint.ignore
+++ b/work/work-testing/api/api_lint.ignore
@@ -17,12 +17,6 @@
W does not declare a `getWorkerFactory()` method matching method androidx.work.testing.TestListenableWorkerBuilder.setWorkerFactory(androidx.work.WorkerFactory)
-MissingNullability: androidx.work.testing.TestListenableWorkerBuilderKt#TestListenableWorkerBuilder(android.content.Context, androidx.work.Data, java.util.List<? extends java.lang.String>, int, java.util.List<? extends android.net.Uri>, java.util.List<? extends java.lang.String>):
- Missing nullability on method `TestListenableWorkerBuilder` return
-MissingNullability: androidx.work.testing.TestWorkerBuilderKt#TestWorkerBuilder(android.content.Context, java.util.concurrent.Executor, androidx.work.Data, java.util.List<? extends java.lang.String>, int, java.util.List<? extends android.net.Uri>, java.util.List<? extends java.lang.String>):
- Missing nullability on method `TestWorkerBuilder` return
-
-
StaticFinalBuilder: androidx.work.testing.TestListenableWorkerBuilder:
Builder must be final: androidx.work.testing.TestListenableWorkerBuilder