Merge "Don't try to cast Context to Application in WindowRecomposer" into androidx-main
diff --git a/activity/activity-ktx/api/current.ignore b/activity/activity-ktx/api/current.ignore
new file mode 100644
index 0000000..1756030
--- /dev/null
+++ b/activity/activity-ktx/api/current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.activity.contextaware.ContextAwareKt#withContextAvailable(androidx.activity.contextaware.ContextAware, kotlin.jvm.functions.Function1<? super android.content.Context,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.activity.contextaware.ContextAwareKt.withContextAvailable
diff --git a/activity/activity-ktx/api/current.txt b/activity/activity-ktx/api/current.txt
index 0a94311..822d245 100644
--- a/activity/activity-ktx/api/current.txt
+++ b/activity/activity-ktx/api/current.txt
@@ -18,7 +18,7 @@
package androidx.activity.contextaware {
public final class ContextAwareKt {
- method public static suspend inline <R> Object? withContextAvailable(androidx.activity.contextaware.ContextAware, kotlin.jvm.functions.Function1<? super android.content.Context,? extends R> onContextAvailable, kotlin.coroutines.Continuation<? super R> p);
+ method public static suspend inline <R> Object? withContextAvailable(androidx.activity.contextaware.ContextAware, kotlin.jvm.functions.Function1<? super android.content.Context,? extends R> onContextAvailable, kotlin.coroutines.Continuation<? super R>);
}
}
diff --git a/activity/activity-ktx/api/public_plus_experimental_current.txt b/activity/activity-ktx/api/public_plus_experimental_current.txt
index 0ca1317..f690f03 100644
--- a/activity/activity-ktx/api/public_plus_experimental_current.txt
+++ b/activity/activity-ktx/api/public_plus_experimental_current.txt
@@ -11,7 +11,7 @@
}
public final class PipHintTrackerKt {
- method @RequiresApi(android.os.Build.VERSION_CODES.O) @kotlinx.coroutines.ExperimentalCoroutinesApi public static suspend Object? trackPipAnimationHintView(android.app.Activity, android.view.View view, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @RequiresApi(android.os.Build.VERSION_CODES.O) @kotlinx.coroutines.ExperimentalCoroutinesApi public static suspend Object? trackPipAnimationHintView(android.app.Activity, android.view.View view, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
}
@@ -19,7 +19,7 @@
package androidx.activity.contextaware {
public final class ContextAwareKt {
- method public static suspend inline <R> Object? withContextAvailable(androidx.activity.contextaware.ContextAware, kotlin.jvm.functions.Function1<? super android.content.Context,? extends R> onContextAvailable, kotlin.coroutines.Continuation<? super R> p);
+ method public static suspend inline <R> Object? withContextAvailable(androidx.activity.contextaware.ContextAware, kotlin.jvm.functions.Function1<? super android.content.Context,? extends R> onContextAvailable, kotlin.coroutines.Continuation<? super R>);
}
}
diff --git a/activity/activity-ktx/api/restricted_current.ignore b/activity/activity-ktx/api/restricted_current.ignore
new file mode 100644
index 0000000..1756030
--- /dev/null
+++ b/activity/activity-ktx/api/restricted_current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.activity.contextaware.ContextAwareKt#withContextAvailable(androidx.activity.contextaware.ContextAware, kotlin.jvm.functions.Function1<? super android.content.Context,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.activity.contextaware.ContextAwareKt.withContextAvailable
diff --git a/activity/activity-ktx/api/restricted_current.txt b/activity/activity-ktx/api/restricted_current.txt
index 0a94311..822d245 100644
--- a/activity/activity-ktx/api/restricted_current.txt
+++ b/activity/activity-ktx/api/restricted_current.txt
@@ -18,7 +18,7 @@
package androidx.activity.contextaware {
public final class ContextAwareKt {
- method public static suspend inline <R> Object? withContextAvailable(androidx.activity.contextaware.ContextAware, kotlin.jvm.functions.Function1<? super android.content.Context,? extends R> onContextAvailable, kotlin.coroutines.Continuation<? super R> p);
+ method public static suspend inline <R> Object? withContextAvailable(androidx.activity.contextaware.ContextAware, kotlin.jvm.functions.Function1<? super android.content.Context,? extends R> onContextAvailable, kotlin.coroutines.Continuation<? super R>);
}
}
diff --git a/activity/activity/api/api_lint.ignore b/activity/activity/api/api_lint.ignore
index bdc1a31..5af671f 100644
--- a/activity/activity/api/api_lint.ignore
+++ b/activity/activity/api/api_lint.ignore
@@ -15,6 +15,46 @@
ComponentActivity should not extend `Activity`. Activity subclasses are impossible to compose. Expose a composable API instead.
+InvalidNullability: androidx.activity.ComponentActivity#onCreateOptionsMenu(android.view.Menu) parameter #0:
+ Invalid nullability on parameter `menu` in method `onCreateOptionsMenu`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.activity.ComponentActivity#onMultiWindowModeChanged(boolean, android.content.res.Configuration) parameter #1:
+ Invalid nullability on parameter `newConfig` in method `onMultiWindowModeChanged`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.activity.ComponentActivity#onPictureInPictureModeChanged(boolean, android.content.res.Configuration) parameter #1:
+ Invalid nullability on parameter `newConfig` in method `onPictureInPictureModeChanged`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.activity.ComponentActivity#onPrepareOptionsMenu(android.view.Menu) parameter #0:
+ Invalid nullability on parameter `menu` in method `onPrepareOptionsMenu`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.activity.ComponentActivity#onRetainNonConfigurationInstance():
+ Invalid nullability on method `onRetainNonConfigurationInstance` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.activity.result.ActivityResult#writeToParcel(android.os.Parcel, int) parameter #0:
+ Invalid nullability on parameter `dest` in method `writeToParcel`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.activity.result.IntentSenderRequest#writeToParcel(android.os.Parcel, int) parameter #0:
+ Invalid nullability on parameter `dest` in method `writeToParcel`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.activity.result.contract.ActivityResultContracts.CaptureVideo#getSynchronousResult(android.content.Context, android.net.Uri):
+ Invalid nullability on method `getSynchronousResult` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.activity.result.contract.ActivityResultContracts.CreateDocument#getSynchronousResult(android.content.Context, String):
+ Invalid nullability on method `getSynchronousResult` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.activity.result.contract.ActivityResultContracts.GetContent#getSynchronousResult(android.content.Context, String):
+ Invalid nullability on method `getSynchronousResult` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.activity.result.contract.ActivityResultContracts.GetMultipleContents#getSynchronousResult(android.content.Context, String):
+ Invalid nullability on method `getSynchronousResult` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.activity.result.contract.ActivityResultContracts.OpenDocument#getSynchronousResult(android.content.Context, String[]):
+ Invalid nullability on method `getSynchronousResult` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.activity.result.contract.ActivityResultContracts.OpenDocumentTree#getSynchronousResult(android.content.Context, android.net.Uri):
+ Invalid nullability on method `getSynchronousResult` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.activity.result.contract.ActivityResultContracts.OpenMultipleDocuments#getSynchronousResult(android.content.Context, String[]):
+ Invalid nullability on method `getSynchronousResult` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.activity.result.contract.ActivityResultContracts.RequestMultiplePermissions#getSynchronousResult(android.content.Context, String[]):
+ Invalid nullability on method `getSynchronousResult` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.activity.result.contract.ActivityResultContracts.RequestPermission#getSynchronousResult(android.content.Context, String):
+ Invalid nullability on method `getSynchronousResult` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.activity.result.contract.ActivityResultContracts.TakePicture#getSynchronousResult(android.content.Context, android.net.Uri):
+ Invalid nullability on method `getSynchronousResult` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.activity.result.contract.ActivityResultContracts.TakePicturePreview#getSynchronousResult(android.content.Context, Void):
+ Invalid nullability on method `getSynchronousResult` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.activity.result.contract.ActivityResultContracts.TakeVideo#getSynchronousResult(android.content.Context, android.net.Uri):
+ Invalid nullability on method `getSynchronousResult` return. Overrides of unannotated super method cannot be Nullable.
+
+
MissingGetterMatchingBuilder: androidx.activity.result.IntentSenderRequest.Builder#setFlags(int, int):
androidx.activity.result.IntentSenderRequest does not declare a `getFlags()` method matching method androidx.activity.result.IntentSenderRequest.Builder.setFlags(int,int)
diff --git a/annotation/annotation/api/current.txt b/annotation/annotation/api/current.txt
index b8c4750..a3d4793 100644
--- a/annotation/annotation/api/current.txt
+++ b/annotation/annotation/api/current.txt
@@ -51,7 +51,7 @@
@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.CONSTRUCTOR}) public @interface ContentView {
}
- @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget}) public @interface DeprecatedSinceApi {
+ @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.FUNCTION, kotlin.annotation.AnnotationTarget.PROPERTY_GETTER, kotlin.annotation.AnnotationTarget.PROPERTY_SETTER, kotlin.annotation.AnnotationTarget.ANNOTATION_CLASS, kotlin.annotation.AnnotationTarget.CLASS, kotlin.annotation.AnnotationTarget.CONSTRUCTOR}) public @interface DeprecatedSinceApi {
method public abstract int api();
method public abstract String message() default "";
property public abstract int api;
@@ -81,7 +81,7 @@
@java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.LOCAL_VARIABLE}) public @interface DrawableRes {
}
- @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget) public @interface EmptySuper {
+ @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface EmptySuper {
}
@java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.LOCAL_VARIABLE, java.lang.annotation.ElementType.ANNOTATION_TYPE}) public @interface FloatRange {
@@ -187,7 +187,7 @@
@java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.LOCAL_VARIABLE, java.lang.annotation.ElementType.ANNOTATION_TYPE, java.lang.annotation.ElementType.PACKAGE}) public @interface Nullable {
}
- @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget}) public @interface OpenForTesting {
+ @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.FUNCTION, kotlin.annotation.AnnotationTarget.PROPERTY_GETTER, kotlin.annotation.AnnotationTarget.PROPERTY_SETTER, kotlin.annotation.AnnotationTarget.CLASS}) public @interface OpenForTesting {
}
@java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.LOCAL_VARIABLE}) public @interface PluralsRes {
@@ -238,7 +238,7 @@
enum_constant public static final androidx.annotation.RestrictTo.Scope TESTS;
}
- @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget}) public @interface ReturnThis {
+ @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.FUNCTION, kotlin.annotation.AnnotationTarget.CLASS}) public @interface ReturnThis {
}
@java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.LOCAL_VARIABLE, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.ANNOTATION_TYPE}) public @interface Size {
diff --git a/annotation/annotation/api/public_plus_experimental_current.txt b/annotation/annotation/api/public_plus_experimental_current.txt
index b8c4750..a3d4793 100644
--- a/annotation/annotation/api/public_plus_experimental_current.txt
+++ b/annotation/annotation/api/public_plus_experimental_current.txt
@@ -51,7 +51,7 @@
@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.CONSTRUCTOR}) public @interface ContentView {
}
- @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget}) public @interface DeprecatedSinceApi {
+ @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.FUNCTION, kotlin.annotation.AnnotationTarget.PROPERTY_GETTER, kotlin.annotation.AnnotationTarget.PROPERTY_SETTER, kotlin.annotation.AnnotationTarget.ANNOTATION_CLASS, kotlin.annotation.AnnotationTarget.CLASS, kotlin.annotation.AnnotationTarget.CONSTRUCTOR}) public @interface DeprecatedSinceApi {
method public abstract int api();
method public abstract String message() default "";
property public abstract int api;
@@ -81,7 +81,7 @@
@java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.LOCAL_VARIABLE}) public @interface DrawableRes {
}
- @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget) public @interface EmptySuper {
+ @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface EmptySuper {
}
@java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.LOCAL_VARIABLE, java.lang.annotation.ElementType.ANNOTATION_TYPE}) public @interface FloatRange {
@@ -187,7 +187,7 @@
@java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.LOCAL_VARIABLE, java.lang.annotation.ElementType.ANNOTATION_TYPE, java.lang.annotation.ElementType.PACKAGE}) public @interface Nullable {
}
- @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget}) public @interface OpenForTesting {
+ @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.FUNCTION, kotlin.annotation.AnnotationTarget.PROPERTY_GETTER, kotlin.annotation.AnnotationTarget.PROPERTY_SETTER, kotlin.annotation.AnnotationTarget.CLASS}) public @interface OpenForTesting {
}
@java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.LOCAL_VARIABLE}) public @interface PluralsRes {
@@ -238,7 +238,7 @@
enum_constant public static final androidx.annotation.RestrictTo.Scope TESTS;
}
- @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget}) public @interface ReturnThis {
+ @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.FUNCTION, kotlin.annotation.AnnotationTarget.CLASS}) public @interface ReturnThis {
}
@java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.LOCAL_VARIABLE, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.ANNOTATION_TYPE}) public @interface Size {
diff --git a/annotation/annotation/api/restricted_current.txt b/annotation/annotation/api/restricted_current.txt
index b8c4750..a3d4793 100644
--- a/annotation/annotation/api/restricted_current.txt
+++ b/annotation/annotation/api/restricted_current.txt
@@ -51,7 +51,7 @@
@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.CONSTRUCTOR}) public @interface ContentView {
}
- @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget}) public @interface DeprecatedSinceApi {
+ @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.FUNCTION, kotlin.annotation.AnnotationTarget.PROPERTY_GETTER, kotlin.annotation.AnnotationTarget.PROPERTY_SETTER, kotlin.annotation.AnnotationTarget.ANNOTATION_CLASS, kotlin.annotation.AnnotationTarget.CLASS, kotlin.annotation.AnnotationTarget.CONSTRUCTOR}) public @interface DeprecatedSinceApi {
method public abstract int api();
method public abstract String message() default "";
property public abstract int api;
@@ -81,7 +81,7 @@
@java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.LOCAL_VARIABLE}) public @interface DrawableRes {
}
- @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget) public @interface EmptySuper {
+ @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface EmptySuper {
}
@java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.LOCAL_VARIABLE, java.lang.annotation.ElementType.ANNOTATION_TYPE}) public @interface FloatRange {
@@ -187,7 +187,7 @@
@java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.LOCAL_VARIABLE, java.lang.annotation.ElementType.ANNOTATION_TYPE, java.lang.annotation.ElementType.PACKAGE}) public @interface Nullable {
}
- @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget}) public @interface OpenForTesting {
+ @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.FUNCTION, kotlin.annotation.AnnotationTarget.PROPERTY_GETTER, kotlin.annotation.AnnotationTarget.PROPERTY_SETTER, kotlin.annotation.AnnotationTarget.CLASS}) public @interface OpenForTesting {
}
@java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.LOCAL_VARIABLE}) public @interface PluralsRes {
@@ -238,7 +238,7 @@
enum_constant public static final androidx.annotation.RestrictTo.Scope TESTS;
}
- @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget, kotlin.annotation.AnnotationTarget}) public @interface ReturnThis {
+ @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.FUNCTION, kotlin.annotation.AnnotationTarget.CLASS}) public @interface ReturnThis {
}
@java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.LOCAL_VARIABLE, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.ANNOTATION_TYPE}) public @interface Size {
diff --git a/appcompat/appcompat-resources/api/api_lint.ignore b/appcompat/appcompat-resources/api/api_lint.ignore
index 63eb163..1e22a31 100644
--- a/appcompat/appcompat-resources/api/api_lint.ignore
+++ b/appcompat/appcompat-resources/api/api_lint.ignore
@@ -3,6 +3,10 @@
Public class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat stripped of unavailable superclass androidx.appcompat.graphics.drawable.StateListDrawable
+InvalidNullability: androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat#setTintMode(android.graphics.PorterDuff.Mode) parameter #0:
+ Invalid nullability on parameter `tintMode` in method `setTintMode`. Parameters of overrides cannot be NonNull if super parameter is Nullable.
+
+
MissingNullability: androidx.appcompat.content.res.AppCompatResources#getColorStateList(android.content.Context, int):
Missing nullability on method `getColorStateList` return
MissingNullability: androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat#createFromXmlInner(android.content.Context, android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme):
diff --git a/appcompat/appcompat/api/api_lint.ignore b/appcompat/appcompat/api/api_lint.ignore
index 39ad20a..378324a 100644
--- a/appcompat/appcompat/api/api_lint.ignore
+++ b/appcompat/appcompat/api/api_lint.ignore
@@ -49,6 +49,54 @@
Symmetric method for `setSplitTrack` must be named `isSplitTrack`; was `getSplitTrack`
+InvalidNullability: androidx.appcompat.app.AppCompatActivity#onSupportActionModeFinished(androidx.appcompat.view.ActionMode) parameter #0:
+ Invalid nullability on parameter `mode` in method `onSupportActionModeFinished`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.appcompat.app.AppCompatActivity#onSupportActionModeStarted(androidx.appcompat.view.ActionMode) parameter #0:
+ Invalid nullability on parameter `mode` in method `onSupportActionModeStarted`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.appcompat.app.AppCompatActivity#onWindowStartingSupportActionMode(androidx.appcompat.view.ActionMode.Callback):
+ Invalid nullability on method `onWindowStartingSupportActionMode` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.appcompat.app.AppCompatActivity#onWindowStartingSupportActionMode(androidx.appcompat.view.ActionMode.Callback) parameter #0:
+ Invalid nullability on parameter `callback` in method `onWindowStartingSupportActionMode`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.appcompat.widget.AppCompatAutoCompleteTextView#getCustomSelectionActionModeCallback():
+ Invalid nullability on method `getCustomSelectionActionModeCallback` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.appcompat.widget.AppCompatButton#getCustomSelectionActionModeCallback():
+ Invalid nullability on method `getCustomSelectionActionModeCallback` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.appcompat.widget.AppCompatButton#setFilters(android.text.InputFilter[]) parameter #0:
+ Invalid nullability on parameter `filters` in method `setFilters`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.appcompat.widget.AppCompatCheckBox#setFilters(android.text.InputFilter[]) parameter #0:
+ Invalid nullability on parameter `filters` in method `setFilters`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.appcompat.widget.AppCompatCheckedTextView#getCustomSelectionActionModeCallback():
+ Invalid nullability on method `getCustomSelectionActionModeCallback` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.appcompat.widget.AppCompatCheckedTextView#onCreateInputConnection(android.view.inputmethod.EditorInfo):
+ Invalid nullability on method `onCreateInputConnection` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.appcompat.widget.AppCompatCheckedTextView#onCreateInputConnection(android.view.inputmethod.EditorInfo) parameter #0:
+ Invalid nullability on parameter `outAttrs` in method `onCreateInputConnection`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.appcompat.widget.AppCompatCheckedTextView#setTextAppearance(android.content.Context, int) parameter #0:
+ Invalid nullability on parameter `context` in method `setTextAppearance`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.appcompat.widget.AppCompatEditText#getCustomSelectionActionModeCallback():
+ Invalid nullability on method `getCustomSelectionActionModeCallback` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.appcompat.widget.AppCompatEditText#getText():
+ Invalid nullability on method `getText` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.appcompat.widget.AppCompatEditText#onCreateInputConnection(android.view.inputmethod.EditorInfo):
+ Invalid nullability on method `onCreateInputConnection` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.appcompat.widget.AppCompatEditText#onCreateInputConnection(android.view.inputmethod.EditorInfo) parameter #0:
+ Invalid nullability on parameter `outAttrs` in method `onCreateInputConnection`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.appcompat.widget.AppCompatRadioButton#setFilters(android.text.InputFilter[]) parameter #0:
+ Invalid nullability on parameter `filters` in method `setFilters`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.appcompat.widget.AppCompatTextView#getCustomSelectionActionModeCallback():
+ Invalid nullability on method `getCustomSelectionActionModeCallback` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.appcompat.widget.AppCompatTextView#setFilters(android.text.InputFilter[]) parameter #0:
+ Invalid nullability on parameter `filters` in method `setFilters`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.appcompat.widget.AppCompatToggleButton#setFilters(android.text.InputFilter[]) parameter #0:
+ Invalid nullability on parameter `filters` in method `setFilters`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.appcompat.widget.ListPopupWindow#getListView():
+ Invalid nullability on method `getListView` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.appcompat.widget.SwitchCompat#getCustomSelectionActionModeCallback():
+ Invalid nullability on method `getCustomSelectionActionModeCallback` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.appcompat.widget.SwitchCompat#setFilters(android.text.InputFilter[]) parameter #0:
+ Invalid nullability on parameter `filters` in method `setFilters`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+
+
ListenerLast: androidx.appcompat.app.AlertDialog.Builder#setCursor(android.database.Cursor, android.content.DialogInterface.OnClickListener, String) parameter #2:
Listeners should always be at end of argument list (method `setCursor`)
diff --git a/benchmark/benchmark-common/api/public_plus_experimental_current.txt b/benchmark/benchmark-common/api/public_plus_experimental_current.txt
index fd9ccb2..ee9d43e 100644
--- a/benchmark/benchmark-common/api/public_plus_experimental_current.txt
+++ b/benchmark/benchmark-common/api/public_plus_experimental_current.txt
@@ -19,13 +19,13 @@
public final class BenchmarkState {
method public boolean keepRunning();
method public void pauseTiming();
- method @androidx.benchmark.BenchmarkState.Companion.ExperimentalExternalReport public static void reportData(String className, String testName, @IntRange(from=0) long totalRunTimeNs, java.util.List<java.lang.Long> dataNs, @IntRange(from=0) int warmupIterations, @IntRange(from=0) long thermalThrottleSleepSeconds, @IntRange(from=1) int repeatIterations);
+ method @androidx.benchmark.BenchmarkState.Companion.ExperimentalExternalReport public static void reportData(String className, String testName, @IntRange(from=0L) long totalRunTimeNs, java.util.List<java.lang.Long> dataNs, @IntRange(from=0L) int warmupIterations, @IntRange(from=0L) long thermalThrottleSleepSeconds, @IntRange(from=1L) int repeatIterations);
method public void resumeTiming();
field public static final androidx.benchmark.BenchmarkState.Companion Companion;
}
public static final class BenchmarkState.Companion {
- method @androidx.benchmark.BenchmarkState.Companion.ExperimentalExternalReport public void reportData(String className, String testName, @IntRange(from=0) long totalRunTimeNs, java.util.List<java.lang.Long> dataNs, @IntRange(from=0) int warmupIterations, @IntRange(from=0) long thermalThrottleSleepSeconds, @IntRange(from=1) int repeatIterations);
+ method @androidx.benchmark.BenchmarkState.Companion.ExperimentalExternalReport public void reportData(String className, String testName, @IntRange(from=0L) long totalRunTimeNs, java.util.List<java.lang.Long> dataNs, @IntRange(from=0L) int warmupIterations, @IntRange(from=0L) long thermalThrottleSleepSeconds, @IntRange(from=1L) int repeatIterations);
}
@kotlin.Experimental @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public static @interface BenchmarkState.Companion.ExperimentalExternalReport {
diff --git a/benchmark/benchmark-common/build.gradle b/benchmark/benchmark-common/build.gradle
index d298309..64e14d3 100644
--- a/benchmark/benchmark-common/build.gradle
+++ b/benchmark/benchmark-common/build.gradle
@@ -56,6 +56,8 @@
api("androidx.annotation:annotation:1.1.0")
api("androidx.annotation:annotation-experimental:1.0.0")
implementation("androidx.tracing:tracing-ktx:1.0.0")
+ implementation(projectOrArtifact(":tracing:tracing-perfetto"))
+ implementation(projectOrArtifact(":tracing:tracing-perfetto-binary"))
implementation(libs.testMonitor)
implementation(libs.wireRuntime)
@@ -89,4 +91,3 @@
it.dependsOn("generateReleaseProtos")
}
}
-
diff --git a/benchmark/benchmark-common/src/main/java/androidx/benchmark/perfetto/PerfettoCapture.kt b/benchmark/benchmark-common/src/main/java/androidx/benchmark/perfetto/PerfettoCapture.kt
index eb24e477..9e6a901 100644
--- a/benchmark/benchmark-common/src/main/java/androidx/benchmark/perfetto/PerfettoCapture.kt
+++ b/benchmark/benchmark-common/src/main/java/androidx/benchmark/perfetto/PerfettoCapture.kt
@@ -20,8 +20,20 @@
import androidx.annotation.RequiresApi
import androidx.annotation.RestrictTo
import androidx.benchmark.Outputs
+import androidx.benchmark.Shell
+import androidx.benchmark.perfetto.PerfettoHelper.Companion.isAbiSupported
import androidx.benchmark.userspaceTrace
+import androidx.test.platform.app.InstrumentationRegistry
+import androidx.tracing.perfetto.TracingReceiver.Companion.RESULT_CODE_ALREADY_ENABLED
+import androidx.tracing.perfetto.TracingReceiver.Companion.RESULT_CODE_ERROR_BINARY_MISSING
+import androidx.tracing.perfetto.TracingReceiver.Companion.RESULT_CODE_ERROR_BINARY_VERIFICATION_ERROR
+import androidx.tracing.perfetto.TracingReceiver.Companion.RESULT_CODE_ERROR_BINARY_VERSION_MISMATCH
+import androidx.tracing.perfetto.TracingReceiver.Companion.RESULT_CODE_ERROR_OTHER
+import androidx.tracing.perfetto.TracingReceiver.Companion.RESULT_CODE_SUCCESS
+import java.io.BufferedOutputStream
import java.io.File
+import java.io.FileInputStream
+import java.util.zip.ZipInputStream
/**
* Enables capturing a Perfetto trace
@@ -77,4 +89,98 @@
public fun stop(destinationPath: String) = userspaceTrace("stop perfetto") {
helper.stopCollecting(destinationPath)
}
+
+ /**
+ * Enables Perfetto SDK tracing in an app if present. Provides required binary dependencies to
+ * the app if they're missing and the [provideBinariesIfMissing] parameter is set to `true`.
+ */
+ fun enableAndroidxTracingPerfetto(
+ targetPackage: String,
+ provideBinariesIfMissing: Boolean
+ ): String? {
+ if (!isAbiSupported()) {
+ throw IllegalStateException("Unsupported ABI (${Build.SUPPORTED_ABIS.joinToString()})")
+ }
+
+ val handshake = PerfettoHandshake(targetPackage)
+ val response = handshake.requestEnable(null).let {
+ if (it.exitCode == RESULT_CODE_ERROR_BINARY_MISSING && provideBinariesIfMissing)
+ handshake.requestEnable(pushLibrary(targetPackage)) // provide binaries and retry
+ else
+ it // no retry
+ }
+
+ return when (response.exitCode) {
+ 0, null -> "The broadcast to enable tracing was not received. This most likely means " +
+ "that the app does not contain the `androidx.tracing.tracing-perfetto` " +
+ "library as its dependency."
+ RESULT_CODE_SUCCESS -> null
+ RESULT_CODE_ALREADY_ENABLED -> "Perfetto SDK already enabled."
+ RESULT_CODE_ERROR_BINARY_MISSING ->
+ "Perfetto SDK binary dependencies missing. " +
+ "Required version: ${response.requiredVersion}. " +
+ "Error: ${response.errorMessage}."
+ RESULT_CODE_ERROR_BINARY_VERSION_MISMATCH ->
+ "Perfetto SDK binary mismatch. " +
+ "Required version: ${response.requiredVersion}. " +
+ "Error: ${response.errorMessage}."
+ RESULT_CODE_ERROR_BINARY_VERIFICATION_ERROR ->
+ "Perfetto SDK binary verification failed. " +
+ "Required version: ${response.requiredVersion}. " +
+ "Error: ${response.errorMessage}. " +
+ "If working with an unreleased snapshot, ensure all modules are built " +
+ "against the same snapshot (e.g. clear caches and rebuild)."
+ RESULT_CODE_ERROR_OTHER -> "Error: ${response.errorMessage}."
+ else -> throw RuntimeException("Unrecognized exit code: ${response.exitCode}.")
+ }
+ }
+
+ private fun pushLibrary(targetPackage: String): String {
+ val context = InstrumentationRegistry.getInstrumentation().context
+
+ val libFileName = "libtracing_perfetto.so"
+ val abiDirName = File(context.applicationInfo.nativeLibraryDir).name
+ val baseApk = File(context.applicationInfo.publicSourceDir!!)
+
+ val shellWriteableAppReadableDir = File("/sdcard/Android/data/$targetPackage/files")
+ val dstDir = shellWriteableAppReadableDir.resolve("lib/$abiDirName")
+ val dstFile = dstDir.resolve(libFileName)
+ val tmpFile = context.cacheDir.resolve(".tmp_$libFileName")
+
+ val rxLibPathInsideZip = Regex(".*lib/[^/]*$abiDirName[^/]*/$libFileName")
+
+ ZipInputStream(FileInputStream(baseApk)).use { stream ->
+ findEntry@ while (true) {
+ val entry = stream.nextEntry ?: break@findEntry
+ if (!entry.name.matches(rxLibPathInsideZip)) continue@findEntry
+
+ // found the right entry, so copying it to destination
+ BufferedOutputStream(tmpFile.outputStream()).use { dstStream ->
+ val buffer = ByteArray(1024)
+ writing@ while (true) {
+ val readCount = stream.read(buffer)
+ if (readCount <= 0) break@writing
+ dstStream.write(buffer, 0, readCount)
+ }
+ }
+ executeShellCommand("mkdir -p ${dstDir.path}", Regex("^$"))
+ executeShellCommand("mv ${tmpFile.path} ${dstFile.path}", Regex("^$"))
+
+ return dstFile.path
+ }
+ }
+
+ throw IllegalStateException(
+ "Unable to locate $libFileName to enable Perfetto SDK. Tried inside ${baseApk.path}."
+ )
+ }
+
+ private fun executeShellCommand(command: String, expectedResponse: Regex) {
+ val response = Shell.executeCommand(command)
+ if (!response.matches(expectedResponse)) throw IllegalStateException(
+ "Command response not matching expected." +
+ " Command: $command." +
+ " Expected response: ${expectedResponse.pattern}."
+ )
+ }
}
diff --git a/benchmark/benchmark-common/src/main/java/androidx/benchmark/perfetto/PerfettoHandshake.kt b/benchmark/benchmark-common/src/main/java/androidx/benchmark/perfetto/PerfettoHandshake.kt
new file mode 100644
index 0000000..0047f00
--- /dev/null
+++ b/benchmark/benchmark-common/src/main/java/androidx/benchmark/perfetto/PerfettoHandshake.kt
@@ -0,0 +1,106 @@
+/*
+ * 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.benchmark.perfetto
+
+import android.os.Build
+import android.util.JsonReader
+import androidx.annotation.DoNotInline
+import androidx.annotation.RequiresApi
+import androidx.benchmark.Shell
+import androidx.tracing.perfetto.TracingReceiver
+import androidx.tracing.perfetto.TracingReceiver.Companion.KEY_ERROR_MESSAGE
+import androidx.tracing.perfetto.TracingReceiver.Companion.KEY_EXIT_CODE
+import androidx.tracing.perfetto.TracingReceiver.Companion.KEY_REQUIRED_VERSION
+import java.io.StringReader
+
+@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
+internal class PerfettoHandshake(private val targetPackage: String) {
+ private companion object {
+ val receiverName: String = TracingReceiver::class.java.name
+ }
+
+ @RequiresApi(Build.VERSION_CODES.LOLLIPOP)
+ fun requestEnable(providedBinaryPath: String? = null): Response {
+ val action = TracingReceiver.ACTION_ENABLE_TRACING
+ val pathExtra = providedBinaryPath?.let { """--es ${TracingReceiver.KEY_PATH} $it""" } ?: ""
+ val command = "am broadcast -a $action $pathExtra $targetPackage/$receiverName"
+ return Response.parse(Shell.executeCommand(command))
+ }
+
+ data class Response constructor(
+ val exitCode: Int?,
+ val requiredVersion: String?,
+ val errorMessage: String?
+ ) {
+ companion object {
+ @DoNotInline // System.lineSeparator() is API level 19
+ fun parse(rawResponse: String): Response {
+ val line = rawResponse
+ .split(Regex("\r?\n"))
+ .firstOrNull { it.contains("Broadcast completed: result=") }
+ ?: throw IllegalArgumentException("Cannot parse: $rawResponse")
+
+ val matchResult =
+ Regex("Broadcast completed: (result=.*?)(, data=\".*?\")?(, extras: .*)?")
+ .matchEntire(line)
+ ?: throw IllegalArgumentException("Cannot parse: $rawResponse")
+
+ val broadcastResponseCode = matchResult
+ .groups[1]
+ ?.value
+ ?.substringAfter("result=")
+ ?.toIntOrNull()
+
+ val dataString = matchResult
+ .groups
+ .firstOrNull { it?.value?.startsWith(", data=") ?: false }
+ ?.value
+ ?.substringAfter(", data=\"")
+ ?.dropLast(1)
+ ?: throw IllegalArgumentException("Cannot parse: $rawResponse. " +
+ "Unable to detect 'data=' section."
+ )
+
+ JsonReader(StringReader(dataString)).use { reader ->
+ reader.beginObject()
+
+ var requiredVersion: String? = null
+ var errorMessage: String? = null
+ var exitCode: Int? = null
+
+ while (reader.hasNext()) {
+ when (reader.nextName()) {
+ KEY_EXIT_CODE -> exitCode = reader.nextInt()
+ KEY_REQUIRED_VERSION -> requiredVersion = reader.nextString()
+ KEY_ERROR_MESSAGE -> errorMessage = reader.nextString()
+ else -> {}
+ }
+ }
+
+ if (broadcastResponseCode != exitCode) {
+ throw IllegalStateException("Cannot parse: $rawResponse. Exit code " +
+ "not matching broadcast exit code."
+ )
+ }
+
+ reader.endObject()
+ return Response(exitCode, requiredVersion, errorMessage)
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/benchmark/benchmark-junit4/api/api_lint.ignore b/benchmark/benchmark-junit4/api/api_lint.ignore
new file mode 100644
index 0000000..e8c315f
--- /dev/null
+++ b/benchmark/benchmark-junit4/api/api_lint.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+InvalidNullability: androidx.benchmark.junit4.BenchmarkRule#apply(org.junit.runners.model.Statement, org.junit.runner.Description) parameter #0:
+ Invalid nullability on parameter `base` in method `apply`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.benchmark.junit4.BenchmarkRule#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.
diff --git a/benchmark/benchmark-macro-junit4/api/api_lint.ignore b/benchmark/benchmark-macro-junit4/api/api_lint.ignore
new file mode 100644
index 0000000..e618f5f
--- /dev/null
+++ b/benchmark/benchmark-macro-junit4/api/api_lint.ignore
@@ -0,0 +1,9 @@
+// Baseline format: 1.0
+InvalidNullability: androidx.benchmark.macro.junit4.BaselineProfileRule#apply(org.junit.runners.model.Statement, org.junit.runner.Description) parameter #0:
+ Invalid nullability on parameter `base` in method `apply`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.benchmark.macro.junit4.BaselineProfileRule#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.
+InvalidNullability: androidx.benchmark.macro.junit4.MacrobenchmarkRule#apply(org.junit.runners.model.Statement, org.junit.runner.Description) parameter #0:
+ Invalid nullability on parameter `base` in method `apply`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.benchmark.macro.junit4.MacrobenchmarkRule#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.
diff --git a/benchmark/benchmark-macro-junit4/api/current.txt b/benchmark/benchmark-macro-junit4/api/current.txt
index 4b1ab53..6de0d8b 100644
--- a/benchmark/benchmark-macro-junit4/api/current.txt
+++ b/benchmark/benchmark-macro-junit4/api/current.txt
@@ -4,10 +4,10 @@
public final class MacrobenchmarkRule implements org.junit.rules.TestRule {
ctor public MacrobenchmarkRule();
method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
- method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1) int iterations, optional kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> setupBlock, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
- method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
- method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
- method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1L) int iterations, optional kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> setupBlock, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1L) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, @IntRange(from=1L) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, @IntRange(from=1L) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
}
}
diff --git a/benchmark/benchmark-macro-junit4/api/public_plus_experimental_current.txt b/benchmark/benchmark-macro-junit4/api/public_plus_experimental_current.txt
index 31d9966..8b7dffc 100644
--- a/benchmark/benchmark-macro-junit4/api/public_plus_experimental_current.txt
+++ b/benchmark/benchmark-macro-junit4/api/public_plus_experimental_current.txt
@@ -10,10 +10,10 @@
public final class MacrobenchmarkRule implements org.junit.rules.TestRule {
ctor public MacrobenchmarkRule();
method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
- method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1) int iterations, optional kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> setupBlock, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
- method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
- method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
- method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1L) int iterations, optional kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> setupBlock, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1L) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, @IntRange(from=1L) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, @IntRange(from=1L) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
}
}
diff --git a/benchmark/benchmark-macro-junit4/api/restricted_current.txt b/benchmark/benchmark-macro-junit4/api/restricted_current.txt
index 4b1ab53..6de0d8b 100644
--- a/benchmark/benchmark-macro-junit4/api/restricted_current.txt
+++ b/benchmark/benchmark-macro-junit4/api/restricted_current.txt
@@ -4,10 +4,10 @@
public final class MacrobenchmarkRule implements org.junit.rules.TestRule {
ctor public MacrobenchmarkRule();
method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
- method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1) int iterations, optional kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> setupBlock, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
- method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
- method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
- method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1L) int iterations, optional kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> setupBlock, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1L) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, @IntRange(from=1L) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, @IntRange(from=1L) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
}
}
diff --git a/benchmark/benchmark-macro/api/current.txt b/benchmark/benchmark-macro/api/current.txt
index 74b1286..c2a5dd1 100644
--- a/benchmark/benchmark-macro/api/current.txt
+++ b/benchmark/benchmark-macro/api/current.txt
@@ -30,7 +30,7 @@
}
@RequiresApi(24) public static final class CompilationMode.Partial extends androidx.benchmark.macro.CompilationMode {
- ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode, optional @IntRange(from=0) int warmupIterations);
+ ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode, optional @IntRange(from=0L) int warmupIterations);
ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode);
ctor public CompilationMode.Partial();
method public androidx.benchmark.macro.BaselineProfileMode getBaselineProfileMode();
diff --git a/benchmark/benchmark-macro/api/public_plus_experimental_current.txt b/benchmark/benchmark-macro/api/public_plus_experimental_current.txt
index cca9a92..4919627 100644
--- a/benchmark/benchmark-macro/api/public_plus_experimental_current.txt
+++ b/benchmark/benchmark-macro/api/public_plus_experimental_current.txt
@@ -34,7 +34,7 @@
}
@RequiresApi(24) public static final class CompilationMode.Partial extends androidx.benchmark.macro.CompilationMode {
- ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode, optional @IntRange(from=0) int warmupIterations);
+ ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode, optional @IntRange(from=0L) int warmupIterations);
ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode);
ctor public CompilationMode.Partial();
method public androidx.benchmark.macro.BaselineProfileMode getBaselineProfileMode();
diff --git a/benchmark/benchmark-macro/api/restricted_current.txt b/benchmark/benchmark-macro/api/restricted_current.txt
index 0c9de0a..1e19fec 100644
--- a/benchmark/benchmark-macro/api/restricted_current.txt
+++ b/benchmark/benchmark-macro/api/restricted_current.txt
@@ -34,7 +34,7 @@
}
@RequiresApi(24) public static final class CompilationMode.Partial extends androidx.benchmark.macro.CompilationMode {
- ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode, optional @IntRange(from=0) int warmupIterations);
+ ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode, optional @IntRange(from=0L) int warmupIterations);
ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode);
ctor public CompilationMode.Partial();
method public androidx.benchmark.macro.BaselineProfileMode getBaselineProfileMode();
diff --git a/benchmark/benchmark-macro/build.gradle b/benchmark/benchmark-macro/build.gradle
index 38c72be..29a6c33 100644
--- a/benchmark/benchmark-macro/build.gradle
+++ b/benchmark/benchmark-macro/build.gradle
@@ -38,6 +38,7 @@
"androidx/traceprocessor/testdata"
)
}
+
namespace "androidx.benchmark.macro"
}
@@ -54,10 +55,12 @@
androidTestImplementation(project(":internal-testutils-ktx"))
androidTestImplementation("androidx.activity:activity-ktx:1.3.1")
+ androidTestImplementation(project(":tracing:tracing-perfetto"))
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testRules)
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.kotlinTest)
+ androidTestImplementation(libs.truth)
}
androidx {
@@ -73,4 +76,4 @@
kotlinOptions {
freeCompilerArgs += [ '-Xopt-in=kotlin.RequiresOptIn' ]
}
-}
\ No newline at end of file
+}
diff --git a/benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/Packages.kt b/benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/Packages.kt
index 7cc468e..3580685 100644
--- a/benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/Packages.kt
+++ b/benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/Packages.kt
@@ -22,8 +22,7 @@
*
* Use this app/package if it's necessary to kill/compile target process.
*/
- const val TARGET =
- "androidx.benchmark.integration.macrobenchmark.target"
+ const val TARGET = "androidx.benchmark.integration.macrobenchmark.target"
/**
* This test app - this process.
diff --git a/benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/perfetto/PerfettoSdkHandshakeTest.kt b/benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/perfetto/PerfettoSdkHandshakeTest.kt
new file mode 100644
index 0000000..2a06a94
--- /dev/null
+++ b/benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/perfetto/PerfettoSdkHandshakeTest.kt
@@ -0,0 +1,176 @@
+/*
+ * 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.benchmark.macro.perfetto
+
+import androidx.benchmark.Shell
+import androidx.benchmark.macro.MacrobenchmarkScope
+import androidx.benchmark.macro.Packages
+import androidx.benchmark.macro.perfetto.PerfettoSdkHandshakeTest.SdkDelivery.MISSING
+import androidx.benchmark.macro.perfetto.PerfettoSdkHandshakeTest.SdkDelivery.PROVIDED_BY_BENCHMARK
+import androidx.benchmark.perfetto.PerfettoCapture
+import androidx.benchmark.perfetto.PerfettoHelper.Companion.isAbiSupported
+import com.google.common.truth.Truth.assertThat
+import org.junit.After
+import org.junit.Assume.assumeTrue
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.junit.runners.Parameterized
+import org.junit.runners.Parameterized.Parameters
+
+private const val tracingPerfettoVersion = "1.0.0-alpha01" // TODO(224510255): get by 'reflection'
+
+@RunWith(Parameterized::class)
+/**
+ * End-to-end test verifying the process of enabling Perfetto SDK tracing using a broadcast.
+ * @see [androidx.tracing.perfetto.TracingReceiver]
+ */
+class PerfettoSdkHandshakeTest(private val testConfig: TestConfig) {
+ private val perfettoCapture = PerfettoCapture()
+ private val targetPackage = Packages.TARGET
+ private lateinit var scope: MacrobenchmarkScope
+
+ companion object {
+ @Parameters(name = "{0}")
+ @JvmStatic
+ fun parameters() = listOf(
+ TestConfig(sdkDelivery = PROVIDED_BY_BENCHMARK, packageAlive = true),
+ TestConfig(sdkDelivery = MISSING, packageAlive = true),
+ // TODO: tests verifying tracing on app start-up
+ )
+ }
+
+ @Before
+ fun setUp() {
+ scope = MacrobenchmarkScope(targetPackage, launchWithClearTask = true)
+
+ // kill process if running to ensure a clean test start
+ if (Shell.isPackageAlive(targetPackage)) scope.killProcess()
+ assertPackageAlive(false)
+
+ // clean target process app data to ensure a clean start
+ Shell.executeCommand("pm clear $targetPackage").let { response ->
+ assertThat(response).matches("Success\r?\n")
+ }
+ }
+
+ @After
+ fun tearDown() {
+ // kill the process at the end of the test
+ scope.killProcess()
+ assertPackageAlive(false)
+ }
+
+ @Test
+ fun test_enable() {
+ assumeTrue(isAbiSupported())
+
+ // start the process if required to already be running when the handshake starts
+ if (testConfig.packageAlive) enablePackage()
+
+ // issue an 'enable' broadcast
+ perfettoCapture.enableAndroidxTracingPerfetto(
+ targetPackage, shouldProvideBinaries(testConfig.sdkDelivery)
+ ).let { response: String? ->
+ when (testConfig.sdkDelivery) {
+ PROVIDED_BY_BENCHMARK -> assertThat(response).isNull()
+ MISSING -> assertMissingBinariesResponse(response)
+ }
+ }
+
+ // issue an 'enable' broadcast again
+ perfettoCapture.enableAndroidxTracingPerfetto(
+ targetPackage, shouldProvideBinaries(testConfig.sdkDelivery)
+ ).let { response: String? ->
+ when (testConfig.sdkDelivery) {
+ PROVIDED_BY_BENCHMARK -> assertAlreadyEnabledResponse(response)
+ MISSING -> assertMissingBinariesResponse(response)
+ }
+ }
+
+ // check that the process 'survived' the test
+ assertPackageAlive(true)
+ }
+
+ @Test
+ fun test_detectUnsupported() {
+ assumeTrue(!isAbiSupported())
+
+ if (testConfig.packageAlive) enablePackage()
+
+ try {
+ perfettoCapture.enableAndroidxTracingPerfetto(
+ targetPackage,
+ shouldProvideBinaries(testConfig.sdkDelivery)
+ )
+ } catch (e: IllegalStateException) {
+ assertThat(e.message).contains("Unsupported ABI")
+ }
+ }
+
+ private fun enablePackage() {
+ scope.pressHome()
+ scope.startActivityAndWait()
+ assertPackageAlive(true)
+ }
+
+ private fun shouldProvideBinaries(sdkDelivery: SdkDelivery): Boolean {
+ return when (sdkDelivery) {
+ PROVIDED_BY_BENCHMARK -> true
+ MISSING -> false
+ }
+ }
+
+ private fun assertAlreadyEnabledResponse(response: String?) {
+ assertThat(response).ignoringCase().contains("already enabled")
+ }
+
+ private fun assertMissingBinariesResponse(response: String?) {
+ assertThat(response).ignoringCase().contains("binary dependencies missing")
+ assertThat(response).contains("Required version: $tracingPerfettoVersion")
+ assertThat(response).containsMatch(
+ "Perfetto SDK binary dependencies missing" +
+ ".*UnsatisfiedLinkError.*libtracing_perfetto.so"
+ )
+ }
+
+ private fun assertPackageAlive(expected: Boolean) =
+ assertThat(Shell.isPackageAlive(targetPackage)).isEqualTo(expected)
+
+ data class TestConfig(
+ /** Determines if and how Perfetto binaries are provided to the test app. */
+ val sdkDelivery: SdkDelivery,
+
+ /** Determines if the app is already running as the actual testing starts. */
+ val packageAlive: Boolean,
+ )
+
+ /**
+ * Determines if and how Perfetto binaries are provided to the test app.
+ *
+ * Note: the case where SDK binaries are already present is not tested here.
+ * To some degree we test that case in
+ * [androidx.tracing.perfetto.test.TracingTest.test_endToEnd_binaryDependenciesPresent].
+ */
+ enum class SdkDelivery {
+ /** Benchmark detects they're missing and provides them to the app */
+ PROVIDED_BY_BENCHMARK,
+
+ /** Remain unresolved */
+ MISSING
+ }
+}
diff --git a/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Macrobenchmark.kt b/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Macrobenchmark.kt
index aca7f19..821fc6c 100644
--- a/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Macrobenchmark.kt
+++ b/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Macrobenchmark.kt
@@ -310,8 +310,6 @@
setupBlock = {
if (startupMode == StartupMode.COLD) {
killProcess()
- // drop app pages from page cache to ensure it is loaded from disk, from scratch
- dropKernelPageCache()
// Clear profile caches when possible.
// Benchmarks get faster over time as ART can create profiles for future
@@ -332,6 +330,15 @@
throw IllegalStateException("block never used for CompilationMode.None")
}
}
+ // drop app pages from page cache to ensure it is loaded from disk, from scratch
+
+ // resetAndCompile uses ProfileInstallReceiver to write a skip file.
+ // This is done to reduce the interference from ProfileInstaller,
+ // so long-running benchmarks don't get optimized due to a background dexopt.
+
+ // To restore the state of the process we need to drop app pages so its
+ // loaded from disk, from scratch.
+ dropKernelPageCache()
} else if (iteration == 0 && startupMode != null) {
try {
iteration = null // override to null for warmup, before starting measurements
diff --git a/benchmark/integration-tests/macrobenchmark-target/build.gradle b/benchmark/integration-tests/macrobenchmark-target/build.gradle
index eeca3ad..00866e4 100644
--- a/benchmark/integration-tests/macrobenchmark-target/build.gradle
+++ b/benchmark/integration-tests/macrobenchmark-target/build.gradle
@@ -39,5 +39,6 @@
implementation(project(":profileinstaller:profileinstaller"))
implementation(project(":recyclerview:recyclerview"))
implementation(project(":tracing:tracing-ktx"))
+ implementation(project(":tracing:tracing-perfetto"))
implementation(libs.material)
}
diff --git a/biometric/biometric-ktx/api/current.txt b/biometric/biometric-ktx/api/current.txt
index cda35b7..4b44a85 100644
--- a/biometric/biometric-ktx/api/current.txt
+++ b/biometric/biometric-ktx/api/current.txt
@@ -14,41 +14,41 @@
}
public final class Class2BiometricAuthExtensionsKt {
- method public static suspend Object? authenticate(androidx.biometric.auth.Class2BiometricAuthPrompt, androidx.biometric.auth.AuthPromptHost host, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method public static suspend Object? authenticateWithClass2Biometrics(androidx.fragment.app.FragmentActivity, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method public static suspend Object? authenticateWithClass2Biometrics(androidx.fragment.app.Fragment, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method public static suspend Object? authenticate(androidx.biometric.auth.Class2BiometricAuthPrompt, androidx.biometric.auth.AuthPromptHost host, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method public static suspend Object? authenticateWithClass2Biometrics(androidx.fragment.app.FragmentActivity, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method public static suspend Object? authenticateWithClass2Biometrics(androidx.fragment.app.Fragment, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
method public static androidx.biometric.auth.AuthPrompt startClass2BiometricAuthentication(androidx.fragment.app.FragmentActivity, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
method public static androidx.biometric.auth.AuthPrompt startClass2BiometricAuthentication(androidx.fragment.app.Fragment, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
}
public final class Class2BiometricOrCredentialAuthExtensionsKt {
- method public static suspend Object? authenticate(androidx.biometric.auth.Class2BiometricOrCredentialAuthPrompt, androidx.biometric.auth.AuthPromptHost host, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method public static suspend Object? authenticateWithClass2BiometricsOrCredentials(androidx.fragment.app.FragmentActivity, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method public static suspend Object? authenticateWithClass2BiometricsOrCredentials(androidx.fragment.app.Fragment, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method public static suspend Object? authenticate(androidx.biometric.auth.Class2BiometricOrCredentialAuthPrompt, androidx.biometric.auth.AuthPromptHost host, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method public static suspend Object? authenticateWithClass2BiometricsOrCredentials(androidx.fragment.app.FragmentActivity, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method public static suspend Object? authenticateWithClass2BiometricsOrCredentials(androidx.fragment.app.Fragment, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
method public static androidx.biometric.auth.AuthPrompt startClass2BiometricOrCredentialAuthentication(androidx.fragment.app.FragmentActivity, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
method public static androidx.biometric.auth.AuthPrompt startClass2BiometricOrCredentialAuthentication(androidx.fragment.app.Fragment, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
}
public final class Class3BiometricAuthExtensionsKt {
- method public static suspend Object? authenticate(androidx.biometric.auth.Class3BiometricAuthPrompt, androidx.biometric.auth.AuthPromptHost host, androidx.biometric.BiometricPrompt.CryptoObject? crypto, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method public static suspend Object? authenticate(androidx.biometric.auth.Class3BiometricAuthPrompt, androidx.biometric.auth.AuthPromptHost host, androidx.biometric.BiometricPrompt.CryptoObject? crypto, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
method public static androidx.biometric.auth.AuthPrompt authenticateWithClass3Biometrics(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
- method public static suspend Object? authenticateWithClass3Biometrics(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method public static suspend Object? authenticateWithClass3Biometrics(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
method public static androidx.biometric.auth.AuthPrompt authenticateWithClass3Biometrics(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
- method public static suspend Object? authenticateWithClass3Biometrics(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method public static suspend Object? authenticateWithClass3Biometrics(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
}
public final class Class3BiometricOrCredentialAuthExtensionsKt {
- method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticate(androidx.biometric.auth.Class3BiometricOrCredentialAuthPrompt, androidx.biometric.auth.AuthPromptHost host, androidx.biometric.BiometricPrompt.CryptoObject? crypto, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithClass3BiometricsOrCredentials(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithClass3BiometricsOrCredentials(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticate(androidx.biometric.auth.Class3BiometricOrCredentialAuthPrompt, androidx.biometric.auth.AuthPromptHost host, androidx.biometric.BiometricPrompt.CryptoObject? crypto, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithClass3BiometricsOrCredentials(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithClass3BiometricsOrCredentials(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
method @RequiresApi(android.os.Build.VERSION_CODES.R) public static androidx.biometric.auth.AuthPrompt startClass3BiometricOrCredentialAuthentication(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
method @RequiresApi(android.os.Build.VERSION_CODES.R) public static androidx.biometric.auth.AuthPrompt startClass3BiometricOrCredentialAuthentication(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
}
public final class CredentialAuthExtensionsKt {
- method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticate(androidx.biometric.auth.CredentialAuthPrompt, androidx.biometric.auth.AuthPromptHost host, androidx.biometric.BiometricPrompt.CryptoObject? crypto, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithCredentials(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? description, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithCredentials(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? description, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticate(androidx.biometric.auth.CredentialAuthPrompt, androidx.biometric.auth.AuthPromptHost host, androidx.biometric.BiometricPrompt.CryptoObject? crypto, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithCredentials(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? description, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithCredentials(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? description, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
method @RequiresApi(android.os.Build.VERSION_CODES.R) public static androidx.biometric.auth.AuthPrompt startCredentialAuthentication(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? description, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
method @RequiresApi(android.os.Build.VERSION_CODES.R) public static androidx.biometric.auth.AuthPrompt startCredentialAuthentication(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? description, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
}
diff --git a/biometric/biometric-ktx/api/public_plus_experimental_current.txt b/biometric/biometric-ktx/api/public_plus_experimental_current.txt
index cda35b7..4b44a85 100644
--- a/biometric/biometric-ktx/api/public_plus_experimental_current.txt
+++ b/biometric/biometric-ktx/api/public_plus_experimental_current.txt
@@ -14,41 +14,41 @@
}
public final class Class2BiometricAuthExtensionsKt {
- method public static suspend Object? authenticate(androidx.biometric.auth.Class2BiometricAuthPrompt, androidx.biometric.auth.AuthPromptHost host, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method public static suspend Object? authenticateWithClass2Biometrics(androidx.fragment.app.FragmentActivity, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method public static suspend Object? authenticateWithClass2Biometrics(androidx.fragment.app.Fragment, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method public static suspend Object? authenticate(androidx.biometric.auth.Class2BiometricAuthPrompt, androidx.biometric.auth.AuthPromptHost host, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method public static suspend Object? authenticateWithClass2Biometrics(androidx.fragment.app.FragmentActivity, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method public static suspend Object? authenticateWithClass2Biometrics(androidx.fragment.app.Fragment, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
method public static androidx.biometric.auth.AuthPrompt startClass2BiometricAuthentication(androidx.fragment.app.FragmentActivity, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
method public static androidx.biometric.auth.AuthPrompt startClass2BiometricAuthentication(androidx.fragment.app.Fragment, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
}
public final class Class2BiometricOrCredentialAuthExtensionsKt {
- method public static suspend Object? authenticate(androidx.biometric.auth.Class2BiometricOrCredentialAuthPrompt, androidx.biometric.auth.AuthPromptHost host, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method public static suspend Object? authenticateWithClass2BiometricsOrCredentials(androidx.fragment.app.FragmentActivity, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method public static suspend Object? authenticateWithClass2BiometricsOrCredentials(androidx.fragment.app.Fragment, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method public static suspend Object? authenticate(androidx.biometric.auth.Class2BiometricOrCredentialAuthPrompt, androidx.biometric.auth.AuthPromptHost host, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method public static suspend Object? authenticateWithClass2BiometricsOrCredentials(androidx.fragment.app.FragmentActivity, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method public static suspend Object? authenticateWithClass2BiometricsOrCredentials(androidx.fragment.app.Fragment, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
method public static androidx.biometric.auth.AuthPrompt startClass2BiometricOrCredentialAuthentication(androidx.fragment.app.FragmentActivity, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
method public static androidx.biometric.auth.AuthPrompt startClass2BiometricOrCredentialAuthentication(androidx.fragment.app.Fragment, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
}
public final class Class3BiometricAuthExtensionsKt {
- method public static suspend Object? authenticate(androidx.biometric.auth.Class3BiometricAuthPrompt, androidx.biometric.auth.AuthPromptHost host, androidx.biometric.BiometricPrompt.CryptoObject? crypto, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method public static suspend Object? authenticate(androidx.biometric.auth.Class3BiometricAuthPrompt, androidx.biometric.auth.AuthPromptHost host, androidx.biometric.BiometricPrompt.CryptoObject? crypto, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
method public static androidx.biometric.auth.AuthPrompt authenticateWithClass3Biometrics(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
- method public static suspend Object? authenticateWithClass3Biometrics(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method public static suspend Object? authenticateWithClass3Biometrics(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
method public static androidx.biometric.auth.AuthPrompt authenticateWithClass3Biometrics(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
- method public static suspend Object? authenticateWithClass3Biometrics(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method public static suspend Object? authenticateWithClass3Biometrics(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
}
public final class Class3BiometricOrCredentialAuthExtensionsKt {
- method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticate(androidx.biometric.auth.Class3BiometricOrCredentialAuthPrompt, androidx.biometric.auth.AuthPromptHost host, androidx.biometric.BiometricPrompt.CryptoObject? crypto, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithClass3BiometricsOrCredentials(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithClass3BiometricsOrCredentials(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticate(androidx.biometric.auth.Class3BiometricOrCredentialAuthPrompt, androidx.biometric.auth.AuthPromptHost host, androidx.biometric.BiometricPrompt.CryptoObject? crypto, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithClass3BiometricsOrCredentials(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithClass3BiometricsOrCredentials(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
method @RequiresApi(android.os.Build.VERSION_CODES.R) public static androidx.biometric.auth.AuthPrompt startClass3BiometricOrCredentialAuthentication(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
method @RequiresApi(android.os.Build.VERSION_CODES.R) public static androidx.biometric.auth.AuthPrompt startClass3BiometricOrCredentialAuthentication(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
}
public final class CredentialAuthExtensionsKt {
- method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticate(androidx.biometric.auth.CredentialAuthPrompt, androidx.biometric.auth.AuthPromptHost host, androidx.biometric.BiometricPrompt.CryptoObject? crypto, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithCredentials(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? description, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithCredentials(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? description, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticate(androidx.biometric.auth.CredentialAuthPrompt, androidx.biometric.auth.AuthPromptHost host, androidx.biometric.BiometricPrompt.CryptoObject? crypto, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithCredentials(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? description, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithCredentials(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? description, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
method @RequiresApi(android.os.Build.VERSION_CODES.R) public static androidx.biometric.auth.AuthPrompt startCredentialAuthentication(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? description, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
method @RequiresApi(android.os.Build.VERSION_CODES.R) public static androidx.biometric.auth.AuthPrompt startCredentialAuthentication(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? description, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
}
diff --git a/biometric/biometric-ktx/api/restricted_current.txt b/biometric/biometric-ktx/api/restricted_current.txt
index cda35b7..4b44a85 100644
--- a/biometric/biometric-ktx/api/restricted_current.txt
+++ b/biometric/biometric-ktx/api/restricted_current.txt
@@ -14,41 +14,41 @@
}
public final class Class2BiometricAuthExtensionsKt {
- method public static suspend Object? authenticate(androidx.biometric.auth.Class2BiometricAuthPrompt, androidx.biometric.auth.AuthPromptHost host, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method public static suspend Object? authenticateWithClass2Biometrics(androidx.fragment.app.FragmentActivity, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method public static suspend Object? authenticateWithClass2Biometrics(androidx.fragment.app.Fragment, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method public static suspend Object? authenticate(androidx.biometric.auth.Class2BiometricAuthPrompt, androidx.biometric.auth.AuthPromptHost host, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method public static suspend Object? authenticateWithClass2Biometrics(androidx.fragment.app.FragmentActivity, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method public static suspend Object? authenticateWithClass2Biometrics(androidx.fragment.app.Fragment, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
method public static androidx.biometric.auth.AuthPrompt startClass2BiometricAuthentication(androidx.fragment.app.FragmentActivity, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
method public static androidx.biometric.auth.AuthPrompt startClass2BiometricAuthentication(androidx.fragment.app.Fragment, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
}
public final class Class2BiometricOrCredentialAuthExtensionsKt {
- method public static suspend Object? authenticate(androidx.biometric.auth.Class2BiometricOrCredentialAuthPrompt, androidx.biometric.auth.AuthPromptHost host, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method public static suspend Object? authenticateWithClass2BiometricsOrCredentials(androidx.fragment.app.FragmentActivity, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method public static suspend Object? authenticateWithClass2BiometricsOrCredentials(androidx.fragment.app.Fragment, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method public static suspend Object? authenticate(androidx.biometric.auth.Class2BiometricOrCredentialAuthPrompt, androidx.biometric.auth.AuthPromptHost host, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method public static suspend Object? authenticateWithClass2BiometricsOrCredentials(androidx.fragment.app.FragmentActivity, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method public static suspend Object? authenticateWithClass2BiometricsOrCredentials(androidx.fragment.app.Fragment, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
method public static androidx.biometric.auth.AuthPrompt startClass2BiometricOrCredentialAuthentication(androidx.fragment.app.FragmentActivity, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
method public static androidx.biometric.auth.AuthPrompt startClass2BiometricOrCredentialAuthentication(androidx.fragment.app.Fragment, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
}
public final class Class3BiometricAuthExtensionsKt {
- method public static suspend Object? authenticate(androidx.biometric.auth.Class3BiometricAuthPrompt, androidx.biometric.auth.AuthPromptHost host, androidx.biometric.BiometricPrompt.CryptoObject? crypto, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method public static suspend Object? authenticate(androidx.biometric.auth.Class3BiometricAuthPrompt, androidx.biometric.auth.AuthPromptHost host, androidx.biometric.BiometricPrompt.CryptoObject? crypto, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
method public static androidx.biometric.auth.AuthPrompt authenticateWithClass3Biometrics(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
- method public static suspend Object? authenticateWithClass3Biometrics(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method public static suspend Object? authenticateWithClass3Biometrics(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
method public static androidx.biometric.auth.AuthPrompt authenticateWithClass3Biometrics(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
- method public static suspend Object? authenticateWithClass3Biometrics(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method public static suspend Object? authenticateWithClass3Biometrics(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, CharSequence negativeButtonText, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
}
public final class Class3BiometricOrCredentialAuthExtensionsKt {
- method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticate(androidx.biometric.auth.Class3BiometricOrCredentialAuthPrompt, androidx.biometric.auth.AuthPromptHost host, androidx.biometric.BiometricPrompt.CryptoObject? crypto, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithClass3BiometricsOrCredentials(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithClass3BiometricsOrCredentials(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticate(androidx.biometric.auth.Class3BiometricOrCredentialAuthPrompt, androidx.biometric.auth.AuthPromptHost host, androidx.biometric.BiometricPrompt.CryptoObject? crypto, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithClass3BiometricsOrCredentials(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithClass3BiometricsOrCredentials(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
method @RequiresApi(android.os.Build.VERSION_CODES.R) public static androidx.biometric.auth.AuthPrompt startClass3BiometricOrCredentialAuthentication(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
method @RequiresApi(android.os.Build.VERSION_CODES.R) public static androidx.biometric.auth.AuthPrompt startClass3BiometricOrCredentialAuthentication(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? subtitle, optional CharSequence? description, optional boolean confirmationRequired, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
}
public final class CredentialAuthExtensionsKt {
- method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticate(androidx.biometric.auth.CredentialAuthPrompt, androidx.biometric.auth.AuthPromptHost host, androidx.biometric.BiometricPrompt.CryptoObject? crypto, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithCredentials(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? description, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
- method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithCredentials(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? description, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult> p);
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticate(androidx.biometric.auth.CredentialAuthPrompt, androidx.biometric.auth.AuthPromptHost host, androidx.biometric.BiometricPrompt.CryptoObject? crypto, kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithCredentials(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? description, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public static suspend Object? authenticateWithCredentials(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? description, optional kotlin.coroutines.Continuation<? super androidx.biometric.BiometricPrompt.AuthenticationResult>);
method @RequiresApi(android.os.Build.VERSION_CODES.R) public static androidx.biometric.auth.AuthPrompt startCredentialAuthentication(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? description, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
method @RequiresApi(android.os.Build.VERSION_CODES.R) public static androidx.biometric.auth.AuthPrompt startCredentialAuthentication(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.CryptoObject? crypto, CharSequence title, optional CharSequence? description, optional java.util.concurrent.Executor? executor, androidx.biometric.auth.AuthPromptCallback callback);
}
diff --git a/biometric/biometric/src/test/java/androidx/biometric/BiometricManagerTest.java b/biometric/biometric/src/test/java/androidx/biometric/BiometricManagerTest.java
index 5f22b16..9372b301 100644
--- a/biometric/biometric/src/test/java/androidx/biometric/BiometricManagerTest.java
+++ b/biometric/biometric/src/test/java/androidx/biometric/BiometricManagerTest.java
@@ -65,9 +65,14 @@
@Config(minSdk = Build.VERSION_CODES.Q)
@RequiresApi(Build.VERSION_CODES.Q)
public void testCanAuthenticate_ReturnsSuccess_WhenManagerReturnsSuccess_OnApi29AndAbove() {
+ final int authenticators = Authenticators.BIOMETRIC_WEAK;
final android.hardware.biometrics.BiometricManager frameworkBiometricManager =
mock(android.hardware.biometrics.BiometricManager.class);
when(frameworkBiometricManager.canAuthenticate()).thenReturn(BIOMETRIC_SUCCESS);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
+ when(frameworkBiometricManager.canAuthenticate(authenticators))
+ .thenReturn(BIOMETRIC_SUCCESS);
+ }
when(mFingerprintManager.isHardwareDetected()).thenReturn(false);
when(mFingerprintManager.hasEnrolledFingerprints()).thenReturn(false);
@@ -80,17 +85,21 @@
.setFingerprintHardwarePresent(true)
.build());
- final int authenticators = Authenticators.BIOMETRIC_WEAK;
assertThat(biometricManager.canAuthenticate(authenticators)).isEqualTo(BIOMETRIC_SUCCESS);
}
@Test
- @Config(minSdk = Build.VERSION_CODES.Q, maxSdk = 29)
+ @Config(minSdk = Build.VERSION_CODES.Q)
@RequiresApi(Build.VERSION_CODES.Q)
public void testCanAuthenticate_ReturnsError_WhenManagerReturnsNoneEnrolled_OnApi29AndAbove() {
+ final int authenticators = Authenticators.BIOMETRIC_WEAK;
final android.hardware.biometrics.BiometricManager frameworkBiometricManager =
mock(android.hardware.biometrics.BiometricManager.class);
when(frameworkBiometricManager.canAuthenticate()).thenReturn(BIOMETRIC_ERROR_NONE_ENROLLED);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
+ when(frameworkBiometricManager.canAuthenticate(authenticators))
+ .thenReturn(BIOMETRIC_ERROR_NONE_ENROLLED);
+ }
when(mFingerprintManager.isHardwareDetected()).thenReturn(true);
when(mFingerprintManager.hasEnrolledFingerprints()).thenReturn(true);
@@ -103,18 +112,22 @@
.setFingerprintHardwarePresent(true)
.build());
- final int authenticators = Authenticators.BIOMETRIC_WEAK;
assertThat(biometricManager.canAuthenticate(authenticators))
.isEqualTo(BIOMETRIC_ERROR_NONE_ENROLLED);
}
@Test
- @Config(minSdk = Build.VERSION_CODES.Q, maxSdk = 29)
+ @Config(minSdk = Build.VERSION_CODES.Q)
@RequiresApi(Build.VERSION_CODES.Q)
public void testCanAuthenticate_ReturnsError_WhenManagerReturnsNoHardware_OnApi29AndAbove() {
+ final int authenticators = Authenticators.BIOMETRIC_WEAK;
final android.hardware.biometrics.BiometricManager frameworkBiometricManager =
mock(android.hardware.biometrics.BiometricManager.class);
when(frameworkBiometricManager.canAuthenticate()).thenReturn(BIOMETRIC_ERROR_NO_HARDWARE);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
+ when(frameworkBiometricManager.canAuthenticate(authenticators))
+ .thenReturn(BIOMETRIC_ERROR_NO_HARDWARE);
+ }
when(mFingerprintManager.isHardwareDetected()).thenReturn(true);
when(mFingerprintManager.hasEnrolledFingerprints()).thenReturn(true);
@@ -127,7 +140,6 @@
.setFingerprintHardwarePresent(true)
.build());
- final int authenticators = Authenticators.BIOMETRIC_WEAK;
assertThat(biometricManager.canAuthenticate(authenticators))
.isEqualTo(BIOMETRIC_ERROR_NO_HARDWARE);
}
diff --git a/browser/browser/api/api_lint.ignore b/browser/browser/api/api_lint.ignore
index 56b3ce2..6ec579a 100644
--- a/browser/browser/api/api_lint.ignore
+++ b/browser/browser/api/api_lint.ignore
@@ -95,6 +95,20 @@
Intent action constant name must be ACTION_FOO: KEY_ACTION
+InvalidNullability: androidx.browser.customtabs.CustomTabsServiceConnection#onServiceConnected(android.content.ComponentName, android.os.IBinder) parameter #0:
+ Invalid nullability on parameter `name` in method `onServiceConnected`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.browser.customtabs.CustomTabsServiceConnection#onServiceConnected(android.content.ComponentName, android.os.IBinder) parameter #1:
+ Invalid nullability on parameter `service` in method `onServiceConnected`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.browser.customtabs.PostMessageServiceConnection#onServiceConnected(android.content.ComponentName, android.os.IBinder) parameter #0:
+ Invalid nullability on parameter `name` in method `onServiceConnected`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.browser.customtabs.PostMessageServiceConnection#onServiceConnected(android.content.ComponentName, android.os.IBinder) parameter #1:
+ Invalid nullability on parameter `service` in method `onServiceConnected`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.browser.customtabs.PostMessageServiceConnection#onServiceDisconnected(android.content.ComponentName) parameter #0:
+ Invalid nullability on parameter `name` in method `onServiceDisconnected`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.browser.trusted.TrustedWebActivityService#onBind(android.content.Intent):
+ Invalid nullability on method `onBind` return. Overrides of unannotated super method cannot be Nullable.
+
+
ListenerLast: androidx.browser.customtabs.CustomTabsClient#newSession(androidx.browser.customtabs.CustomTabsCallback, int) parameter #1:
Listeners should always be at end of argument list (method `newSession`)
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/LintConfiguration.kt b/buildSrc/private/src/main/kotlin/androidx/build/LintConfiguration.kt
index f58237b..564b0a8 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/LintConfiguration.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/LintConfiguration.kt
@@ -19,36 +19,18 @@
import androidx.build.dependencyTracker.AffectedModuleDetector
import com.android.build.api.dsl.Lint
import com.android.build.gradle.internal.lint.AndroidLintAnalysisTask
-import com.android.build.gradle.internal.lint.AndroidLintTextOutputTask
-import com.google.common.io.Files
import java.io.File
import java.util.Locale
-import org.gradle.api.DefaultTask
import org.gradle.api.Project
-import org.gradle.api.file.RegularFileProperty
import org.gradle.api.services.BuildService
import org.gradle.api.services.BuildServiceParameters
-import org.gradle.api.tasks.InputFiles
-import org.gradle.api.tasks.OutputFile
-import org.gradle.api.tasks.TaskAction
import org.gradle.kotlin.dsl.getByType
/**
- * Setting this property means that lint will update lint-baseline.xml if it exists.
- */
-private const val UPDATE_LINT_BASELINE = "updateLintBaseline"
-
-/**
* Name of the service we use to limit the number of concurrent executions of lint
*/
public const val LINT_SERVICE_NAME = "androidxLintService"
-/**
- * Property used by Lint to continue creating baselines without failing lint, normally set by:
- * -Dlint.baselines.continue=true from command line.
- */
-private const val LINT_BASELINE_CONTINUE = "lint.baselines.continue"
-
// service for limiting the number of concurrent lint tasks
interface AndroidXLintService : BuildService<BuildServiceParameters.None>
@@ -168,44 +150,16 @@
// it contains expected violations that we do not want to trigger a build failure
val isTestingLintItself = (project.path == ":lint-checks:integration-tests")
- // If -PupdateLintBaseline was set we should update the baseline if it exists
- val updateLintBaseline = project.providers.gradleProperty(UPDATE_LINT_BASELINE).isPresent &&
- !isTestingLintItself
-
lint.apply {
// Skip lintVital tasks on assemble. We explicitly run lintRelease for libraries.
checkReleaseBuilds = false
}
- // task to copy autogenerated baselines back into the source tree
- val replaceLintBaselineTask = project.tasks.register(
- "replaceLintBaseline",
- UpdateBaselineTask::class.java,
- ) { copyTask ->
- copyTask.source.set(generatedLintBaseline)
- copyTask.dest.set(lintBaseline)
- }
-
- val projectGeneratedLintBaseline = generatedLintBaseline
-
tasks.withType(AndroidLintAnalysisTask::class.java).configureEach { task ->
// don't run too many copies of lint at once due to memory limitations
task.usesService(
task.project.gradle.sharedServices.registrations.getByName(LINT_SERVICE_NAME).service
)
- if (updateLintBaseline) {
- // Remove the generated baseline before running lint, so that lint won't try to use it
- task.doFirst {
- if (projectGeneratedLintBaseline.exists()) {
- projectGeneratedLintBaseline.delete()
- }
- }
- }
- }
- tasks.withType(AndroidLintTextOutputTask::class.java).configureEach { task ->
- if (updateLintBaseline) {
- task.finalizedBy(replaceLintBaselineTask)
- }
}
// Lint is configured entirely in finalizeDsl so that individual projects cannot easily
@@ -326,17 +280,6 @@
lintConfig = File(project.getSupportRootFolder(), lintXmlPath)
}
- // Ideally, teams aren't able to add new violations to a baseline file; they should only
- // be able to burn down existing violations. That's hard to enforce, though, so we'll
- // generally allow teams to update their baseline files with a publicly-known flag.
- if (updateLintBaseline) {
- // Continue generating baselines regardless of errors.
- abortOnError = false
-
- // Avoid printing every single lint error to the terminal.
- textReport = false
- }
-
val lintBaselineFile = lintBaseline.get().asFile
// If we give lint the filepath of a baseline file, then:
// If the file does not exist, lint will write new violations to it
@@ -347,9 +290,7 @@
// If we're not updating the baselines, then we want lint to check for new errors.
// This requires us only pass a baseline to lint if one already exists.
- if (updateLintBaseline) {
- baseline = generatedLintBaseline
- } else if (lintBaselineFile.exists()) {
+ if (lintBaselineFile.exists()) {
baseline = lintBaselineFile
}
}
@@ -357,50 +298,3 @@
val Project.lintBaseline get() =
project.objects.fileProperty().fileValue(File(projectDir, "/lint-baseline.xml"))
-val Project.generatedLintBaseline get() = File(project.buildDir, "/generated-lint-baseline.xml")
-
-/**
- * Task that copies the generated line baseline
- * If an input baseline file has no issues, it is considered to be nonexistent
- */
-abstract class UpdateBaselineTask : DefaultTask() {
- @get:InputFiles // allows missing input file
- abstract val source: RegularFileProperty
-
- @get:OutputFile
- abstract val dest: RegularFileProperty
-
- @TaskAction
- fun copyBaseline() {
- val source = source.get().asFile
- val dest = dest.get().asFile
- val sourceText = if (source.exists()) {
- source.readText()
- } else {
- ""
- }
- var sourceHasIssues =
- if (source.exists()) {
- // Does the baseline contain any issues?
- source.reader().useLines { lines ->
- lines.any { line ->
- line.endsWith("<issue")
- }
- }
- } else {
- false
- }
- val destNonempty = dest.exists()
- val changing = (sourceHasIssues != destNonempty) ||
- (sourceHasIssues && sourceText != dest.readText())
- if (changing) {
- if (sourceHasIssues) {
- Files.copy(source, dest)
- println("Updated baseline file ${dest.path}")
- } else {
- dest.delete()
- println("Deleted baseline file ${dest.path}")
- }
- }
- }
-}
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/metalava/MetalavaRunner.kt b/buildSrc/private/src/main/kotlin/androidx/build/metalava/MetalavaRunner.kt
index 83e8fa4..b2f8473 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/metalava/MetalavaRunner.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/metalava/MetalavaRunner.kt
@@ -198,9 +198,11 @@
workerExecutor: WorkerExecutor,
pathToManifest: String? = null
) {
+ // API lint runs on the experimental pass, which also includes public API. This means API lint
+ // can safely be skipped on the public pass.
generateApi(
metalavaClasspath, files.bootClasspath, files.dependencyClasspath, files.sourcePaths.files,
- apiLocation, GenerateApiMode.PublicApi, apiLintMode, workerExecutor, pathToManifest
+ apiLocation, GenerateApiMode.PublicApi, ApiLintMode.Skip, workerExecutor, pathToManifest
)
generateApi(
metalavaClasspath, files.bootClasspath, files.dependencyClasspath, files.sourcePaths.files,
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 722b8f7..cba832b 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/uptodatedness/TaskUpToDateValidator.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/uptodatedness/TaskUpToDateValidator.kt
@@ -189,6 +189,8 @@
// We should be able to remove these entries when b/160392650 is fixed
"lint",
"lintAnalyzeDebug",
+ "lintBundledDebug",
+ "lintUnbundledDebug",
"lintDebug",
"lintVitalDebug",
"lintWithExpandProjectionDebug",
@@ -207,6 +209,10 @@
"lintAnalyzeWithKspDebug",
"lintReportTargetSdk29Debug",
"lintAnalyzeTargetSdk29Debug",
+ "lintReportBundledDebug",
+ "lintAnalyzeBundledDebug",
+ "lintReportUnbundledDebug",
+ "lintAnalyzeUnbundledDebug",
"lintReportTargetSdk30Debug",
"lintAnalyzeTargetSdk30Debug",
"lintReportTargetSdkLatestDebug",
diff --git a/busytown/androidx_incremental.sh b/busytown/androidx_incremental.sh
index 1a4697d..44bc158 100755
--- a/busytown/androidx_incremental.sh
+++ b/busytown/androidx_incremental.sh
@@ -39,15 +39,6 @@
}
hashOutDir
-# diagnostics to hopefully help us figure out b/188565660
-function zipKotlinMetadata() {
- zipFile=kotlinMetadata.zip
- echo "zipping kotlin metadata"
- rm -f "$DIST_DIR/$zipFile"
- (cd $OUT_DIR && find -name "*kotlin_module" | xargs zip -q -u "$DIST_DIR/$zipFile")
- echo done zipping kotlin metadata
-}
-
# If we encounter a failure in postsubmit, we try a few things to determine if the failure is
# reproducible
DIAGNOSE_ARG=""
@@ -62,7 +53,6 @@
echo build succeeded
EXIT_VALUE=0
else
- zipKotlinMetadata
echo build failed
EXIT_VALUE=1
fi
diff --git a/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/CameraControlAdapter.kt b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/CameraControlAdapter.kt
index d67471a..97d2902 100644
--- a/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/CameraControlAdapter.kt
+++ b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/CameraControlAdapter.kt
@@ -20,6 +20,7 @@
import android.graphics.Rect
import android.hardware.camera2.CameraCharacteristics
import android.util.Rational
+import android.util.Size
import androidx.annotation.RequiresApi
import androidx.arch.core.util.Function
import androidx.camera.camera2.pipe.CameraPipe
@@ -155,6 +156,10 @@
evCompControl.updateAsync(exposure).asListenableFuture()
)
+ override fun addZslConfig(resolution: Size, sessionConfigBuilder: SessionConfig.Builder) {
+ // Override if Zero-Shutter Lag needs to add config to session config.
+ }
+
override fun submitStillCaptureRequests(
captureConfigs: List<CaptureConfig>,
captureMode: Int,
diff --git a/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/CameraInfoAdapter.kt b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/CameraInfoAdapter.kt
index 2fd1e33..407e789 100644
--- a/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/CameraInfoAdapter.kt
+++ b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/adapter/CameraInfoAdapter.kt
@@ -120,4 +120,14 @@
Log.warn { "TODO: isFocusAndMeteringSupported are not yet supported." }
return false
}
+
+ override fun isYuvReprocessingSupported(): Boolean {
+ Log.warn { "TODO: isYuvReprocessingSupported are not yet supported." }
+ return false
+ }
+
+ override fun isPrivateReprocessingSupported(): Boolean {
+ Log.warn { "TODO: isPrivateReprocessingSupported are not yet supported." }
+ return false
+ }
}
\ No newline at end of file
diff --git a/camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/internal/ProcessingCaptureSessionTest.kt b/camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/internal/ProcessingCaptureSessionTest.kt
index e631b70..63e8f47 100644
--- a/camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/internal/ProcessingCaptureSessionTest.kt
+++ b/camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/internal/ProcessingCaptureSessionTest.kt
@@ -22,8 +22,10 @@
import android.graphics.ImageFormat.YUV_420_888
import android.graphics.SurfaceTexture
import android.hardware.camera2.CameraCaptureSession
+import android.hardware.camera2.CameraCaptureSession.CaptureCallback
import android.hardware.camera2.CameraDevice
import android.hardware.camera2.CaptureRequest
+import android.hardware.camera2.TotalCaptureResult
import android.media.ImageReader
import android.media.ImageWriter
import android.os.Build
@@ -53,6 +55,7 @@
import androidx.camera.core.impl.SessionConfig
import androidx.camera.core.impl.SessionProcessor
import androidx.camera.core.impl.SessionProcessorSurface
+import androidx.camera.core.impl.TagBundle
import androidx.camera.core.impl.utils.executor.CameraXExecutors
import androidx.camera.testing.CameraUtil
import androidx.camera.testing.CameraUtil.CameraDeviceHolder
@@ -237,7 +240,7 @@
).awaitWithTimeout(3000)
// Assert
- sessionConfigParameters.assertRepeatingRequestCompleted()
+ sessionConfigParameters.assertRepeatingRequestCompletedWithTags()
sessionConfigParameters.assertPreviewImageReceived()
val parametersConfigSet = sessionProcessor.assertSetParametersInvoked()
@@ -264,7 +267,7 @@
sessionConfigParameters.getActiveSessionConfigForRepeating()
// Assert
- sessionConfigParameters.assertRepeatingRequestCompleted()
+ sessionConfigParameters.assertRepeatingRequestCompletedWithTags()
sessionConfigParameters.assertPreviewImageReceived()
val parametersConfigSet = sessionProcessor.assertSetParametersInvoked()
@@ -760,10 +763,14 @@
private var previewImageReader: ImageReader? = null
private var captureImageReader: ImageReader
private val sessionConfigured = CompletableDeferred<Unit>()
- private val repeatingRequestCompleted = CompletableDeferred<Unit>()
+ private val repeatingRequestCompletedWithTags = CompletableDeferred<Unit>()
private val previewImageReady = CompletableDeferred<Unit>()
private val captureImageReady = CompletableDeferred<Unit>()
private val stillCaptureCompleted = CompletableDeferred<Unit>()
+ private val tagKey1 = "KEY1"
+ private val tagKey2 = "KEY2"
+ private val tagValue1 = "Value1"
+ private val tagValue2 = 99
init {
// Preview
@@ -850,11 +857,27 @@
CaptureRequest.CONTROL_AF_MODE_OFF
).build()
)
- addRepeatingCameraCaptureCallback(object : CameraCaptureCallback() {
- override fun onCaptureCompleted(cameraCaptureResult: CameraCaptureResult) {
- repeatingRequestCompleted.complete(Unit)
- }
- })
+ addRepeatingCameraCaptureCallback(
+ CaptureCallbackContainer.create(object : CaptureCallback() {
+ override fun onCaptureCompleted(
+ session: CameraCaptureSession,
+ request: CaptureRequest,
+ result: TotalCaptureResult
+ ) {
+ if (request.tag !is TagBundle) {
+ return
+ }
+
+ val tagBundle = request.tag as TagBundle
+ if (tagBundle.getTag(tagKey1)!! == tagValue1 &&
+ tagBundle.getTag(tagKey2)!! == tagValue2
+ ) {
+ repeatingRequestCompletedWithTags.complete(Unit)
+ }
+ }
+ }))
+ addTag(tagKey1, tagValue1)
+ addTag(tagKey2, tagValue2)
}.build()
}
@@ -888,8 +911,8 @@
sessionConfigured.awaitWithTimeout(3000)
}
- suspend fun assertRepeatingRequestCompleted() {
- repeatingRequestCompleted.awaitWithTimeout(3000)
+ suspend fun assertRepeatingRequestCompletedWithTags() {
+ repeatingRequestCompletedWithTags.awaitWithTimeout(3000)
}
suspend fun assertPreviewImageReceived() {
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 d43b9c8..b30d021 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
@@ -27,8 +27,10 @@
import android.hardware.camera2.CameraDevice;
import android.hardware.camera2.CaptureRequest;
import android.hardware.camera2.TotalCaptureResult;
+import android.os.Build;
import android.util.ArrayMap;
import android.util.Rational;
+import android.util.Size;
import androidx.annotation.GuardedBy;
import androidx.annotation.NonNull;
@@ -124,6 +126,7 @@
private final ZoomControl mZoomControl;
private final TorchControl mTorchControl;
private final ExposureControl mExposureControl;
+ private final ZslControl mZslControl;
private final Camera2CameraControl mCamera2CameraControl;
private final Camera2CapturePipeline mCamera2CapturePipeline;
@GuardedBy("mLock")
@@ -194,6 +197,11 @@
this, scheduler, mExecutor, cameraQuirks);
mZoomControl = new ZoomControl(this, mCameraCharacteristics, mExecutor);
mTorchControl = new TorchControl(this, mCameraCharacteristics, mExecutor);
+ if (Build.VERSION.SDK_INT >= 23) {
+ mZslControl = new ZslControlImpl(mCameraCharacteristics);
+ } else {
+ mZslControl = new ZslControlNoOpImpl();
+ }
// Workarounds
mAeFpsRange = new AeFpsRange(cameraQuirks);
@@ -261,6 +269,11 @@
}
@NonNull
+ public ZslControl getZslControl() {
+ return mZslControl;
+ }
+
+ @NonNull
public Camera2CameraControl getCamera2CameraControl() {
return mCamera2CameraControl;
}
@@ -370,6 +383,12 @@
mFlashModeChangeSessionUpdateFuture = updateSessionConfigAsync();
}
+ @Override
+ public void addZslConfig(@NonNull Size resolution,
+ @NonNull SessionConfig.Builder sessionConfigBuilder) {
+ mZslControl.addZslConfig(resolution, sessionConfigBuilder);
+ }
+
/** {@inheritDoc} */
@Override
@NonNull
diff --git a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CameraInfoImpl.java b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CameraInfoImpl.java
index af3c55e..66ba1a9 100644
--- a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CameraInfoImpl.java
+++ b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2CameraInfoImpl.java
@@ -16,6 +16,11 @@
package androidx.camera.camera2.internal;
+import static android.hardware.camera2.CameraMetadata.REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING;
+import static android.hardware.camera2.CameraMetadata.REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING;
+
+import static androidx.camera.camera2.internal.ZslUtil.isCapabilitySupported;
+
import android.hardware.camera2.CameraCharacteristics;
import android.hardware.camera2.CameraMetadata;
import android.util.Pair;
@@ -348,6 +353,18 @@
}
}
+ @Override
+ public boolean isYuvReprocessingSupported() {
+ return isCapabilitySupported(mCameraCharacteristicsCompat,
+ REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING);
+ }
+
+ @Override
+ public boolean isPrivateReprocessingSupported() {
+ return isCapabilitySupported(mCameraCharacteristicsCompat,
+ REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING);
+ }
+
/** {@inheritDoc} */
@NonNull
@Override
diff --git a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2RequestProcessor.java b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2RequestProcessor.java
index fc1dd9c..20c9794 100644
--- a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2RequestProcessor.java
+++ b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2RequestProcessor.java
@@ -27,12 +27,14 @@
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.camera.core.Logger;
+import androidx.camera.core.impl.CameraCaptureCallback;
import androidx.camera.core.impl.CameraCaptureFailure;
import androidx.camera.core.impl.CaptureConfig;
import androidx.camera.core.impl.DeferrableSurface;
import androidx.camera.core.impl.RequestProcessor;
import androidx.camera.core.impl.SessionConfig;
import androidx.camera.core.impl.SessionProcessorSurface;
+import androidx.camera.core.impl.TagBundle;
import androidx.core.util.Preconditions;
import java.util.ArrayList;
@@ -60,9 +62,13 @@
@RequiresApi(21) // TODO(b/200306659): Remove and replace with annotation on package-info.java
public class Camera2RequestProcessor implements RequestProcessor {
private static final String TAG = "Camera2RequestProcessor";
+ @NonNull
private final CaptureSession mCaptureSession;
+ @NonNull
private final List<SessionProcessorSurface> mProcessorSurfaces;
private volatile boolean mIsClosed = false;
+ @Nullable
+ private volatile SessionConfig mSessionConfig;
public Camera2RequestProcessor(@NonNull CaptureSession captureSession,
@NonNull List<SessionProcessorSurface> processorSurfaces) {
@@ -79,6 +85,14 @@
mIsClosed = true;
}
+ /**
+ * Update the SessionConfig to get the tags and the capture callback attached to the
+ * repeating request.
+ */
+ public void updateSessionConfig(@Nullable SessionConfig sessionConfig) {
+ mSessionConfig = sessionConfig;
+ }
+
private boolean areRequestsValid(@NonNull List<RequestProcessor.Request> requests) {
for (Request request : requests) {
if (!isRequestValid(request)) {
@@ -154,7 +168,22 @@
sessionConfigBuilder.setTemplateType(request.getTemplateId());
sessionConfigBuilder.setImplementationOptions(request.getParameters());
sessionConfigBuilder.addCameraCaptureCallback(CaptureCallbackContainer.create(
- new Camera2CallbackWrapper(request, callback, true)));
+ new Camera2CallbackWrapper(request, callback, true)));
+
+ if (mSessionConfig != null) {
+ // Attach the CameraX camera capture callback so that CameraControl can get the capture
+ // results it needs.
+ for (CameraCaptureCallback cameraCaptureCallback :
+ mSessionConfig.getRepeatingCameraCaptureCallbacks()) {
+ sessionConfigBuilder.addCameraCaptureCallback(cameraCaptureCallback);
+ }
+
+ // Set the tag (key, value) from CameraX.
+ TagBundle tagBundle = mSessionConfig.getRepeatingCaptureConfig().getTagBundle();
+ for (String key : tagBundle.listKeys()) {
+ sessionConfigBuilder.addTag(key, tagBundle.getTag(key));
+ }
+ }
for (Integer outputConfigId : request.getTargetOutputConfigIds()) {
sessionConfigBuilder.addSurface(findSurface(outputConfigId));
diff --git a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/ProcessingCaptureSession.java b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/ProcessingCaptureSession.java
index 2d40296..203c4dc 100644
--- a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/ProcessingCaptureSession.java
+++ b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/ProcessingCaptureSession.java
@@ -67,11 +67,7 @@
* (1) Target surfaces specified in {@link #setSessionConfig} and
* {@link #issueCaptureRequests(List)} are ignored. Target surfaces can only be set by
* {@link SessionProcessor}.
- * (2) After {@link #setSessionConfig(SessionConfig)} is invoked,
- * {@link SessionConfig#getRepeatingCameraCaptureCallbacks()} will be invoked but the
- * {@link CameraCaptureResult} doesn't contain camera2
- * {@link android.hardware.camera2.CaptureResult}.
- * (3) {@link #issueCaptureRequests(List)} can only execute {@link CaptureConfig} with
+ * (2) {@link #issueCaptureRequests(List)} can only execute {@link CaptureConfig} with
* CameraDevice.TEMPLATE_STILL_CAPTURE. Others captureConfigs will be cancelled immediately.
* {@link CaptureConfig#getCameraCaptureCallbacks()} will be invoked but the
* {@link CameraCaptureResult} doesn't contain camera2
@@ -531,8 +527,9 @@
return;
}
- mSessionProcessorCaptureCallback
- .setCameraCaptureCallbacks(sessionConfig.getRepeatingCameraCaptureCallbacks());
+ if (mRequestProcessor != null) {
+ mRequestProcessor.updateSessionConfig(sessionConfig);
+ }
if (mProcessorState == ProcessorState.ON_CAPTURE_SESSION_STARTED) {
mSessionOptions =
diff --git a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/ZslControl.java b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/ZslControl.java
new file mode 100644
index 0000000..2f2c082
--- /dev/null
+++ b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/ZslControl.java
@@ -0,0 +1,37 @@
+/*
+ * 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.camera.camera2.internal;
+
+import android.util.Size;
+
+import androidx.annotation.NonNull;
+import androidx.camera.core.impl.SessionConfig;
+
+/**
+ * Interface for Zero-Shutter Lag image capture control.
+ */
+interface ZslControl {
+
+ /**
+ * Add zero-shutter lag config to {@link SessionConfig}.
+ * @param resolution surface resolution.
+ * @param sessionConfigBuilder session config builder.
+ */
+ void addZslConfig(
+ @NonNull Size resolution,
+ @NonNull SessionConfig.Builder sessionConfigBuilder);
+}
diff --git a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/ZslControlImpl.java b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/ZslControlImpl.java
new file mode 100644
index 0000000..208261c
--- /dev/null
+++ b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/ZslControlImpl.java
@@ -0,0 +1,200 @@
+/*
+ * 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.camera.camera2.internal;
+
+import static android.hardware.camera2.CameraMetadata.REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING;
+import static android.hardware.camera2.CameraMetadata.REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING;
+
+import static androidx.camera.camera2.internal.ZslUtil.isCapabilitySupported;
+
+import android.graphics.ImageFormat;
+import android.hardware.camera2.CameraCaptureSession;
+import android.hardware.camera2.CaptureResult;
+import android.hardware.camera2.TotalCaptureResult;
+import android.hardware.camera2.params.InputConfiguration;
+import android.media.ImageWriter;
+import android.util.Size;
+import android.view.Surface;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.RequiresApi;
+import androidx.camera.camera2.internal.compat.CameraCharacteristicsCompat;
+import androidx.camera.core.ImageProxy;
+import androidx.camera.core.ImageReaderProxys;
+import androidx.camera.core.SafeCloseImageReaderProxy;
+import androidx.camera.core.impl.CameraCaptureCallback;
+import androidx.camera.core.impl.CameraCaptureResult;
+import androidx.camera.core.impl.DeferrableSurface;
+import androidx.camera.core.impl.ImmediateSurface;
+import androidx.camera.core.impl.SessionConfig;
+import androidx.camera.core.impl.utils.executor.CameraXExecutors;
+import androidx.camera.core.internal.compat.ImageWriterCompat;
+
+import java.util.LinkedList;
+import java.util.Queue;
+
+/**
+ * Implementation for {@link ZslControl}.
+ */
+@RequiresApi(23)
+final class ZslControlImpl implements ZslControl {
+
+ @SuppressWarnings("WeakerAccess") /* synthetic accessor */
+ private static final int MAX_IMAGES = 2;
+
+ @SuppressWarnings("WeakerAccess")
+ @NonNull
+ final Queue<ImageProxy> mImageRingBuffer = new LinkedList<>();
+
+ @SuppressWarnings("WeakerAccess")
+ @NonNull
+ final Queue<TotalCaptureResult> mTotalCaptureResultRingBuffer = new LinkedList<>();
+
+ private boolean mIsYuvReprocessingSupported = false;
+ private boolean mIsPrivateReprocessingSupported = false;
+
+ @SuppressWarnings("WeakerAccess")
+ SafeCloseImageReaderProxy mReprocessingImageReader;
+ private DeferrableSurface mReprocessingImageDeferrableSurface;
+
+ @Nullable
+ ImageWriter mReprocessingImageWriter;
+
+ ZslControlImpl(@NonNull CameraCharacteristicsCompat cameraCharacteristicsCompat) {
+ mIsYuvReprocessingSupported =
+ isCapabilitySupported(cameraCharacteristicsCompat,
+ REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING);
+ mIsPrivateReprocessingSupported =
+ isCapabilitySupported(cameraCharacteristicsCompat,
+ REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING);
+ }
+
+
+ @Override
+ public void addZslConfig(
+ @NonNull Size resolution,
+ @NonNull SessionConfig.Builder sessionConfigBuilder) {
+ if (!mIsYuvReprocessingSupported && !mIsPrivateReprocessingSupported) {
+ return;
+ }
+
+ cleanup();
+
+ // Init the reprocessing image reader and enqueue available images into the ring buffer.
+ // TODO(b/226683183): Decide whether YUV or PRIVATE reprocessing should be the default.
+ int reprocessingImageFormat = mIsYuvReprocessingSupported
+ ? ImageFormat.YUV_420_888 : ImageFormat.PRIVATE;
+
+ mReprocessingImageReader =
+ new SafeCloseImageReaderProxy(
+ ImageReaderProxys.createIsolatedReader(
+ resolution.getWidth(),
+ resolution.getHeight(),
+ reprocessingImageFormat,
+ // TODO(226675509): Replace with RingBuffer interfaces and set the
+ // appropriate value based on RingBuffer capacity.
+ MAX_IMAGES));
+ mReprocessingImageReader.setOnImageAvailableListener(
+ imageReader -> {
+ ImageProxy imageProxy = imageReader.acquireLatestImage();
+ if (imageProxy != null) {
+ // TODO(226675509): Replace with RingBuffer interfaces and close the
+ // image if over capacity.
+ mImageRingBuffer.add(imageProxy);
+ }
+ }, CameraXExecutors.ioExecutor());
+
+ // Init the reprocessing image reader surface and add into the target surfaces of capture
+ mReprocessingImageDeferrableSurface = new ImmediateSurface(
+ mReprocessingImageReader.getSurface(),
+ new Size(mReprocessingImageReader.getWidth(),
+ mReprocessingImageReader.getHeight()),
+ reprocessingImageFormat);
+
+ SafeCloseImageReaderProxy reprocessingImageReaderProxy = mReprocessingImageReader;
+ mReprocessingImageDeferrableSurface.getTerminationFuture().addListener(
+ reprocessingImageReaderProxy::safeClose,
+ CameraXExecutors.mainThreadExecutor());
+ sessionConfigBuilder.addSurface(mReprocessingImageDeferrableSurface);
+
+ // Init capture and session state callback and enqueue the total capture result
+ sessionConfigBuilder.addCameraCaptureCallback(new CameraCaptureCallback() {
+ @Override
+ public void onCaptureCompleted(
+ @NonNull CameraCaptureResult cameraCaptureResult) {
+ super.onCaptureCompleted(cameraCaptureResult);
+ CaptureResult captureResult = cameraCaptureResult.getCaptureResult();
+ if (captureResult != null && captureResult instanceof TotalCaptureResult) {
+ mTotalCaptureResultRingBuffer.add((TotalCaptureResult) captureResult);
+ }
+ }
+ });
+
+ sessionConfigBuilder.addSessionStateCallback(
+ new CameraCaptureSession.StateCallback() {
+ @Override
+ public void onConfigured(
+ @NonNull CameraCaptureSession cameraCaptureSession) {
+ Surface surface = cameraCaptureSession.getInputSurface();
+ if (surface != null) {
+ mReprocessingImageWriter =
+ ImageWriterCompat.newInstance(surface, 1);
+ }
+ }
+
+ @Override
+ public void onConfigureFailed(
+ @NonNull CameraCaptureSession cameraCaptureSession) { }
+ });
+
+ // Set input configuration for reprocessing capture request
+ sessionConfigBuilder.setInputConfiguration(new InputConfiguration(
+ mReprocessingImageReader.getWidth(),
+ mReprocessingImageReader.getHeight(),
+ mReprocessingImageReader.getImageFormat()));
+ }
+
+ private void cleanup() {
+ // We might need synchronization here when clearing ring buffer while image is enqueued
+ // at the same time. Will test this case.
+ Queue<ImageProxy> imageRingBuffer = mImageRingBuffer;
+ while (!imageRingBuffer.isEmpty()) {
+ ImageProxy imageProxy = imageRingBuffer.remove();
+ imageProxy.close();
+ }
+ Queue<TotalCaptureResult> totalCaptureResultRingBuffer = mTotalCaptureResultRingBuffer;
+ totalCaptureResultRingBuffer.clear();
+
+ DeferrableSurface reprocessingImageDeferrableSurface = mReprocessingImageDeferrableSurface;
+ if (reprocessingImageDeferrableSurface != null) {
+ SafeCloseImageReaderProxy reprocessingImageReaderProxy = mReprocessingImageReader;
+ if (reprocessingImageReaderProxy != null) {
+ reprocessingImageDeferrableSurface.getTerminationFuture().addListener(
+ reprocessingImageReaderProxy::safeClose,
+ CameraXExecutors.mainThreadExecutor());
+ }
+ reprocessingImageDeferrableSurface.close();
+ }
+
+ ImageWriter reprocessingImageWriter = mReprocessingImageWriter;
+ if (reprocessingImageWriter != null) {
+ reprocessingImageWriter.close();
+ mReprocessingImageWriter = null;
+ }
+ }
+}
diff --git a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/ZslControlNoOpImpl.java b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/ZslControlNoOpImpl.java
new file mode 100644
index 0000000..bcb2e1e
--- /dev/null
+++ b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/ZslControlNoOpImpl.java
@@ -0,0 +1,32 @@
+/*
+ * 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.camera.camera2.internal;
+
+import android.util.Size;
+
+import androidx.annotation.NonNull;
+import androidx.camera.core.impl.SessionConfig;
+
+/**
+ * No-Op implementation for {@link ZslControl}.
+ */
+public class ZslControlNoOpImpl implements ZslControl {
+ @Override
+ public void addZslConfig(@NonNull Size resolution,
+ @NonNull SessionConfig.Builder sessionConfigBuilder) {
+ }
+}
diff --git a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/ZslUtil.java b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/ZslUtil.java
new file mode 100644
index 0000000..29cf221
--- /dev/null
+++ b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/ZslUtil.java
@@ -0,0 +1,47 @@
+/*
+ * 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.camera.camera2.internal;
+
+import static android.hardware.camera2.CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.RequiresApi;
+import androidx.camera.camera2.internal.compat.CameraCharacteristicsCompat;
+
+/**
+ * Utility class for Zero-Shutter Lag.
+ */
+final class ZslUtil {
+
+ private ZslUtil() {
+ }
+
+ @RequiresApi(21)
+ public static boolean isCapabilitySupported(
+ @NonNull CameraCharacteristicsCompat cameraCharacteristicsCompat,
+ int targetCapability) {
+ int[] capabilities = cameraCharacteristicsCompat.get(REQUEST_AVAILABLE_CAPABILITIES);
+ if (capabilities != null) {
+ for (int capability : capabilities) {
+ if (capability == targetCapability) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+}
diff --git a/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/Camera2CameraInfoImplTest.java b/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/Camera2CameraInfoImplTest.java
index b0e1792..2abe2cf 100644
--- a/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/Camera2CameraInfoImplTest.java
+++ b/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/Camera2CameraInfoImplTest.java
@@ -89,6 +89,12 @@
private static final int CAMERA1_LENS_FACING_INT = CameraCharacteristics.LENS_FACING_FRONT;
private static final boolean CAMERA1_FLASH_INFO_BOOLEAN = false;
+ private static final int CAMERA0_SUPPORTED_YUV_REPROCESSING =
+ CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING;
+ private static final int[] CAMERA0_SUPPORTED_CAPABILITIES = new int[] {
+ CAMERA0_SUPPORTED_YUV_REPROCESSING,
+ };
+
private CameraCharacteristicsCompat mCameraCharacteristics0;
private CameraCharacteristicsCompat mCameraCharacteristics1;
private CameraManagerCompat mCameraManagerCompat;
@@ -434,6 +440,24 @@
.isSameInstanceAs(mCameraCharacteristics0.toCameraCharacteristics());
}
+ @Test
+ public void cameraInfoWithCameraControl_canReturnIsYuvReprocessingSupported()
+ throws CameraAccessExceptionCompat {
+ final Camera2CameraInfoImpl cameraInfo = new Camera2CameraInfoImpl(
+ CAMERA0_ID, mCameraManagerCompat);
+
+ assertThat(cameraInfo.isYuvReprocessingSupported()).isTrue();
+ }
+
+ @Test
+ public void cameraInfoWithCameraControl_canReturnIsPrivateReprocessingSupported()
+ throws CameraAccessExceptionCompat {
+ final Camera2CameraInfoImpl cameraInfo = new Camera2CameraInfoImpl(
+ CAMERA0_ID, mCameraManagerCompat);
+
+ assertThat(cameraInfo.isPrivateReprocessingSupported()).isFalse();
+ }
+
private CameraManagerCompat initCameraManagerWithPhysicalIds(
List<Pair<String, CameraCharacteristics>> cameraIdsAndCharacteristicsList) {
FakeCameraManagerImpl cameraManagerImpl = new FakeCameraManagerImpl();
@@ -468,6 +492,10 @@
shadowCharacteristics0.set(
CameraCharacteristics.FLASH_INFO_AVAILABLE, CAMERA0_FLASH_INFO_BOOLEAN);
+ // Mock the request capability
+ shadowCharacteristics0.set(CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES,
+ CAMERA0_SUPPORTED_CAPABILITIES);
+
// Add the camera to the camera service
((ShadowCameraManager)
Shadow.extract(
diff --git a/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/ZslControlImplTest.kt b/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/ZslControlImplTest.kt
new file mode 100644
index 0000000..e8f4751
--- /dev/null
+++ b/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/ZslControlImplTest.kt
@@ -0,0 +1,128 @@
+/*
+ * 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.camera.camera2.internal
+
+import android.graphics.ImageFormat.PRIVATE
+import android.graphics.ImageFormat.YUV_420_888
+import android.hardware.camera2.CameraCharacteristics
+import android.hardware.camera2.CameraDevice
+import android.os.Build
+import android.util.Size
+import androidx.camera.camera2.internal.compat.CameraCharacteristicsCompat
+import androidx.camera.core.impl.SessionConfig
+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
+import org.robolectric.shadow.api.Shadow
+import org.robolectric.shadows.ShadowCameraCharacteristics
+
+private val RESOLUTION = Size(640, 480)
+
+/**
+ * Unit tests for [ZslControlImpl].
+ */
+@RunWith(RobolectricTestRunner::class)
+@DoNotInstrument
+@Config(minSdk = Build.VERSION_CODES.M)
+public class ZslControlImplTest {
+
+ private lateinit var zslControl: ZslControlImpl
+ private lateinit var sessionConfigBuilder: SessionConfig.Builder
+
+ @Before
+ public fun setUp() {
+ sessionConfigBuilder = SessionConfig.Builder().also { sessionConfigBuilder ->
+ sessionConfigBuilder.setTemplateType(CameraDevice.TEMPLATE_ZERO_SHUTTER_LAG)
+ }
+ }
+
+ @Test
+ public fun isYuvReprocessingSupported_addZslConfig() {
+ zslControl = ZslControlImpl(createCameraCharacteristicsCompat(
+ hasCapabilities = true,
+ isYuvReprocessingSupported = true,
+ isPrivateReprocessingSupported = false
+ ))
+
+ zslControl.addZslConfig(RESOLUTION, sessionConfigBuilder)
+
+ assertThat(zslControl.mReprocessingImageReader).isNotNull()
+ assertThat(zslControl.mReprocessingImageWriter).isNull()
+ assertThat(zslControl.mReprocessingImageReader.imageFormat).isEqualTo(YUV_420_888)
+ }
+
+ @Test
+ public fun isPrivateReprocessingSupported_addZslConfig() {
+ zslControl = ZslControlImpl(createCameraCharacteristicsCompat(
+ hasCapabilities = true,
+ isYuvReprocessingSupported = false,
+ isPrivateReprocessingSupported = true
+ ))
+
+ zslControl.addZslConfig(RESOLUTION, sessionConfigBuilder)
+
+ assertThat(zslControl.mReprocessingImageReader).isNotNull()
+ assertThat(zslControl.mReprocessingImageWriter).isNull()
+ assertThat(zslControl.mReprocessingImageReader.imageFormat).isEqualTo(PRIVATE)
+ }
+
+ @Test
+ public fun isReprocessingNotSupported_notAddZslConfig() {
+ zslControl = ZslControlImpl(createCameraCharacteristicsCompat(
+ hasCapabilities = true,
+ isYuvReprocessingSupported = false,
+ isPrivateReprocessingSupported = false
+ ))
+
+ zslControl.addZslConfig(RESOLUTION, sessionConfigBuilder)
+
+ assertThat(zslControl.mReprocessingImageReader).isNull()
+ assertThat(zslControl.mReprocessingImageWriter).isNull()
+ }
+
+ private fun createCameraCharacteristicsCompat(
+ hasCapabilities: Boolean,
+ isYuvReprocessingSupported: Boolean,
+ isPrivateReprocessingSupported: Boolean
+ ): CameraCharacteristicsCompat {
+ val characteristics = ShadowCameraCharacteristics.newCameraCharacteristics()
+ val shadowCharacteristics = Shadow.extract<ShadowCameraCharacteristics>(characteristics)
+
+ val capabilities = arrayListOf<Int>()
+ if (isYuvReprocessingSupported) {
+ capabilities.add(
+ CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING)
+ }
+ if (isPrivateReprocessingSupported) {
+ capabilities.add(
+ CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING)
+ }
+
+ if (hasCapabilities) {
+ shadowCharacteristics.set(
+ CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES,
+ capabilities.toIntArray()
+ )
+ }
+
+ return CameraCharacteristicsCompat.toCameraCharacteristicsCompat(characteristics)
+ }
+}
\ No newline at end of file
diff --git a/camera/camera-core/src/androidTest/java/androidx/camera/core/ImageCaptureTest.java b/camera/camera-core/src/androidTest/java/androidx/camera/core/ImageCaptureTest.java
index b4510a4..42bfabe 100644
--- a/camera/camera-core/src/androidTest/java/androidx/camera/core/ImageCaptureTest.java
+++ b/camera/camera-core/src/androidTest/java/androidx/camera/core/ImageCaptureTest.java
@@ -398,8 +398,7 @@
semaphore.release();
image.close();
}
- },
- /*totalCaptureResult*/null);
+ });
// Act: dispatch a image that has been rotated in the HAL. After 90° rotation the buffer
// becomes 4x6 and orientation is normal.
diff --git a/camera/camera-core/src/main/java/androidx/camera/core/CameraInfo.java b/camera/camera-core/src/main/java/androidx/camera/core/CameraInfo.java
index cb387cf..88b7dc2 100644
--- a/camera/camera-core/src/main/java/androidx/camera/core/CameraInfo.java
+++ b/camera/camera-core/src/main/java/androidx/camera/core/CameraInfo.java
@@ -16,6 +16,7 @@
package androidx.camera.core;
+import android.graphics.ImageFormat;
import android.view.Surface;
import androidx.annotation.NonNull;
@@ -203,6 +204,34 @@
return false;
}
+ /**
+ * Returns if {@link ImageFormat#YUV_420_888} reprocessing is supported on the device.
+ *
+ * @return True if supported, otherwise false.
+ *
+ * @See CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING
+ *
+ * @hide
+ */
+ @RestrictTo(Scope.LIBRARY_GROUP)
+ default boolean isYuvReprocessingSupported() {
+ return false;
+ }
+
+ /**
+ * Returns if {@link ImageFormat#PRIVATE} reprocessing is supported on the device.
+ *
+ * @return True if supported, otherwise false.
+ *
+ * @See CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING
+ *
+ * @hide
+ */
+ @RestrictTo(Scope.LIBRARY_GROUP)
+ default boolean isPrivateReprocessingSupported() {
+ return false;
+ }
+
/** @hide */
@StringDef(open = true, value = {IMPLEMENTATION_TYPE_UNKNOWN,
IMPLEMENTATION_TYPE_CAMERA2_LEGACY, IMPLEMENTATION_TYPE_CAMERA2,
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 0e069cf..053af09 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
@@ -48,7 +48,6 @@
import android.graphics.ImageFormat;
import android.graphics.Matrix;
import android.graphics.Rect;
-import android.hardware.camera2.TotalCaptureResult;
import android.location.Location;
import android.media.Image;
import android.media.ImageReader;
@@ -330,7 +329,9 @@
/** Callback used to match the {@link ImageProxy} with the {@link ImageInfo}. */
private CameraCaptureCallback mMetadataMatchingCaptureCallback;
+
private DeferrableSurface mDeferrableSurface;
+
private ImageCaptureRequestProcessor mImageCaptureRequestProcessor;
// Synthetic access
@SuppressWarnings("WeakerAccess")
@@ -370,6 +371,10 @@
Threads.checkMainThread();
SessionConfig.Builder sessionConfigBuilder = SessionConfig.Builder.createFrom(config);
+ if (Build.VERSION.SDK_INT >= 23 && getCaptureMode() == CAPTURE_MODE_ZERO_SHUTTER_LAG) {
+ getCameraControl().addZslConfig(resolution, sessionConfigBuilder);
+ }
+
// Setup the ImageReader to do processing
if (config.getImageReaderProxyProvider() != null) {
mImageReader =
@@ -1152,7 +1157,7 @@
mImageCaptureRequestProcessor.sendRequest(new ImageCaptureRequest(
getRelativeRotation(attachedCamera), jpegQuality, mCropAspectRatio,
getViewPortCropRect(), mSensorToBufferTransformMatrix, callbackExecutor,
- callback, /*totalCaptureResult*/null));
+ callback));
}
private void lockFlashMode() {
@@ -1208,6 +1213,7 @@
case CAPTURE_MODE_MAXIMIZE_QUALITY:
return JPEG_QUALITY_MAXIMIZE_QUALITY_MODE;
case CAPTURE_MODE_MINIMIZE_LATENCY:
+ case CAPTURE_MODE_ZERO_SHUTTER_LAG:
return JPEG_QUALITY_MINIMIZE_LATENCY_MODE;
default:
throw new IllegalStateException("CaptureMode " + mCaptureMode + " is invalid");
@@ -2145,9 +2151,6 @@
@NonNull
private final Matrix mSensorToBufferTransformMatrix;
- @Nullable
- final TotalCaptureResult mTotalCaptureResult;
-
/**
*
* @param rotationDegrees The degrees to rotate the image buffer from sensor
@@ -2160,8 +2163,6 @@
* @param sensorToBufferTransformMatrix The sensor to buffer transform matrix.
* @param executor The {@link Executor} which will be used for the listener.
* @param callback The {@link OnImageCapturedCallback} for the quest.
- * @param totalCaptureResult The {@link TotalCaptureResult} used for reprocessable
- * capture request.
* @throws IllegalArgumentException If targetRatio is not a valid value.
*/
ImageCaptureRequest(
@@ -2171,8 +2172,7 @@
@Nullable Rect viewPortCropRect,
@NonNull Matrix sensorToBufferTransformMatrix,
@NonNull Executor executor,
- @NonNull OnImageCapturedCallback callback,
- @Nullable TotalCaptureResult totalCaptureResult) {
+ @NonNull OnImageCapturedCallback callback) {
mRotationDegrees = rotationDegrees;
mJpegQuality = jpegQuality;
if (targetRatio != null) {
@@ -2185,7 +2185,6 @@
mSensorToBufferTransformMatrix = sensorToBufferTransformMatrix;
mListenerExecutor = executor;
mCallback = callback;
- mTotalCaptureResult = totalCaptureResult;
}
void dispatchImage(final ImageProxy image) {
diff --git a/camera/camera-core/src/main/java/androidx/camera/core/ImageReaderProxys.java b/camera/camera-core/src/main/java/androidx/camera/core/ImageReaderProxys.java
index 7e5ccc1..a912d7d 100644
--- a/camera/camera-core/src/main/java/androidx/camera/core/ImageReaderProxys.java
+++ b/camera/camera-core/src/main/java/androidx/camera/core/ImageReaderProxys.java
@@ -20,13 +20,17 @@
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
+import androidx.annotation.RestrictTo;
import androidx.camera.core.impl.ImageReaderProxy;
/**
* Different implementations of {@link ImageReaderProxy}.
+ *
+ * @hide
*/
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@RequiresApi(21) // TODO(b/200306659): Remove and replace with annotation on package-info.java
-final class ImageReaderProxys {
+public final class ImageReaderProxys {
private ImageReaderProxys() {
}
@@ -41,7 +45,7 @@
* @return new {@link ImageReaderProxy} instance
*/
@NonNull
- static ImageReaderProxy createIsolatedReader(
+ public static ImageReaderProxy createIsolatedReader(
int width, int height, int format, int maxImages) {
ImageReader imageReader = ImageReader.newInstance(width, height, format, maxImages);
return new AndroidImageReaderProxy(imageReader);
diff --git a/camera/camera-core/src/main/java/androidx/camera/core/SafeCloseImageReaderProxy.java b/camera/camera-core/src/main/java/androidx/camera/core/SafeCloseImageReaderProxy.java
index 8132309..775f812 100644
--- a/camera/camera-core/src/main/java/androidx/camera/core/SafeCloseImageReaderProxy.java
+++ b/camera/camera-core/src/main/java/androidx/camera/core/SafeCloseImageReaderProxy.java
@@ -22,6 +22,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
+import androidx.annotation.RestrictTo;
import androidx.camera.core.impl.ImageReaderProxy;
import java.util.concurrent.Executor;
@@ -29,9 +30,12 @@
/**
* An {@link ImageReaderProxy} that wraps another ImageReaderProxy to safely wait until all
* produced {@link ImageProxy} are closed before closing the ImageReaderProxy.
+ *
+ * @hide
*/
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@RequiresApi(21) // TODO(b/200306659): Remove and replace with annotation on package-info.java
-class SafeCloseImageReaderProxy implements ImageReaderProxy {
+public class SafeCloseImageReaderProxy implements ImageReaderProxy {
// Lock to synchronize acquired ImageProxys and close.
private final Object mLock = new Object();
@@ -57,7 +61,7 @@
}
};
- SafeCloseImageReaderProxy(@NonNull ImageReaderProxy imageReaderProxy) {
+ public SafeCloseImageReaderProxy(@NonNull ImageReaderProxy imageReaderProxy) {
mImageReaderProxy = imageReaderProxy;
mSurface = imageReaderProxy.getSurface();
}
@@ -117,7 +121,7 @@
* <p>Once this has been called, no more additional ImageProxy can be acquired from the
* {@link SafeCloseImageReaderProxy}.
*/
- void safeClose() {
+ public void safeClose() {
synchronized (mLock) {
mIsClosed = true;
mImageReaderProxy.clearOnImageAvailableListener();
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 d54398b..d0563e5 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
@@ -19,6 +19,7 @@
import static androidx.camera.core.ImageCapture.FLASH_MODE_OFF;
import android.graphics.Rect;
+import android.util.Size;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
@@ -58,6 +59,15 @@
void setFlashMode(@FlashMode int flashMode);
/**
+ * Add zero-shutter lag config to {@link SessionConfig}.
+ * @param resolution surface resolution.
+ * @param sessionConfigBuilder session config builder.
+ */
+ void addZslConfig(
+ @NonNull Size resolution,
+ @NonNull SessionConfig.Builder sessionConfigBuilder);
+
+ /**
* Performs still capture requests with the desired capture mode.
*
* @param captureConfigs capture configuration used for creating CaptureRequest
@@ -119,6 +129,11 @@
public void setFlashMode(@FlashMode int flashMode) {
}
+ @Override
+ public void addZslConfig(@NonNull Size resolution,
+ @NonNull SessionConfig.Builder sessionConfigBuilder) {
+ }
+
@NonNull
@Override
public ListenableFuture<Void> enableTorch(boolean torch) {
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 0c9aa31..b1516f7 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
@@ -41,13 +41,21 @@
import androidx.camera.testing.CameraXUtil
import androidx.camera.testing.fakes.FakeAppConfig
import androidx.camera.testing.fakes.FakeCamera
+import androidx.camera.testing.fakes.FakeCameraControl
import androidx.camera.testing.fakes.FakeCameraFactory
+import androidx.camera.testing.fakes.FakeCameraInfoInternal
import androidx.camera.testing.fakes.FakeImageInfo
import androidx.camera.testing.fakes.FakeImageProxy
import androidx.camera.testing.fakes.FakeImageReaderProxy
import androidx.concurrent.futures.ResolvableFuture
import androidx.test.core.app.ApplicationProvider
import com.google.common.truth.Truth.assertThat
+import java.io.File
+import java.util.ArrayDeque
+import java.util.Collections
+import java.util.concurrent.ExecutionException
+import java.util.concurrent.Executor
+import java.util.concurrent.atomic.AtomicReference
import org.junit.After
import org.junit.Before
import org.junit.Test
@@ -65,12 +73,6 @@
import org.robolectric.annotation.internal.DoNotInstrument
import org.robolectric.shadow.api.Shadow
import org.robolectric.shadows.ShadowLooper
-import java.io.File
-import java.util.ArrayDeque
-import java.util.Collections
-import java.util.concurrent.ExecutionException
-import java.util.concurrent.Executor
-import java.util.concurrent.atomic.AtomicReference
private const val MAX_IMAGES = 3
@@ -85,6 +87,7 @@
private lateinit var callbackHandler: Handler
private lateinit var callbackThread: HandlerThread
private lateinit var executor: Executor
+ private lateinit var camera: FakeCamera
private var fakeImageReaderProxy: FakeImageReaderProxy? = null
private var capturedImage: ImageProxy? = null
private lateinit var cameraUseCaseAdapter: CameraUseCaseAdapter
@@ -100,7 +103,12 @@
@Before
@Throws(ExecutionException::class, InterruptedException::class)
public fun setUp() {
- val camera = FakeCamera()
+ val cameraInfo = FakeCameraInfoInternal().apply {
+ isYuvReprocessingSupported = true
+ isPrivateReprocessingSupported = true
+ }
+
+ camera = FakeCamera(null, cameraInfo)
val cameraFactoryProvider =
CameraFactory.Provider { _, _, _ ->
@@ -155,6 +163,7 @@
public fun captureImageWithViewPort_isSet() {
// Arrange
val imageCapture = bindImageCapture(
+ ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY,
ViewPort.Builder(Rational(1, 1), Surface.ROTATION_0).build()
)
@@ -181,6 +190,7 @@
public fun capturedImageValidAfterRemoved() {
// Arrange
val imageCapture = bindImageCapture(
+ ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY,
ViewPort.Builder(Rational(1, 1), Surface.ROTATION_0).build()
)
@@ -202,7 +212,7 @@
@Test
public fun capturedImageSize_isEqualToSurfaceSize() {
// Act/arrange.
- val imageCapture = bindImageCapture()
+ val imageCapture = bindImageCapture(ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY)
// Act
imageCapture.takePicture(executor, onImageCapturedCallback)
@@ -362,11 +372,50 @@
verify(request).notifyCallbackError(anyInt(), eq(errorMsg), eq(throwable))
}
- private fun bindImageCapture(): ImageCapture {
- return bindImageCapture(null)
+ @Config(maxSdk = 22)
+ @Test
+ public fun bindImageCaptureWithZslUnsupportedSdkVersion_notAddZslConfig() {
+ bindImageCapture(
+ ImageCapture.CAPTURE_MODE_ZERO_SHUTTER_LAG,
+ ViewPort.Builder(Rational(1, 1), Surface.ROTATION_0).build()
+ )
+
+ assertThat(camera.cameraControlInternal).isInstanceOf(FakeCameraControl::class.java)
+ val cameraControl = camera.cameraControlInternal as FakeCameraControl
+ assertThat(cameraControl.isZslConfigAdded).isFalse()
}
- private fun bindImageCapture(viewPort: ViewPort?): ImageCapture {
+ @Config(minSdk = 23)
+ @Test
+ public fun bindImageCaptureInRegularCaptureModeWithZslSupportedSdkVersion_notAddZslConfig() {
+ bindImageCapture(
+ ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY,
+ ViewPort.Builder(Rational(1, 1), Surface.ROTATION_0).build()
+ )
+
+ assertThat(camera.cameraControlInternal).isInstanceOf(FakeCameraControl::class.java)
+ val cameraControl = camera.cameraControlInternal as FakeCameraControl
+ assertThat(cameraControl.isZslConfigAdded).isFalse()
+ }
+
+ @Config(minSdk = 23)
+ @Test
+ public fun bindImageCaptureInZslCaptureModeWithZslSupportedSdkVersion_addZslConfig() {
+ bindImageCapture(
+ ImageCapture.CAPTURE_MODE_ZERO_SHUTTER_LAG,
+ ViewPort.Builder(Rational(1, 1), Surface.ROTATION_0).build()
+ )
+
+ assertThat(camera.cameraControlInternal).isInstanceOf(FakeCameraControl::class.java)
+ val cameraControl = camera.cameraControlInternal as FakeCameraControl
+ assertThat(cameraControl.isZslConfigAdded).isTrue()
+ }
+
+ private fun bindImageCapture(captureMode: Int): ImageCapture {
+ return bindImageCapture(captureMode, null)
+ }
+
+ private fun bindImageCapture(captureMode: Int, viewPort: ViewPort?): ImageCapture {
// Arrange.
val sessionOptionUnpacker =
{ _: UseCaseConfig<*>?, _: SessionConfig.Builder? -> }
@@ -374,7 +423,7 @@
// Set non jpg format so it doesn't trigger the exif code path.
.setBufferFormat(ImageFormat.YUV_420_888)
.setTargetRotation(Surface.ROTATION_0)
- .setCaptureMode(ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY)
+ .setCaptureMode(captureMode)
.setFlashMode(ImageCapture.FLASH_MODE_OFF)
.setCaptureOptionUnpacker { _: UseCaseConfig<*>?, _: CaptureConfig.Builder? -> }
.setImageReaderProxyProvider(getImageReaderProxyProvider())
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 fd61da9..39936df 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
@@ -20,6 +20,7 @@
import static androidx.camera.testing.fakes.FakeCameraDeviceSurfaceManager.MAX_OUTPUT_SIZE;
import android.graphics.Rect;
+import android.util.Size;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
@@ -61,6 +62,8 @@
private final ArrayList<CallbackToFutureAdapter.Completer<Void>> mSubmittedCompleterList =
new ArrayList<>();
+ private boolean mIsZslConfigAdded = false;
+
public FakeCameraControl(@NonNull ControlUpdateCallback controlUpdateCallback) {
mControlUpdateCallback = controlUpdateCallback;
}
@@ -127,6 +130,22 @@
}
@Override
+ public void addZslConfig(@NonNull Size resolution,
+ @NonNull SessionConfig.Builder sessionConfigBuilder) {
+ // Override if Zero-Shutter Lag needs to add config to session config.
+ mIsZslConfigAdded = true;
+ }
+
+ /**
+ * Check if {@link FakeCameraControl#addZslConfig(Size, SessionConfig.Builder)} is
+ * triggered. Only for testing purpose.
+ * @return
+ */
+ public boolean isZslConfigAdded() {
+ return mIsZslConfigAdded;
+ }
+
+ @Override
@NonNull
public ListenableFuture<Void> enableTorch(boolean torch) {
Logger.d(TAG, "enableTorch(" + torch + ")");
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 d26fb42..bfb44e5 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
@@ -67,6 +67,9 @@
// camera-core:1.0.0
private CamcorderProfileProvider mCamcorderProfileProvider;
+ private boolean mIsYuvReprocessingSupported = false;
+ private boolean mIsPrivateReprocessingSupported = false;
+
@NonNull
private final List<Quirk> mCameraQuirks = new ArrayList<>();
@@ -189,6 +192,16 @@
return false;
}
+ @Override
+ public boolean isYuvReprocessingSupported() {
+ return mIsYuvReprocessingSupported;
+ }
+
+ @Override
+ public boolean isPrivateReprocessingSupported() {
+ return mIsPrivateReprocessingSupported;
+ }
+
/** Adds a quirk to the list of this camera's quirks. */
public void addCameraQuirk(@NonNull final Quirk quirk) {
mCameraQuirks.add(quirk);
@@ -207,6 +220,16 @@
mCamcorderProfileProvider = Preconditions.checkNotNull(camcorderProfileProvider);
}
+ /** Set the isYuvReprocessingSupported flag for testing */
+ public void setYuvReprocessingSupported(boolean supported) {
+ mIsYuvReprocessingSupported = supported;
+ }
+
+ /** Set the isPrivateReprocessingSupported flag for testing */
+ public void setPrivateReprocessingSupported(boolean supported) {
+ mIsPrivateReprocessingSupported = supported;
+ }
+
@RequiresApi(21) // TODO(b/200306659): Remove and replace with annotation on package-info.java
static final class FakeExposureState implements ExposureState {
@Override
diff --git a/camera/camera-view/api/api_lint.ignore b/camera/camera-view/api/api_lint.ignore
index c4b7e5f..14c8b57 100644
--- a/camera/camera-view/api/api_lint.ignore
+++ b/camera/camera-view/api/api_lint.ignore
@@ -7,3 +7,7 @@
Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
AsyncSuffixFuture: androidx.camera.view.CameraController#setZoomRatio(float):
Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
+
+
+InvalidNullability: androidx.camera.view.PreviewView#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.
diff --git a/car/app/app-automotive/api/api_lint.ignore b/car/app/app-automotive/api/api_lint.ignore
new file mode 100644
index 0000000..64c566ac
--- /dev/null
+++ b/car/app/app-automotive/api/api_lint.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+InvalidNullability: androidx.car.app.activity.CarAppActivity#onNewIntent(android.content.Intent) parameter #0:
+ Invalid nullability on parameter `intent` in method `onNewIntent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
diff --git a/car/app/app/api/api_lint.ignore b/car/app/app/api/api_lint.ignore
new file mode 100644
index 0000000..7cc8252
--- /dev/null
+++ b/car/app/app/api/api_lint.ignore
@@ -0,0 +1,13 @@
+// Baseline format: 1.0
+InvalidNullability: androidx.car.app.CarAppService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]) parameter #0:
+ Invalid nullability on parameter `fd` in method `dump`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.car.app.CarAppService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]) parameter #1:
+ Invalid nullability on parameter `writer` in method `dump`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.car.app.CarAppService#onBind(android.content.Intent) parameter #0:
+ Invalid nullability on parameter `intent` in method `onBind`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.car.app.CarAppService#onUnbind(android.content.Intent) parameter #0:
+ Invalid nullability on parameter `intent` in method `onUnbind`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.car.app.model.CarSpan#updateDrawState(android.text.TextPaint) parameter #0:
+ Invalid nullability on parameter `tp` in method `updateDrawState`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.car.app.serialization.Bundleable#writeToParcel(android.os.Parcel, int) parameter #0:
+ Invalid nullability on parameter `dest` in method `writeToParcel`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
diff --git a/collection/collection/api/current.txt b/collection/collection/api/current.txt
index 08dc174..905d4b2 100644
--- a/collection/collection/api/current.txt
+++ b/collection/collection/api/current.txt
@@ -136,7 +136,7 @@
}
public class LruCache<K, V> {
- ctor public LruCache(@IntRange(from=1, to=kotlin.jvm.internal.LongCompanionObject.MAX_VALUE) int maxSize);
+ ctor public LruCache(@IntRange(from=1L, to=kotlin.jvm.internal.LongCompanionObject.MAX_VALUE) int maxSize);
method protected V? create(K key);
method public final int createCount();
method protected void entryRemoved(boolean evicted, K key, V oldValue, V? newValue);
@@ -149,7 +149,7 @@
method public final V? put(K key, V value);
method public final int putCount();
method public final V? remove(K key);
- method public void resize(@IntRange(from=1, to=kotlin.jvm.internal.LongCompanionObject.MAX_VALUE) int maxSize);
+ method public void resize(@IntRange(from=1L, to=kotlin.jvm.internal.LongCompanionObject.MAX_VALUE) int maxSize);
method public final int size();
method protected int sizeOf(K key, V value);
method public final java.util.Map<K,V> snapshot();
diff --git a/collection/collection/api/public_plus_experimental_current.txt b/collection/collection/api/public_plus_experimental_current.txt
index 08dc174..905d4b2 100644
--- a/collection/collection/api/public_plus_experimental_current.txt
+++ b/collection/collection/api/public_plus_experimental_current.txt
@@ -136,7 +136,7 @@
}
public class LruCache<K, V> {
- ctor public LruCache(@IntRange(from=1, to=kotlin.jvm.internal.LongCompanionObject.MAX_VALUE) int maxSize);
+ ctor public LruCache(@IntRange(from=1L, to=kotlin.jvm.internal.LongCompanionObject.MAX_VALUE) int maxSize);
method protected V? create(K key);
method public final int createCount();
method protected void entryRemoved(boolean evicted, K key, V oldValue, V? newValue);
@@ -149,7 +149,7 @@
method public final V? put(K key, V value);
method public final int putCount();
method public final V? remove(K key);
- method public void resize(@IntRange(from=1, to=kotlin.jvm.internal.LongCompanionObject.MAX_VALUE) int maxSize);
+ method public void resize(@IntRange(from=1L, to=kotlin.jvm.internal.LongCompanionObject.MAX_VALUE) int maxSize);
method public final int size();
method protected int sizeOf(K key, V value);
method public final java.util.Map<K,V> snapshot();
diff --git a/collection/collection/api/restricted_current.txt b/collection/collection/api/restricted_current.txt
index 08dc174..905d4b2 100644
--- a/collection/collection/api/restricted_current.txt
+++ b/collection/collection/api/restricted_current.txt
@@ -136,7 +136,7 @@
}
public class LruCache<K, V> {
- ctor public LruCache(@IntRange(from=1, to=kotlin.jvm.internal.LongCompanionObject.MAX_VALUE) int maxSize);
+ ctor public LruCache(@IntRange(from=1L, to=kotlin.jvm.internal.LongCompanionObject.MAX_VALUE) int maxSize);
method protected V? create(K key);
method public final int createCount();
method protected void entryRemoved(boolean evicted, K key, V oldValue, V? newValue);
@@ -149,7 +149,7 @@
method public final V? put(K key, V value);
method public final int putCount();
method public final V? remove(K key);
- method public void resize(@IntRange(from=1, to=kotlin.jvm.internal.LongCompanionObject.MAX_VALUE) int maxSize);
+ method public void resize(@IntRange(from=1L, to=kotlin.jvm.internal.LongCompanionObject.MAX_VALUE) int maxSize);
method public final int size();
method protected int sizeOf(K key, V value);
method public final java.util.Map<K,V> snapshot();
diff --git a/collection2/collection2/api/current.txt b/collection2/collection2/api/current.txt
index 6d11855..dade033 100644
--- a/collection2/collection2/api/current.txt
+++ b/collection2/collection2/api/current.txt
@@ -172,7 +172,7 @@
method public V? replace(K? key, V? value);
method public boolean replace(K? key, V? oldValue, V? newValue);
method public V! setValueAt(int index, V? value);
- method protected final void set_size(int _size);
+ method protected final void set_size(int);
method public int size();
method public V! valueAt(int index);
property protected final int _size;
diff --git a/collection2/collection2/api/public_plus_experimental_current.txt b/collection2/collection2/api/public_plus_experimental_current.txt
index 6d11855..dade033 100644
--- a/collection2/collection2/api/public_plus_experimental_current.txt
+++ b/collection2/collection2/api/public_plus_experimental_current.txt
@@ -172,7 +172,7 @@
method public V? replace(K? key, V? value);
method public boolean replace(K? key, V? oldValue, V? newValue);
method public V! setValueAt(int index, V? value);
- method protected final void set_size(int _size);
+ method protected final void set_size(int);
method public int size();
method public V! valueAt(int index);
property protected final int _size;
diff --git a/collection2/collection2/api/restricted_current.txt b/collection2/collection2/api/restricted_current.txt
index 6d11855..dade033 100644
--- a/collection2/collection2/api/restricted_current.txt
+++ b/collection2/collection2/api/restricted_current.txt
@@ -172,7 +172,7 @@
method public V? replace(K? key, V? value);
method public boolean replace(K? key, V? oldValue, V? newValue);
method public V! setValueAt(int index, V? value);
- method protected final void set_size(int _size);
+ method protected final void set_size(int);
method public int size();
method public V! valueAt(int index);
property protected final int _size;
diff --git a/compose/animation/animation-core/api/current.ignore b/compose/animation/animation-core/api/current.ignore
index 2426d29..030661d 100644
--- a/compose/animation/animation-core/api/current.ignore
+++ b/compose/animation/animation-core/api/current.ignore
@@ -1,4 +1,34 @@
// Baseline format: 1.0
+ParameterNameChange: androidx.compose.animation.core.Animatable#animateDecay(T, androidx.compose.animation.core.DecayAnimationSpec<T>, kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.Animatable<T,V>,kotlin.Unit>, kotlin.coroutines.Continuation<? super androidx.compose.animation.core.AnimationResult<T,V>>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.animation.core.Animatable.animateDecay
+ParameterNameChange: androidx.compose.animation.core.Animatable#animateTo(T, androidx.compose.animation.core.AnimationSpec<T>, T, kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.Animatable<T,V>,kotlin.Unit>, kotlin.coroutines.Continuation<? super androidx.compose.animation.core.AnimationResult<T,V>>) parameter #4:
+ Attempted to remove parameter name from parameter arg5 in androidx.compose.animation.core.Animatable.animateTo
+ParameterNameChange: androidx.compose.animation.core.Animatable#snapTo(T, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.animation.core.Animatable.snapTo
+ParameterNameChange: androidx.compose.animation.core.Animatable#stop(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.animation.core.Animatable.stop
+ParameterNameChange: androidx.compose.animation.core.InfiniteAnimationPolicyKt#withInfiniteAnimationFrameMillis(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.animation.core.InfiniteAnimationPolicyKt.withInfiniteAnimationFrameMillis
+ParameterNameChange: androidx.compose.animation.core.InfiniteAnimationPolicyKt#withInfiniteAnimationFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.animation.core.InfiniteAnimationPolicyKt.withInfiniteAnimationFrameNanos
+ParameterNameChange: androidx.compose.animation.core.KeyframesSpec.KeyframesSpecConfig#setDelayMillis(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.animation.core.KeyframesSpec.KeyframesSpecConfig.setDelayMillis
+ParameterNameChange: androidx.compose.animation.core.KeyframesSpec.KeyframesSpecConfig#setDurationMillis(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.animation.core.KeyframesSpec.KeyframesSpecConfig.setDurationMillis
+ParameterNameChange: androidx.compose.animation.core.MutableTransitionState#setTargetState(S) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.animation.core.MutableTransitionState.setTargetState
+ParameterNameChange: androidx.compose.animation.core.SuspendAnimationKt#animate(androidx.compose.animation.core.TwoWayConverter<T,V>, T, T, T, androidx.compose.animation.core.AnimationSpec<T>, kotlin.jvm.functions.Function2<? super T,? super T,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #6:
+ Attempted to remove parameter name from parameter arg7 in androidx.compose.animation.core.SuspendAnimationKt.animate
+ParameterNameChange: androidx.compose.animation.core.SuspendAnimationKt#animate(float, float, float, androidx.compose.animation.core.AnimationSpec<java.lang.Float>, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #5:
+ Attempted to remove parameter name from parameter arg6 in androidx.compose.animation.core.SuspendAnimationKt.animate
+ParameterNameChange: androidx.compose.animation.core.SuspendAnimationKt#animateDecay(androidx.compose.animation.core.AnimationState<T,V>, androidx.compose.animation.core.DecayAnimationSpec<T>, boolean, kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.AnimationScope<T,V>,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #4:
+ Attempted to remove parameter name from parameter arg5 in androidx.compose.animation.core.SuspendAnimationKt.animateDecay
+ParameterNameChange: androidx.compose.animation.core.SuspendAnimationKt#animateDecay(float, float, androidx.compose.animation.core.FloatDecayAnimationSpec, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #4:
+ Attempted to remove parameter name from parameter arg5 in androidx.compose.animation.core.SuspendAnimationKt.animateDecay
+ParameterNameChange: androidx.compose.animation.core.SuspendAnimationKt#animateTo(androidx.compose.animation.core.AnimationState<T,V>, T, androidx.compose.animation.core.AnimationSpec<T>, boolean, kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.AnimationScope<T,V>,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #5:
+ Attempted to remove parameter name from parameter arg6 in androidx.compose.animation.core.SuspendAnimationKt.animateTo
+
+
RemovedMethod: androidx.compose.animation.core.StartOffset#StartOffset():
Removed constructor androidx.compose.animation.core.StartOffset()
RemovedMethod: androidx.compose.animation.core.StartOffsetType#StartOffsetType():
diff --git a/compose/animation/animation-core/api/current.txt b/compose/animation/animation-core/api/current.txt
index bb23aa1..eea899a 100644
--- a/compose/animation/animation-core/api/current.txt
+++ b/compose/animation/animation-core/api/current.txt
@@ -6,8 +6,8 @@
public final class Animatable<T, V extends androidx.compose.animation.core.AnimationVector> {
ctor public Animatable(T? initialValue, androidx.compose.animation.core.TwoWayConverter<T,V> typeConverter, optional T? visibilityThreshold);
- method public suspend Object? animateDecay(T? initialVelocity, androidx.compose.animation.core.DecayAnimationSpec<T> animationSpec, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.Animatable<T,V>,kotlin.Unit>? block, optional kotlin.coroutines.Continuation<? super androidx.compose.animation.core.AnimationResult<T,V>> p);
- method public suspend Object? animateTo(T? targetValue, optional androidx.compose.animation.core.AnimationSpec<T> animationSpec, optional T? initialVelocity, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.Animatable<T,V>,kotlin.Unit>? block, optional kotlin.coroutines.Continuation<? super androidx.compose.animation.core.AnimationResult<T,V>> p);
+ method public suspend Object? animateDecay(T? initialVelocity, androidx.compose.animation.core.DecayAnimationSpec<T> animationSpec, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.Animatable<T,V>,kotlin.Unit>? block, optional kotlin.coroutines.Continuation<? super androidx.compose.animation.core.AnimationResult<T,V>>);
+ method public suspend Object? animateTo(T? targetValue, optional androidx.compose.animation.core.AnimationSpec<T> animationSpec, optional T? initialVelocity, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.Animatable<T,V>,kotlin.Unit>? block, optional kotlin.coroutines.Continuation<? super androidx.compose.animation.core.AnimationResult<T,V>>);
method public androidx.compose.runtime.State<T> asState();
method public T? getLowerBound();
method public T! getTargetValue();
@@ -17,8 +17,8 @@
method public T! getVelocity();
method public V getVelocityVector();
method public boolean isRunning();
- method public suspend Object? snapTo(T? targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? stop(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? snapTo(T? targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? stop(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public void updateBounds(optional T? lowerBound, optional T? upperBound);
property public final boolean isRunning;
property public final T? lowerBound;
@@ -311,8 +311,8 @@
}
public final class InfiniteAnimationPolicyKt {
- method public static suspend inline <R> Object? withInfiniteAnimationFrameMillis(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend <R> Object? withInfiniteAnimationFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ method public static suspend inline <R> Object? withInfiniteAnimationFrameMillis(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend <R> Object? withInfiniteAnimationFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
}
public final class InfiniteRepeatableSpec<T> implements androidx.compose.animation.core.AnimationSpec<T> {
@@ -351,8 +351,8 @@
method public infix androidx.compose.animation.core.KeyframesSpec.KeyframeEntity<T> at(T?, int timeStamp);
method public int getDelayMillis();
method public int getDurationMillis();
- method public void setDelayMillis(int delayMillis);
- method public void setDurationMillis(int durationMillis);
+ method public void setDelayMillis(int);
+ method public void setDurationMillis(int);
method public infix void with(androidx.compose.animation.core.KeyframesSpec.KeyframeEntity<T>, androidx.compose.animation.core.Easing easing);
property public final int delayMillis;
property public final int durationMillis;
@@ -363,7 +363,7 @@
method public S! getCurrentState();
method public S! getTargetState();
method public boolean isIdle();
- method public void setTargetState(S! targetState);
+ method public void setTargetState(S!);
property public final S! currentState;
property public final boolean isIdle;
property public final S! targetState;
@@ -446,11 +446,11 @@
}
public final class SuspendAnimationKt {
- method public static suspend Object? animate(float initialValue, float targetValue, optional float initialVelocity, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,kotlin.Unit> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend <T, V extends androidx.compose.animation.core.AnimationVector> Object? animate(androidx.compose.animation.core.TwoWayConverter<T,V> typeConverter, T? initialValue, T? targetValue, optional T? initialVelocity, optional androidx.compose.animation.core.AnimationSpec<T> animationSpec, kotlin.jvm.functions.Function2<? super T,? super T,kotlin.Unit> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? animateDecay(float initialValue, float initialVelocity, androidx.compose.animation.core.FloatDecayAnimationSpec animationSpec, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,kotlin.Unit> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend <T, V extends androidx.compose.animation.core.AnimationVector> Object? animateDecay(androidx.compose.animation.core.AnimationState<T,V>, androidx.compose.animation.core.DecayAnimationSpec<T> animationSpec, optional boolean sequentialAnimation, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.AnimationScope<T,V>,kotlin.Unit> block, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend <T, V extends androidx.compose.animation.core.AnimationVector> Object? animateTo(androidx.compose.animation.core.AnimationState<T,V>, T? targetValue, optional androidx.compose.animation.core.AnimationSpec<T> animationSpec, optional boolean sequentialAnimation, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.AnimationScope<T,V>,kotlin.Unit> block, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? animate(float initialValue, float targetValue, optional float initialVelocity, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,kotlin.Unit> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend <T, V extends androidx.compose.animation.core.AnimationVector> Object? animate(androidx.compose.animation.core.TwoWayConverter<T,V> typeConverter, T? initialValue, T? targetValue, optional T? initialVelocity, optional androidx.compose.animation.core.AnimationSpec<T> animationSpec, kotlin.jvm.functions.Function2<? super T,? super T,kotlin.Unit> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? animateDecay(float initialValue, float initialVelocity, androidx.compose.animation.core.FloatDecayAnimationSpec animationSpec, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,kotlin.Unit> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend <T, V extends androidx.compose.animation.core.AnimationVector> Object? animateDecay(androidx.compose.animation.core.AnimationState<T,V>, androidx.compose.animation.core.DecayAnimationSpec<T> animationSpec, optional boolean sequentialAnimation, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.AnimationScope<T,V>,kotlin.Unit> block, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend <T, V extends androidx.compose.animation.core.AnimationVector> Object? animateTo(androidx.compose.animation.core.AnimationState<T,V>, T? targetValue, optional androidx.compose.animation.core.AnimationSpec<T> animationSpec, optional boolean sequentialAnimation, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.AnimationScope<T,V>,kotlin.Unit> block, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class TargetBasedAnimation<T, V extends androidx.compose.animation.core.AnimationVector> implements androidx.compose.animation.core.Animation<T,V> {
diff --git a/compose/animation/animation-core/api/public_plus_experimental_current.txt b/compose/animation/animation-core/api/public_plus_experimental_current.txt
index ebe0f5f..baea8ca 100644
--- a/compose/animation/animation-core/api/public_plus_experimental_current.txt
+++ b/compose/animation/animation-core/api/public_plus_experimental_current.txt
@@ -6,8 +6,8 @@
public final class Animatable<T, V extends androidx.compose.animation.core.AnimationVector> {
ctor public Animatable(T? initialValue, androidx.compose.animation.core.TwoWayConverter<T,V> typeConverter, optional T? visibilityThreshold);
- method public suspend Object? animateDecay(T? initialVelocity, androidx.compose.animation.core.DecayAnimationSpec<T> animationSpec, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.Animatable<T,V>,kotlin.Unit>? block, optional kotlin.coroutines.Continuation<? super androidx.compose.animation.core.AnimationResult<T,V>> p);
- method public suspend Object? animateTo(T? targetValue, optional androidx.compose.animation.core.AnimationSpec<T> animationSpec, optional T? initialVelocity, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.Animatable<T,V>,kotlin.Unit>? block, optional kotlin.coroutines.Continuation<? super androidx.compose.animation.core.AnimationResult<T,V>> p);
+ method public suspend Object? animateDecay(T? initialVelocity, androidx.compose.animation.core.DecayAnimationSpec<T> animationSpec, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.Animatable<T,V>,kotlin.Unit>? block, optional kotlin.coroutines.Continuation<? super androidx.compose.animation.core.AnimationResult<T,V>>);
+ method public suspend Object? animateTo(T? targetValue, optional androidx.compose.animation.core.AnimationSpec<T> animationSpec, optional T? initialVelocity, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.Animatable<T,V>,kotlin.Unit>? block, optional kotlin.coroutines.Continuation<? super androidx.compose.animation.core.AnimationResult<T,V>>);
method public androidx.compose.runtime.State<T> asState();
method public T? getLowerBound();
method public T! getTargetValue();
@@ -17,8 +17,8 @@
method public T! getVelocity();
method public V getVelocityVector();
method public boolean isRunning();
- method public suspend Object? snapTo(T? targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? stop(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? snapTo(T? targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? stop(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public void updateBounds(optional T? lowerBound, optional T? upperBound);
property public final boolean isRunning;
property public final T? lowerBound;
@@ -314,8 +314,8 @@
}
public final class InfiniteAnimationPolicyKt {
- method public static suspend inline <R> Object? withInfiniteAnimationFrameMillis(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend <R> Object? withInfiniteAnimationFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ method public static suspend inline <R> Object? withInfiniteAnimationFrameMillis(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend <R> Object? withInfiniteAnimationFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
}
public final class InfiniteRepeatableSpec<T> implements androidx.compose.animation.core.AnimationSpec<T> {
@@ -357,8 +357,8 @@
method public infix androidx.compose.animation.core.KeyframesSpec.KeyframeEntity<T> at(T?, int timeStamp);
method public int getDelayMillis();
method public int getDurationMillis();
- method public void setDelayMillis(int delayMillis);
- method public void setDurationMillis(int durationMillis);
+ method public void setDelayMillis(int);
+ method public void setDurationMillis(int);
method public infix void with(androidx.compose.animation.core.KeyframesSpec.KeyframeEntity<T>, androidx.compose.animation.core.Easing easing);
property public final int delayMillis;
property public final int durationMillis;
@@ -369,7 +369,7 @@
method public S! getCurrentState();
method public S! getTargetState();
method public boolean isIdle();
- method public void setTargetState(S! targetState);
+ method public void setTargetState(S!);
property public final S! currentState;
property public final boolean isIdle;
property public final S! targetState;
@@ -452,11 +452,11 @@
}
public final class SuspendAnimationKt {
- method public static suspend Object? animate(float initialValue, float targetValue, optional float initialVelocity, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,kotlin.Unit> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend <T, V extends androidx.compose.animation.core.AnimationVector> Object? animate(androidx.compose.animation.core.TwoWayConverter<T,V> typeConverter, T? initialValue, T? targetValue, optional T? initialVelocity, optional androidx.compose.animation.core.AnimationSpec<T> animationSpec, kotlin.jvm.functions.Function2<? super T,? super T,kotlin.Unit> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? animateDecay(float initialValue, float initialVelocity, androidx.compose.animation.core.FloatDecayAnimationSpec animationSpec, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,kotlin.Unit> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend <T, V extends androidx.compose.animation.core.AnimationVector> Object? animateDecay(androidx.compose.animation.core.AnimationState<T,V>, androidx.compose.animation.core.DecayAnimationSpec<T> animationSpec, optional boolean sequentialAnimation, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.AnimationScope<T,V>,kotlin.Unit> block, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend <T, V extends androidx.compose.animation.core.AnimationVector> Object? animateTo(androidx.compose.animation.core.AnimationState<T,V>, T? targetValue, optional androidx.compose.animation.core.AnimationSpec<T> animationSpec, optional boolean sequentialAnimation, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.AnimationScope<T,V>,kotlin.Unit> block, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? animate(float initialValue, float targetValue, optional float initialVelocity, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,kotlin.Unit> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend <T, V extends androidx.compose.animation.core.AnimationVector> Object? animate(androidx.compose.animation.core.TwoWayConverter<T,V> typeConverter, T? initialValue, T? targetValue, optional T? initialVelocity, optional androidx.compose.animation.core.AnimationSpec<T> animationSpec, kotlin.jvm.functions.Function2<? super T,? super T,kotlin.Unit> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? animateDecay(float initialValue, float initialVelocity, androidx.compose.animation.core.FloatDecayAnimationSpec animationSpec, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,kotlin.Unit> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend <T, V extends androidx.compose.animation.core.AnimationVector> Object? animateDecay(androidx.compose.animation.core.AnimationState<T,V>, androidx.compose.animation.core.DecayAnimationSpec<T> animationSpec, optional boolean sequentialAnimation, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.AnimationScope<T,V>,kotlin.Unit> block, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend <T, V extends androidx.compose.animation.core.AnimationVector> Object? animateTo(androidx.compose.animation.core.AnimationState<T,V>, T? targetValue, optional androidx.compose.animation.core.AnimationSpec<T> animationSpec, optional boolean sequentialAnimation, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.AnimationScope<T,V>,kotlin.Unit> block, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class TargetBasedAnimation<T, V extends androidx.compose.animation.core.AnimationVector> implements androidx.compose.animation.core.Animation<T,V> {
diff --git a/compose/animation/animation-core/api/restricted_current.ignore b/compose/animation/animation-core/api/restricted_current.ignore
index 2426d29..030661d 100644
--- a/compose/animation/animation-core/api/restricted_current.ignore
+++ b/compose/animation/animation-core/api/restricted_current.ignore
@@ -1,4 +1,34 @@
// Baseline format: 1.0
+ParameterNameChange: androidx.compose.animation.core.Animatable#animateDecay(T, androidx.compose.animation.core.DecayAnimationSpec<T>, kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.Animatable<T,V>,kotlin.Unit>, kotlin.coroutines.Continuation<? super androidx.compose.animation.core.AnimationResult<T,V>>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.animation.core.Animatable.animateDecay
+ParameterNameChange: androidx.compose.animation.core.Animatable#animateTo(T, androidx.compose.animation.core.AnimationSpec<T>, T, kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.Animatable<T,V>,kotlin.Unit>, kotlin.coroutines.Continuation<? super androidx.compose.animation.core.AnimationResult<T,V>>) parameter #4:
+ Attempted to remove parameter name from parameter arg5 in androidx.compose.animation.core.Animatable.animateTo
+ParameterNameChange: androidx.compose.animation.core.Animatable#snapTo(T, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.animation.core.Animatable.snapTo
+ParameterNameChange: androidx.compose.animation.core.Animatable#stop(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.animation.core.Animatable.stop
+ParameterNameChange: androidx.compose.animation.core.InfiniteAnimationPolicyKt#withInfiniteAnimationFrameMillis(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.animation.core.InfiniteAnimationPolicyKt.withInfiniteAnimationFrameMillis
+ParameterNameChange: androidx.compose.animation.core.InfiniteAnimationPolicyKt#withInfiniteAnimationFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.animation.core.InfiniteAnimationPolicyKt.withInfiniteAnimationFrameNanos
+ParameterNameChange: androidx.compose.animation.core.KeyframesSpec.KeyframesSpecConfig#setDelayMillis(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.animation.core.KeyframesSpec.KeyframesSpecConfig.setDelayMillis
+ParameterNameChange: androidx.compose.animation.core.KeyframesSpec.KeyframesSpecConfig#setDurationMillis(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.animation.core.KeyframesSpec.KeyframesSpecConfig.setDurationMillis
+ParameterNameChange: androidx.compose.animation.core.MutableTransitionState#setTargetState(S) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.animation.core.MutableTransitionState.setTargetState
+ParameterNameChange: androidx.compose.animation.core.SuspendAnimationKt#animate(androidx.compose.animation.core.TwoWayConverter<T,V>, T, T, T, androidx.compose.animation.core.AnimationSpec<T>, kotlin.jvm.functions.Function2<? super T,? super T,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #6:
+ Attempted to remove parameter name from parameter arg7 in androidx.compose.animation.core.SuspendAnimationKt.animate
+ParameterNameChange: androidx.compose.animation.core.SuspendAnimationKt#animate(float, float, float, androidx.compose.animation.core.AnimationSpec<java.lang.Float>, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #5:
+ Attempted to remove parameter name from parameter arg6 in androidx.compose.animation.core.SuspendAnimationKt.animate
+ParameterNameChange: androidx.compose.animation.core.SuspendAnimationKt#animateDecay(androidx.compose.animation.core.AnimationState<T,V>, androidx.compose.animation.core.DecayAnimationSpec<T>, boolean, kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.AnimationScope<T,V>,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #4:
+ Attempted to remove parameter name from parameter arg5 in androidx.compose.animation.core.SuspendAnimationKt.animateDecay
+ParameterNameChange: androidx.compose.animation.core.SuspendAnimationKt#animateDecay(float, float, androidx.compose.animation.core.FloatDecayAnimationSpec, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #4:
+ Attempted to remove parameter name from parameter arg5 in androidx.compose.animation.core.SuspendAnimationKt.animateDecay
+ParameterNameChange: androidx.compose.animation.core.SuspendAnimationKt#animateTo(androidx.compose.animation.core.AnimationState<T,V>, T, androidx.compose.animation.core.AnimationSpec<T>, boolean, kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.AnimationScope<T,V>,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #5:
+ Attempted to remove parameter name from parameter arg6 in androidx.compose.animation.core.SuspendAnimationKt.animateTo
+
+
RemovedMethod: androidx.compose.animation.core.StartOffset#StartOffset():
Removed constructor androidx.compose.animation.core.StartOffset()
RemovedMethod: androidx.compose.animation.core.StartOffsetType#StartOffsetType():
diff --git a/compose/animation/animation-core/api/restricted_current.txt b/compose/animation/animation-core/api/restricted_current.txt
index 3f7de7d..998d951 100644
--- a/compose/animation/animation-core/api/restricted_current.txt
+++ b/compose/animation/animation-core/api/restricted_current.txt
@@ -6,8 +6,8 @@
public final class Animatable<T, V extends androidx.compose.animation.core.AnimationVector> {
ctor public Animatable(T? initialValue, androidx.compose.animation.core.TwoWayConverter<T,V> typeConverter, optional T? visibilityThreshold);
- method public suspend Object? animateDecay(T? initialVelocity, androidx.compose.animation.core.DecayAnimationSpec<T> animationSpec, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.Animatable<T,V>,kotlin.Unit>? block, optional kotlin.coroutines.Continuation<? super androidx.compose.animation.core.AnimationResult<T,V>> p);
- method public suspend Object? animateTo(T? targetValue, optional androidx.compose.animation.core.AnimationSpec<T> animationSpec, optional T? initialVelocity, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.Animatable<T,V>,kotlin.Unit>? block, optional kotlin.coroutines.Continuation<? super androidx.compose.animation.core.AnimationResult<T,V>> p);
+ method public suspend Object? animateDecay(T? initialVelocity, androidx.compose.animation.core.DecayAnimationSpec<T> animationSpec, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.Animatable<T,V>,kotlin.Unit>? block, optional kotlin.coroutines.Continuation<? super androidx.compose.animation.core.AnimationResult<T,V>>);
+ method public suspend Object? animateTo(T? targetValue, optional androidx.compose.animation.core.AnimationSpec<T> animationSpec, optional T? initialVelocity, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.Animatable<T,V>,kotlin.Unit>? block, optional kotlin.coroutines.Continuation<? super androidx.compose.animation.core.AnimationResult<T,V>>);
method public androidx.compose.runtime.State<T> asState();
method public T? getLowerBound();
method public T! getTargetValue();
@@ -17,8 +17,8 @@
method public T! getVelocity();
method public V getVelocityVector();
method public boolean isRunning();
- method public suspend Object? snapTo(T? targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? stop(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? snapTo(T? targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? stop(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public void updateBounds(optional T? lowerBound, optional T? upperBound);
property public final boolean isRunning;
property public final T? lowerBound;
@@ -311,8 +311,8 @@
}
public final class InfiniteAnimationPolicyKt {
- method public static suspend inline <R> Object? withInfiniteAnimationFrameMillis(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend <R> Object? withInfiniteAnimationFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ method public static suspend inline <R> Object? withInfiniteAnimationFrameMillis(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend <R> Object? withInfiniteAnimationFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
}
public final class InfiniteRepeatableSpec<T> implements androidx.compose.animation.core.AnimationSpec<T> {
@@ -351,8 +351,8 @@
method public infix androidx.compose.animation.core.KeyframesSpec.KeyframeEntity<T> at(T?, int timeStamp);
method public int getDelayMillis();
method public int getDurationMillis();
- method public void setDelayMillis(int delayMillis);
- method public void setDurationMillis(int durationMillis);
+ method public void setDelayMillis(int);
+ method public void setDurationMillis(int);
method public infix void with(androidx.compose.animation.core.KeyframesSpec.KeyframeEntity<T>, androidx.compose.animation.core.Easing easing);
property public final int delayMillis;
property public final int durationMillis;
@@ -363,7 +363,7 @@
method public S! getCurrentState();
method public S! getTargetState();
method public boolean isIdle();
- method public void setTargetState(S! targetState);
+ method public void setTargetState(S!);
property public final S! currentState;
property public final boolean isIdle;
property public final S! targetState;
@@ -446,11 +446,11 @@
}
public final class SuspendAnimationKt {
- method public static suspend Object? animate(float initialValue, float targetValue, optional float initialVelocity, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,kotlin.Unit> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend <T, V extends androidx.compose.animation.core.AnimationVector> Object? animate(androidx.compose.animation.core.TwoWayConverter<T,V> typeConverter, T? initialValue, T? targetValue, optional T? initialVelocity, optional androidx.compose.animation.core.AnimationSpec<T> animationSpec, kotlin.jvm.functions.Function2<? super T,? super T,kotlin.Unit> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? animateDecay(float initialValue, float initialVelocity, androidx.compose.animation.core.FloatDecayAnimationSpec animationSpec, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,kotlin.Unit> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend <T, V extends androidx.compose.animation.core.AnimationVector> Object? animateDecay(androidx.compose.animation.core.AnimationState<T,V>, androidx.compose.animation.core.DecayAnimationSpec<T> animationSpec, optional boolean sequentialAnimation, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.AnimationScope<T,V>,kotlin.Unit> block, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend <T, V extends androidx.compose.animation.core.AnimationVector> Object? animateTo(androidx.compose.animation.core.AnimationState<T,V>, T? targetValue, optional androidx.compose.animation.core.AnimationSpec<T> animationSpec, optional boolean sequentialAnimation, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.AnimationScope<T,V>,kotlin.Unit> block, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? animate(float initialValue, float targetValue, optional float initialVelocity, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,kotlin.Unit> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend <T, V extends androidx.compose.animation.core.AnimationVector> Object? animate(androidx.compose.animation.core.TwoWayConverter<T,V> typeConverter, T? initialValue, T? targetValue, optional T? initialVelocity, optional androidx.compose.animation.core.AnimationSpec<T> animationSpec, kotlin.jvm.functions.Function2<? super T,? super T,kotlin.Unit> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? animateDecay(float initialValue, float initialVelocity, androidx.compose.animation.core.FloatDecayAnimationSpec animationSpec, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,kotlin.Unit> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend <T, V extends androidx.compose.animation.core.AnimationVector> Object? animateDecay(androidx.compose.animation.core.AnimationState<T,V>, androidx.compose.animation.core.DecayAnimationSpec<T> animationSpec, optional boolean sequentialAnimation, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.AnimationScope<T,V>,kotlin.Unit> block, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend <T, V extends androidx.compose.animation.core.AnimationVector> Object? animateTo(androidx.compose.animation.core.AnimationState<T,V>, T? targetValue, optional androidx.compose.animation.core.AnimationSpec<T> animationSpec, optional boolean sequentialAnimation, optional kotlin.jvm.functions.Function1<? super androidx.compose.animation.core.AnimationScope<T,V>,kotlin.Unit> block, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class TargetBasedAnimation<T, V extends androidx.compose.animation.core.AnimationVector> implements androidx.compose.animation.core.Animation<T,V> {
diff --git a/compose/animation/animation-core/src/test/java/androidx/compose/animation/core/AnimatableTest.kt b/compose/animation/animation-core/src/test/java/androidx/compose/animation/core/AnimatableTest.kt
index 4d6a0d6..051d544 100644
--- a/compose/animation/animation-core/src/test/java/androidx/compose/animation/core/AnimatableTest.kt
+++ b/compose/animation/animation-core/src/test/java/androidx/compose/animation/core/AnimatableTest.kt
@@ -16,6 +16,7 @@
package androidx.compose.animation.core
+import androidx.compose.runtime.MonotonicFrameClock
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
@@ -24,6 +25,8 @@
import junit.framework.TestCase.assertEquals
import junit.framework.TestCase.assertFalse
import junit.framework.TestCase.assertTrue
+import kotlin.math.abs
+import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
@@ -32,9 +35,6 @@
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-import kotlin.coroutines.resume
-import kotlin.coroutines.suspendCoroutine
-import kotlin.math.abs
@RunWith(JUnit4::class)
class AnimatableTest {
@@ -194,22 +194,55 @@
0f,
200f
)
- val clock = SuspendAnimationTest.TestFrameClock()
+ val clock = MyTestFrameClock()
val interval = 50
coroutineScope {
withContext(clock) {
val animatable = Animatable(0f)
- launch {
- // Put in a bunch of frames 50 milliseconds apart
- for (frameTimeMillis in 0..1000 step interval) {
- clock.frame(frameTimeMillis * 1_000_000L)
- delay(5)
- }
- }
- // The first frame should start at 100ms
var playTimeMillis by mutableStateOf(0L)
- suspendCoroutine<Unit> {
- launch {
+
+ suspend fun createInterruption() {
+ val anim2 = TargetBasedAnimation(
+ spring(),
+ Float.VectorConverter,
+ animatable.value,
+ 300f,
+ animatable.velocity
+ )
+ assertEquals(100L, playTimeMillis)
+ var firstFrame = true
+ val result2 = animatable.animateTo(300f, spring()) {
+ // First frame will arrive with a timestamp of the time of interruption,
+ // which is 100ms. The subsequent frames will be consistent with what's
+ // tracked in `playTimeMillis`.
+ val playTime = if (firstFrame) 100L else playTimeMillis
+ assertTrue(isRunning)
+ assertEquals(300f, targetValue)
+ assertEquals(
+ anim2.getValueFromMillis((playTime - 100)),
+ value
+ )
+ assertEquals(
+ anim2.getVelocityFromMillis((playTime - 100)),
+ velocity
+ )
+ if (!firstFrame) {
+ playTimeMillis += interval
+ clock.trySendFrame(playTimeMillis * 1_000_000L)
+ } else {
+ firstFrame = false
+ }
+ }
+ assertFalse(animatable.isRunning)
+ assertEquals(AnimationEndReason.Finished, result2.endReason)
+ assertEquals(300f, animatable.targetValue)
+ assertEquals(300f, animatable.value)
+ assertEquals(0f, animatable.velocity)
+ }
+
+ clock.trySendFrame(0)
+ launch {
+ try {
animatable.animateTo(
200f,
animationSpec = tween(200, easing = LinearEasing)
@@ -224,41 +257,22 @@
assertTrue(playTimeMillis <= 100)
if (playTimeMillis == 100L) {
- // Interrupt here
- it.resume(Unit)
+ [email protected] {
+ // No more new frame until the ongoing animation is canceled.
+ createInterruption()
+ }
+ } else {
+ playTimeMillis += interval
+ clock.trySendFrame(playTimeMillis * 1_000_000L)
}
- playTimeMillis += 50L
}
+ } finally {
+ // At this point the previous animation on the Animatable has been
+ // canceled. Pump a frame to get the new animation going.
+ playTimeMillis += interval
+ clock.trySendFrame(playTimeMillis * 1_000_000L)
}
}
- launch {
- var playTimeMillis2 = 100L
- val anim2 = TargetBasedAnimation(
- spring(),
- Float.VectorConverter,
- animatable.value,
- 300f,
- animatable.velocity
- )
- val result2 = animatable.animateTo(300f, spring()) {
- assertTrue(isRunning)
- assertEquals(300f, targetValue)
- assertEquals(
- anim2.getValueFromMillis((playTimeMillis2 - 100)),
- value
- )
- assertEquals(
- anim2.getVelocityFromMillis((playTimeMillis2 - 100)),
- velocity
- )
- playTimeMillis2 += interval
- }
- assertFalse(animatable.isRunning)
- assertEquals(AnimationEndReason.Finished, result2.endReason)
- assertEquals(300f, animatable.targetValue)
- assertEquals(300f, animatable.value)
- assertEquals(0f, animatable.velocity)
- }
}
}
}
@@ -323,4 +337,20 @@
assertThat(string).contains("finishedTimeNanos=3000")
assertThat(string).contains("isRunning=true")
}
+
+ private class MyTestFrameClock : MonotonicFrameClock {
+ // Make the send non-blocking
+ private val frameCh = Channel<Long>(Channel.UNLIMITED)
+
+ suspend fun frame(frameTimeNanos: Long) {
+ frameCh.send(frameTimeNanos)
+ }
+
+ fun trySendFrame(frameTimeNanos: Long) {
+ frameCh.trySend(frameTimeNanos)
+ }
+
+ override suspend fun <R> withFrameNanos(onFrame: (Long) -> R): R =
+ onFrame(frameCh.receive())
+ }
}
diff --git a/compose/animation/animation/api/public_plus_experimental_current.txt b/compose/animation/animation/api/public_plus_experimental_current.txt
index e79ff0f..e7765d0 100644
--- a/compose/animation/animation/api/public_plus_experimental_current.txt
+++ b/compose/animation/animation/api/public_plus_experimental_current.txt
@@ -72,7 +72,7 @@
method public androidx.compose.animation.SizeTransform? getSizeTransform();
method public androidx.compose.animation.EnterTransition getTargetContentEnter();
method public float getTargetContentZIndex();
- method public void setTargetContentZIndex(float targetContentZIndex);
+ method public void setTargetContentZIndex(float);
property public final androidx.compose.animation.ExitTransition initialContentExit;
property public final androidx.compose.animation.SizeTransform? sizeTransform;
property public final androidx.compose.animation.EnterTransition targetContentEnter;
diff --git a/compose/foundation/foundation-layout/api/current.txt b/compose/foundation/foundation-layout/api/current.txt
index 7c1d049..ec3582e 100644
--- a/compose/foundation/foundation-layout/api/current.txt
+++ b/compose/foundation/foundation-layout/api/current.txt
@@ -293,7 +293,7 @@
method @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static androidx.compose.foundation.layout.WindowInsets getSystemGestures(androidx.compose.foundation.layout.WindowInsets.Companion);
method @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static androidx.compose.foundation.layout.WindowInsets getTappableElement(androidx.compose.foundation.layout.WindowInsets.Companion);
method @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static androidx.compose.foundation.layout.WindowInsets getWaterfall(androidx.compose.foundation.layout.WindowInsets.Companion);
- method public static void setConsumeWindowInsets(androidx.compose.ui.platform.ComposeView, boolean value);
+ method public static void setConsumeWindowInsets(androidx.compose.ui.platform.ComposeView, boolean);
}
}
diff --git a/compose/foundation/foundation-layout/api/public_plus_experimental_current.txt b/compose/foundation/foundation-layout/api/public_plus_experimental_current.txt
index df79bba..2e12685 100644
--- a/compose/foundation/foundation-layout/api/public_plus_experimental_current.txt
+++ b/compose/foundation/foundation-layout/api/public_plus_experimental_current.txt
@@ -309,7 +309,7 @@
method @androidx.compose.foundation.layout.ExperimentalLayoutApi @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static boolean isCaptionBarVisible(androidx.compose.foundation.layout.WindowInsets.Companion);
method @androidx.compose.foundation.layout.ExperimentalLayoutApi @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static boolean isImeVisible(androidx.compose.foundation.layout.WindowInsets.Companion);
method @androidx.compose.foundation.layout.ExperimentalLayoutApi @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static boolean isTappableElementVisible(androidx.compose.foundation.layout.WindowInsets.Companion);
- method public static void setConsumeWindowInsets(androidx.compose.ui.platform.ComposeView, boolean value);
+ method public static void setConsumeWindowInsets(androidx.compose.ui.platform.ComposeView, boolean);
}
}
diff --git a/compose/foundation/foundation-layout/api/restricted_current.txt b/compose/foundation/foundation-layout/api/restricted_current.txt
index a3bd696..585f2e0 100644
--- a/compose/foundation/foundation-layout/api/restricted_current.txt
+++ b/compose/foundation/foundation-layout/api/restricted_current.txt
@@ -298,7 +298,7 @@
method @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static androidx.compose.foundation.layout.WindowInsets getSystemGestures(androidx.compose.foundation.layout.WindowInsets.Companion);
method @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static androidx.compose.foundation.layout.WindowInsets getTappableElement(androidx.compose.foundation.layout.WindowInsets.Companion);
method @androidx.compose.runtime.Composable @androidx.compose.runtime.NonRestartableComposable public static androidx.compose.foundation.layout.WindowInsets getWaterfall(androidx.compose.foundation.layout.WindowInsets.Companion);
- method public static void setConsumeWindowInsets(androidx.compose.ui.platform.ComposeView, boolean value);
+ method public static void setConsumeWindowInsets(androidx.compose.ui.platform.ComposeView, boolean);
}
}
diff --git a/compose/foundation/foundation/api/current.ignore b/compose/foundation/foundation/api/current.ignore
index 792192e..1fd974e 100644
--- a/compose/foundation/foundation/api/current.ignore
+++ b/compose/foundation/foundation/api/current.ignore
@@ -1,4 +1,92 @@
// Baseline format: 1.0
+ParameterNameChange: androidx.compose.foundation.MutatorMutex#mutate(androidx.compose.foundation.MutatePriority, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.MutatorMutex.mutate
+ParameterNameChange: androidx.compose.foundation.MutatorMutex#mutateWith(T, androidx.compose.foundation.MutatePriority, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super R>,?>, kotlin.coroutines.Continuation<? super R>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.MutatorMutex.mutateWith
+ParameterNameChange: androidx.compose.foundation.ScrollState#animateScrollTo(int, androidx.compose.animation.core.AnimationSpec<java.lang.Float>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.ScrollState.animateScrollTo
+ParameterNameChange: androidx.compose.foundation.ScrollState#scroll(androidx.compose.foundation.MutatePriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.ScrollState.scroll
+ParameterNameChange: androidx.compose.foundation.ScrollState#scrollTo(int, kotlin.coroutines.Continuation<? super java.lang.Float>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.foundation.ScrollState.scrollTo
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#awaitDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.DragGestureDetectorKt.awaitDragOrCancellation
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#awaitHorizontalDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.DragGestureDetectorKt.awaitHorizontalDragOrCancellation
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#awaitHorizontalTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit>, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.DragGestureDetectorKt.awaitHorizontalTouchSlopOrCancellation
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#awaitTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.DragGestureDetectorKt.awaitTouchSlopOrCancellation
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#awaitVerticalDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.DragGestureDetectorKt.awaitVerticalDragOrCancellation
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#awaitVerticalTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit>, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.DragGestureDetectorKt.awaitVerticalTouchSlopOrCancellation
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#detectDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.jvm.functions.Function0<kotlin.Unit>, kotlin.jvm.functions.Function0<kotlin.Unit>, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #5:
+ Attempted to remove parameter name from parameter arg6 in androidx.compose.foundation.gestures.DragGestureDetectorKt.detectDragGestures
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#detectDragGesturesAfterLongPress(androidx.compose.ui.input.pointer.PointerInputScope, kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.jvm.functions.Function0<kotlin.Unit>, kotlin.jvm.functions.Function0<kotlin.Unit>, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #5:
+ Attempted to remove parameter name from parameter arg6 in androidx.compose.foundation.gestures.DragGestureDetectorKt.detectDragGesturesAfterLongPress
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#detectHorizontalDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.jvm.functions.Function0<kotlin.Unit>, kotlin.jvm.functions.Function0<kotlin.Unit>, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #5:
+ Attempted to remove parameter name from parameter arg6 in androidx.compose.foundation.gestures.DragGestureDetectorKt.detectHorizontalDragGestures
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#detectVerticalDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.jvm.functions.Function0<kotlin.Unit>, kotlin.jvm.functions.Function0<kotlin.Unit>, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #5:
+ Attempted to remove parameter name from parameter arg6 in androidx.compose.foundation.gestures.DragGestureDetectorKt.detectVerticalDragGestures
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#drag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit>, kotlin.coroutines.Continuation<? super java.lang.Boolean>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.DragGestureDetectorKt.drag
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#horizontalDrag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit>, kotlin.coroutines.Continuation<? super java.lang.Boolean>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.DragGestureDetectorKt.horizontalDrag
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#verticalDrag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit>, kotlin.coroutines.Continuation<? super java.lang.Boolean>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.DragGestureDetectorKt.verticalDrag
+ParameterNameChange: androidx.compose.foundation.gestures.DraggableState#drag(androidx.compose.foundation.MutatePriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.DragScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.DraggableState.drag
+ParameterNameChange: androidx.compose.foundation.gestures.FlingBehavior#performFling(androidx.compose.foundation.gestures.ScrollScope, float, kotlin.coroutines.Continuation<? super java.lang.Float>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.FlingBehavior.performFling
+ParameterNameChange: androidx.compose.foundation.gestures.ForEachGestureKt#forEachGesture(androidx.compose.ui.input.pointer.PointerInputScope, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.ForEachGestureKt.forEachGesture
+ParameterNameChange: androidx.compose.foundation.gestures.PressGestureScope#awaitRelease(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.foundation.gestures.PressGestureScope.awaitRelease
+ParameterNameChange: androidx.compose.foundation.gestures.PressGestureScope#tryAwaitRelease(kotlin.coroutines.Continuation<? super java.lang.Boolean>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.foundation.gestures.PressGestureScope.tryAwaitRelease
+ParameterNameChange: androidx.compose.foundation.gestures.ScrollExtensionsKt#animateScrollBy(androidx.compose.foundation.gestures.ScrollableState, float, androidx.compose.animation.core.AnimationSpec<java.lang.Float>, kotlin.coroutines.Continuation<? super java.lang.Float>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.ScrollExtensionsKt.animateScrollBy
+ParameterNameChange: androidx.compose.foundation.gestures.ScrollExtensionsKt#scrollBy(androidx.compose.foundation.gestures.ScrollableState, float, kotlin.coroutines.Continuation<? super java.lang.Float>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.ScrollExtensionsKt.scrollBy
+ParameterNameChange: androidx.compose.foundation.gestures.ScrollExtensionsKt#stopScroll(androidx.compose.foundation.gestures.ScrollableState, androidx.compose.foundation.MutatePriority, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.ScrollExtensionsKt.stopScroll
+ParameterNameChange: androidx.compose.foundation.gestures.ScrollableState#scroll(androidx.compose.foundation.MutatePriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.ScrollableState.scroll
+ParameterNameChange: androidx.compose.foundation.gestures.TapGestureDetectorKt#awaitFirstDown(androidx.compose.ui.input.pointer.AwaitPointerEventScope, boolean, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.TapGestureDetectorKt.awaitFirstDown
+ParameterNameChange: androidx.compose.foundation.gestures.TapGestureDetectorKt#detectTapGestures(androidx.compose.ui.input.pointer.PointerInputScope, kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.jvm.functions.Function3<? super androidx.compose.foundation.gestures.PressGestureScope,? super androidx.compose.ui.geometry.Offset,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #5:
+ Attempted to remove parameter name from parameter arg6 in androidx.compose.foundation.gestures.TapGestureDetectorKt.detectTapGestures
+ParameterNameChange: androidx.compose.foundation.gestures.TapGestureDetectorKt#waitForUpOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.foundation.gestures.TapGestureDetectorKt.waitForUpOrCancellation
+ParameterNameChange: androidx.compose.foundation.gestures.TransformGestureDetectorKt#detectTransformGestures(androidx.compose.ui.input.pointer.PointerInputScope, boolean, kotlin.jvm.functions.Function4<? super androidx.compose.ui.geometry.Offset,? super androidx.compose.ui.geometry.Offset,? super java.lang.Float,? super java.lang.Float,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.TransformGestureDetectorKt.detectTransformGestures
+ParameterNameChange: androidx.compose.foundation.gestures.TransformableState#transform(androidx.compose.foundation.MutatePriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.TransformScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.TransformableState.transform
+ParameterNameChange: androidx.compose.foundation.gestures.TransformableStateKt#animatePanBy(androidx.compose.foundation.gestures.TransformableState, long, androidx.compose.animation.core.AnimationSpec<androidx.compose.ui.geometry.Offset>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.TransformableStateKt.animatePanBy
+ParameterNameChange: androidx.compose.foundation.gestures.TransformableStateKt#animateRotateBy(androidx.compose.foundation.gestures.TransformableState, float, androidx.compose.animation.core.AnimationSpec<java.lang.Float>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.TransformableStateKt.animateRotateBy
+ParameterNameChange: androidx.compose.foundation.gestures.TransformableStateKt#animateZoomBy(androidx.compose.foundation.gestures.TransformableState, float, androidx.compose.animation.core.AnimationSpec<java.lang.Float>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.TransformableStateKt.animateZoomBy
+ParameterNameChange: androidx.compose.foundation.gestures.TransformableStateKt#panBy(androidx.compose.foundation.gestures.TransformableState, long, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.TransformableStateKt.panBy
+ParameterNameChange: androidx.compose.foundation.gestures.TransformableStateKt#rotateBy(androidx.compose.foundation.gestures.TransformableState, float, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.TransformableStateKt.rotateBy
+ParameterNameChange: androidx.compose.foundation.gestures.TransformableStateKt#stopTransformation(androidx.compose.foundation.gestures.TransformableState, androidx.compose.foundation.MutatePriority, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.TransformableStateKt.stopTransformation
+ParameterNameChange: androidx.compose.foundation.gestures.TransformableStateKt#zoomBy(androidx.compose.foundation.gestures.TransformableState, float, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.TransformableStateKt.zoomBy
+ParameterNameChange: androidx.compose.foundation.interaction.MutableInteractionSource#emit(androidx.compose.foundation.interaction.Interaction, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.foundation.interaction.MutableInteractionSource.emit
+ParameterNameChange: androidx.compose.foundation.lazy.LazyListState#animateScrollToItem(int, int, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.lazy.LazyListState.animateScrollToItem
+ParameterNameChange: androidx.compose.foundation.lazy.LazyListState#scroll(androidx.compose.foundation.MutatePriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.lazy.LazyListState.scroll
+ParameterNameChange: androidx.compose.foundation.lazy.LazyListState#scrollToItem(int, int, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.lazy.LazyListState.scrollToItem
+
+
RemovedClass: androidx.compose.foundation.lazy.LazyGridKt:
Removed class androidx.compose.foundation.lazy.LazyGridKt
RemovedClass: androidx.compose.foundation.lazy.LazyGridSpanKt:
diff --git a/compose/foundation/foundation/api/current.txt b/compose/foundation/foundation/api/current.txt
index c83a173..0869326 100644
--- a/compose/foundation/foundation/api/current.txt
+++ b/compose/foundation/foundation/api/current.txt
@@ -95,8 +95,8 @@
@androidx.compose.runtime.Stable public final class MutatorMutex {
ctor public MutatorMutex();
- method public suspend <R> Object? mutate(optional androidx.compose.foundation.MutatePriority priority, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R> p);
- method public suspend <T, R> Object? mutateWith(T? receiver, optional androidx.compose.foundation.MutatePriority priority, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? mutate(optional androidx.compose.foundation.MutatePriority priority, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
+ method public suspend <T, R> Object? mutateWith(T? receiver, optional androidx.compose.foundation.MutatePriority priority, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
}
public final class ProgressSemanticsKt {
@@ -112,14 +112,14 @@
@androidx.compose.runtime.Stable public final class ScrollState implements androidx.compose.foundation.gestures.ScrollableState {
ctor public ScrollState(int initial);
- method public suspend Object? animateScrollTo(int value, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? animateScrollTo(int value, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public float dispatchRawDelta(float delta);
method public androidx.compose.foundation.interaction.InteractionSource getInteractionSource();
method public int getMaxValue();
method public int getValue();
method public boolean isScrollInProgress();
- method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? scrollTo(int value, kotlin.coroutines.Continuation<? super java.lang.Float> p);
+ method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? scrollTo(int value, kotlin.coroutines.Continuation<? super java.lang.Float>);
property public final androidx.compose.foundation.interaction.InteractionSource interactionSource;
property public boolean isScrollInProgress;
property public final int maxValue;
@@ -151,19 +151,19 @@
}
public final class DragGestureDetectorKt {
- method public static suspend Object? awaitDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? awaitHorizontalDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? awaitHorizontalTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onTouchSlopReached, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? awaitTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onTouchSlopReached, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? awaitVerticalDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? awaitVerticalTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onTouchSlopReached, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? detectDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? detectDragGesturesAfterLongPress(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? detectHorizontalDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onHorizontalDrag, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? detectVerticalDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onVerticalDrag, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? drag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super java.lang.Boolean> p);
- method public static suspend Object? horizontalDrag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super java.lang.Boolean> p);
- method public static suspend Object? verticalDrag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super java.lang.Boolean> p);
+ method public static suspend Object? awaitDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? awaitHorizontalDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? awaitHorizontalTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onTouchSlopReached, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? awaitTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onTouchSlopReached, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? awaitVerticalDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? awaitVerticalTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onTouchSlopReached, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? detectDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? detectDragGesturesAfterLongPress(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? detectHorizontalDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onHorizontalDrag, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? detectVerticalDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onVerticalDrag, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? drag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super java.lang.Boolean>);
+ method public static suspend Object? horizontalDrag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super java.lang.Boolean>);
+ method public static suspend Object? verticalDrag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super java.lang.Boolean>);
}
public interface DragScope {
@@ -178,15 +178,15 @@
public interface DraggableState {
method public void dispatchRawDelta(float delta);
- method public suspend Object? drag(optional androidx.compose.foundation.MutatePriority dragPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.DragScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? drag(optional androidx.compose.foundation.MutatePriority dragPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.DragScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
@androidx.compose.runtime.Stable public interface FlingBehavior {
- method public suspend Object? performFling(androidx.compose.foundation.gestures.ScrollScope, float initialVelocity, kotlin.coroutines.Continuation<? super java.lang.Float> p);
+ method public suspend Object? performFling(androidx.compose.foundation.gestures.ScrollScope, float initialVelocity, kotlin.coroutines.Continuation<? super java.lang.Float>);
}
public final class ForEachGestureKt {
- method public static suspend Object? forEachGesture(androidx.compose.ui.input.pointer.PointerInputScope, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? forEachGesture(androidx.compose.ui.input.pointer.PointerInputScope, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class GestureCancellationException extends java.util.concurrent.CancellationException {
@@ -202,14 +202,14 @@
}
public interface PressGestureScope extends androidx.compose.ui.unit.Density {
- method public suspend Object? awaitRelease(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? tryAwaitRelease(kotlin.coroutines.Continuation<? super java.lang.Boolean> p);
+ method public suspend Object? awaitRelease(kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? tryAwaitRelease(kotlin.coroutines.Continuation<? super java.lang.Boolean>);
}
public final class ScrollExtensionsKt {
- method public static suspend Object? animateScrollBy(androidx.compose.foundation.gestures.ScrollableState, float value, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super java.lang.Float> p);
- method public static suspend Object? scrollBy(androidx.compose.foundation.gestures.ScrollableState, float value, kotlin.coroutines.Continuation<? super java.lang.Float> p);
- method public static suspend Object? stopScroll(androidx.compose.foundation.gestures.ScrollableState, optional androidx.compose.foundation.MutatePriority scrollPriority, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? animateScrollBy(androidx.compose.foundation.gestures.ScrollableState, float value, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super java.lang.Float>);
+ method public static suspend Object? scrollBy(androidx.compose.foundation.gestures.ScrollableState, float value, kotlin.coroutines.Continuation<? super java.lang.Float>);
+ method public static suspend Object? stopScroll(androidx.compose.foundation.gestures.ScrollableState, optional androidx.compose.foundation.MutatePriority scrollPriority, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public interface ScrollScope {
@@ -228,7 +228,7 @@
public interface ScrollableState {
method public float dispatchRawDelta(float delta);
method public boolean isScrollInProgress();
- method public suspend Object? scroll(optional androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? scroll(optional androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public abstract boolean isScrollInProgress;
}
@@ -238,9 +238,9 @@
}
public final class TapGestureDetectorKt {
- method public static suspend Object? awaitFirstDown(androidx.compose.ui.input.pointer.AwaitPointerEventScope, optional boolean requireUnconsumed, optional kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? detectTapGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onDoubleTap, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onLongPress, optional kotlin.jvm.functions.Function3<? super androidx.compose.foundation.gestures.PressGestureScope,? super androidx.compose.ui.geometry.Offset,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> onPress, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onTap, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? waitForUpOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
+ method public static suspend Object? awaitFirstDown(androidx.compose.ui.input.pointer.AwaitPointerEventScope, optional boolean requireUnconsumed, optional kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? detectTapGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onDoubleTap, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onLongPress, optional kotlin.jvm.functions.Function3<? super androidx.compose.foundation.gestures.PressGestureScope,? super androidx.compose.ui.geometry.Offset,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> onPress, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onTap, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? waitForUpOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
}
public final class TransformGestureDetectorKt {
@@ -249,7 +249,7 @@
method public static long calculatePan(androidx.compose.ui.input.pointer.PointerEvent);
method public static float calculateRotation(androidx.compose.ui.input.pointer.PointerEvent);
method public static float calculateZoom(androidx.compose.ui.input.pointer.PointerEvent);
- method public static suspend Object? detectTransformGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional boolean panZoomLock, kotlin.jvm.functions.Function4<? super androidx.compose.ui.geometry.Offset,? super androidx.compose.ui.geometry.Offset,? super java.lang.Float,? super java.lang.Float,kotlin.Unit> onGesture, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? detectTransformGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional boolean panZoomLock, kotlin.jvm.functions.Function4<? super androidx.compose.ui.geometry.Offset,? super androidx.compose.ui.geometry.Offset,? super java.lang.Float,? super java.lang.Float,kotlin.Unit> onGesture, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public interface TransformScope {
@@ -262,20 +262,20 @@
public interface TransformableState {
method public boolean isTransformInProgress();
- method public suspend Object? transform(optional androidx.compose.foundation.MutatePriority transformPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.TransformScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? transform(optional androidx.compose.foundation.MutatePriority transformPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.TransformScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public abstract boolean isTransformInProgress;
}
public final class TransformableStateKt {
method public static androidx.compose.foundation.gestures.TransformableState TransformableState(kotlin.jvm.functions.Function3<? super java.lang.Float,? super androidx.compose.ui.geometry.Offset,? super java.lang.Float,kotlin.Unit> onTransformation);
- method public static suspend Object? animatePanBy(androidx.compose.foundation.gestures.TransformableState, long offset, optional androidx.compose.animation.core.AnimationSpec<androidx.compose.ui.geometry.Offset> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? animateRotateBy(androidx.compose.foundation.gestures.TransformableState, float degrees, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? animateZoomBy(androidx.compose.foundation.gestures.TransformableState, float zoomFactor, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? panBy(androidx.compose.foundation.gestures.TransformableState, long offset, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? animatePanBy(androidx.compose.foundation.gestures.TransformableState, long offset, optional androidx.compose.animation.core.AnimationSpec<androidx.compose.ui.geometry.Offset> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? animateRotateBy(androidx.compose.foundation.gestures.TransformableState, float degrees, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? animateZoomBy(androidx.compose.foundation.gestures.TransformableState, float zoomFactor, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? panBy(androidx.compose.foundation.gestures.TransformableState, long offset, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @androidx.compose.runtime.Composable public static androidx.compose.foundation.gestures.TransformableState rememberTransformableState(kotlin.jvm.functions.Function3<? super java.lang.Float,? super androidx.compose.ui.geometry.Offset,? super java.lang.Float,kotlin.Unit> onTransformation);
- method public static suspend Object? rotateBy(androidx.compose.foundation.gestures.TransformableState, float degrees, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? stopTransformation(androidx.compose.foundation.gestures.TransformableState, optional androidx.compose.foundation.MutatePriority terminationPriority, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? zoomBy(androidx.compose.foundation.gestures.TransformableState, float zoomFactor, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? rotateBy(androidx.compose.foundation.gestures.TransformableState, float degrees, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? stopTransformation(androidx.compose.foundation.gestures.TransformableState, optional androidx.compose.foundation.MutatePriority terminationPriority, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? zoomBy(androidx.compose.foundation.gestures.TransformableState, float zoomFactor, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
}
@@ -352,7 +352,7 @@
}
@androidx.compose.runtime.Stable public interface MutableInteractionSource extends androidx.compose.foundation.interaction.InteractionSource {
- method public suspend Object? emit(androidx.compose.foundation.interaction.Interaction interaction, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? emit(androidx.compose.foundation.interaction.Interaction interaction, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public boolean tryEmit(androidx.compose.foundation.interaction.Interaction interaction);
}
@@ -450,15 +450,15 @@
@androidx.compose.runtime.Stable public final class LazyListState implements androidx.compose.foundation.gestures.ScrollableState {
ctor public LazyListState(optional int firstVisibleItemIndex, optional int firstVisibleItemScrollOffset);
- method public suspend Object? animateScrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? animateScrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public float dispatchRawDelta(float delta);
method public int getFirstVisibleItemIndex();
method public int getFirstVisibleItemScrollOffset();
method public androidx.compose.foundation.interaction.InteractionSource getInteractionSource();
method public androidx.compose.foundation.lazy.LazyListLayoutInfo getLayoutInfo();
method public boolean isScrollInProgress();
- method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? scrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? scrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final int firstVisibleItemIndex;
property public final int firstVisibleItemScrollOffset;
property public final androidx.compose.foundation.interaction.InteractionSource interactionSource;
@@ -594,15 +594,15 @@
@androidx.compose.runtime.Stable public final class LazyGridState implements androidx.compose.foundation.gestures.ScrollableState {
ctor public LazyGridState(optional int firstVisibleItemIndex, optional int firstVisibleItemScrollOffset);
- method public suspend Object? animateScrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? animateScrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public float dispatchRawDelta(float delta);
method public int getFirstVisibleItemIndex();
method public int getFirstVisibleItemScrollOffset();
method public androidx.compose.foundation.interaction.InteractionSource getInteractionSource();
method public androidx.compose.foundation.lazy.grid.LazyGridLayoutInfo getLayoutInfo();
method public boolean isScrollInProgress();
- method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? scrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? scrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final int firstVisibleItemIndex;
property public final int firstVisibleItemScrollOffset;
property public final androidx.compose.foundation.interaction.InteractionSource interactionSource;
diff --git a/compose/foundation/foundation/api/public_plus_experimental_current.txt b/compose/foundation/foundation/api/public_plus_experimental_current.txt
index eb34880..894497b 100644
--- a/compose/foundation/foundation/api/public_plus_experimental_current.txt
+++ b/compose/foundation/foundation/api/public_plus_experimental_current.txt
@@ -121,8 +121,8 @@
@androidx.compose.runtime.Stable public final class MutatorMutex {
ctor public MutatorMutex();
- method public suspend <R> Object? mutate(optional androidx.compose.foundation.MutatePriority priority, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R> p);
- method public suspend <T, R> Object? mutateWith(T? receiver, optional androidx.compose.foundation.MutatePriority priority, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? mutate(optional androidx.compose.foundation.MutatePriority priority, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
+ method public suspend <T, R> Object? mutateWith(T? receiver, optional androidx.compose.foundation.MutatePriority priority, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
}
public final class ProgressSemanticsKt {
@@ -138,14 +138,14 @@
@androidx.compose.runtime.Stable public final class ScrollState implements androidx.compose.foundation.gestures.ScrollableState {
ctor public ScrollState(int initial);
- method public suspend Object? animateScrollTo(int value, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? animateScrollTo(int value, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public float dispatchRawDelta(float delta);
method public androidx.compose.foundation.interaction.InteractionSource getInteractionSource();
method public int getMaxValue();
method public int getValue();
method public boolean isScrollInProgress();
- method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? scrollTo(int value, kotlin.coroutines.Continuation<? super java.lang.Float> p);
+ method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? scrollTo(int value, kotlin.coroutines.Continuation<? super java.lang.Float>);
property public final androidx.compose.foundation.interaction.InteractionSource interactionSource;
property public boolean isScrollInProgress;
property public final int maxValue;
@@ -177,19 +177,19 @@
}
public final class DragGestureDetectorKt {
- method public static suspend Object? awaitDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? awaitHorizontalDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? awaitHorizontalTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onTouchSlopReached, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? awaitTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onTouchSlopReached, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? awaitVerticalDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? awaitVerticalTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onTouchSlopReached, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? detectDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? detectDragGesturesAfterLongPress(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? detectHorizontalDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onHorizontalDrag, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? detectVerticalDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onVerticalDrag, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? drag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super java.lang.Boolean> p);
- method public static suspend Object? horizontalDrag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super java.lang.Boolean> p);
- method public static suspend Object? verticalDrag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super java.lang.Boolean> p);
+ method public static suspend Object? awaitDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? awaitHorizontalDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? awaitHorizontalTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onTouchSlopReached, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? awaitTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onTouchSlopReached, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? awaitVerticalDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? awaitVerticalTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onTouchSlopReached, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? detectDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? detectDragGesturesAfterLongPress(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? detectHorizontalDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onHorizontalDrag, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? detectVerticalDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onVerticalDrag, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? drag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super java.lang.Boolean>);
+ method public static suspend Object? horizontalDrag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super java.lang.Boolean>);
+ method public static suspend Object? verticalDrag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super java.lang.Boolean>);
}
public interface DragScope {
@@ -204,15 +204,15 @@
public interface DraggableState {
method public void dispatchRawDelta(float delta);
- method public suspend Object? drag(optional androidx.compose.foundation.MutatePriority dragPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.DragScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? drag(optional androidx.compose.foundation.MutatePriority dragPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.DragScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
@androidx.compose.runtime.Stable public interface FlingBehavior {
- method public suspend Object? performFling(androidx.compose.foundation.gestures.ScrollScope, float initialVelocity, kotlin.coroutines.Continuation<? super java.lang.Float> p);
+ method public suspend Object? performFling(androidx.compose.foundation.gestures.ScrollScope, float initialVelocity, kotlin.coroutines.Continuation<? super java.lang.Float>);
}
public final class ForEachGestureKt {
- method public static suspend Object? forEachGesture(androidx.compose.ui.input.pointer.PointerInputScope, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? forEachGesture(androidx.compose.ui.input.pointer.PointerInputScope, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class GestureCancellationException extends java.util.concurrent.CancellationException {
@@ -240,14 +240,14 @@
}
public interface PressGestureScope extends androidx.compose.ui.unit.Density {
- method public suspend Object? awaitRelease(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? tryAwaitRelease(kotlin.coroutines.Continuation<? super java.lang.Boolean> p);
+ method public suspend Object? awaitRelease(kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? tryAwaitRelease(kotlin.coroutines.Continuation<? super java.lang.Boolean>);
}
public final class ScrollExtensionsKt {
- method public static suspend Object? animateScrollBy(androidx.compose.foundation.gestures.ScrollableState, float value, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super java.lang.Float> p);
- method public static suspend Object? scrollBy(androidx.compose.foundation.gestures.ScrollableState, float value, kotlin.coroutines.Continuation<? super java.lang.Float> p);
- method public static suspend Object? stopScroll(androidx.compose.foundation.gestures.ScrollableState, optional androidx.compose.foundation.MutatePriority scrollPriority, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? animateScrollBy(androidx.compose.foundation.gestures.ScrollableState, float value, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super java.lang.Float>);
+ method public static suspend Object? scrollBy(androidx.compose.foundation.gestures.ScrollableState, float value, kotlin.coroutines.Continuation<? super java.lang.Float>);
+ method public static suspend Object? stopScroll(androidx.compose.foundation.gestures.ScrollableState, optional androidx.compose.foundation.MutatePriority scrollPriority, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public interface ScrollScope {
@@ -266,7 +266,7 @@
public interface ScrollableState {
method public float dispatchRawDelta(float delta);
method public boolean isScrollInProgress();
- method public suspend Object? scroll(optional androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? scroll(optional androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public abstract boolean isScrollInProgress;
}
@@ -276,9 +276,9 @@
}
public final class TapGestureDetectorKt {
- method public static suspend Object? awaitFirstDown(androidx.compose.ui.input.pointer.AwaitPointerEventScope, optional boolean requireUnconsumed, optional kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? detectTapGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onDoubleTap, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onLongPress, optional kotlin.jvm.functions.Function3<? super androidx.compose.foundation.gestures.PressGestureScope,? super androidx.compose.ui.geometry.Offset,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> onPress, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onTap, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? waitForUpOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
+ method public static suspend Object? awaitFirstDown(androidx.compose.ui.input.pointer.AwaitPointerEventScope, optional boolean requireUnconsumed, optional kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? detectTapGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onDoubleTap, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onLongPress, optional kotlin.jvm.functions.Function3<? super androidx.compose.foundation.gestures.PressGestureScope,? super androidx.compose.ui.geometry.Offset,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> onPress, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onTap, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? waitForUpOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
}
public final class TransformGestureDetectorKt {
@@ -287,7 +287,7 @@
method public static long calculatePan(androidx.compose.ui.input.pointer.PointerEvent);
method public static float calculateRotation(androidx.compose.ui.input.pointer.PointerEvent);
method public static float calculateZoom(androidx.compose.ui.input.pointer.PointerEvent);
- method public static suspend Object? detectTransformGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional boolean panZoomLock, kotlin.jvm.functions.Function4<? super androidx.compose.ui.geometry.Offset,? super androidx.compose.ui.geometry.Offset,? super java.lang.Float,? super java.lang.Float,kotlin.Unit> onGesture, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? detectTransformGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional boolean panZoomLock, kotlin.jvm.functions.Function4<? super androidx.compose.ui.geometry.Offset,? super androidx.compose.ui.geometry.Offset,? super java.lang.Float,? super java.lang.Float,kotlin.Unit> onGesture, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public interface TransformScope {
@@ -300,20 +300,20 @@
public interface TransformableState {
method public boolean isTransformInProgress();
- method public suspend Object? transform(optional androidx.compose.foundation.MutatePriority transformPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.TransformScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? transform(optional androidx.compose.foundation.MutatePriority transformPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.TransformScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public abstract boolean isTransformInProgress;
}
public final class TransformableStateKt {
method public static androidx.compose.foundation.gestures.TransformableState TransformableState(kotlin.jvm.functions.Function3<? super java.lang.Float,? super androidx.compose.ui.geometry.Offset,? super java.lang.Float,kotlin.Unit> onTransformation);
- method public static suspend Object? animatePanBy(androidx.compose.foundation.gestures.TransformableState, long offset, optional androidx.compose.animation.core.AnimationSpec<androidx.compose.ui.geometry.Offset> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? animateRotateBy(androidx.compose.foundation.gestures.TransformableState, float degrees, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? animateZoomBy(androidx.compose.foundation.gestures.TransformableState, float zoomFactor, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? panBy(androidx.compose.foundation.gestures.TransformableState, long offset, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? animatePanBy(androidx.compose.foundation.gestures.TransformableState, long offset, optional androidx.compose.animation.core.AnimationSpec<androidx.compose.ui.geometry.Offset> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? animateRotateBy(androidx.compose.foundation.gestures.TransformableState, float degrees, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? animateZoomBy(androidx.compose.foundation.gestures.TransformableState, float zoomFactor, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? panBy(androidx.compose.foundation.gestures.TransformableState, long offset, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @androidx.compose.runtime.Composable public static androidx.compose.foundation.gestures.TransformableState rememberTransformableState(kotlin.jvm.functions.Function3<? super java.lang.Float,? super androidx.compose.ui.geometry.Offset,? super java.lang.Float,kotlin.Unit> onTransformation);
- method public static suspend Object? rotateBy(androidx.compose.foundation.gestures.TransformableState, float degrees, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? stopTransformation(androidx.compose.foundation.gestures.TransformableState, optional androidx.compose.foundation.MutatePriority terminationPriority, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? zoomBy(androidx.compose.foundation.gestures.TransformableState, float zoomFactor, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? rotateBy(androidx.compose.foundation.gestures.TransformableState, float degrees, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? stopTransformation(androidx.compose.foundation.gestures.TransformableState, optional androidx.compose.foundation.MutatePriority terminationPriority, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? zoomBy(androidx.compose.foundation.gestures.TransformableState, float zoomFactor, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
}
@@ -390,7 +390,7 @@
}
@androidx.compose.runtime.Stable public interface MutableInteractionSource extends androidx.compose.foundation.interaction.InteractionSource {
- method public suspend Object? emit(androidx.compose.foundation.interaction.Interaction interaction, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? emit(androidx.compose.foundation.interaction.Interaction interaction, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public boolean tryEmit(androidx.compose.foundation.interaction.Interaction interaction);
}
@@ -513,15 +513,15 @@
@androidx.compose.runtime.Stable public final class LazyListState implements androidx.compose.foundation.gestures.ScrollableState {
ctor public LazyListState(optional int firstVisibleItemIndex, optional int firstVisibleItemScrollOffset);
- method public suspend Object? animateScrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? animateScrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public float dispatchRawDelta(float delta);
method public int getFirstVisibleItemIndex();
method public int getFirstVisibleItemScrollOffset();
method public androidx.compose.foundation.interaction.InteractionSource getInteractionSource();
method public androidx.compose.foundation.lazy.LazyListLayoutInfo getLayoutInfo();
method public boolean isScrollInProgress();
- method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? scrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? scrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final int firstVisibleItemIndex;
property public final int firstVisibleItemScrollOffset;
property public final androidx.compose.foundation.interaction.InteractionSource interactionSource;
@@ -658,15 +658,15 @@
@androidx.compose.runtime.Stable public final class LazyGridState implements androidx.compose.foundation.gestures.ScrollableState {
ctor public LazyGridState(optional int firstVisibleItemIndex, optional int firstVisibleItemScrollOffset);
- method public suspend Object? animateScrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? animateScrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public float dispatchRawDelta(float delta);
method public int getFirstVisibleItemIndex();
method public int getFirstVisibleItemScrollOffset();
method public androidx.compose.foundation.interaction.InteractionSource getInteractionSource();
method public androidx.compose.foundation.lazy.grid.LazyGridLayoutInfo getLayoutInfo();
method public boolean isScrollInProgress();
- method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? scrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? scrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final int firstVisibleItemIndex;
property public final int firstVisibleItemScrollOffset;
property public final androidx.compose.foundation.interaction.InteractionSource interactionSource;
@@ -746,7 +746,7 @@
}
@androidx.compose.foundation.ExperimentalFoundationApi public sealed interface BringIntoViewRequester {
- method public suspend Object? bringIntoView(optional androidx.compose.ui.geometry.Rect? rect, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? bringIntoView(optional androidx.compose.ui.geometry.Rect? rect, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class BringIntoViewRequesterKt {
@@ -755,7 +755,7 @@
}
@androidx.compose.foundation.ExperimentalFoundationApi public interface BringIntoViewResponder {
- method @androidx.compose.foundation.ExperimentalFoundationApi public suspend Object? bringChildIntoView(androidx.compose.ui.geometry.Rect localRect, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @androidx.compose.foundation.ExperimentalFoundationApi public suspend Object? bringChildIntoView(androidx.compose.ui.geometry.Rect localRect, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @androidx.compose.foundation.ExperimentalFoundationApi public androidx.compose.ui.geometry.Rect calculateRectForParent(androidx.compose.ui.geometry.Rect localRect);
}
diff --git a/compose/foundation/foundation/api/restricted_current.ignore b/compose/foundation/foundation/api/restricted_current.ignore
index 792192e..1fd974e 100644
--- a/compose/foundation/foundation/api/restricted_current.ignore
+++ b/compose/foundation/foundation/api/restricted_current.ignore
@@ -1,4 +1,92 @@
// Baseline format: 1.0
+ParameterNameChange: androidx.compose.foundation.MutatorMutex#mutate(androidx.compose.foundation.MutatePriority, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.MutatorMutex.mutate
+ParameterNameChange: androidx.compose.foundation.MutatorMutex#mutateWith(T, androidx.compose.foundation.MutatePriority, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super R>,?>, kotlin.coroutines.Continuation<? super R>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.MutatorMutex.mutateWith
+ParameterNameChange: androidx.compose.foundation.ScrollState#animateScrollTo(int, androidx.compose.animation.core.AnimationSpec<java.lang.Float>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.ScrollState.animateScrollTo
+ParameterNameChange: androidx.compose.foundation.ScrollState#scroll(androidx.compose.foundation.MutatePriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.ScrollState.scroll
+ParameterNameChange: androidx.compose.foundation.ScrollState#scrollTo(int, kotlin.coroutines.Continuation<? super java.lang.Float>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.foundation.ScrollState.scrollTo
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#awaitDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.DragGestureDetectorKt.awaitDragOrCancellation
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#awaitHorizontalDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.DragGestureDetectorKt.awaitHorizontalDragOrCancellation
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#awaitHorizontalTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit>, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.DragGestureDetectorKt.awaitHorizontalTouchSlopOrCancellation
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#awaitTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.DragGestureDetectorKt.awaitTouchSlopOrCancellation
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#awaitVerticalDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.DragGestureDetectorKt.awaitVerticalDragOrCancellation
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#awaitVerticalTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit>, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.DragGestureDetectorKt.awaitVerticalTouchSlopOrCancellation
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#detectDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.jvm.functions.Function0<kotlin.Unit>, kotlin.jvm.functions.Function0<kotlin.Unit>, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #5:
+ Attempted to remove parameter name from parameter arg6 in androidx.compose.foundation.gestures.DragGestureDetectorKt.detectDragGestures
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#detectDragGesturesAfterLongPress(androidx.compose.ui.input.pointer.PointerInputScope, kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.jvm.functions.Function0<kotlin.Unit>, kotlin.jvm.functions.Function0<kotlin.Unit>, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #5:
+ Attempted to remove parameter name from parameter arg6 in androidx.compose.foundation.gestures.DragGestureDetectorKt.detectDragGesturesAfterLongPress
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#detectHorizontalDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.jvm.functions.Function0<kotlin.Unit>, kotlin.jvm.functions.Function0<kotlin.Unit>, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #5:
+ Attempted to remove parameter name from parameter arg6 in androidx.compose.foundation.gestures.DragGestureDetectorKt.detectHorizontalDragGestures
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#detectVerticalDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.jvm.functions.Function0<kotlin.Unit>, kotlin.jvm.functions.Function0<kotlin.Unit>, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #5:
+ Attempted to remove parameter name from parameter arg6 in androidx.compose.foundation.gestures.DragGestureDetectorKt.detectVerticalDragGestures
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#drag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit>, kotlin.coroutines.Continuation<? super java.lang.Boolean>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.DragGestureDetectorKt.drag
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#horizontalDrag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit>, kotlin.coroutines.Continuation<? super java.lang.Boolean>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.DragGestureDetectorKt.horizontalDrag
+ParameterNameChange: androidx.compose.foundation.gestures.DragGestureDetectorKt#verticalDrag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit>, kotlin.coroutines.Continuation<? super java.lang.Boolean>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.DragGestureDetectorKt.verticalDrag
+ParameterNameChange: androidx.compose.foundation.gestures.DraggableState#drag(androidx.compose.foundation.MutatePriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.DragScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.DraggableState.drag
+ParameterNameChange: androidx.compose.foundation.gestures.FlingBehavior#performFling(androidx.compose.foundation.gestures.ScrollScope, float, kotlin.coroutines.Continuation<? super java.lang.Float>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.FlingBehavior.performFling
+ParameterNameChange: androidx.compose.foundation.gestures.ForEachGestureKt#forEachGesture(androidx.compose.ui.input.pointer.PointerInputScope, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.ForEachGestureKt.forEachGesture
+ParameterNameChange: androidx.compose.foundation.gestures.PressGestureScope#awaitRelease(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.foundation.gestures.PressGestureScope.awaitRelease
+ParameterNameChange: androidx.compose.foundation.gestures.PressGestureScope#tryAwaitRelease(kotlin.coroutines.Continuation<? super java.lang.Boolean>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.foundation.gestures.PressGestureScope.tryAwaitRelease
+ParameterNameChange: androidx.compose.foundation.gestures.ScrollExtensionsKt#animateScrollBy(androidx.compose.foundation.gestures.ScrollableState, float, androidx.compose.animation.core.AnimationSpec<java.lang.Float>, kotlin.coroutines.Continuation<? super java.lang.Float>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.ScrollExtensionsKt.animateScrollBy
+ParameterNameChange: androidx.compose.foundation.gestures.ScrollExtensionsKt#scrollBy(androidx.compose.foundation.gestures.ScrollableState, float, kotlin.coroutines.Continuation<? super java.lang.Float>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.ScrollExtensionsKt.scrollBy
+ParameterNameChange: androidx.compose.foundation.gestures.ScrollExtensionsKt#stopScroll(androidx.compose.foundation.gestures.ScrollableState, androidx.compose.foundation.MutatePriority, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.ScrollExtensionsKt.stopScroll
+ParameterNameChange: androidx.compose.foundation.gestures.ScrollableState#scroll(androidx.compose.foundation.MutatePriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.ScrollableState.scroll
+ParameterNameChange: androidx.compose.foundation.gestures.TapGestureDetectorKt#awaitFirstDown(androidx.compose.ui.input.pointer.AwaitPointerEventScope, boolean, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.TapGestureDetectorKt.awaitFirstDown
+ParameterNameChange: androidx.compose.foundation.gestures.TapGestureDetectorKt#detectTapGestures(androidx.compose.ui.input.pointer.PointerInputScope, kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.jvm.functions.Function3<? super androidx.compose.foundation.gestures.PressGestureScope,? super androidx.compose.ui.geometry.Offset,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #5:
+ Attempted to remove parameter name from parameter arg6 in androidx.compose.foundation.gestures.TapGestureDetectorKt.detectTapGestures
+ParameterNameChange: androidx.compose.foundation.gestures.TapGestureDetectorKt#waitForUpOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.foundation.gestures.TapGestureDetectorKt.waitForUpOrCancellation
+ParameterNameChange: androidx.compose.foundation.gestures.TransformGestureDetectorKt#detectTransformGestures(androidx.compose.ui.input.pointer.PointerInputScope, boolean, kotlin.jvm.functions.Function4<? super androidx.compose.ui.geometry.Offset,? super androidx.compose.ui.geometry.Offset,? super java.lang.Float,? super java.lang.Float,kotlin.Unit>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.TransformGestureDetectorKt.detectTransformGestures
+ParameterNameChange: androidx.compose.foundation.gestures.TransformableState#transform(androidx.compose.foundation.MutatePriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.TransformScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.TransformableState.transform
+ParameterNameChange: androidx.compose.foundation.gestures.TransformableStateKt#animatePanBy(androidx.compose.foundation.gestures.TransformableState, long, androidx.compose.animation.core.AnimationSpec<androidx.compose.ui.geometry.Offset>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.TransformableStateKt.animatePanBy
+ParameterNameChange: androidx.compose.foundation.gestures.TransformableStateKt#animateRotateBy(androidx.compose.foundation.gestures.TransformableState, float, androidx.compose.animation.core.AnimationSpec<java.lang.Float>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.TransformableStateKt.animateRotateBy
+ParameterNameChange: androidx.compose.foundation.gestures.TransformableStateKt#animateZoomBy(androidx.compose.foundation.gestures.TransformableState, float, androidx.compose.animation.core.AnimationSpec<java.lang.Float>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.foundation.gestures.TransformableStateKt.animateZoomBy
+ParameterNameChange: androidx.compose.foundation.gestures.TransformableStateKt#panBy(androidx.compose.foundation.gestures.TransformableState, long, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.TransformableStateKt.panBy
+ParameterNameChange: androidx.compose.foundation.gestures.TransformableStateKt#rotateBy(androidx.compose.foundation.gestures.TransformableState, float, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.TransformableStateKt.rotateBy
+ParameterNameChange: androidx.compose.foundation.gestures.TransformableStateKt#stopTransformation(androidx.compose.foundation.gestures.TransformableState, androidx.compose.foundation.MutatePriority, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.TransformableStateKt.stopTransformation
+ParameterNameChange: androidx.compose.foundation.gestures.TransformableStateKt#zoomBy(androidx.compose.foundation.gestures.TransformableState, float, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.gestures.TransformableStateKt.zoomBy
+ParameterNameChange: androidx.compose.foundation.interaction.MutableInteractionSource#emit(androidx.compose.foundation.interaction.Interaction, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.foundation.interaction.MutableInteractionSource.emit
+ParameterNameChange: androidx.compose.foundation.lazy.LazyListState#animateScrollToItem(int, int, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.lazy.LazyListState.animateScrollToItem
+ParameterNameChange: androidx.compose.foundation.lazy.LazyListState#scroll(androidx.compose.foundation.MutatePriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.lazy.LazyListState.scroll
+ParameterNameChange: androidx.compose.foundation.lazy.LazyListState#scrollToItem(int, int, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.foundation.lazy.LazyListState.scrollToItem
+
+
RemovedClass: androidx.compose.foundation.lazy.LazyGridKt:
Removed class androidx.compose.foundation.lazy.LazyGridKt
RemovedClass: androidx.compose.foundation.lazy.LazyGridSpanKt:
diff --git a/compose/foundation/foundation/api/restricted_current.txt b/compose/foundation/foundation/api/restricted_current.txt
index c83a173..0869326 100644
--- a/compose/foundation/foundation/api/restricted_current.txt
+++ b/compose/foundation/foundation/api/restricted_current.txt
@@ -95,8 +95,8 @@
@androidx.compose.runtime.Stable public final class MutatorMutex {
ctor public MutatorMutex();
- method public suspend <R> Object? mutate(optional androidx.compose.foundation.MutatePriority priority, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R> p);
- method public suspend <T, R> Object? mutateWith(T? receiver, optional androidx.compose.foundation.MutatePriority priority, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? mutate(optional androidx.compose.foundation.MutatePriority priority, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
+ method public suspend <T, R> Object? mutateWith(T? receiver, optional androidx.compose.foundation.MutatePriority priority, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
}
public final class ProgressSemanticsKt {
@@ -112,14 +112,14 @@
@androidx.compose.runtime.Stable public final class ScrollState implements androidx.compose.foundation.gestures.ScrollableState {
ctor public ScrollState(int initial);
- method public suspend Object? animateScrollTo(int value, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? animateScrollTo(int value, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public float dispatchRawDelta(float delta);
method public androidx.compose.foundation.interaction.InteractionSource getInteractionSource();
method public int getMaxValue();
method public int getValue();
method public boolean isScrollInProgress();
- method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? scrollTo(int value, kotlin.coroutines.Continuation<? super java.lang.Float> p);
+ method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? scrollTo(int value, kotlin.coroutines.Continuation<? super java.lang.Float>);
property public final androidx.compose.foundation.interaction.InteractionSource interactionSource;
property public boolean isScrollInProgress;
property public final int maxValue;
@@ -151,19 +151,19 @@
}
public final class DragGestureDetectorKt {
- method public static suspend Object? awaitDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? awaitHorizontalDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? awaitHorizontalTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onTouchSlopReached, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? awaitTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onTouchSlopReached, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? awaitVerticalDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? awaitVerticalTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onTouchSlopReached, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? detectDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? detectDragGesturesAfterLongPress(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? detectHorizontalDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onHorizontalDrag, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? detectVerticalDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onVerticalDrag, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? drag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super java.lang.Boolean> p);
- method public static suspend Object? horizontalDrag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super java.lang.Boolean> p);
- method public static suspend Object? verticalDrag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super java.lang.Boolean> p);
+ method public static suspend Object? awaitDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? awaitHorizontalDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? awaitHorizontalTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onTouchSlopReached, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? awaitTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onTouchSlopReached, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? awaitVerticalDragOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? awaitVerticalTouchSlopOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onTouchSlopReached, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? detectDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? detectDragGesturesAfterLongPress(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? detectHorizontalDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onHorizontalDrag, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? detectVerticalDragGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit> onDragStart, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragEnd, optional kotlin.jvm.functions.Function0<kotlin.Unit> onDragCancel, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputChange,? super java.lang.Float,kotlin.Unit> onVerticalDrag, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? drag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super java.lang.Boolean>);
+ method public static suspend Object? horizontalDrag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super java.lang.Boolean>);
+ method public static suspend Object? verticalDrag(androidx.compose.ui.input.pointer.AwaitPointerEventScope, long pointerId, kotlin.jvm.functions.Function1<? super androidx.compose.ui.input.pointer.PointerInputChange,kotlin.Unit> onDrag, kotlin.coroutines.Continuation<? super java.lang.Boolean>);
}
public interface DragScope {
@@ -178,15 +178,15 @@
public interface DraggableState {
method public void dispatchRawDelta(float delta);
- method public suspend Object? drag(optional androidx.compose.foundation.MutatePriority dragPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.DragScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? drag(optional androidx.compose.foundation.MutatePriority dragPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.DragScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
@androidx.compose.runtime.Stable public interface FlingBehavior {
- method public suspend Object? performFling(androidx.compose.foundation.gestures.ScrollScope, float initialVelocity, kotlin.coroutines.Continuation<? super java.lang.Float> p);
+ method public suspend Object? performFling(androidx.compose.foundation.gestures.ScrollScope, float initialVelocity, kotlin.coroutines.Continuation<? super java.lang.Float>);
}
public final class ForEachGestureKt {
- method public static suspend Object? forEachGesture(androidx.compose.ui.input.pointer.PointerInputScope, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? forEachGesture(androidx.compose.ui.input.pointer.PointerInputScope, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.PointerInputScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class GestureCancellationException extends java.util.concurrent.CancellationException {
@@ -202,14 +202,14 @@
}
public interface PressGestureScope extends androidx.compose.ui.unit.Density {
- method public suspend Object? awaitRelease(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? tryAwaitRelease(kotlin.coroutines.Continuation<? super java.lang.Boolean> p);
+ method public suspend Object? awaitRelease(kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? tryAwaitRelease(kotlin.coroutines.Continuation<? super java.lang.Boolean>);
}
public final class ScrollExtensionsKt {
- method public static suspend Object? animateScrollBy(androidx.compose.foundation.gestures.ScrollableState, float value, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super java.lang.Float> p);
- method public static suspend Object? scrollBy(androidx.compose.foundation.gestures.ScrollableState, float value, kotlin.coroutines.Continuation<? super java.lang.Float> p);
- method public static suspend Object? stopScroll(androidx.compose.foundation.gestures.ScrollableState, optional androidx.compose.foundation.MutatePriority scrollPriority, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? animateScrollBy(androidx.compose.foundation.gestures.ScrollableState, float value, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super java.lang.Float>);
+ method public static suspend Object? scrollBy(androidx.compose.foundation.gestures.ScrollableState, float value, kotlin.coroutines.Continuation<? super java.lang.Float>);
+ method public static suspend Object? stopScroll(androidx.compose.foundation.gestures.ScrollableState, optional androidx.compose.foundation.MutatePriority scrollPriority, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public interface ScrollScope {
@@ -228,7 +228,7 @@
public interface ScrollableState {
method public float dispatchRawDelta(float delta);
method public boolean isScrollInProgress();
- method public suspend Object? scroll(optional androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? scroll(optional androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public abstract boolean isScrollInProgress;
}
@@ -238,9 +238,9 @@
}
public final class TapGestureDetectorKt {
- method public static suspend Object? awaitFirstDown(androidx.compose.ui.input.pointer.AwaitPointerEventScope, optional boolean requireUnconsumed, optional kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
- method public static suspend Object? detectTapGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onDoubleTap, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onLongPress, optional kotlin.jvm.functions.Function3<? super androidx.compose.foundation.gestures.PressGestureScope,? super androidx.compose.ui.geometry.Offset,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> onPress, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onTap, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? waitForUpOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange> p);
+ method public static suspend Object? awaitFirstDown(androidx.compose.ui.input.pointer.AwaitPointerEventScope, optional boolean requireUnconsumed, optional kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
+ method public static suspend Object? detectTapGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onDoubleTap, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onLongPress, optional kotlin.jvm.functions.Function3<? super androidx.compose.foundation.gestures.PressGestureScope,? super androidx.compose.ui.geometry.Offset,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> onPress, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Offset,kotlin.Unit>? onTap, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? waitForUpOrCancellation(androidx.compose.ui.input.pointer.AwaitPointerEventScope, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerInputChange>);
}
public final class TransformGestureDetectorKt {
@@ -249,7 +249,7 @@
method public static long calculatePan(androidx.compose.ui.input.pointer.PointerEvent);
method public static float calculateRotation(androidx.compose.ui.input.pointer.PointerEvent);
method public static float calculateZoom(androidx.compose.ui.input.pointer.PointerEvent);
- method public static suspend Object? detectTransformGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional boolean panZoomLock, kotlin.jvm.functions.Function4<? super androidx.compose.ui.geometry.Offset,? super androidx.compose.ui.geometry.Offset,? super java.lang.Float,? super java.lang.Float,kotlin.Unit> onGesture, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? detectTransformGestures(androidx.compose.ui.input.pointer.PointerInputScope, optional boolean panZoomLock, kotlin.jvm.functions.Function4<? super androidx.compose.ui.geometry.Offset,? super androidx.compose.ui.geometry.Offset,? super java.lang.Float,? super java.lang.Float,kotlin.Unit> onGesture, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public interface TransformScope {
@@ -262,20 +262,20 @@
public interface TransformableState {
method public boolean isTransformInProgress();
- method public suspend Object? transform(optional androidx.compose.foundation.MutatePriority transformPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.TransformScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? transform(optional androidx.compose.foundation.MutatePriority transformPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.TransformScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public abstract boolean isTransformInProgress;
}
public final class TransformableStateKt {
method public static androidx.compose.foundation.gestures.TransformableState TransformableState(kotlin.jvm.functions.Function3<? super java.lang.Float,? super androidx.compose.ui.geometry.Offset,? super java.lang.Float,kotlin.Unit> onTransformation);
- method public static suspend Object? animatePanBy(androidx.compose.foundation.gestures.TransformableState, long offset, optional androidx.compose.animation.core.AnimationSpec<androidx.compose.ui.geometry.Offset> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? animateRotateBy(androidx.compose.foundation.gestures.TransformableState, float degrees, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? animateZoomBy(androidx.compose.foundation.gestures.TransformableState, float zoomFactor, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? panBy(androidx.compose.foundation.gestures.TransformableState, long offset, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? animatePanBy(androidx.compose.foundation.gestures.TransformableState, long offset, optional androidx.compose.animation.core.AnimationSpec<androidx.compose.ui.geometry.Offset> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? animateRotateBy(androidx.compose.foundation.gestures.TransformableState, float degrees, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? animateZoomBy(androidx.compose.foundation.gestures.TransformableState, float zoomFactor, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? panBy(androidx.compose.foundation.gestures.TransformableState, long offset, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @androidx.compose.runtime.Composable public static androidx.compose.foundation.gestures.TransformableState rememberTransformableState(kotlin.jvm.functions.Function3<? super java.lang.Float,? super androidx.compose.ui.geometry.Offset,? super java.lang.Float,kotlin.Unit> onTransformation);
- method public static suspend Object? rotateBy(androidx.compose.foundation.gestures.TransformableState, float degrees, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? stopTransformation(androidx.compose.foundation.gestures.TransformableState, optional androidx.compose.foundation.MutatePriority terminationPriority, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? zoomBy(androidx.compose.foundation.gestures.TransformableState, float zoomFactor, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? rotateBy(androidx.compose.foundation.gestures.TransformableState, float degrees, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? stopTransformation(androidx.compose.foundation.gestures.TransformableState, optional androidx.compose.foundation.MutatePriority terminationPriority, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? zoomBy(androidx.compose.foundation.gestures.TransformableState, float zoomFactor, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
}
@@ -352,7 +352,7 @@
}
@androidx.compose.runtime.Stable public interface MutableInteractionSource extends androidx.compose.foundation.interaction.InteractionSource {
- method public suspend Object? emit(androidx.compose.foundation.interaction.Interaction interaction, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? emit(androidx.compose.foundation.interaction.Interaction interaction, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public boolean tryEmit(androidx.compose.foundation.interaction.Interaction interaction);
}
@@ -450,15 +450,15 @@
@androidx.compose.runtime.Stable public final class LazyListState implements androidx.compose.foundation.gestures.ScrollableState {
ctor public LazyListState(optional int firstVisibleItemIndex, optional int firstVisibleItemScrollOffset);
- method public suspend Object? animateScrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? animateScrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public float dispatchRawDelta(float delta);
method public int getFirstVisibleItemIndex();
method public int getFirstVisibleItemScrollOffset();
method public androidx.compose.foundation.interaction.InteractionSource getInteractionSource();
method public androidx.compose.foundation.lazy.LazyListLayoutInfo getLayoutInfo();
method public boolean isScrollInProgress();
- method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? scrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? scrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final int firstVisibleItemIndex;
property public final int firstVisibleItemScrollOffset;
property public final androidx.compose.foundation.interaction.InteractionSource interactionSource;
@@ -594,15 +594,15 @@
@androidx.compose.runtime.Stable public final class LazyGridState implements androidx.compose.foundation.gestures.ScrollableState {
ctor public LazyGridState(optional int firstVisibleItemIndex, optional int firstVisibleItemScrollOffset);
- method public suspend Object? animateScrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? animateScrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public float dispatchRawDelta(float delta);
method public int getFirstVisibleItemIndex();
method public int getFirstVisibleItemScrollOffset();
method public androidx.compose.foundation.interaction.InteractionSource getInteractionSource();
method public androidx.compose.foundation.lazy.grid.LazyGridLayoutInfo getLayoutInfo();
method public boolean isScrollInProgress();
- method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? scrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? scrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final int firstVisibleItemIndex;
property public final int firstVisibleItemScrollOffset;
property public final androidx.compose.foundation.interaction.InteractionSource interactionSource;
diff --git a/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/FontFamilyDemo.kt b/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/FontFamilyDemo.kt
index c4cfc9e..5e33f75 100644
--- a/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/FontFamilyDemo.kt
+++ b/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/FontFamilyDemo.kt
@@ -172,7 +172,7 @@
// example of defining custom font typeface resolver for use in a FontFamily
// this is typically done to add _new_ types of font resources to Compose
object ExampleAsyncFontTypefaceLoader : AndroidFont.TypefaceLoader {
- override fun loadBlocking(context: Context, font: AndroidFont): android.graphics.Typeface? {
+ override fun loadBlocking(context: Context, font: AndroidFont): Typeface? {
return when (font) {
is DemoOptionalFont -> null // all optional fonts fail
is DemoBlockingFont -> font.typeface
@@ -184,7 +184,7 @@
override suspend fun awaitLoad(
context: Context,
font: AndroidFont
- ): android.graphics.Typeface {
+ ): Typeface {
// delayed fonts take the specified delay
font as DemoAsyncFont
delay(font.delay)
@@ -192,32 +192,22 @@
}
}
-@OptIn(ExperimentalTextApi::class)
class DemoAsyncFont(
override val weight: FontWeight,
override val style: FontStyle,
val delay: Long,
- val typeface: android.graphics.Typeface = android.graphics.Typeface.MONOSPACE
-) : AndroidFont(Async) {
- override val typefaceLoader: TypefaceLoader
- get() = ExampleAsyncFontTypefaceLoader
-}
+ val typeface: Typeface = Typeface.MONOSPACE
+) : AndroidFont(Async, ExampleAsyncFontTypefaceLoader)
@OptIn(ExperimentalTextApi::class)
class DemoOptionalFont(
override val weight: FontWeight,
override val style: FontStyle,
-) : AndroidFont(OptionalLocal) {
- override val typefaceLoader: TypefaceLoader
- get() = ExampleAsyncFontTypefaceLoader
-}
+) : AndroidFont(OptionalLocal, ExampleAsyncFontTypefaceLoader)
@OptIn(ExperimentalTextApi::class)
class DemoBlockingFont(
override val weight: FontWeight,
override val style: FontStyle,
- val typeface: android.graphics.Typeface
-) : AndroidFont(OptionalLocal) {
- override val typefaceLoader: TypefaceLoader
- get() = ExampleAsyncFontTypefaceLoader
-}
+ val typeface: Typeface
+) : AndroidFont(OptionalLocal, ExampleAsyncFontTypefaceLoader)
diff --git a/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/layout/LazyLayoutTest.kt b/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/layout/LazyLayoutTest.kt
index ad95123..db78578 100644
--- a/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/layout/LazyLayoutTest.kt
+++ b/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/layout/LazyLayoutTest.kt
@@ -53,14 +53,12 @@
override fun placeChildren() {}
}
}
- val itemsProvider = {
- object : LazyLayoutItemsProvider {
- override fun getContent(index: Int): @Composable () -> Unit = {}
- override val itemsCount: Int = 0
- override fun getKey(index: Int) = Unit
- override val keyToIndexMap: Map<Any, Int> = emptyMap()
- override fun getContentType(index: Int): Any? = null
- }
+ val itemsProvider = object : LazyLayoutItemsProvider {
+ override fun getContent(index: Int): @Composable () -> Unit = {}
+ override val itemsCount: Int = 0
+ override fun getKey(index: Int) = Unit
+ override val keyToIndexMap: Map<Any, Int> = emptyMap()
+ override fun getContentType(index: Int): Any? = null
}
rule.setContent {
diff --git a/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/MaxLinesHeightModifierTest.kt b/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/MaxLinesHeightModifierTest.kt
index 86e5efc..60b4ec6 100644
--- a/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/MaxLinesHeightModifierTest.kt
+++ b/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/MaxLinesHeightModifierTest.kt
@@ -176,8 +176,7 @@
}
}
val fontFamily = FontFamily(
- object : AndroidFont(FontLoadingStrategy.Async) {
- override val typefaceLoader: TypefaceLoader = asyncLoader
+ object : AndroidFont(FontLoadingStrategy.Async, asyncLoader) {
override val weight: FontWeight = FontWeight.Normal
override val style: FontStyle = FontStyle.Normal
},
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGrid.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGrid.kt
index b5f81ac..9a88f0c 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGrid.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGrid.kt
@@ -80,10 +80,10 @@
val itemScope = remember { LazyGridItemScopeImpl() }
- val stateOfItemsProvider = rememberStateOfItemsProvider(state, content, itemScope)
+ val itemsProvider = rememberItemsProvider(state, content, itemScope)
- val spanLayoutProvider = remember(stateOfItemsProvider) {
- derivedStateOf { LazyGridSpanLayoutProvider(stateOfItemsProvider.value) }
+ val spanLayoutProvider = remember(itemsProvider) {
+ derivedStateOf { LazyGridSpanLayoutProvider(itemsProvider) }
}
val scope = rememberCoroutineScope()
@@ -93,7 +93,7 @@
state.placementAnimator = placementAnimator
val measurePolicy = rememberLazyGridMeasurePolicy(
- stateOfItemsProvider,
+ itemsProvider,
state,
overScrollController,
spanLayoutProvider,
@@ -108,13 +108,13 @@
state.isVertical = isVertical
- ScrollPositionUpdater(stateOfItemsProvider, state)
+ ScrollPositionUpdater(itemsProvider, state)
LazyLayout(
modifier = modifier
.then(state.remeasurementModifier)
.lazyGridSemantics(
- stateOfItemsProvider = stateOfItemsProvider,
+ itemsProvider = itemsProvider,
state = state,
coroutineScope = scope,
isVertical = isVertical,
@@ -143,7 +143,7 @@
),
prefetchState = state.prefetchState,
measurePolicy = measurePolicy,
- itemsProvider = { stateOfItemsProvider.value }
+ itemsProvider = itemsProvider
)
}
@@ -151,10 +151,9 @@
@OptIn(ExperimentalFoundationApi::class)
@Composable
private fun ScrollPositionUpdater(
- stateOfItemsProvider: State<LazyGridItemsProvider>,
+ itemsProvider: LazyGridItemsProvider,
state: LazyGridState
) {
- val itemsProvider = stateOfItemsProvider.value
if (itemsProvider.itemsCount > 0) {
state.updateScrollPositionIfTheFirstItemWasMoved(itemsProvider)
}
@@ -163,8 +162,8 @@
@OptIn(ExperimentalFoundationApi::class)
@Composable
private fun rememberLazyGridMeasurePolicy(
- /** State containing the items provider of the list. */
- stateOfItemsProvider: State<LazyGridItemsProvider>,
+ /** Items provider of the list. */
+ itemsProvider: LazyGridItemsProvider,
/** The state of the list. */
state: LazyGridState,
/** The overscroll controller. */
@@ -216,7 +215,6 @@
val afterContentPadding = totalMainAxisPadding - beforeContentPadding
val contentConstraints = constraints.offset(-totalHorizontalPadding, -totalVerticalPadding)
- val itemsProvider = stateOfItemsProvider.value
state.updateScrollPositionIfTheFirstItemWasMoved(itemsProvider)
val spanLayoutProvider = stateOfSpanLayoutProvider.value
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridItemsProvider.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridItemsProvider.kt
index 7ac289d..d5ba6bf 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridItemsProvider.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridItemsProvider.kt
@@ -19,7 +19,7 @@
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.lazy.layout.LazyLayoutItemsProvider
-@OptIn(ExperimentalFoundationApi::class)
+@ExperimentalFoundationApi
internal interface LazyGridItemsProvider : LazyLayoutItemsProvider {
/** Returns the span for the given [index] */
fun LazyGridItemSpanScope.getSpan(index: Int): GridItemSpan
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridItemsProviderImpl.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridItemsProviderImpl.kt
index 945d364..3d9234d 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridItemsProviderImpl.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridItemsProviderImpl.kt
@@ -30,15 +30,14 @@
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.runtime.snapshotFlow
-import kotlinx.coroutines.flow.collect
-@OptIn(ExperimentalFoundationApi::class)
+@ExperimentalFoundationApi
@Composable
-internal fun rememberStateOfItemsProvider(
+internal fun rememberItemsProvider(
state: LazyGridState,
content: LazyGridScope.() -> Unit,
itemScope: LazyGridItemScope
-): State<LazyGridItemsProvider> {
+): LazyGridItemsProvider {
val latestContent = rememberUpdatedState(content)
val nearestItemsRangeState = remember(state) {
mutableStateOf(
@@ -51,56 +50,58 @@
// recreated when the state is updated with a new range.
.collect { nearestItemsRangeState.value = it }
}
- return remember(nearestItemsRangeState, itemScope) {
- derivedStateOf<LazyGridItemsProvider> {
- val listScope = LazyGridScopeImpl().apply(latestContent.value)
- LazyGridItemsProviderImpl(
- itemScope,
- listScope.intervals,
- listScope.hasCustomSpans,
- nearestItemsRangeState.value
- )
- }
+ return remember(nearestItemsRangeState) {
+ LazyGridItemsProviderImpl(
+ derivedStateOf {
+ val listScope = LazyGridScopeImpl().apply(latestContent.value)
+ LazyGridItemsSnapshot(
+ itemScope,
+ listScope.intervals,
+ listScope.hasCustomSpans,
+ nearestItemsRangeState.value
+ )
+ }
+ )
}
}
-@OptIn(ExperimentalFoundationApi::class)
-internal class LazyGridItemsProviderImpl(
+@ExperimentalFoundationApi
+internal class LazyGridItemsSnapshot(
private val itemScope: LazyGridItemScope,
private val intervals: IntervalList<LazyGridIntervalContent>,
- override val hasCustomSpans: Boolean,
+ val hasCustomSpans: Boolean,
nearestItemsRange: IntRange
-) : LazyGridItemsProvider {
+) {
/**
* Caches the last interval we binary searched for. We might not need to recalculate
* for subsequent queries, as they tend to be localised.
*/
private var lastInterval: IntervalHolder<LazyGridIntervalContent>? = null
- override val itemsCount get() = intervals.totalSize
+ val itemsCount get() = intervals.totalSize
- override fun getKey(index: Int): Any {
+ fun getKey(index: Int): Any {
val interval = getIntervalForIndex(index)
val localIntervalIndex = index - interval.startIndex
val key = interval.content.key?.invoke(localIntervalIndex)
return key ?: getDefaultLazyKeyFor(index)
}
- override fun LazyGridItemSpanScope.getSpan(index: Int): GridItemSpan {
+ fun LazyGridItemSpanScope.getSpan(index: Int): GridItemSpan {
val interval = getIntervalForIndex(index)
val localIntervalIndex = index - interval.startIndex
return interval.content.span.invoke(this, localIntervalIndex)
}
- override fun getContent(index: Int): @Composable () -> Unit {
+ fun getContent(index: Int): @Composable () -> Unit {
val interval = getIntervalForIndex(index)
val localIntervalIndex = index - interval.startIndex
return interval.content.content.invoke(itemScope, localIntervalIndex)
}
- override val keyToIndexMap: Map<Any, Int> = generateKeyToIndexMap(nearestItemsRange, intervals)
+ val keyToIndexMap: Map<Any, Int> = generateKeyToIndexMap(nearestItemsRange, intervals)
- override fun getContentType(index: Int): Any? {
+ fun getContentType(index: Int): Any? {
val interval = getIntervalForIndex(index)
val localIntervalIndex = index - interval.startIndex
return interval.content.type.invoke(localIntervalIndex)
@@ -115,6 +116,27 @@
}
}
+@ExperimentalFoundationApi
+internal class LazyGridItemsProviderImpl(
+ private val itemsSnapshot: State<LazyGridItemsSnapshot>
+) : LazyGridItemsProvider {
+
+ override val itemsCount get() = itemsSnapshot.value.itemsCount
+
+ override fun getKey(index: Int) = itemsSnapshot.value.getKey(index)
+
+ override fun LazyGridItemSpanScope.getSpan(index: Int): GridItemSpan =
+ with(itemsSnapshot.value) { getSpan(index) }
+
+ override val hasCustomSpans: Boolean get() = itemsSnapshot.value.hasCustomSpans
+
+ override fun getContent(index: Int) = itemsSnapshot.value.getContent(index)
+
+ override val keyToIndexMap: Map<Any, Int> get() = itemsSnapshot.value.keyToIndexMap
+
+ override fun getContentType(index: Int) = itemsSnapshot.value.getContentType(index)
+}
+
/**
* Traverses the interval [list] in order to create a mapping from the key to the index for all
* the indexes in the passed [range].
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridScrollPosition.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridScrollPosition.kt
index bd6578d..83a321e 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridScrollPosition.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridScrollPosition.kt
@@ -16,6 +16,7 @@
package androidx.compose.foundation.lazy.grid
+import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.runtime.mutableStateOf
/**
@@ -28,6 +29,7 @@
* block as otherwise the extra remeasurement will be scheduled once we update the values in the
* end of the measure block.
*/
+@OptIn(ExperimentalFoundationApi::class)
internal class LazyGridScrollPosition(
initialIndex: Int = 0,
initialScrollOffset: Int = 0
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazySemantics.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazySemantics.kt
index e0f1d09..19bf588 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazySemantics.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazySemantics.kt
@@ -20,7 +20,6 @@
import androidx.compose.foundation.gestures.ScrollableState
import androidx.compose.foundation.gestures.animateScrollBy
import androidx.compose.runtime.Composable
-import androidx.compose.runtime.State
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.CollectionInfo
@@ -39,7 +38,7 @@
@Suppress("ComposableModifierFactory", "ModifierInspectorInfo")
@Composable
internal fun Modifier.lazyGridSemantics(
- stateOfItemsProvider: State<LazyGridItemsProvider>,
+ itemsProvider: LazyGridItemsProvider,
state: LazyGridState,
coroutineScope: CoroutineScope,
isVertical: Boolean,
@@ -47,16 +46,16 @@
userScrollEnabled: Boolean
) = this.then(
remember(
- stateOfItemsProvider,
+ itemsProvider,
state,
isVertical,
reverseScrolling,
userScrollEnabled
) {
val indexForKeyMapping: (Any) -> Int = { needle ->
- val key = stateOfItemsProvider.value::getKey
+ val key = itemsProvider::getKey
var result = -1
- for (index in 0 until stateOfItemsProvider.value.itemsCount) {
+ for (index in 0 until itemsProvider.itemsCount) {
if (key(index) == needle) {
result = index
break
@@ -77,7 +76,7 @@
if (state.canScrollForward) {
// If we can scroll further, we don't know the end yet,
// but it's upper bounded by #items + 1
- stateOfItemsProvider.value.itemsCount + 1f
+ itemsProvider.itemsCount + 1f
} else {
// If we can't scroll further, the current value is the max
state.firstVisibleItemIndex + state.firstVisibleItemScrollOffset / 100_000f
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/layout/LazyLayout.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/layout/LazyLayout.kt
index b924ba2..24ecffe 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/layout/LazyLayout.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/layout/LazyLayout.kt
@@ -35,7 +35,7 @@
@ExperimentalFoundationApi
@Composable
internal fun LazyLayout(
- itemsProvider: () -> LazyLayoutItemsProvider,
+ itemsProvider: LazyLayoutItemsProvider,
modifier: Modifier = Modifier,
prefetchState: LazyLayoutPrefetchState? = null,
measurePolicy: LazyLayoutMeasureScope.(Constraints) -> MeasureResult
@@ -44,7 +44,7 @@
val saveableStateHolder = rememberSaveableStateHolder()
val itemContentFactory = remember {
- LazyLayoutItemContentFactory(saveableStateHolder) { currentItemsProvider.value.invoke() }
+ LazyLayoutItemContentFactory(saveableStateHolder) { currentItemsProvider.value }
}
val subcomposeLayoutState = remember {
SubcomposeLayoutState(LazyLayoutItemReusePolicy(itemContentFactory))
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/list/LazyList.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/list/LazyList.kt
index 16a423c..b346ad1 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/list/LazyList.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/list/LazyList.kt
@@ -33,7 +33,6 @@
import androidx.compose.foundation.lazy.layout.LazyLayout
import androidx.compose.foundation.lazy.layout.LazyLayoutMeasureScope
import androidx.compose.runtime.Composable
-import androidx.compose.runtime.State
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Alignment
@@ -82,7 +81,7 @@
val itemScope: Ref<LazyItemScopeImpl> = remember { Ref() }
- val stateOfItemsProvider = rememberStateOfItemsProvider(state, content, itemScope)
+ val itemsProvider = rememberItemsProvider(state, content, itemScope)
val scope = rememberCoroutineScope()
val placementAnimator = remember(state, isVertical) {
@@ -91,7 +90,7 @@
state.placementAnimator = placementAnimator
val measurePolicy = rememberLazyListMeasurePolicy(
- stateOfItemsProvider,
+ itemsProvider,
itemScope,
state,
overScrollController,
@@ -105,13 +104,13 @@
placementAnimator
)
- ScrollPositionUpdater(stateOfItemsProvider, state)
+ ScrollPositionUpdater(itemsProvider, state)
LazyLayout(
modifier = modifier
.then(state.remeasurementModifier)
.lazyListSemantics(
- stateOfItemsProvider = stateOfItemsProvider,
+ itemsProvider = itemsProvider,
state = state,
coroutineScope = scope,
isVertical = isVertical,
@@ -140,7 +139,7 @@
),
prefetchState = state.prefetchState,
measurePolicy = measurePolicy,
- itemsProvider = { stateOfItemsProvider.value }
+ itemsProvider = itemsProvider
)
}
@@ -148,10 +147,9 @@
@ExperimentalFoundationApi
@Composable
private fun ScrollPositionUpdater(
- stateOfItemsProvider: State<LazyListItemsProvider>,
+ itemsProvider: LazyListItemsProvider,
state: LazyListState
) {
- val itemsProvider = stateOfItemsProvider.value
if (itemsProvider.itemsCount > 0) {
state.updateScrollPositionIfTheFirstItemWasMoved(itemsProvider)
}
@@ -160,8 +158,8 @@
@ExperimentalFoundationApi
@Composable
private fun rememberLazyListMeasurePolicy(
- /** State containing the items provider of the list. */
- stateOfItemsProvider: State<LazyListItemsProvider>,
+ /** Items provider of the list. */
+ itemsProvider: LazyListItemsProvider,
/** Value holder for the item scope used to compose items. */
itemScope: Ref<LazyItemScopeImpl>,
/** The state of the list. */
@@ -217,7 +215,6 @@
val contentConstraints =
containerConstraints.offset(-totalHorizontalPadding, -totalVerticalPadding)
- val itemsProvider = stateOfItemsProvider.value
state.updateScrollPositionIfTheFirstItemWasMoved(itemsProvider)
// Update the state's cached Density
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/list/LazyListItemsProviderImpl.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/list/LazyListItemsProviderImpl.kt
index a10897a..a22339a 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/list/LazyListItemsProviderImpl.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/list/LazyListItemsProviderImpl.kt
@@ -33,15 +33,14 @@
import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.runtime.snapshotFlow
import androidx.compose.ui.node.Ref
-import kotlinx.coroutines.flow.collect
@ExperimentalFoundationApi
@Composable
-internal fun rememberStateOfItemsProvider(
+internal fun rememberItemsProvider(
state: LazyListState,
content: LazyListScope.() -> Unit,
itemScope: Ref<LazyItemScopeImpl>
-): State<LazyListItemsProvider> {
+): LazyListItemsProvider {
val latestContent = rememberUpdatedState(content)
val nearestItemsRangeState = remember(state) {
mutableStateOf(
@@ -55,53 +54,34 @@
.collect { nearestItemsRangeState.value = it }
}
return remember(nearestItemsRangeState) {
- derivedStateOf<LazyListItemsProvider> {
- val listScope = LazyListScopeImpl().apply(latestContent.value)
- LazyListItemsProviderImpl(
- itemScope,
- listScope.intervals,
- listScope.headerIndexes,
- nearestItemsRangeState.value
- )
- }
+ LazyListItemsProviderImpl(
+ derivedStateOf {
+ val listScope = LazyListScopeImpl().apply(latestContent.value)
+ LazyListItemsSnapshot(
+ itemScope,
+ listScope.intervals,
+ listScope.headerIndexes,
+ nearestItemsRangeState.value
+ )
+ }
+ )
}
}
@ExperimentalFoundationApi
-internal class LazyListItemsProviderImpl(
+internal class LazyListItemsSnapshot(
private val itemScope: Ref<LazyItemScopeImpl>,
private val list: IntervalList<LazyListIntervalContent>,
- override val headerIndexes: List<Int>,
+ val headerIndexes: List<Int>,
nearestItemsRange: IntRange
-) : LazyListItemsProvider {
+) {
/**
* Caches the last interval we binary searched for. We might not need to recalculate
* for subsequent queries, as they tend to be localised.
*/
private var lastInterval: IntervalHolder<LazyListIntervalContent>? = null
- override val itemsCount get() = list.totalSize
-
- override fun getKey(index: Int): Any {
- val interval = getIntervalForIndex(index)
- val localIntervalIndex = index - interval.startIndex
- val key = interval.content.key?.invoke(localIntervalIndex)
- return key ?: getDefaultLazyKeyFor(index)
- }
-
- override fun getContent(index: Int): @Composable () -> Unit {
- val interval = getIntervalForIndex(index)
- val localIntervalIndex = index - interval.startIndex
- return interval.content.content.invoke(itemScope.value!!, localIntervalIndex)
- }
-
- override val keyToIndexMap: Map<Any, Int> = generateKeyToIndexMap(nearestItemsRange, list)
-
- override fun getContentType(index: Int): Any? {
- val interval = getIntervalForIndex(index)
- val localIntervalIndex = index - interval.startIndex
- return interval.content.type.invoke(localIntervalIndex)
- }
+ val itemsCount get() = list.totalSize
private fun getIntervalForIndex(itemIndex: Int) = lastInterval.let {
if (it != null && itemIndex in it.startIndex until it.startIndex + it.size) {
@@ -110,6 +90,45 @@
list.intervalForIndex(itemIndex).also { lastInterval = it }
}
}
+
+ fun getKey(index: Int): Any {
+ val interval = getIntervalForIndex(index)
+ val localIntervalIndex = index - interval.startIndex
+ val key = interval.content.key?.invoke(localIntervalIndex)
+ return key ?: getDefaultLazyKeyFor(index)
+ }
+
+ fun getContent(index: Int): @Composable () -> Unit {
+ val interval = getIntervalForIndex(index)
+ val localIntervalIndex = index - interval.startIndex
+ return interval.content.content.invoke(itemScope.value!!, localIntervalIndex)
+ }
+
+ val keyToIndexMap: Map<Any, Int> = generateKeyToIndexMap(nearestItemsRange, list)
+
+ fun getContentType(index: Int): Any? {
+ val interval = getIntervalForIndex(index)
+ val localIntervalIndex = index - interval.startIndex
+ return interval.content.type.invoke(localIntervalIndex)
+ }
+}
+
+@ExperimentalFoundationApi
+internal class LazyListItemsProviderImpl(
+ private val itemsSnapshot: State<LazyListItemsSnapshot>
+) : LazyListItemsProvider {
+
+ override val headerIndexes: List<Int> get() = itemsSnapshot.value.headerIndexes
+
+ override val itemsCount get() = itemsSnapshot.value.itemsCount
+
+ override fun getKey(index: Int) = itemsSnapshot.value.getKey(index)
+
+ override fun getContent(index: Int) = itemsSnapshot.value.getContent(index)
+
+ override val keyToIndexMap: Map<Any, Int> get() = itemsSnapshot.value.keyToIndexMap
+
+ override fun getContentType(index: Int) = itemsSnapshot.value.getContentType(index)
}
/**
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/list/LazySemantics.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/list/LazySemantics.kt
index 6023028..ec02f79 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/list/LazySemantics.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/list/LazySemantics.kt
@@ -21,7 +21,6 @@
import androidx.compose.foundation.gestures.animateScrollBy
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.runtime.Composable
-import androidx.compose.runtime.State
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.CollectionInfo
@@ -40,7 +39,7 @@
@Suppress("ComposableModifierFactory", "ModifierInspectorInfo")
@Composable
internal fun Modifier.lazyListSemantics(
- stateOfItemsProvider: State<LazyListItemsProvider>,
+ itemsProvider: LazyListItemsProvider,
state: LazyListState,
coroutineScope: CoroutineScope,
isVertical: Boolean,
@@ -48,16 +47,16 @@
userScrollEnabled: Boolean
) = this.then(
remember(
- stateOfItemsProvider,
+ itemsProvider,
state,
isVertical,
reverseScrolling,
userScrollEnabled
) {
val indexForKeyMapping: (Any) -> Int = { needle ->
- val key = stateOfItemsProvider.value::getKey
+ val key = itemsProvider::getKey
var result = -1
- for (index in 0 until stateOfItemsProvider.value.itemsCount) {
+ for (index in 0 until itemsProvider.itemsCount) {
if (key(index) == needle) {
result = index
break
@@ -78,7 +77,7 @@
if (state.canScrollForward) {
// If we can scroll further, we don't know the end yet,
// but it's upper bounded by #items + 1
- stateOfItemsProvider.value.itemsCount + 1f
+ itemsProvider.itemsCount + 1f
} else {
// If we can't scroll further, the current value is the max
state.firstVisibleItemIndex + state.firstVisibleItemScrollOffset / 100_000f
diff --git a/compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/TextLayoutHelperTest.kt b/compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/TextLayoutHelperTest.kt
index 42b5799..eef02a1 100644
--- a/compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/TextLayoutHelperTest.kt
+++ b/compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/TextLayoutHelperTest.kt
@@ -524,7 +524,12 @@
getProperty("textDirection"),
getProperty("lineHeight"),
getProperty("textIndent"),
- getProperty("platformStyle")
+ getProperty("platformStyle"),
+ // ParagraphStyle and SpanStyle properties are already compared, TextStyle should have
+ // paragraph style attributes is tested in:
+ // ui-text/../androidx/compose/ui/text/TextSpanParagraphStyleTest.kt
+ getProperty("paragraphStyle"),
+ getProperty("spanStyle")
)
val textStyleProperties = TextStyle::class.memberProperties.map { Property(it) }
diff --git a/compose/material/material-window/api/current.txt b/compose/material/material-window/api/current.txt
index c1c9c45..f519e63 100644
--- a/compose/material/material-window/api/current.txt
+++ b/compose/material/material-window/api/current.txt
@@ -9,19 +9,19 @@
}
public static final class HeightSizeClass.Companion {
- method public int getCompact();
- method public int getExpanded();
- method public int getMedium();
- property public final int Compact;
- property public final int Expanded;
- property public final int Medium;
+ method public String getCompact();
+ method public String getExpanded();
+ method public String getMedium();
+ property public final String Compact;
+ property public final String Expanded;
+ property public final String Medium;
}
@androidx.compose.runtime.Immutable public final class SizeClass {
- method public int getHeight();
- method public int getWidth();
- property public final int height;
- property public final int width;
+ method public String getHeight();
+ method public String getWidth();
+ property public final String height;
+ property public final String width;
field public static final androidx.compose.material.window.SizeClass.Companion Companion;
}
@@ -36,12 +36,12 @@
}
public static final class WidthSizeClass.Companion {
- method public int getCompact();
- method public int getExpanded();
- method public int getMedium();
- property public final int Compact;
- property public final int Expanded;
- property public final int Medium;
+ method public String getCompact();
+ method public String getExpanded();
+ method public String getMedium();
+ property public final String Compact;
+ property public final String Expanded;
+ property public final String Medium;
}
}
diff --git a/compose/material/material-window/api/public_plus_experimental_current.txt b/compose/material/material-window/api/public_plus_experimental_current.txt
index 4692a13..a80d3fc 100644
--- a/compose/material/material-window/api/public_plus_experimental_current.txt
+++ b/compose/material/material-window/api/public_plus_experimental_current.txt
@@ -2,9 +2,7 @@
package androidx.compose.material.window {
public final class AndroidSizeClass_androidKt {
- method @androidx.compose.material.window.ExperimentalMaterialWindowApi @androidx.compose.runtime.Composable public static int rememberHeightSizeClass(android.app.Activity);
- method @androidx.compose.material.window.ExperimentalMaterialWindowApi @androidx.compose.runtime.Composable public static androidx.compose.material.window.SizeClass rememberSizeClass(android.app.Activity);
- method @androidx.compose.material.window.ExperimentalMaterialWindowApi @androidx.compose.runtime.Composable public static int rememberWidthSizeClass(android.app.Activity);
+ method @androidx.compose.material.window.ExperimentalMaterialWindowApi @androidx.compose.runtime.Composable public static androidx.compose.material.window.SizeClass calculateSizeClass(android.app.Activity);
}
@kotlin.RequiresOptIn(message="This material-window API is experimental and is likely to change or to be removed in" + " the future.") public @interface ExperimentalMaterialWindowApi {
@@ -15,19 +13,19 @@
}
public static final class HeightSizeClass.Companion {
- method public int getCompact();
- method public int getExpanded();
- method public int getMedium();
- property public final int Compact;
- property public final int Expanded;
- property public final int Medium;
+ method public String getCompact();
+ method public String getExpanded();
+ method public String getMedium();
+ property public final String Compact;
+ property public final String Expanded;
+ property public final String Medium;
}
@androidx.compose.runtime.Immutable public final class SizeClass {
- method public int getHeight();
- method public int getWidth();
- property public final int height;
- property public final int width;
+ method public String getHeight();
+ method public String getWidth();
+ property public final String height;
+ property public final String width;
field public static final androidx.compose.material.window.SizeClass.Companion Companion;
}
@@ -43,12 +41,12 @@
}
public static final class WidthSizeClass.Companion {
- method public int getCompact();
- method public int getExpanded();
- method public int getMedium();
- property public final int Compact;
- property public final int Expanded;
- property public final int Medium;
+ method public String getCompact();
+ method public String getExpanded();
+ method public String getMedium();
+ property public final String Compact;
+ property public final String Expanded;
+ property public final String Medium;
}
}
diff --git a/compose/material/material-window/api/restricted_current.txt b/compose/material/material-window/api/restricted_current.txt
index c1c9c45..f519e63 100644
--- a/compose/material/material-window/api/restricted_current.txt
+++ b/compose/material/material-window/api/restricted_current.txt
@@ -9,19 +9,19 @@
}
public static final class HeightSizeClass.Companion {
- method public int getCompact();
- method public int getExpanded();
- method public int getMedium();
- property public final int Compact;
- property public final int Expanded;
- property public final int Medium;
+ method public String getCompact();
+ method public String getExpanded();
+ method public String getMedium();
+ property public final String Compact;
+ property public final String Expanded;
+ property public final String Medium;
}
@androidx.compose.runtime.Immutable public final class SizeClass {
- method public int getHeight();
- method public int getWidth();
- property public final int height;
- property public final int width;
+ method public String getHeight();
+ method public String getWidth();
+ property public final String height;
+ property public final String width;
field public static final androidx.compose.material.window.SizeClass.Companion Companion;
}
@@ -36,12 +36,12 @@
}
public static final class WidthSizeClass.Companion {
- method public int getCompact();
- method public int getExpanded();
- method public int getMedium();
- property public final int Compact;
- property public final int Expanded;
- property public final int Medium;
+ method public String getCompact();
+ method public String getExpanded();
+ method public String getMedium();
+ property public final String Compact;
+ property public final String Expanded;
+ property public final String Medium;
}
}
diff --git a/compose/material/material-window/build.gradle b/compose/material/material-window/build.gradle
index 5700dd6..aeab013 100644
--- a/compose/material/material-window/build.gradle
+++ b/compose/material/material-window/build.gradle
@@ -49,6 +49,8 @@
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.junit)
androidTestImplementation(libs.truth)
+
+ samples(project(":compose:material:material-window:material-window-samples"))
}
}
@@ -95,6 +97,9 @@
}
}
}
+ dependencies {
+ samples(project(":compose:material:material-window:material-window-samples"))
+ }
}
androidx {
diff --git a/compose/material/material-window/samples/build.gradle b/compose/material/material-window/samples/build.gradle
new file mode 100644
index 0000000..4272a48
--- /dev/null
+++ b/compose/material/material-window/samples/build.gradle
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+
+
+import androidx.build.LibraryType
+
+plugins {
+ id("AndroidXPlugin")
+ id("com.android.library")
+ id("AndroidXComposePlugin")
+ id("org.jetbrains.kotlin.android")
+}
+
+dependencies {
+ kotlinPlugin(project(":compose:compiler:compiler"))
+
+ implementation(libs.kotlinStdlib)
+
+ compileOnly(project(":annotation:annotation-sampled"))
+
+ implementation(project(":compose:material:material-window"))
+ implementation(project(":compose:runtime:runtime"))
+ implementation("androidx.activity:activity-compose:1.3.1")
+}
+
+androidx {
+ name = "AndroidX Compose Material Window Samples"
+ type = LibraryType.SAMPLES
+ mavenGroup = LibraryGroups.COMPOSE_MATERIAL
+ inceptionYear = "2022"
+ description = "Contains the sample code for the AndroidX Material Window APIs."
+}
+
+android {
+ namespace "androidx.compose.material.window.samples"
+}
diff --git a/compose/material/material-window/samples/src/main/AndroidManifest.xml b/compose/material/material-window/samples/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..a7cd314
--- /dev/null
+++ b/compose/material/material-window/samples/src/main/AndroidManifest.xml
@@ -0,0 +1,17 @@
+<!--
+ ~ Copyright (C) 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
+ -->
+
+<manifest />
diff --git a/compose/material/material-window/samples/src/main/java/androidx/compose/material/window/samples/SizeClassSamples.kt b/compose/material/material-window/samples/src/main/java/androidx/compose/material/window/samples/SizeClassSamples.kt
new file mode 100644
index 0000000..5a6b869
--- /dev/null
+++ b/compose/material/material-window/samples/src/main/java/androidx/compose/material/window/samples/SizeClassSamples.kt
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.compose.material.window.samples
+
+import android.os.Bundle
+import androidx.activity.ComponentActivity
+import androidx.activity.compose.setContent
+import androidx.annotation.Sampled
+import androidx.compose.material.window.ExperimentalMaterialWindowApi
+import androidx.compose.material.window.WidthSizeClass
+import androidx.compose.material.window.calculateSizeClass
+import androidx.compose.runtime.Composable
+
+@OptIn(ExperimentalMaterialWindowApi::class)
+@Sampled
+fun AndroidSizeClassSample() {
+ class MyActivity : ComponentActivity() {
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContent {
+ // Calculate the size class for the activity's current window. If the window size
+ // changes, for example when the device is rotated, the value returned by
+ // calculateSizeClass will also change.
+ val sizeClass = calculateSizeClass()
+ // Perform logic on the size class to decide whether to show the top app bar.
+ val showTopAppBar = sizeClass.width != WidthSizeClass.Compact
+
+ // MyScreen knows nothing about window sizes, and performs logic based on a Boolean
+ // flag.
+ MyScreen(showTopAppBar = showTopAppBar)
+ }
+ }
+ }
+}
+
+@Suppress("UNUSED_PARAMETER")
+@Composable
+private fun MyScreen(showTopAppBar: Boolean) {}
diff --git a/compose/material/material-window/src/androidAndroidTest/kotlin/androidx/compose/material/window/AndroidSizeClassTest.kt b/compose/material/material-window/src/androidAndroidTest/kotlin/androidx/compose/material/window/AndroidSizeClassTest.kt
index fe1039b..53a46f1 100644
--- a/compose/material/material-window/src/androidAndroidTest/kotlin/androidx/compose/material/window/AndroidSizeClassTest.kt
+++ b/compose/material/material-window/src/androidAndroidTest/kotlin/androidx/compose/material/window/AndroidSizeClassTest.kt
@@ -43,7 +43,7 @@
fun widthSizeClass_correctCalculation() {
var actualWidthSizeClass: WidthSizeClass? = null
rule.setContent {
- actualWidthSizeClass = rule.activity.rememberWidthSizeClass()
+ actualWidthSizeClass = rule.activity.calculateSizeClass().width
}
rule.runOnIdle {
@@ -61,7 +61,7 @@
fun heightSizeClass_correctCalculation() {
var actualHeightSizeClass: HeightSizeClass? = null
rule.setContent {
- actualHeightSizeClass = rule.activity.rememberHeightSizeClass()
+ actualHeightSizeClass = rule.activity.calculateSizeClass().height
}
rule.runOnIdle {
@@ -83,7 +83,7 @@
val density = mutableStateOf(Density(1f))
rule.setContent {
CompositionLocalProvider(LocalDensity provides density.value) {
- actualSizeClass = rule.activity.rememberSizeClass()
+ actualSizeClass = rule.activity.calculateSizeClass()
}
}
diff --git a/compose/material/material-window/src/androidMain/kotlin/androidx/compose/material/window/AndroidSizeClass.android.kt b/compose/material/material-window/src/androidMain/kotlin/androidx/compose/material/window/AndroidSizeClass.android.kt
index 7695a08..be27854 100644
--- a/compose/material/material-window/src/androidMain/kotlin/androidx/compose/material/window/AndroidSizeClass.android.kt
+++ b/compose/material/material-window/src/androidMain/kotlin/androidx/compose/material/window/AndroidSizeClass.android.kt
@@ -21,50 +21,26 @@
import androidx.compose.ui.graphics.toComposeRect
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.platform.LocalDensity
-import androidx.compose.runtime.remember
import androidx.window.layout.WindowMetricsCalculator
/**
- * Calculates [SizeClass] of the window.
+ * Calculates the window's [SizeClass] for this [Activity].
*
- * Whenever device configutation changes result in change of the width or height based
- * size classes, for example on device rotation or window resizing, this will return a new
- * [SizeClass] instance.
+ * A new [SizeClass] will be returned whenever a configuration change causes the width or height of
+ * the window to cross a breakpoint, such as when the device is rotated or the window is resized.
+ *
+ * @sample androidx.compose.material.window.samples.AndroidSizeClassSample
*/
@ExperimentalMaterialWindowApi
@Composable
-fun Activity.rememberSizeClass(): SizeClass {
- // observe configuration changes and recalculate size class on corresponding changes
- val configuration = LocalConfiguration.current
+fun Activity.calculateSizeClass(): SizeClass {
+ // Observe view configuration changes and recalculate the size class on each change. We can't
+ // use Activity#onConfigurationChanged as this will sometimes fail to be called on different
+ // API levels, hence why this function needs to be @Composable so we can observe the
+ // ComposeView's configuration changes.
+ LocalConfiguration.current
val density = LocalDensity.current
- return remember(
- configuration.screenLayout,
- configuration.screenHeightDp,
- configuration.screenWidthDp,
- configuration.orientation,
- configuration.densityDpi,
- density.density
- ) {
- val metrics = WindowMetricsCalculator.getOrCreate().computeCurrentWindowMetrics(this)
- val size = with(density) { metrics.bounds.toComposeRect().size.toDpSize() }
- SizeClass.calculateFromSize(size)
- }
+ val metrics = WindowMetricsCalculator.getOrCreate().computeCurrentWindowMetrics(this)
+ val size = with(density) { metrics.bounds.toComposeRect().size.toDpSize() }
+ return SizeClass.calculateFromSize(size)
}
-
-/**
- * Calculates [WidthSizeClass] of the window.
- *
- * @see rememberSizeClass
- */
-@ExperimentalMaterialWindowApi
-@Composable
-fun Activity.rememberWidthSizeClass(): WidthSizeClass = rememberSizeClass().width
-
-/**
- * Calculates [HeightSizeClass] of the window.
- *
- * @see rememberSizeClass
- */
-@ExperimentalMaterialWindowApi
-@Composable
-fun Activity.rememberHeightSizeClass(): HeightSizeClass = rememberSizeClass().height
\ No newline at end of file
diff --git a/compose/material/material-window/src/commonMain/kotlin/androidx/compose/material/window/SizeClass.kt b/compose/material/material-window/src/commonMain/kotlin/androidx/compose/material/window/SizeClass.kt
index 44aa060..840fa91 100644
--- a/compose/material/material-window/src/commonMain/kotlin/androidx/compose/material/window/SizeClass.kt
+++ b/compose/material/material-window/src/commonMain/kotlin/androidx/compose/material/window/SizeClass.kt
@@ -22,11 +22,17 @@
import androidx.compose.ui.unit.dp
/**
- * Window size classes are a set of opinionated viewport breakpoints to design, develop, and test resizable application layouts against.
+ * Window size classes are a set of opinionated viewport breakpoints to design, develop, and test
+ * responsive application layouts against.
* For more details check <a href="https://developer.android.com/guide/topics/large-screens/support-different-screen-sizes" class="external" target="_blank">Support different screen sizes</a> documentation.
*
- * @param width width-based size class of the window
- * @param height height-based size class of the window
+ * SizeClass contains a [WidthSizeClass] and [HeightSizeClass], representing the size classes for
+ * this window's width and height respectively.
+ *
+ * See [calculateSizeClass] to calculate the size class for the Activity's current window
+ *
+ * @param width width-based window size class
+ * @param height height-based window size class
*/
@Immutable
class SizeClass private constructor(
@@ -35,7 +41,8 @@
) {
companion object {
/**
- * Calculates [SizeClass] for a given [size]. Should be used for testing purposes only
+ * Calculates [SizeClass] for a given [size]. Should be used for testing purposes only - to
+ * calculate a [SizeClass] for the Activity's current window see [calculateSizeClass].
*
* @param size of the window
* @return size class corresponding to the given width and height
@@ -71,33 +78,34 @@
}
/**
- * Width-based size class of the window.
+ * Width-based window size class.
*
* A size class represents a breakpoint that can be used to build responsive layouts. Each size
* class breakpoint represents a majority case for typical device scenarios so your layouts will
* work well on most devices and configurations.
*
- * For more details check <a href="https://developer.android.com/guide/topics/large-screens/support-different-screen-sizes#window_size_classes" class="external" target="_blank">Window size classes documentation</a>.
+ * For more details see <a href="https://developer.android.com/guide/topics/large-screens/support-different-screen-sizes#window_size_classes" class="external" target="_blank">Window size classes documentation</a>.
*/
@Immutable
@kotlin.jvm.JvmInline
-value class WidthSizeClass private constructor(private val value: Int) {
+value class WidthSizeClass private constructor(private val value: String) {
companion object {
/** Represents the majority of phones in portrait. */
- val Compact = WidthSizeClass(0)
+ val Compact = WidthSizeClass("Compact")
/**
- * Represents the majority of tablets in portrait and large unfolded inner displays in portrait.
+ * Represents the majority of tablets in portrait and large unfolded inner displays in
+ * portrait.
*/
- val Medium = WidthSizeClass(1)
+ val Medium = WidthSizeClass("Medium")
/**
* Represents the majority of tablets in landscape and large unfolded inner displays in
* landscape.
*/
- val Expanded = WidthSizeClass(2)
+ val Expanded = WidthSizeClass("Expanded")
- /** Calculates [WidthSizeClass] size class for given [width] */
+ /** Calculates the [WidthSizeClass] for a given [width] */
internal fun fromWidth(width: Dp): WidthSizeClass {
require(width >= 0.dp) { "Width must not be negative" }
return when {
@@ -110,28 +118,28 @@
}
/**
- * Height-based size class of the window.
+ * Height-based window size class.
*
* A size class represents a breakpoint that can be used to build responsive layouts. Each size
* class breakpoint represents a majority case for typical device scenarios so your layouts will
* work well on most devices and configurations.
*
- * For more details check <a href="https://developer.android.com/guide/topics/large-screens/support-different-screen-sizes#window_size_classes" class="external" target="_blank">Window size classes documentation</a>.
+ * For more details see <a href="https://developer.android.com/guide/topics/large-screens/support-different-screen-sizes#window_size_classes" class="external" target="_blank">Window size classes documentation</a>.
*/
@Immutable
@kotlin.jvm.JvmInline
-value class HeightSizeClass private constructor(private val value: Int) {
+value class HeightSizeClass private constructor(private val value: String) {
companion object {
/** Represents the majority of phones in landscape */
- val Compact = HeightSizeClass(0)
+ val Compact = HeightSizeClass("Compact")
/** Represents the majority of tablets in landscape and majority of phones in portrait */
- val Medium = HeightSizeClass(1)
+ val Medium = HeightSizeClass("Medium")
/** Represents the majority of tablets in portrait */
- val Expanded = HeightSizeClass(2)
+ val Expanded = HeightSizeClass("Expanded")
- /** Calculates [HeightSizeClass] size class for given [height] */
+ /** Calculates the [HeightSizeClass] for a given [height] */
internal fun fromHeight(height: Dp): HeightSizeClass {
require(height >= 0.dp) { "Height must not be negative" }
return when {
@@ -141,4 +149,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/compose/material/material/api/current.ignore b/compose/material/material/api/current.ignore
index f60b7d3..05d758d 100644
--- a/compose/material/material/api/current.ignore
+++ b/compose/material/material/api/current.ignore
@@ -1,3 +1,11 @@
// Baseline format: 1.0
+ParameterNameChange: androidx.compose.material.DrawerState#close(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.material.DrawerState.close
+ParameterNameChange: androidx.compose.material.DrawerState#open(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.material.DrawerState.open
+ParameterNameChange: androidx.compose.material.SnackbarHostState#showSnackbar(String, String, androidx.compose.material.SnackbarDuration, kotlin.coroutines.Continuation<? super androidx.compose.material.SnackbarResult>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.material.SnackbarHostState.showSnackbar
+
+
RemovedMethod: androidx.compose.material.FabPosition#FabPosition():
Removed constructor androidx.compose.material.FabPosition()
diff --git a/compose/material/material/api/current.txt b/compose/material/material/api/current.txt
index f8756c8..04c1c14 100644
--- a/compose/material/material/api/current.txt
+++ b/compose/material/material/api/current.txt
@@ -231,12 +231,12 @@
@androidx.compose.runtime.Stable public final class DrawerState {
ctor public DrawerState(androidx.compose.material.DrawerValue initialValue, optional kotlin.jvm.functions.Function1<? super androidx.compose.material.DrawerValue,java.lang.Boolean> confirmStateChange);
- method public suspend Object? close(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? close(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public androidx.compose.material.DrawerValue getCurrentValue();
method public boolean isAnimationRunning();
method public boolean isClosed();
method public boolean isOpen();
- method public suspend Object? open(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? open(kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final androidx.compose.material.DrawerValue currentValue;
property public final boolean isAnimationRunning;
property public final boolean isClosed;
@@ -485,7 +485,7 @@
@androidx.compose.runtime.Stable public final class SnackbarHostState {
ctor public SnackbarHostState();
method public androidx.compose.material.SnackbarData? getCurrentSnackbarData();
- method public suspend Object? showSnackbar(String message, optional String? actionLabel, optional androidx.compose.material.SnackbarDuration duration, optional kotlin.coroutines.Continuation<? super androidx.compose.material.SnackbarResult> p);
+ method public suspend Object? showSnackbar(String message, optional String? actionLabel, optional androidx.compose.material.SnackbarDuration duration, optional kotlin.coroutines.Continuation<? super androidx.compose.material.SnackbarResult>);
property public final androidx.compose.material.SnackbarData? currentSnackbarData;
}
diff --git a/compose/material/material/api/public_plus_experimental_current.txt b/compose/material/material/api/public_plus_experimental_current.txt
index a60be1a..c9468ea 100644
--- a/compose/material/material/api/public_plus_experimental_current.txt
+++ b/compose/material/material/api/public_plus_experimental_current.txt
@@ -51,11 +51,11 @@
@androidx.compose.material.ExperimentalMaterialApi @androidx.compose.runtime.Stable public final class BackdropScaffoldState extends androidx.compose.material.SwipeableState<androidx.compose.material.BackdropValue> {
ctor public BackdropScaffoldState(androidx.compose.material.BackdropValue initialValue, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.jvm.functions.Function1<? super androidx.compose.material.BackdropValue,java.lang.Boolean> confirmStateChange, optional androidx.compose.material.SnackbarHostState snackbarHostState);
- method public suspend Object? conceal(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? conceal(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public androidx.compose.material.SnackbarHostState getSnackbarHostState();
method public boolean isConcealed();
method public boolean isRevealed();
- method public suspend Object? reveal(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? reveal(kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final boolean isConcealed;
property public final boolean isRevealed;
property public final androidx.compose.material.SnackbarHostState snackbarHostState;
@@ -78,12 +78,12 @@
@androidx.compose.material.ExperimentalMaterialApi public final class BottomDrawerState extends androidx.compose.material.SwipeableState<androidx.compose.material.BottomDrawerValue> {
ctor public BottomDrawerState(androidx.compose.material.BottomDrawerValue initialValue, optional kotlin.jvm.functions.Function1<? super androidx.compose.material.BottomDrawerValue,java.lang.Boolean> confirmStateChange);
- method public suspend Object? close(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? expand(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? close(kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? expand(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public boolean isClosed();
method public boolean isExpanded();
method public boolean isOpen();
- method public suspend Object? open(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? open(kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final boolean isClosed;
property public final boolean isExpanded;
property public final boolean isOpen;
@@ -137,8 +137,8 @@
@androidx.compose.material.ExperimentalMaterialApi @androidx.compose.runtime.Stable public final class BottomSheetState extends androidx.compose.material.SwipeableState<androidx.compose.material.BottomSheetValue> {
ctor public BottomSheetState(androidx.compose.material.BottomSheetValue initialValue, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.jvm.functions.Function1<? super androidx.compose.material.BottomSheetValue,java.lang.Boolean> confirmStateChange);
- method public suspend Object? collapse(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? expand(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? collapse(kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? expand(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public boolean isCollapsed();
method public boolean isExpanded();
property public final boolean isCollapsed;
@@ -316,10 +316,10 @@
@androidx.compose.material.ExperimentalMaterialApi public final class DismissState extends androidx.compose.material.SwipeableState<androidx.compose.material.DismissValue> {
ctor public DismissState(androidx.compose.material.DismissValue initialValue, optional kotlin.jvm.functions.Function1<? super androidx.compose.material.DismissValue,java.lang.Boolean> confirmStateChange);
- method public suspend Object? dismiss(androidx.compose.material.DismissDirection direction, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? dismiss(androidx.compose.material.DismissDirection direction, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public androidx.compose.material.DismissDirection? getDismissDirection();
method public boolean isDismissed(androidx.compose.material.DismissDirection direction);
- method public suspend Object? reset(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? reset(kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final androidx.compose.material.DismissDirection? dismissDirection;
field public static final androidx.compose.material.DismissState.Companion Companion;
}
@@ -359,16 +359,16 @@
@androidx.compose.runtime.Stable public final class DrawerState {
ctor public DrawerState(androidx.compose.material.DrawerValue initialValue, optional kotlin.jvm.functions.Function1<? super androidx.compose.material.DrawerValue,java.lang.Boolean> confirmStateChange);
- method @androidx.compose.material.ExperimentalMaterialApi public suspend Object? animateTo(androidx.compose.material.DrawerValue targetValue, androidx.compose.animation.core.AnimationSpec<java.lang.Float> anim, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? close(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @androidx.compose.material.ExperimentalMaterialApi public suspend Object? animateTo(androidx.compose.material.DrawerValue targetValue, androidx.compose.animation.core.AnimationSpec<java.lang.Float> anim, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? close(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public androidx.compose.material.DrawerValue getCurrentValue();
method @androidx.compose.material.ExperimentalMaterialApi public androidx.compose.runtime.State<java.lang.Float> getOffset();
method @androidx.compose.material.ExperimentalMaterialApi public androidx.compose.material.DrawerValue getTargetValue();
method public boolean isAnimationRunning();
method public boolean isClosed();
method public boolean isOpen();
- method public suspend Object? open(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method @androidx.compose.material.ExperimentalMaterialApi public suspend Object? snapTo(androidx.compose.material.DrawerValue targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? open(kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method @androidx.compose.material.ExperimentalMaterialApi public suspend Object? snapTo(androidx.compose.material.DrawerValue targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final androidx.compose.material.DrawerValue currentValue;
property public final boolean isAnimationRunning;
property public final boolean isClosed;
@@ -519,9 +519,9 @@
@androidx.compose.material.ExperimentalMaterialApi public final class ModalBottomSheetState extends androidx.compose.material.SwipeableState<androidx.compose.material.ModalBottomSheetValue> {
ctor public ModalBottomSheetState(androidx.compose.material.ModalBottomSheetValue initialValue, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, boolean isSkipHalfExpanded, optional kotlin.jvm.functions.Function1<? super androidx.compose.material.ModalBottomSheetValue,java.lang.Boolean> confirmStateChange);
ctor public ModalBottomSheetState(androidx.compose.material.ModalBottomSheetValue initialValue, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.jvm.functions.Function1<? super androidx.compose.material.ModalBottomSheetValue,java.lang.Boolean> confirmStateChange);
- method public suspend Object? hide(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? hide(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public boolean isVisible();
- method public suspend Object? show(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? show(kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final boolean isVisible;
field public static final androidx.compose.material.ModalBottomSheetState.Companion Companion;
}
@@ -679,7 +679,7 @@
@androidx.compose.runtime.Stable public final class SnackbarHostState {
ctor public SnackbarHostState();
method public androidx.compose.material.SnackbarData? getCurrentSnackbarData();
- method public suspend Object? showSnackbar(String message, optional String? actionLabel, optional androidx.compose.material.SnackbarDuration duration, optional kotlin.coroutines.Continuation<? super androidx.compose.material.SnackbarResult> p);
+ method public suspend Object? showSnackbar(String message, optional String? actionLabel, optional androidx.compose.material.SnackbarDuration duration, optional kotlin.coroutines.Continuation<? super androidx.compose.material.SnackbarResult>);
property public final androidx.compose.material.SnackbarData? currentSnackbarData;
}
@@ -737,7 +737,7 @@
@androidx.compose.material.ExperimentalMaterialApi @androidx.compose.runtime.Stable public class SwipeableState<T> {
ctor public SwipeableState(T? initialValue, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.jvm.functions.Function1<? super T,java.lang.Boolean> confirmStateChange);
- method @androidx.compose.material.ExperimentalMaterialApi public final suspend Object? animateTo(T? targetValue, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> anim, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @androidx.compose.material.ExperimentalMaterialApi public final suspend Object? animateTo(T? targetValue, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> anim, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public final T! getCurrentValue();
method public final float getDirection();
method public final androidx.compose.runtime.State<java.lang.Float> getOffset();
@@ -746,8 +746,8 @@
method public final T! getTargetValue();
method public final boolean isAnimationRunning();
method public final float performDrag(float delta);
- method public final suspend Object? performFling(float velocity, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method @androidx.compose.material.ExperimentalMaterialApi public final suspend Object? snapTo(T? targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public final suspend Object? performFling(float velocity, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method @androidx.compose.material.ExperimentalMaterialApi public final suspend Object? snapTo(T? targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final T! currentValue;
property public final float direction;
property public final boolean isAnimationRunning;
diff --git a/compose/material/material/api/restricted_current.ignore b/compose/material/material/api/restricted_current.ignore
index f60b7d3..05d758d 100644
--- a/compose/material/material/api/restricted_current.ignore
+++ b/compose/material/material/api/restricted_current.ignore
@@ -1,3 +1,11 @@
// Baseline format: 1.0
+ParameterNameChange: androidx.compose.material.DrawerState#close(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.material.DrawerState.close
+ParameterNameChange: androidx.compose.material.DrawerState#open(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.material.DrawerState.open
+ParameterNameChange: androidx.compose.material.SnackbarHostState#showSnackbar(String, String, androidx.compose.material.SnackbarDuration, kotlin.coroutines.Continuation<? super androidx.compose.material.SnackbarResult>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.compose.material.SnackbarHostState.showSnackbar
+
+
RemovedMethod: androidx.compose.material.FabPosition#FabPosition():
Removed constructor androidx.compose.material.FabPosition()
diff --git a/compose/material/material/api/restricted_current.txt b/compose/material/material/api/restricted_current.txt
index f8756c8..04c1c14 100644
--- a/compose/material/material/api/restricted_current.txt
+++ b/compose/material/material/api/restricted_current.txt
@@ -231,12 +231,12 @@
@androidx.compose.runtime.Stable public final class DrawerState {
ctor public DrawerState(androidx.compose.material.DrawerValue initialValue, optional kotlin.jvm.functions.Function1<? super androidx.compose.material.DrawerValue,java.lang.Boolean> confirmStateChange);
- method public suspend Object? close(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? close(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public androidx.compose.material.DrawerValue getCurrentValue();
method public boolean isAnimationRunning();
method public boolean isClosed();
method public boolean isOpen();
- method public suspend Object? open(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? open(kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final androidx.compose.material.DrawerValue currentValue;
property public final boolean isAnimationRunning;
property public final boolean isClosed;
@@ -485,7 +485,7 @@
@androidx.compose.runtime.Stable public final class SnackbarHostState {
ctor public SnackbarHostState();
method public androidx.compose.material.SnackbarData? getCurrentSnackbarData();
- method public suspend Object? showSnackbar(String message, optional String? actionLabel, optional androidx.compose.material.SnackbarDuration duration, optional kotlin.coroutines.Continuation<? super androidx.compose.material.SnackbarResult> p);
+ method public suspend Object? showSnackbar(String message, optional String? actionLabel, optional androidx.compose.material.SnackbarDuration duration, optional kotlin.coroutines.Continuation<? super androidx.compose.material.SnackbarResult>);
property public final androidx.compose.material.SnackbarData? currentSnackbarData;
}
diff --git a/compose/material/material/icons/generator/api/icons.txt b/compose/material/material/icons/generator/api/icons.txt
index d6c84bf..8ff7235 100644
--- a/compose/material/material/icons/generator/api/icons.txt
+++ b/compose/material/material/icons/generator/api/icons.txt
@@ -190,6 +190,7 @@
Filled.BikeScooter
Filled.Biotech
Filled.Blender
+Filled.Blinds
Filled.BlindsClosed
Filled.Block
Filled.Bloodtype
@@ -238,6 +239,8 @@
Filled.BrightnessHigh
Filled.BrightnessLow
Filled.BrightnessMedium
+Filled.BroadcastOnHome
+Filled.BroadcastOnPersonal
Filled.BrokenImage
Filled.BrowseGallery
Filled.BrowserNotSupported
@@ -458,6 +461,7 @@
Filled.Description
Filled.Deselect
Filled.DesignServices
+Filled.Desk
Filled.DesktopAccessDisabled
Filled.DesktopMac
Filled.DesktopWindows
@@ -1029,6 +1033,7 @@
Filled.Lock
Filled.LockClock
Filled.LockOpen
+Filled.LockPerson
Filled.LockReset
Filled.Login
Filled.LogoDev
@@ -1179,6 +1184,7 @@
Filled.NightlightRound
Filled.NightsStay
Filled.NoAccounts
+Filled.NoAdultContent
Filled.NoBackpack
Filled.NoCell
Filled.NoCrash
@@ -1957,6 +1963,7 @@
Filled.VpnKeyOff
Filled.VpnLock
Filled.Vrpano
+Filled.Wallet
Filled.Wallpaper
Filled.Warehouse
Filled.Warning
@@ -1990,6 +1997,9 @@
Filled.WheelchairPickup
Filled.WhereToVote
Filled.Widgets
+Filled.WidthFull
+Filled.WidthNormal
+Filled.WidthWide
Filled.Wifi
Filled.Wifi1Bar
Filled.Wifi2Bar
@@ -2034,6 +2044,7 @@
Filled._15mp
Filled._16mp
Filled._17mp
+Filled._18UpRating
Filled._18mp
Filled._19mp
Filled._1k
@@ -2272,6 +2283,7 @@
Outlined.BikeScooter
Outlined.Biotech
Outlined.Blender
+Outlined.Blinds
Outlined.BlindsClosed
Outlined.Block
Outlined.Bloodtype
@@ -2320,6 +2332,8 @@
Outlined.BrightnessHigh
Outlined.BrightnessLow
Outlined.BrightnessMedium
+Outlined.BroadcastOnHome
+Outlined.BroadcastOnPersonal
Outlined.BrokenImage
Outlined.BrowseGallery
Outlined.BrowserNotSupported
@@ -2540,6 +2554,7 @@
Outlined.Description
Outlined.Deselect
Outlined.DesignServices
+Outlined.Desk
Outlined.DesktopAccessDisabled
Outlined.DesktopMac
Outlined.DesktopWindows
@@ -3111,6 +3126,7 @@
Outlined.Lock
Outlined.LockClock
Outlined.LockOpen
+Outlined.LockPerson
Outlined.LockReset
Outlined.Login
Outlined.LogoDev
@@ -3261,6 +3277,7 @@
Outlined.NightlightRound
Outlined.NightsStay
Outlined.NoAccounts
+Outlined.NoAdultContent
Outlined.NoBackpack
Outlined.NoCell
Outlined.NoCrash
@@ -4039,6 +4056,7 @@
Outlined.VpnKeyOff
Outlined.VpnLock
Outlined.Vrpano
+Outlined.Wallet
Outlined.Wallpaper
Outlined.Warehouse
Outlined.Warning
@@ -4072,6 +4090,9 @@
Outlined.WheelchairPickup
Outlined.WhereToVote
Outlined.Widgets
+Outlined.WidthFull
+Outlined.WidthNormal
+Outlined.WidthWide
Outlined.Wifi
Outlined.Wifi1Bar
Outlined.Wifi2Bar
@@ -4116,6 +4137,7 @@
Outlined._15mp
Outlined._16mp
Outlined._17mp
+Outlined._18UpRating
Outlined._18mp
Outlined._19mp
Outlined._1k
@@ -4354,6 +4376,7 @@
Rounded.BikeScooter
Rounded.Biotech
Rounded.Blender
+Rounded.Blinds
Rounded.BlindsClosed
Rounded.Block
Rounded.Bloodtype
@@ -4402,6 +4425,8 @@
Rounded.BrightnessHigh
Rounded.BrightnessLow
Rounded.BrightnessMedium
+Rounded.BroadcastOnHome
+Rounded.BroadcastOnPersonal
Rounded.BrokenImage
Rounded.BrowseGallery
Rounded.BrowserNotSupported
@@ -4622,6 +4647,7 @@
Rounded.Description
Rounded.Deselect
Rounded.DesignServices
+Rounded.Desk
Rounded.DesktopAccessDisabled
Rounded.DesktopMac
Rounded.DesktopWindows
@@ -5193,6 +5219,7 @@
Rounded.Lock
Rounded.LockClock
Rounded.LockOpen
+Rounded.LockPerson
Rounded.LockReset
Rounded.Login
Rounded.LogoDev
@@ -5343,6 +5370,7 @@
Rounded.NightlightRound
Rounded.NightsStay
Rounded.NoAccounts
+Rounded.NoAdultContent
Rounded.NoBackpack
Rounded.NoCell
Rounded.NoCrash
@@ -6121,6 +6149,7 @@
Rounded.VpnKeyOff
Rounded.VpnLock
Rounded.Vrpano
+Rounded.Wallet
Rounded.Wallpaper
Rounded.Warehouse
Rounded.Warning
@@ -6154,6 +6183,9 @@
Rounded.WheelchairPickup
Rounded.WhereToVote
Rounded.Widgets
+Rounded.WidthFull
+Rounded.WidthNormal
+Rounded.WidthWide
Rounded.Wifi
Rounded.Wifi1Bar
Rounded.Wifi2Bar
@@ -6198,6 +6230,7 @@
Rounded._15mp
Rounded._16mp
Rounded._17mp
+Rounded._18UpRating
Rounded._18mp
Rounded._19mp
Rounded._1k
@@ -6436,6 +6469,7 @@
Sharp.BikeScooter
Sharp.Biotech
Sharp.Blender
+Sharp.Blinds
Sharp.BlindsClosed
Sharp.Block
Sharp.Bloodtype
@@ -6484,6 +6518,8 @@
Sharp.BrightnessHigh
Sharp.BrightnessLow
Sharp.BrightnessMedium
+Sharp.BroadcastOnHome
+Sharp.BroadcastOnPersonal
Sharp.BrokenImage
Sharp.BrowseGallery
Sharp.BrowserNotSupported
@@ -6704,6 +6740,7 @@
Sharp.Description
Sharp.Deselect
Sharp.DesignServices
+Sharp.Desk
Sharp.DesktopAccessDisabled
Sharp.DesktopMac
Sharp.DesktopWindows
@@ -7275,6 +7312,7 @@
Sharp.Lock
Sharp.LockClock
Sharp.LockOpen
+Sharp.LockPerson
Sharp.LockReset
Sharp.Login
Sharp.LogoDev
@@ -7425,6 +7463,7 @@
Sharp.NightlightRound
Sharp.NightsStay
Sharp.NoAccounts
+Sharp.NoAdultContent
Sharp.NoBackpack
Sharp.NoCell
Sharp.NoCrash
@@ -8203,6 +8242,7 @@
Sharp.VpnKeyOff
Sharp.VpnLock
Sharp.Vrpano
+Sharp.Wallet
Sharp.Wallpaper
Sharp.Warehouse
Sharp.Warning
@@ -8236,6 +8276,9 @@
Sharp.WheelchairPickup
Sharp.WhereToVote
Sharp.Widgets
+Sharp.WidthFull
+Sharp.WidthNormal
+Sharp.WidthWide
Sharp.Wifi
Sharp.Wifi1Bar
Sharp.Wifi2Bar
@@ -8280,6 +8323,7 @@
Sharp._15mp
Sharp._16mp
Sharp._17mp
+Sharp._18UpRating
Sharp._18mp
Sharp._19mp
Sharp._1k
@@ -8518,6 +8562,7 @@
TwoTone.BikeScooter
TwoTone.Biotech
TwoTone.Blender
+TwoTone.Blinds
TwoTone.BlindsClosed
TwoTone.Block
TwoTone.Bloodtype
@@ -8566,6 +8611,8 @@
TwoTone.BrightnessHigh
TwoTone.BrightnessLow
TwoTone.BrightnessMedium
+TwoTone.BroadcastOnHome
+TwoTone.BroadcastOnPersonal
TwoTone.BrokenImage
TwoTone.BrowseGallery
TwoTone.BrowserNotSupported
@@ -8786,6 +8833,7 @@
TwoTone.Description
TwoTone.Deselect
TwoTone.DesignServices
+TwoTone.Desk
TwoTone.DesktopAccessDisabled
TwoTone.DesktopMac
TwoTone.DesktopWindows
@@ -9357,6 +9405,7 @@
TwoTone.Lock
TwoTone.LockClock
TwoTone.LockOpen
+TwoTone.LockPerson
TwoTone.LockReset
TwoTone.Login
TwoTone.LogoDev
@@ -9507,6 +9556,7 @@
TwoTone.NightlightRound
TwoTone.NightsStay
TwoTone.NoAccounts
+TwoTone.NoAdultContent
TwoTone.NoBackpack
TwoTone.NoCell
TwoTone.NoCrash
@@ -10285,6 +10335,7 @@
TwoTone.VpnKeyOff
TwoTone.VpnLock
TwoTone.Vrpano
+TwoTone.Wallet
TwoTone.Wallpaper
TwoTone.Warehouse
TwoTone.Warning
@@ -10318,6 +10369,9 @@
TwoTone.WheelchairPickup
TwoTone.WhereToVote
TwoTone.Widgets
+TwoTone.WidthFull
+TwoTone.WidthNormal
+TwoTone.WidthWide
TwoTone.Wifi
TwoTone.Wifi1Bar
TwoTone.Wifi2Bar
@@ -10362,6 +10416,7 @@
TwoTone._15mp
TwoTone._16mp
TwoTone._17mp
+TwoTone._18UpRating
TwoTone._18mp
TwoTone._19mp
TwoTone._1k
diff --git a/compose/material/material/icons/generator/raw-icons/filled/18_up_rating.xml b/compose/material/material/icons/generator/raw-icons/filled/18_up_rating.xml
new file mode 100644
index 0000000..9157dca
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/filled/18_up_rating.xml
@@ -0,0 +1,16 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M13,12.5h1.5v1.5h-1.5z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M13,10h1.5v1.5h-1.5z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M19,3H5C3.9,3 3,3.9 3,5v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2V5C21,3.9 20.1,3 19,3zM10,15H8.5v-4.5H7V9h3V15zM16,14c0,0.55 -0.45,1 -1,1h-2.5c-0.55,0 -1,-0.45 -1,-1v-4c0,-0.55 0.45,-1 1,-1H15c0.55,0 1,0.45 1,1V14z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/filled/blinds.xml b/compose/material/material/icons/generator/raw-icons/filled/blinds.xml
new file mode 100644
index 0000000..02afa6f
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/filled/blinds.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20,19V3H4v16H2v2h20v-2H20zM16,9h2v2h-2V9zM14,11H6V9h8V11zM18,7h-2V5h2V7zM14,5v2H6V5H14zM6,19v-6h8v1.82c-0.45,0.32 -0.75,0.84 -0.75,1.43c0,0.97 0.78,1.75 1.75,1.75s1.75,-0.78 1.75,-1.75c0,-0.59 -0.3,-1.12 -0.75,-1.43V13h2v6H6z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/filled/broadcast_on_home.xml b/compose/material/material/icons/generator/raw-icons/filled/broadcast_on_home.xml
new file mode 100644
index 0000000..83c5ebb
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/filled/broadcast_on_home.xml
@@ -0,0 +1,22 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M22,6c0,-1.1 -0.9,-2 -2,-2H4v2h16v2.59c0.73,0.29 1.4,0.69 2,1.17V6z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M8,9H3c-0.5,0 -1,0.5 -1,1v9c0,0.5 0.5,1 1,1h5c0.5,0 1,-0.5 1,-1v-9C9,9.5 8.5,9 8,9zM7,18H4v-7h3V18z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17.75,16.97c0.3,-0.23 0.5,-0.57 0.5,-0.97c0,-0.69 -0.56,-1.25 -1.25,-1.25s-1.25,0.56 -1.25,1.25c0,0.4 0.2,0.75 0.5,0.97V22h1.5V16.97z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,13.5c1.38,0 2.5,1.12 2.5,2.5c0,0.69 -0.28,1.31 -0.73,1.76l1.06,1.06C20.55,18.1 21,17.1 21,16c0,-2.21 -1.79,-4 -4,-4c-2.21,0 -4,1.79 -4,4c0,1.1 0.45,2.1 1.17,2.83l1.06,-1.06c-0.45,-0.45 -0.73,-1.08 -0.73,-1.77C14.5,14.62 15.62,13.5 17,13.5z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,9.5c-3.59,0 -6.5,2.91 -6.5,6.5c0,1.79 0.73,3.42 1.9,4.6l1.06,-1.06C12.56,18.63 12,17.38 12,16c0,-2.76 2.24,-5 5,-5s5,2.24 5,5c0,1.37 -0.56,2.62 -1.46,3.52l1.07,1.06c1.17,-1.18 1.89,-2.8 1.89,-4.58C23.5,12.41 20.59,9.5 17,9.5z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/filled/broadcast_on_personal.xml b/compose/material/material/icons/generator/raw-icons/filled/broadcast_on_personal.xml
new file mode 100644
index 0000000..ddc8dafc
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/filled/broadcast_on_personal.xml
@@ -0,0 +1,19 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,8c0.7,0 1.38,0.1 2.02,0.27L12,3L4,9v12h6.76C9.66,19.63 9,17.89 9,16C9,11.58 12.58,8 17,8z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,14.75c-0.69,0 -1.25,0.56 -1.25,1.25c0,0.4 0.2,0.75 0.5,0.97V22h1.5v-5.03c0.3,-0.23 0.5,-0.57 0.5,-0.97C18.25,15.31 17.69,14.75 17,14.75z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,12c-2.21,0 -4,1.79 -4,4c0,1.1 0.45,2.1 1.17,2.83l1.06,-1.06c-0.45,-0.45 -0.73,-1.08 -0.73,-1.77c0,-1.38 1.12,-2.5 2.5,-2.5s2.5,1.12 2.5,2.5c0,0.69 -0.28,1.31 -0.73,1.76l1.06,1.06C20.55,18.1 21,17.1 21,16C21,13.79 19.21,12 17,12z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,9.5c-3.59,0 -6.5,2.91 -6.5,6.5c0,1.79 0.73,3.42 1.9,4.6l1.06,-1.06C12.56,18.63 12,17.38 12,16c0,-2.76 2.24,-5 5,-5s5,2.24 5,5c0,1.37 -0.56,2.62 -1.46,3.52l1.07,1.06c1.17,-1.18 1.89,-2.8 1.89,-4.58C23.5,12.41 20.59,9.5 17,9.5z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/filled/desk.xml b/compose/material/material/icons/generator/raw-icons/filled/desk.xml
new file mode 100644
index 0000000..c6f9813
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/filled/desk.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M2,6v12h2V8h10v10h2v-2h4v2h2V6H2zM20,8v2h-4V8H20zM16,14v-2h4v2H16z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/filled/lock_person.xml b/compose/material/material/icons/generator/raw-icons/filled/lock_person.xml
new file mode 100644
index 0000000..86b3106
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/filled/lock_person.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M18,11c0.7,0 1.37,0.1 2,0.29V10c0,-1.1 -0.9,-2 -2,-2h-1V6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2H6c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h6.26C11.47,20.87 11,19.49 11,18C11,14.13 14.13,11 18,11zM8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1s3.1,1.39 3.1,3.1v2H8.9V6z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M18,13c-2.76,0 -5,2.24 -5,5s2.24,5 5,5s5,-2.24 5,-5S20.76,13 18,13zM18,15c0.83,0 1.5,0.67 1.5,1.5S18.83,18 18,18s-1.5,-0.67 -1.5,-1.5S17.17,15 18,15zM18,21c-1.03,0 -1.94,-0.52 -2.48,-1.32C16.25,19.26 17.09,19 18,19s1.75,0.26 2.48,0.68C19.94,20.48 19.03,21 18,21z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/filled/no_adult_content.xml b/compose/material/material/icons/generator/raw-icons/filled/no_adult_content.xml
new file mode 100644
index 0000000..27a37a3
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/filled/no_adult_content.xml
@@ -0,0 +1,19 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10s10,-4.48 10,-10S17.52,2 12,2zM4,12c0,-1.85 0.63,-3.54 1.69,-4.9L7.59,9h2.83L7.1,5.69C8.46,4.63 10.15,4 12,4c4.41,0 8,3.59 8,8c0,1.85 -0.63,3.54 -1.69,4.9l-1.9,-1.9h-2.83l3.31,3.31C15.54,19.37 13.85,20 12,20C7.59,20 4,16.41 4,12z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M14.25,14l-1.5,-2l1.5,-2l-1.5,0l-0.75,1l-0.75,-1l-1.5,0l1.5,2l-1.5,2l1.5,0l0.75,-1l0.75,1z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M8,10l-0.75,1l-0.75,-1l-1.5,0l1.5,2l-1.5,2l1.5,0l0.75,-1l0.75,1l1.5,0l-1.5,-2l1.5,-2z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M16,14l0.75,-1l0.75,1l1.5,0l-1.5,-2l1.5,-2l-1.5,0l-0.75,1l-0.75,-1l-1.5,0l1.5,2l-1.5,2z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/filled/wallet.xml b/compose/material/material/icons/generator/raw-icons/filled/wallet.xml
new file mode 100644
index 0000000..b5ad926
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/filled/wallet.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M18,4H6C3.79,4 2,5.79 2,8v8c0,2.21 1.79,4 4,4h12c2.21,0 4,-1.79 4,-4V8C22,5.79 20.21,4 18,4zM16.14,13.77c-0.24,0.2 -0.57,0.28 -0.88,0.2L4.15,11.25C4.45,10.52 5.16,10 6,10h12c0.67,0 1.26,0.34 1.63,0.84L16.14,13.77zM6,6h12c1.1,0 2,0.9 2,2v0.55C19.41,8.21 18.73,8 18,8H6C5.27,8 4.59,8.21 4,8.55V8C4,6.9 4.9,6 6,6z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/filled/width_full.xml b/compose/material/material/icons/generator/raw-icons/filled/width_full.xml
new file mode 100644
index 0000000..b7fb52b
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/filled/width_full.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20,4H4C2.9,4 2,4.9 2,6v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6C22,4.9 21.1,4 20,4zM4,6h1v12H4V6zM20,18h-1V6h1V18z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/filled/width_normal.xml b/compose/material/material/icons/generator/raw-icons/filled/width_normal.xml
new file mode 100644
index 0000000..5f327b5
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/filled/width_normal.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20,4H4C2.9,4 2,4.9 2,6v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6C22,4.9 21.1,4 20,4zM4,6h4v12H4V6zM20,18h-4V6h4V18z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/filled/width_wide.xml b/compose/material/material/icons/generator/raw-icons/filled/width_wide.xml
new file mode 100644
index 0000000..aacd7be
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/filled/width_wide.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20,4H4C2.9,4 2,4.9 2,6v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6C22,4.9 21.1,4 20,4zM4,6h2v12H4V6zM20,18h-2V6h2V18z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/outlined/18_up_rating.xml b/compose/material/material/icons/generator/raw-icons/outlined/18_up_rating.xml
new file mode 100644
index 0000000..d67628b
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/outlined/18_up_rating.xml
@@ -0,0 +1,16 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M8.5,15l1.5,0l0,-6l-3,0l0,1.5l1.5,0z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M19,3H5C3.9,3 3,3.9 3,5v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2V5C21,3.9 20.1,3 19,3zM19,19H5V5h14V19z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M12.5,15H15c0.55,0 1,-0.45 1,-1v-4c0,-0.55 -0.45,-1 -1,-1h-2.5c-0.55,0 -1,0.45 -1,1v4C11.5,14.55 11.95,15 12.5,15zM13,10h1.5v1.5H13V10zM13,12.5h1.5V14H13V12.5z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/outlined/blinds.xml b/compose/material/material/icons/generator/raw-icons/outlined/blinds.xml
new file mode 100644
index 0000000..02afa6f
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/outlined/blinds.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20,19V3H4v16H2v2h20v-2H20zM16,9h2v2h-2V9zM14,11H6V9h8V11zM18,7h-2V5h2V7zM14,5v2H6V5H14zM6,19v-6h8v1.82c-0.45,0.32 -0.75,0.84 -0.75,1.43c0,0.97 0.78,1.75 1.75,1.75s1.75,-0.78 1.75,-1.75c0,-0.59 -0.3,-1.12 -0.75,-1.43V13h2v6H6z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/outlined/broadcast_on_home.xml b/compose/material/material/icons/generator/raw-icons/outlined/broadcast_on_home.xml
new file mode 100644
index 0000000..83c5ebb
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/outlined/broadcast_on_home.xml
@@ -0,0 +1,22 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M22,6c0,-1.1 -0.9,-2 -2,-2H4v2h16v2.59c0.73,0.29 1.4,0.69 2,1.17V6z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M8,9H3c-0.5,0 -1,0.5 -1,1v9c0,0.5 0.5,1 1,1h5c0.5,0 1,-0.5 1,-1v-9C9,9.5 8.5,9 8,9zM7,18H4v-7h3V18z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17.75,16.97c0.3,-0.23 0.5,-0.57 0.5,-0.97c0,-0.69 -0.56,-1.25 -1.25,-1.25s-1.25,0.56 -1.25,1.25c0,0.4 0.2,0.75 0.5,0.97V22h1.5V16.97z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,13.5c1.38,0 2.5,1.12 2.5,2.5c0,0.69 -0.28,1.31 -0.73,1.76l1.06,1.06C20.55,18.1 21,17.1 21,16c0,-2.21 -1.79,-4 -4,-4c-2.21,0 -4,1.79 -4,4c0,1.1 0.45,2.1 1.17,2.83l1.06,-1.06c-0.45,-0.45 -0.73,-1.08 -0.73,-1.77C14.5,14.62 15.62,13.5 17,13.5z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,9.5c-3.59,0 -6.5,2.91 -6.5,6.5c0,1.79 0.73,3.42 1.9,4.6l1.06,-1.06C12.56,18.63 12,17.38 12,16c0,-2.76 2.24,-5 5,-5s5,2.24 5,5c0,1.37 -0.56,2.62 -1.46,3.52l1.07,1.06c1.17,-1.18 1.89,-2.8 1.89,-4.58C23.5,12.41 20.59,9.5 17,9.5z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/outlined/broadcast_on_personal.xml b/compose/material/material/icons/generator/raw-icons/outlined/broadcast_on_personal.xml
new file mode 100644
index 0000000..5a24b52
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/outlined/broadcast_on_personal.xml
@@ -0,0 +1,19 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M4,19v-9l6,-4.5l4.08,3.06c0.81,-0.32 1.69,-0.51 2.61,-0.54L10,3L2,9v12h8.76c-0.48,-0.6 -0.88,-1.27 -1.17,-2H4z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,14.75c-0.69,0 -1.25,0.56 -1.25,1.25c0,0.4 0.2,0.75 0.5,0.97V22h1.5v-5.03c0.3,-0.23 0.5,-0.57 0.5,-0.97C18.25,15.31 17.69,14.75 17,14.75z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,12c-2.21,0 -4,1.79 -4,4c0,1.1 0.45,2.1 1.17,2.83l1.06,-1.06c-0.45,-0.45 -0.73,-1.08 -0.73,-1.77c0,-1.38 1.12,-2.5 2.5,-2.5s2.5,1.12 2.5,2.5c0,0.69 -0.28,1.31 -0.73,1.76l1.06,1.06C20.55,18.1 21,17.1 21,16C21,13.79 19.21,12 17,12z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,9.5c-3.59,0 -6.5,2.91 -6.5,6.5c0,1.79 0.73,3.42 1.9,4.6l1.06,-1.06C12.56,18.63 12,17.38 12,16c0,-2.76 2.24,-5 5,-5s5,2.24 5,5c0,1.37 -0.56,2.62 -1.46,3.52l1.07,1.06c1.17,-1.18 1.89,-2.8 1.89,-4.58C23.5,12.41 20.59,9.5 17,9.5z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/outlined/desk.xml b/compose/material/material/icons/generator/raw-icons/outlined/desk.xml
new file mode 100644
index 0000000..c6f9813
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/outlined/desk.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M2,6v12h2V8h10v10h2v-2h4v2h2V6H2zM20,8v2h-4V8H20zM16,14v-2h4v2H16z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/outlined/lock_person.xml b/compose/material/material/icons/generator/raw-icons/outlined/lock_person.xml
new file mode 100644
index 0000000..4e9145e
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/outlined/lock_person.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M6,20V10h12v1c0.7,0 1.37,0.1 2,0.29V10c0,-1.1 -0.9,-2 -2,-2h-1V6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2H6c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h6.26c-0.42,-0.6 -0.75,-1.28 -0.97,-2H6zM9,6c0,-1.66 1.34,-3 3,-3s3,1.34 3,3v2H9V6z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M18,13c-2.76,0 -5,2.24 -5,5s2.24,5 5,5s5,-2.24 5,-5S20.76,13 18,13zM18,15c0.83,0 1.5,0.67 1.5,1.5S18.83,18 18,18s-1.5,-0.67 -1.5,-1.5S17.17,15 18,15zM18,21c-1.03,0 -1.94,-0.52 -2.48,-1.32C16.25,19.26 17.09,19 18,19s1.75,0.26 2.48,0.68C19.94,20.48 19.03,21 18,21z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/outlined/no_adult_content.xml b/compose/material/material/icons/generator/raw-icons/outlined/no_adult_content.xml
new file mode 100644
index 0000000..27a37a3
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/outlined/no_adult_content.xml
@@ -0,0 +1,19 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10s10,-4.48 10,-10S17.52,2 12,2zM4,12c0,-1.85 0.63,-3.54 1.69,-4.9L7.59,9h2.83L7.1,5.69C8.46,4.63 10.15,4 12,4c4.41,0 8,3.59 8,8c0,1.85 -0.63,3.54 -1.69,4.9l-1.9,-1.9h-2.83l3.31,3.31C15.54,19.37 13.85,20 12,20C7.59,20 4,16.41 4,12z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M14.25,14l-1.5,-2l1.5,-2l-1.5,0l-0.75,1l-0.75,-1l-1.5,0l1.5,2l-1.5,2l1.5,0l0.75,-1l0.75,1z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M8,10l-0.75,1l-0.75,-1l-1.5,0l1.5,2l-1.5,2l1.5,0l0.75,-1l0.75,1l1.5,0l-1.5,-2l1.5,-2z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M16,14l0.75,-1l0.75,1l1.5,0l-1.5,-2l1.5,-2l-1.5,0l-0.75,1l-0.75,-1l-1.5,0l1.5,2l-1.5,2z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/outlined/wallet.xml b/compose/material/material/icons/generator/raw-icons/outlined/wallet.xml
new file mode 100644
index 0000000..b5ad926
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/outlined/wallet.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M18,4H6C3.79,4 2,5.79 2,8v8c0,2.21 1.79,4 4,4h12c2.21,0 4,-1.79 4,-4V8C22,5.79 20.21,4 18,4zM16.14,13.77c-0.24,0.2 -0.57,0.28 -0.88,0.2L4.15,11.25C4.45,10.52 5.16,10 6,10h12c0.67,0 1.26,0.34 1.63,0.84L16.14,13.77zM6,6h12c1.1,0 2,0.9 2,2v0.55C19.41,8.21 18.73,8 18,8H6C5.27,8 4.59,8.21 4,8.55V8C4,6.9 4.9,6 6,6z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/outlined/width_full.xml b/compose/material/material/icons/generator/raw-icons/outlined/width_full.xml
new file mode 100644
index 0000000..ab802cb1
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/outlined/width_full.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20,4H4C2.9,4 2,4.9 2,6v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6C22,4.9 21.1,4 20,4zM4,18V6h1v12H4zM7,18V6h10v12H7zM20,18h-1V6h1V18z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/outlined/width_normal.xml b/compose/material/material/icons/generator/raw-icons/outlined/width_normal.xml
new file mode 100644
index 0000000..65448e4
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/outlined/width_normal.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20,4H4C2.9,4 2,4.9 2,6v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6C22,4.9 21.1,4 20,4zM4,18V6h4v12H4zM10,18V6h4v12H10zM20,18h-4V6h4V18z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/outlined/width_wide.xml b/compose/material/material/icons/generator/raw-icons/outlined/width_wide.xml
new file mode 100644
index 0000000..61f1a42
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/outlined/width_wide.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20,4H4C2.9,4 2,4.9 2,6v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6C22,4.9 21.1,4 20,4zM4,18V6h2v12H4zM8,18V6h8v12H8zM20,18h-2V6h2V18z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/rounded/18_up_rating.xml b/compose/material/material/icons/generator/raw-icons/rounded/18_up_rating.xml
new file mode 100644
index 0000000..96b9f19
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/rounded/18_up_rating.xml
@@ -0,0 +1,16 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M13,12.5h1.5v1.5h-1.5z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M13,10h1.5v1.5h-1.5z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M19,3H5C3.9,3 3,3.9 3,5v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2V5C21,3.9 20.1,3 19,3zM9.25,15L9.25,15c-0.41,0 -0.75,-0.34 -0.75,-0.75V10.5H7.75C7.34,10.5 7,10.16 7,9.75v0C7,9.34 7.34,9 7.75,9H9c0.55,0 1,0.45 1,1v4.25C10,14.66 9.66,15 9.25,15zM16,14c0,0.55 -0.45,1 -1,1h-2.5c-0.55,0 -1,-0.45 -1,-1v-4c0,-0.55 0.45,-1 1,-1H15c0.55,0 1,0.45 1,1V14z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/rounded/blinds.xml b/compose/material/material/icons/generator/raw-icons/rounded/blinds.xml
new file mode 100644
index 0000000..493f573
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/rounded/blinds.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20,19V5c0,-1.1 -0.9,-2 -2,-2H6C4.9,3 4,3.9 4,5v14H3c-0.55,0 -1,0.45 -1,1v0c0,0.55 0.45,1 1,1h18c0.55,0 1,-0.45 1,-1v0c0,-0.55 -0.45,-1 -1,-1H20zM16,9h2v2h-2V9zM14,11H6V9h8V11zM18,7h-2V5h2V7zM14,5v2H6V5H14zM6,19v-6h8v1.82c-0.45,0.32 -0.75,0.84 -0.75,1.43c0,0.97 0.78,1.75 1.75,1.75s1.75,-0.78 1.75,-1.75c0,-0.59 -0.3,-1.12 -0.75,-1.43V13h2v6H6z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/rounded/broadcast_on_home.xml b/compose/material/material/icons/generator/raw-icons/rounded/broadcast_on_home.xml
new file mode 100644
index 0000000..da23a663
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/rounded/broadcast_on_home.xml
@@ -0,0 +1,22 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M22,6c0,-1.1 -0.9,-2 -2,-2H5C4.45,4 4,4.45 4,5v0c0,0.55 0.45,1 1,1h15v2.59c0.73,0.29 1.4,0.69 2,1.17V6z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M8,9H3c-0.5,0 -1,0.5 -1,1v9c0,0.5 0.5,1 1,1h5c0.5,0 1,-0.5 1,-1v-9C9,9.5 8.5,9 8,9zM7,18H4v-7h3V18z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17.75,16.97c0.3,-0.23 0.5,-0.57 0.5,-0.97c0,-0.69 -0.56,-1.25 -1.25,-1.25s-1.25,0.56 -1.25,1.25c0,0.4 0.2,0.75 0.5,0.97v4.28c0,0.41 0.34,0.75 0.75,0.75l0,0c0.41,0 0.75,-0.34 0.75,-0.75V16.97z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17.54,13.56c0.98,0.21 1.76,1.03 1.93,2.02c0.11,0.64 -0.03,1.25 -0.34,1.74c-0.18,0.29 -0.13,0.67 0.12,0.91l0,0c0.34,0.33 0.9,0.29 1.16,-0.12c0.51,-0.82 0.73,-1.83 0.53,-2.9c-0.3,-1.56 -1.56,-2.83 -3.12,-3.13C15.24,11.58 13,13.53 13,16c0,0.78 0.22,1.5 0.6,2.11c0.25,0.41 0.83,0.46 1.16,0.12l0,0c0.24,-0.24 0.29,-0.63 0.11,-0.92c-0.24,-0.38 -0.37,-0.83 -0.37,-1.31C14.5,14.45 15.93,13.22 17.54,13.56z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M16.25,9.54c-2.94,0.33 -5.32,2.68 -5.69,5.61c-0.23,1.82 0.29,3.51 1.3,4.82c0.27,0.35 0.8,0.37 1.12,0.06l0,0c0.27,-0.27 0.28,-0.7 0.05,-1c-0.8,-1.05 -1.2,-2.43 -0.95,-3.89c0.34,-2.03 1.95,-3.67 3.98,-4.05C19.22,10.5 22,12.93 22,16c0,1.13 -0.38,2.18 -1.02,3.02c-0.23,0.3 -0.21,0.73 0.06,1l0,0c0.31,0.31 0.84,0.3 1.11,-0.06C23,18.87 23.5,17.49 23.5,16C23.5,12.16 20.17,9.1 16.25,9.54z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/rounded/broadcast_on_personal.xml b/compose/material/material/icons/generator/raw-icons/rounded/broadcast_on_personal.xml
new file mode 100644
index 0000000..ddc8dafc
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/rounded/broadcast_on_personal.xml
@@ -0,0 +1,19 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,8c0.7,0 1.38,0.1 2.02,0.27L12,3L4,9v12h6.76C9.66,19.63 9,17.89 9,16C9,11.58 12.58,8 17,8z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,14.75c-0.69,0 -1.25,0.56 -1.25,1.25c0,0.4 0.2,0.75 0.5,0.97V22h1.5v-5.03c0.3,-0.23 0.5,-0.57 0.5,-0.97C18.25,15.31 17.69,14.75 17,14.75z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,12c-2.21,0 -4,1.79 -4,4c0,1.1 0.45,2.1 1.17,2.83l1.06,-1.06c-0.45,-0.45 -0.73,-1.08 -0.73,-1.77c0,-1.38 1.12,-2.5 2.5,-2.5s2.5,1.12 2.5,2.5c0,0.69 -0.28,1.31 -0.73,1.76l1.06,1.06C20.55,18.1 21,17.1 21,16C21,13.79 19.21,12 17,12z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,9.5c-3.59,0 -6.5,2.91 -6.5,6.5c0,1.79 0.73,3.42 1.9,4.6l1.06,-1.06C12.56,18.63 12,17.38 12,16c0,-2.76 2.24,-5 5,-5s5,2.24 5,5c0,1.37 -0.56,2.62 -1.46,3.52l1.07,1.06c1.17,-1.18 1.89,-2.8 1.89,-4.58C23.5,12.41 20.59,9.5 17,9.5z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/rounded/desk.xml b/compose/material/material/icons/generator/raw-icons/rounded/desk.xml
new file mode 100644
index 0000000..31f4cda
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/rounded/desk.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M2,7v10c0,0.55 0.45,1 1,1h0c0.55,0 1,-0.45 1,-1V8h10v9c0,0.55 0.45,1 1,1h0c0.55,0 1,-0.45 1,-1v-1h4v1c0,0.55 0.45,1 1,1h0c0.55,0 1,-0.45 1,-1V7c0,-0.55 -0.45,-1 -1,-1H3C2.45,6 2,6.45 2,7zM20,8v2h-4V8H20zM16,14v-2h4v2H16z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/rounded/lock_person.xml b/compose/material/material/icons/generator/raw-icons/rounded/lock_person.xml
new file mode 100644
index 0000000..86b3106
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/rounded/lock_person.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M18,11c0.7,0 1.37,0.1 2,0.29V10c0,-1.1 -0.9,-2 -2,-2h-1V6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2H6c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h6.26C11.47,20.87 11,19.49 11,18C11,14.13 14.13,11 18,11zM8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1s3.1,1.39 3.1,3.1v2H8.9V6z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M18,13c-2.76,0 -5,2.24 -5,5s2.24,5 5,5s5,-2.24 5,-5S20.76,13 18,13zM18,15c0.83,0 1.5,0.67 1.5,1.5S18.83,18 18,18s-1.5,-0.67 -1.5,-1.5S17.17,15 18,15zM18,21c-1.03,0 -1.94,-0.52 -2.48,-1.32C16.25,19.26 17.09,19 18,19s1.75,0.26 2.48,0.68C19.94,20.48 19.03,21 18,21z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/rounded/no_adult_content.xml b/compose/material/material/icons/generator/raw-icons/rounded/no_adult_content.xml
new file mode 100644
index 0000000..27a37a3
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/rounded/no_adult_content.xml
@@ -0,0 +1,19 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10s10,-4.48 10,-10S17.52,2 12,2zM4,12c0,-1.85 0.63,-3.54 1.69,-4.9L7.59,9h2.83L7.1,5.69C8.46,4.63 10.15,4 12,4c4.41,0 8,3.59 8,8c0,1.85 -0.63,3.54 -1.69,4.9l-1.9,-1.9h-2.83l3.31,3.31C15.54,19.37 13.85,20 12,20C7.59,20 4,16.41 4,12z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M14.25,14l-1.5,-2l1.5,-2l-1.5,0l-0.75,1l-0.75,-1l-1.5,0l1.5,2l-1.5,2l1.5,0l0.75,-1l0.75,1z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M8,10l-0.75,1l-0.75,-1l-1.5,0l1.5,2l-1.5,2l1.5,0l0.75,-1l0.75,1l1.5,0l-1.5,-2l1.5,-2z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M16,14l0.75,-1l0.75,1l1.5,0l-1.5,-2l1.5,-2l-1.5,0l-0.75,1l-0.75,-1l-1.5,0l1.5,2l-1.5,2z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/rounded/wallet.xml b/compose/material/material/icons/generator/raw-icons/rounded/wallet.xml
new file mode 100644
index 0000000..b5ad926
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/rounded/wallet.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M18,4H6C3.79,4 2,5.79 2,8v8c0,2.21 1.79,4 4,4h12c2.21,0 4,-1.79 4,-4V8C22,5.79 20.21,4 18,4zM16.14,13.77c-0.24,0.2 -0.57,0.28 -0.88,0.2L4.15,11.25C4.45,10.52 5.16,10 6,10h12c0.67,0 1.26,0.34 1.63,0.84L16.14,13.77zM6,6h12c1.1,0 2,0.9 2,2v0.55C19.41,8.21 18.73,8 18,8H6C5.27,8 4.59,8.21 4,8.55V8C4,6.9 4.9,6 6,6z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/rounded/width_full.xml b/compose/material/material/icons/generator/raw-icons/rounded/width_full.xml
new file mode 100644
index 0000000..b7fb52b
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/rounded/width_full.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20,4H4C2.9,4 2,4.9 2,6v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6C22,4.9 21.1,4 20,4zM4,6h1v12H4V6zM20,18h-1V6h1V18z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/rounded/width_normal.xml b/compose/material/material/icons/generator/raw-icons/rounded/width_normal.xml
new file mode 100644
index 0000000..5f327b5
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/rounded/width_normal.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20,4H4C2.9,4 2,4.9 2,6v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6C22,4.9 21.1,4 20,4zM4,6h4v12H4V6zM20,18h-4V6h4V18z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/rounded/width_wide.xml b/compose/material/material/icons/generator/raw-icons/rounded/width_wide.xml
new file mode 100644
index 0000000..aacd7be
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/rounded/width_wide.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20,4H4C2.9,4 2,4.9 2,6v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6C22,4.9 21.1,4 20,4zM4,6h2v12H4V6zM20,18h-2V6h2V18z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/sharp/18_up_rating.xml b/compose/material/material/icons/generator/raw-icons/sharp/18_up_rating.xml
new file mode 100644
index 0000000..ac13cd8
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/sharp/18_up_rating.xml
@@ -0,0 +1,16 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M13,12.5h1.5v1.5h-1.5z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M13,10h1.5v1.5h-1.5z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M21,3H3v18h18V3zM10,15H8.5v-4.5H7V9h3V15zM16,14c0,0.55 -0.45,1 -1,1h-2.5c-0.55,0 -1,-0.45 -1,-1v-4c0,-0.55 0.45,-1 1,-1H15c0.55,0 1,0.45 1,1V14z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/sharp/blinds.xml b/compose/material/material/icons/generator/raw-icons/sharp/blinds.xml
new file mode 100644
index 0000000..02afa6f
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/sharp/blinds.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20,19V3H4v16H2v2h20v-2H20zM16,9h2v2h-2V9zM14,11H6V9h8V11zM18,7h-2V5h2V7zM14,5v2H6V5H14zM6,19v-6h8v1.82c-0.45,0.32 -0.75,0.84 -0.75,1.43c0,0.97 0.78,1.75 1.75,1.75s1.75,-0.78 1.75,-1.75c0,-0.59 -0.3,-1.12 -0.75,-1.43V13h2v6H6z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/sharp/broadcast_on_home.xml b/compose/material/material/icons/generator/raw-icons/sharp/broadcast_on_home.xml
new file mode 100644
index 0000000..c1a972d
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/sharp/broadcast_on_home.xml
@@ -0,0 +1,22 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M22,9.76V4H4v2h16v2.59C20.73,8.88 21.4,9.28 22,9.76z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M9,9H2v11h7V9zM7,18H4v-7h3V18z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17.75,16.97c0.3,-0.23 0.5,-0.57 0.5,-0.97c0,-0.69 -0.56,-1.25 -1.25,-1.25s-1.25,0.56 -1.25,1.25c0,0.4 0.2,0.75 0.5,0.97V22h1.5V16.97z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,13.5c1.38,0 2.5,1.12 2.5,2.5c0,0.69 -0.28,1.31 -0.73,1.76l1.06,1.06C20.55,18.1 21,17.1 21,16c0,-2.21 -1.79,-4 -4,-4c-2.21,0 -4,1.79 -4,4c0,1.1 0.45,2.1 1.17,2.83l1.06,-1.06c-0.45,-0.45 -0.73,-1.08 -0.73,-1.77C14.5,14.62 15.62,13.5 17,13.5z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,9.5c-3.59,0 -6.5,2.91 -6.5,6.5c0,1.79 0.73,3.42 1.9,4.6l1.06,-1.06C12.56,18.63 12,17.38 12,16c0,-2.76 2.24,-5 5,-5s5,2.24 5,5c0,1.37 -0.56,2.62 -1.46,3.52l1.07,1.06c1.17,-1.18 1.89,-2.8 1.89,-4.58C23.5,12.41 20.59,9.5 17,9.5z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/sharp/broadcast_on_personal.xml b/compose/material/material/icons/generator/raw-icons/sharp/broadcast_on_personal.xml
new file mode 100644
index 0000000..ddc8dafc
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/sharp/broadcast_on_personal.xml
@@ -0,0 +1,19 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,8c0.7,0 1.38,0.1 2.02,0.27L12,3L4,9v12h6.76C9.66,19.63 9,17.89 9,16C9,11.58 12.58,8 17,8z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,14.75c-0.69,0 -1.25,0.56 -1.25,1.25c0,0.4 0.2,0.75 0.5,0.97V22h1.5v-5.03c0.3,-0.23 0.5,-0.57 0.5,-0.97C18.25,15.31 17.69,14.75 17,14.75z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,12c-2.21,0 -4,1.79 -4,4c0,1.1 0.45,2.1 1.17,2.83l1.06,-1.06c-0.45,-0.45 -0.73,-1.08 -0.73,-1.77c0,-1.38 1.12,-2.5 2.5,-2.5s2.5,1.12 2.5,2.5c0,0.69 -0.28,1.31 -0.73,1.76l1.06,1.06C20.55,18.1 21,17.1 21,16C21,13.79 19.21,12 17,12z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,9.5c-3.59,0 -6.5,2.91 -6.5,6.5c0,1.79 0.73,3.42 1.9,4.6l1.06,-1.06C12.56,18.63 12,17.38 12,16c0,-2.76 2.24,-5 5,-5s5,2.24 5,5c0,1.37 -0.56,2.62 -1.46,3.52l1.07,1.06c1.17,-1.18 1.89,-2.8 1.89,-4.58C23.5,12.41 20.59,9.5 17,9.5z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/sharp/desk.xml b/compose/material/material/icons/generator/raw-icons/sharp/desk.xml
new file mode 100644
index 0000000..c6f9813
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/sharp/desk.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M2,6v12h2V8h10v10h2v-2h4v2h2V6H2zM20,8v2h-4V8H20zM16,14v-2h4v2H16z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/sharp/lock_person.xml b/compose/material/material/icons/generator/raw-icons/sharp/lock_person.xml
new file mode 100644
index 0000000..5ecd14f
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/sharp/lock_person.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M16.43,11.18c1.26,-0.29 2.47,-0.21 3.57,0.12V8h-3V6.22c0,-2.61 -1.91,-4.94 -4.51,-5.19C9.51,0.74 7,3.08 7,6v2H4v14h8.26c-1.01,-1.45 -1.5,-3.3 -1.15,-5.27C11.6,14 13.74,11.79 16.43,11.18zM8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1s3.1,1.39 3.1,3.1v2H8.9V6z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M18,13c-2.76,0 -5,2.24 -5,5s2.24,5 5,5s5,-2.24 5,-5S20.76,13 18,13zM18,15c0.83,0 1.5,0.67 1.5,1.5S18.83,18 18,18s-1.5,-0.67 -1.5,-1.5S17.17,15 18,15zM18,21c-1.03,0 -1.94,-0.52 -2.48,-1.32C16.25,19.26 17.09,19 18,19s1.75,0.26 2.48,0.68C19.94,20.48 19.03,21 18,21z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/sharp/no_adult_content.xml b/compose/material/material/icons/generator/raw-icons/sharp/no_adult_content.xml
new file mode 100644
index 0000000..27a37a3
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/sharp/no_adult_content.xml
@@ -0,0 +1,19 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10s10,-4.48 10,-10S17.52,2 12,2zM4,12c0,-1.85 0.63,-3.54 1.69,-4.9L7.59,9h2.83L7.1,5.69C8.46,4.63 10.15,4 12,4c4.41,0 8,3.59 8,8c0,1.85 -0.63,3.54 -1.69,4.9l-1.9,-1.9h-2.83l3.31,3.31C15.54,19.37 13.85,20 12,20C7.59,20 4,16.41 4,12z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M14.25,14l-1.5,-2l1.5,-2l-1.5,0l-0.75,1l-0.75,-1l-1.5,0l1.5,2l-1.5,2l1.5,0l0.75,-1l0.75,1z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M8,10l-0.75,1l-0.75,-1l-1.5,0l1.5,2l-1.5,2l1.5,0l0.75,-1l0.75,1l1.5,0l-1.5,-2l1.5,-2z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M16,14l0.75,-1l0.75,1l1.5,0l-1.5,-2l1.5,-2l-1.5,0l-0.75,1l-0.75,-1l-1.5,0l1.5,2l-1.5,2z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/sharp/wallet.xml b/compose/material/material/icons/generator/raw-icons/sharp/wallet.xml
new file mode 100644
index 0000000..ec2e875
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/sharp/wallet.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M22,4H2v16h20V4zM15.75,14.09L4,11.22V10h16v0.53L15.75,14.09zM4,6h16v2H4V6z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/sharp/width_full.xml b/compose/material/material/icons/generator/raw-icons/sharp/width_full.xml
new file mode 100644
index 0000000..271eb48e
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/sharp/width_full.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M22,4H2v16h20V4zM4,6h1v12H4V6zM20,18h-1V6h1V18z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/sharp/width_normal.xml b/compose/material/material/icons/generator/raw-icons/sharp/width_normal.xml
new file mode 100644
index 0000000..8ba036e
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/sharp/width_normal.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M22,4H2v16h20V4zM4,6h4v12H4V6zM20,18h-4V6h4V18z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/sharp/width_wide.xml b/compose/material/material/icons/generator/raw-icons/sharp/width_wide.xml
new file mode 100644
index 0000000..79c8db8
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/sharp/width_wide.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M22,4H2v16h20V4zM4,6h2v12H4V6zM20,18h-2V6h2V18z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/twotone/18_up_rating.xml b/compose/material/material/icons/generator/raw-icons/twotone/18_up_rating.xml
new file mode 100644
index 0000000..8ee33c5
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/twotone/18_up_rating.xml
@@ -0,0 +1,31 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M13,10h1.5v1.5h-1.5z"
+ android:strokeAlpha="0.3"
+ android:fillAlpha="0.3"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M13,12.5h1.5v1.5h-1.5z"
+ android:strokeAlpha="0.3"
+ android:fillAlpha="0.3"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M5,19h14V5H5V19zM11.5,10c0,-0.55 0.45,-1 1,-1H15c0.55,0 1,0.45 1,1v4c0,0.55 -0.45,1 -1,1h-2.5c-0.55,0 -1,-0.45 -1,-1V10zM7,9h3v6H8.5v-4.5H7V9z"
+ android:strokeAlpha="0.3"
+ android:fillAlpha="0.3"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M8.5,15l1.5,0l0,-6l-3,0l0,1.5l1.5,0z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M19,3H5C3.9,3 3,3.9 3,5v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2V5C21,3.9 20.1,3 19,3zM19,19H5V5h14V19z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M12.5,15H15c0.55,0 1,-0.45 1,-1v-4c0,-0.55 -0.45,-1 -1,-1h-2.5c-0.55,0 -1,0.45 -1,1v4C11.5,14.55 11.95,15 12.5,15zM13,10h1.5v1.5H13V10zM13,12.5h1.5V14H13V12.5z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/twotone/blinds.xml b/compose/material/material/icons/generator/raw-icons/twotone/blinds.xml
new file mode 100644
index 0000000..93b88c7
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/twotone/blinds.xml
@@ -0,0 +1,30 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M6,9h8v2h-8z"
+ android:strokeAlpha="0.3"
+ android:fillAlpha="0.3"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M6,5h8v2h-8z"
+ android:strokeAlpha="0.3"
+ android:fillAlpha="0.3"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M16,9h2v2h-2z"
+ android:strokeAlpha="0.3"
+ android:fillAlpha="0.3"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M16,5h2v2h-2z"
+ android:strokeAlpha="0.3"
+ android:fillAlpha="0.3"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20,19V3H4v16H2v2h20v-2H20zM6,5h8v2H6V5zM6,9h8v2H6V9zM18,19H6v-6h8v1.82c-0.45,0.32 -0.75,0.84 -0.75,1.43c0,0.97 0.78,1.75 1.75,1.75s1.75,-0.78 1.75,-1.75c0,-0.59 -0.3,-1.12 -0.75,-1.43V13h2V19zM18,11h-2V9h2V11zM18,7h-2V5h2V7z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/twotone/broadcast_on_home.xml b/compose/material/material/icons/generator/raw-icons/twotone/broadcast_on_home.xml
new file mode 100644
index 0000000..5284e8b
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/twotone/broadcast_on_home.xml
@@ -0,0 +1,27 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M4,11h3v7h-3z"
+ android:strokeAlpha="0.3"
+ android:fillAlpha="0.3"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20,8.59c0.73,0.29 1.4,0.69 2,1.17V6c0,-1.1 -0.9,-2 -2,-2H4v2h16V8.59z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M8,9H3c-0.5,0 -1,0.5 -1,1v9c0,0.5 0.5,1 1,1h5c0.5,0 1,-0.5 1,-1v-9C9,9.5 8.5,9 8,9zM7,18H4v-7h3V18z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,14.75c-0.69,0 -1.25,0.56 -1.25,1.25c0,0.4 0.2,0.75 0.5,0.97V22h1.5v-5.03c0.3,-0.23 0.5,-0.57 0.5,-0.97C18.25,15.31 17.69,14.75 17,14.75z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,12c-2.21,0 -4,1.79 -4,4c0,1.1 0.45,2.1 1.17,2.83l1.06,-1.06c-0.45,-0.45 -0.73,-1.08 -0.73,-1.77c0,-1.38 1.12,-2.5 2.5,-2.5s2.5,1.12 2.5,2.5c0,0.69 -0.28,1.31 -0.73,1.76l1.06,1.06C20.55,18.1 21,17.1 21,16C21,13.79 19.21,12 17,12z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,9.5c-3.59,0 -6.5,2.91 -6.5,6.5c0,1.79 0.73,3.42 1.9,4.6l1.06,-1.06C12.56,18.63 12,17.38 12,16c0,-2.76 2.24,-5 5,-5s5,2.24 5,5c0,1.37 -0.56,2.62 -1.46,3.52l1.07,1.06c1.17,-1.18 1.89,-2.8 1.89,-4.58C23.5,12.41 20.59,9.5 17,9.5z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/twotone/broadcast_on_personal.xml b/compose/material/material/icons/generator/raw-icons/twotone/broadcast_on_personal.xml
new file mode 100644
index 0000000..b216686
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/twotone/broadcast_on_personal.xml
@@ -0,0 +1,24 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M4,10v9h5.59C9.21,18.07 9,17.06 9,16c0,-3.39 2.11,-6.27 5.08,-7.44L10,5.5L4,10z"
+ android:strokeAlpha="0.3"
+ android:fillAlpha="0.3"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M4,19v-9l6,-4.5l4.08,3.06c0.81,-0.32 1.69,-0.51 2.61,-0.54L10,3L2,9v12h8.76c-0.48,-0.6 -0.88,-1.27 -1.17,-2H4z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,14.75c-0.69,0 -1.25,0.56 -1.25,1.25c0,0.4 0.2,0.75 0.5,0.97V22h1.5v-5.03c0.3,-0.23 0.5,-0.57 0.5,-0.97C18.25,15.31 17.69,14.75 17,14.75z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,12c-2.21,0 -4,1.79 -4,4c0,1.1 0.45,2.1 1.17,2.83l1.06,-1.06c-0.45,-0.45 -0.73,-1.08 -0.73,-1.77c0,-1.38 1.12,-2.5 2.5,-2.5s2.5,1.12 2.5,2.5c0,0.69 -0.28,1.31 -0.73,1.76l1.06,1.06C20.55,18.1 21,17.1 21,16C21,13.79 19.21,12 17,12z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,9.5c-3.59,0 -6.5,2.91 -6.5,6.5c0,1.79 0.73,3.42 1.9,4.6l1.06,-1.06C12.56,18.63 12,17.38 12,16c0,-2.76 2.24,-5 5,-5s5,2.24 5,5c0,1.37 -0.56,2.62 -1.46,3.52l1.07,1.06c1.17,-1.18 1.89,-2.8 1.89,-4.58C23.5,12.41 20.59,9.5 17,9.5z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/twotone/desk.xml b/compose/material/material/icons/generator/raw-icons/twotone/desk.xml
new file mode 100644
index 0000000..90a2ae2
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/twotone/desk.xml
@@ -0,0 +1,20 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M16,8h4v2h-4z"
+ android:strokeAlpha="0.3"
+ android:fillAlpha="0.3"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M16,12h4v2h-4z"
+ android:strokeAlpha="0.3"
+ android:fillAlpha="0.3"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M2,6v12h2V8h10v10h2v-2h4v2h2V6H2zM20,14h-4v-2h4V14zM20,10h-4V8h4V10z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/twotone/lock_person.xml b/compose/material/material/icons/generator/raw-icons/twotone/lock_person.xml
new file mode 100644
index 0000000..b6854d6
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/twotone/lock_person.xml
@@ -0,0 +1,18 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M6,10v10h5.29C11.1,19.37 11,18.7 11,18c0,-3.87 3.13,-7 7,-7v-1H6z"
+ android:strokeAlpha="0.3"
+ android:fillAlpha="0.3"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M6,20V10h12v1c0.7,0 1.37,0.1 2,0.29V10c0,-1.1 -0.9,-2 -2,-2h-1V6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2H6c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h6.26c-0.42,-0.6 -0.75,-1.28 -0.97,-2H6zM9,6c0,-1.66 1.34,-3 3,-3s3,1.34 3,3v2H9V6z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M18,13c-2.76,0 -5,2.24 -5,5s2.24,5 5,5s5,-2.24 5,-5S20.76,13 18,13zM18,15c0.83,0 1.5,0.67 1.5,1.5S18.83,18 18,18s-1.5,-0.67 -1.5,-1.5S17.17,15 18,15zM18,21c-1.03,0 -1.94,-0.52 -2.48,-1.32C16.25,19.26 17.09,19 18,19s1.75,0.26 2.48,0.68C19.94,20.48 19.03,21 18,21z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/twotone/no_adult_content.xml b/compose/material/material/icons/generator/raw-icons/twotone/no_adult_content.xml
new file mode 100644
index 0000000..27a37a3
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/twotone/no_adult_content.xml
@@ -0,0 +1,19 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10s10,-4.48 10,-10S17.52,2 12,2zM4,12c0,-1.85 0.63,-3.54 1.69,-4.9L7.59,9h2.83L7.1,5.69C8.46,4.63 10.15,4 12,4c4.41,0 8,3.59 8,8c0,1.85 -0.63,3.54 -1.69,4.9l-1.9,-1.9h-2.83l3.31,3.31C15.54,19.37 13.85,20 12,20C7.59,20 4,16.41 4,12z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M14.25,14l-1.5,-2l1.5,-2l-1.5,0l-0.75,1l-0.75,-1l-1.5,0l1.5,2l-1.5,2l1.5,0l0.75,-1l0.75,1z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M8,10l-0.75,1l-0.75,-1l-1.5,0l1.5,2l-1.5,2l1.5,0l0.75,-1l0.75,1l1.5,0l-1.5,-2l1.5,-2z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M16,14l0.75,-1l0.75,1l1.5,0l-1.5,-2l1.5,-2l-1.5,0l-0.75,1l-0.75,-1l-1.5,0l1.5,2l-1.5,2z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/twotone/wallet.xml b/compose/material/material/icons/generator/raw-icons/twotone/wallet.xml
new file mode 100644
index 0000000..0e9a8ca
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/twotone/wallet.xml
@@ -0,0 +1,20 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M18,10H6c-0.84,0 -1.55,0.52 -1.85,1.25l11.11,2.72c0.31,0.08 0.64,0 0.88,-0.2l3.49,-2.92C19.26,10.34 18.67,10 18,10z"
+ android:strokeAlpha="0.3"
+ android:fillAlpha="0.3"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M18,6H6C4.9,6 4,6.9 4,8v0.55C4.59,8.21 5.27,8 6,8h12c0.73,0 1.41,0.21 2,0.55V8C20,6.9 19.1,6 18,6z"
+ android:strokeAlpha="0.3"
+ android:fillAlpha="0.3"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M18,4H6C3.79,4 2,5.79 2,8v8c0,2.21 1.79,4 4,4h12c2.21,0 4,-1.79 4,-4V8C22,5.79 20.21,4 18,4zM16.14,13.77c-0.24,0.2 -0.57,0.28 -0.88,0.2L4.15,11.25C4.45,10.52 5.16,10 6,10h12c0.67,0 1.26,0.34 1.63,0.84L16.14,13.77zM20,8.55C19.41,8.21 18.73,8 18,8H6C5.27,8 4.59,8.21 4,8.55V8c0,-1.1 0.9,-2 2,-2h12c1.1,0 2,0.9 2,2V8.55z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/twotone/width_full.xml b/compose/material/material/icons/generator/raw-icons/twotone/width_full.xml
new file mode 100644
index 0000000..06ceb58
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/twotone/width_full.xml
@@ -0,0 +1,15 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M7,6h10v12h-10z"
+ android:strokeAlpha="0.3"
+ android:fillAlpha="0.3"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20,4H4C2.9,4 2,4.9 2,6v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6C22,4.9 21.1,4 20,4zM5,18H4V6h1V18zM17,18H7V6h10V18zM20,18h-1V6h1V18z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/twotone/width_normal.xml b/compose/material/material/icons/generator/raw-icons/twotone/width_normal.xml
new file mode 100644
index 0000000..4fdc336
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/twotone/width_normal.xml
@@ -0,0 +1,15 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M10,6h4v12h-4z"
+ android:strokeAlpha="0.3"
+ android:fillAlpha="0.3"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20,4H4C2.9,4 2,4.9 2,6v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6C22,4.9 21.1,4 20,4zM8,18H4V6h4V18zM14,18h-4V6h4V18zM20,18h-4V6h4V18z"/>
+</vector>
diff --git a/compose/material/material/icons/generator/raw-icons/twotone/width_wide.xml b/compose/material/material/icons/generator/raw-icons/twotone/width_wide.xml
new file mode 100644
index 0000000..8daac03
--- /dev/null
+++ b/compose/material/material/icons/generator/raw-icons/twotone/width_wide.xml
@@ -0,0 +1,15 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M8,6h8v12h-8z"
+ android:strokeAlpha="0.3"
+ android:fillAlpha="0.3"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20,4H4C2.9,4 2,4.9 2,6v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6C22,4.9 21.1,4 20,4zM6,18H4V6h2V18zM16,18H8V6h8V18zM20,18h-2V6h2V18z"/>
+</vector>
diff --git a/compose/material3/material3/api/current.txt b/compose/material3/material3/api/current.txt
index e114199..34521a9 100644
--- a/compose/material3/material3/api/current.txt
+++ b/compose/material3/material3/api/current.txt
@@ -390,7 +390,7 @@
@androidx.compose.runtime.Stable public final class SnackbarHostState {
ctor public SnackbarHostState();
method public androidx.compose.material3.SnackbarData? getCurrentSnackbarData();
- method public suspend Object? showSnackbar(String message, optional String? actionLabel, optional boolean withDismissAction, optional androidx.compose.material3.SnackbarDuration duration, optional kotlin.coroutines.Continuation<? super androidx.compose.material3.SnackbarResult> p);
+ method public suspend Object? showSnackbar(String message, optional String? actionLabel, optional boolean withDismissAction, optional androidx.compose.material3.SnackbarDuration duration, optional kotlin.coroutines.Continuation<? super androidx.compose.material3.SnackbarResult>);
property public final androidx.compose.material3.SnackbarData? currentSnackbarData;
}
@@ -536,9 +536,9 @@
method public float getOffset();
method public float getOffsetLimit();
method public float getScrollFraction();
- method public void setContentOffset(float contentOffset);
- method public void setOffset(float offset);
- method public void setOffsetLimit(float offsetLimit);
+ method public void setContentOffset(float);
+ method public void setOffset(float);
+ method public void setOffsetLimit(float);
property public abstract float contentOffset;
property public abstract androidx.compose.ui.input.nestedscroll.NestedScrollConnection nestedScrollConnection;
property public abstract float offset;
diff --git a/compose/material3/material3/api/public_plus_experimental_current.txt b/compose/material3/material3/api/public_plus_experimental_current.txt
index 7346956..3b7112a 100644
--- a/compose/material3/material3/api/public_plus_experimental_current.txt
+++ b/compose/material3/material3/api/public_plus_experimental_current.txt
@@ -206,16 +206,16 @@
@androidx.compose.material3.ExperimentalMaterial3Api @androidx.compose.runtime.Stable public final class DrawerState {
ctor public DrawerState(androidx.compose.material3.DrawerValue initialValue, optional kotlin.jvm.functions.Function1<? super androidx.compose.material3.DrawerValue,java.lang.Boolean> confirmStateChange);
- method @androidx.compose.material3.ExperimentalMaterial3Api public suspend Object? animateTo(androidx.compose.material3.DrawerValue targetValue, androidx.compose.animation.core.AnimationSpec<java.lang.Float> anim, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? close(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @androidx.compose.material3.ExperimentalMaterial3Api public suspend Object? animateTo(androidx.compose.material3.DrawerValue targetValue, androidx.compose.animation.core.AnimationSpec<java.lang.Float> anim, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? close(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public androidx.compose.material3.DrawerValue getCurrentValue();
method @androidx.compose.material3.ExperimentalMaterial3Api public androidx.compose.runtime.State<java.lang.Float> getOffset();
method @androidx.compose.material3.ExperimentalMaterial3Api public androidx.compose.material3.DrawerValue getTargetValue();
method public boolean isAnimationRunning();
method public boolean isClosed();
method public boolean isOpen();
- method public suspend Object? open(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method @androidx.compose.material3.ExperimentalMaterial3Api public suspend Object? snapTo(androidx.compose.material3.DrawerValue targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? open(kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method @androidx.compose.material3.ExperimentalMaterial3Api public suspend Object? snapTo(androidx.compose.material3.DrawerValue targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final androidx.compose.material3.DrawerValue currentValue;
property public final boolean isAnimationRunning;
property public final boolean isClosed;
@@ -488,8 +488,8 @@
@androidx.compose.runtime.Stable public final class SnackbarHostState {
ctor public SnackbarHostState();
method public androidx.compose.material3.SnackbarData? getCurrentSnackbarData();
- method public suspend Object? showSnackbar(String message, optional String? actionLabel, optional boolean withDismissAction, optional androidx.compose.material3.SnackbarDuration duration, optional kotlin.coroutines.Continuation<? super androidx.compose.material3.SnackbarResult> p);
- method @androidx.compose.material3.ExperimentalMaterial3Api public suspend Object? showSnackbar(androidx.compose.material3.SnackbarVisuals visuals, kotlin.coroutines.Continuation<? super androidx.compose.material3.SnackbarResult> p);
+ method public suspend Object? showSnackbar(String message, optional String? actionLabel, optional boolean withDismissAction, optional androidx.compose.material3.SnackbarDuration duration, optional kotlin.coroutines.Continuation<? super androidx.compose.material3.SnackbarResult>);
+ method @androidx.compose.material3.ExperimentalMaterial3Api public suspend Object? showSnackbar(androidx.compose.material3.SnackbarVisuals visuals, kotlin.coroutines.Continuation<? super androidx.compose.material3.SnackbarResult>);
property public final androidx.compose.material3.SnackbarData? currentSnackbarData;
}
@@ -648,9 +648,9 @@
method public float getOffset();
method public float getOffsetLimit();
method public float getScrollFraction();
- method public void setContentOffset(float contentOffset);
- method public void setOffset(float offset);
- method public void setOffsetLimit(float offsetLimit);
+ method public void setContentOffset(float);
+ method public void setOffset(float);
+ method public void setOffsetLimit(float);
property public abstract float contentOffset;
property public abstract androidx.compose.ui.input.nestedscroll.NestedScrollConnection nestedScrollConnection;
property public abstract float offset;
diff --git a/compose/material3/material3/api/restricted_current.txt b/compose/material3/material3/api/restricted_current.txt
index e114199..34521a9 100644
--- a/compose/material3/material3/api/restricted_current.txt
+++ b/compose/material3/material3/api/restricted_current.txt
@@ -390,7 +390,7 @@
@androidx.compose.runtime.Stable public final class SnackbarHostState {
ctor public SnackbarHostState();
method public androidx.compose.material3.SnackbarData? getCurrentSnackbarData();
- method public suspend Object? showSnackbar(String message, optional String? actionLabel, optional boolean withDismissAction, optional androidx.compose.material3.SnackbarDuration duration, optional kotlin.coroutines.Continuation<? super androidx.compose.material3.SnackbarResult> p);
+ method public suspend Object? showSnackbar(String message, optional String? actionLabel, optional boolean withDismissAction, optional androidx.compose.material3.SnackbarDuration duration, optional kotlin.coroutines.Continuation<? super androidx.compose.material3.SnackbarResult>);
property public final androidx.compose.material3.SnackbarData? currentSnackbarData;
}
@@ -536,9 +536,9 @@
method public float getOffset();
method public float getOffsetLimit();
method public float getScrollFraction();
- method public void setContentOffset(float contentOffset);
- method public void setOffset(float offset);
- method public void setOffsetLimit(float offsetLimit);
+ method public void setContentOffset(float);
+ method public void setOffset(float);
+ method public void setOffsetLimit(float);
property public abstract float contentOffset;
property public abstract androidx.compose.ui.input.nestedscroll.NestedScrollConnection nestedScrollConnection;
property public abstract float offset;
diff --git a/compose/runtime/runtime/api/current.ignore b/compose/runtime/runtime/api/current.ignore
index 1ea8546..88d1bf5 100644
--- a/compose/runtime/runtime/api/current.ignore
+++ b/compose/runtime/runtime/api/current.ignore
@@ -13,6 +13,148 @@
Added method androidx.compose.runtime.ControlledComposition.delegateInvalidations(androidx.compose.runtime.ControlledComposition,int,kotlin.jvm.functions.Function0<? extends R>)
+AddedFinal: androidx.compose.runtime.Composer#apply(V, kotlin.jvm.functions.Function2<? super T,? super V,kotlin.Unit>):
+ Method androidx.compose.runtime.Composer.apply has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#changed(Object):
+ Method androidx.compose.runtime.Composer.changed has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#changed(boolean):
+ Method androidx.compose.runtime.Composer.changed has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#changed(byte):
+ Method androidx.compose.runtime.Composer.changed has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#changed(char):
+ Method androidx.compose.runtime.Composer.changed has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#changed(double):
+ Method androidx.compose.runtime.Composer.changed has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#changed(float):
+ Method androidx.compose.runtime.Composer.changed has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#changed(int):
+ Method androidx.compose.runtime.Composer.changed has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#changed(long):
+ Method androidx.compose.runtime.Composer.changed has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#changed(short):
+ Method androidx.compose.runtime.Composer.changed has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#collectParameterInformation():
+ Method androidx.compose.runtime.Composer.collectParameterInformation has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#createNode(kotlin.jvm.functions.Function0<? extends T>):
+ Method androidx.compose.runtime.Composer.createNode has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#disableReusing():
+ Method androidx.compose.runtime.Composer.disableReusing has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#enableReusing():
+ Method androidx.compose.runtime.Composer.enableReusing has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#endDefaults():
+ Method androidx.compose.runtime.Composer.endDefaults has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#endMovableGroup():
+ Method androidx.compose.runtime.Composer.endMovableGroup has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#endNode():
+ Method androidx.compose.runtime.Composer.endNode has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#endReplaceableGroup():
+ Method androidx.compose.runtime.Composer.endReplaceableGroup has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#endRestartGroup():
+ Method androidx.compose.runtime.Composer.endRestartGroup has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#endReusableGroup():
+ Method androidx.compose.runtime.Composer.endReusableGroup has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#getApplier():
+ Method androidx.compose.runtime.Composer.getApplier has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#getApplyCoroutineContext():
+ Method androidx.compose.runtime.Composer.getApplyCoroutineContext has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#getComposition():
+ Method androidx.compose.runtime.Composer.getComposition has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#getCompositionData():
+ Method androidx.compose.runtime.Composer.getCompositionData has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#getCompoundKeyHash():
+ Method androidx.compose.runtime.Composer.getCompoundKeyHash has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#getDefaultsInvalid():
+ Method androidx.compose.runtime.Composer.getDefaultsInvalid has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#getInserting():
+ Method androidx.compose.runtime.Composer.getInserting has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#getRecomposeScope():
+ Method androidx.compose.runtime.Composer.getRecomposeScope has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#getSkipping():
+ Method androidx.compose.runtime.Composer.getSkipping has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#joinKey(Object, Object):
+ Method androidx.compose.runtime.Composer.joinKey has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#rememberedValue():
+ Method androidx.compose.runtime.Composer.rememberedValue has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#skipCurrentGroup():
+ Method androidx.compose.runtime.Composer.skipCurrentGroup has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#skipToGroupEnd():
+ Method androidx.compose.runtime.Composer.skipToGroupEnd has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#sourceInformation(String):
+ Method androidx.compose.runtime.Composer.sourceInformation has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#sourceInformationMarkerEnd():
+ Method androidx.compose.runtime.Composer.sourceInformationMarkerEnd has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#sourceInformationMarkerStart(int, String):
+ Method androidx.compose.runtime.Composer.sourceInformationMarkerStart has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#startDefaults():
+ Method androidx.compose.runtime.Composer.startDefaults has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#startMovableGroup(int, Object):
+ Method androidx.compose.runtime.Composer.startMovableGroup has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#startNode():
+ Method androidx.compose.runtime.Composer.startNode has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#startReplaceableGroup(int):
+ Method androidx.compose.runtime.Composer.startReplaceableGroup has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#startRestartGroup(int):
+ Method androidx.compose.runtime.Composer.startRestartGroup has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#startReusableGroup(int, Object):
+ Method androidx.compose.runtime.Composer.startReusableGroup has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#startReusableNode():
+ Method androidx.compose.runtime.Composer.startReusableNode has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#updateRememberedValue(Object):
+ Method androidx.compose.runtime.Composer.updateRememberedValue has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#useNode():
+ Method androidx.compose.runtime.Composer.useNode has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#applyChanges():
+ Method androidx.compose.runtime.ControlledComposition.applyChanges has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#composeContent(kotlin.jvm.functions.Function0<kotlin.Unit>):
+ Method androidx.compose.runtime.ControlledComposition.composeContent has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#getHasPendingChanges():
+ Method androidx.compose.runtime.ControlledComposition.getHasPendingChanges has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#invalidateAll():
+ Method androidx.compose.runtime.ControlledComposition.invalidateAll has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#isComposing():
+ Method androidx.compose.runtime.ControlledComposition.isComposing has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#observesAnyOf(java.util.Set<?>):
+ Method androidx.compose.runtime.ControlledComposition.observesAnyOf has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#prepareCompose(kotlin.jvm.functions.Function0<kotlin.Unit>):
+ Method androidx.compose.runtime.ControlledComposition.prepareCompose has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#recompose():
+ Method androidx.compose.runtime.ControlledComposition.recompose has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#recordModificationsOf(java.util.Set<?>):
+ Method androidx.compose.runtime.ControlledComposition.recordModificationsOf has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#recordReadOf(Object):
+ Method androidx.compose.runtime.ControlledComposition.recordReadOf has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#recordWriteOf(Object):
+ Method androidx.compose.runtime.ControlledComposition.recordWriteOf has added 'final' qualifier
+
+
+ParameterNameChange: androidx.compose.runtime.AbstractApplier#setCurrent(T) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.runtime.AbstractApplier.setCurrent
+ParameterNameChange: androidx.compose.runtime.BroadcastFrameClock#withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.runtime.BroadcastFrameClock.withFrameNanos
+ParameterNameChange: androidx.compose.runtime.MonotonicFrameClock#withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.runtime.MonotonicFrameClock.withFrameNanos
+ParameterNameChange: androidx.compose.runtime.MonotonicFrameClockKt#withFrameMillis(androidx.compose.runtime.MonotonicFrameClock, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.runtime.MonotonicFrameClockKt.withFrameMillis
+ParameterNameChange: androidx.compose.runtime.MonotonicFrameClockKt#withFrameMillis(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.runtime.MonotonicFrameClockKt.withFrameMillis
+ParameterNameChange: androidx.compose.runtime.MonotonicFrameClockKt#withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.runtime.MonotonicFrameClockKt.withFrameNanos
+ParameterNameChange: androidx.compose.runtime.MutableState#setValue(T) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.runtime.MutableState.setValue
+ParameterNameChange: androidx.compose.runtime.PausableMonotonicFrameClock#withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.runtime.PausableMonotonicFrameClock.withFrameNanos
+ParameterNameChange: androidx.compose.runtime.ProduceStateScope#awaitDispose(kotlin.jvm.functions.Function0<kotlin.Unit>, kotlin.coroutines.Continuation<?>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.runtime.ProduceStateScope.awaitDispose
+ParameterNameChange: androidx.compose.runtime.Recomposer#awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.runtime.Recomposer.awaitIdle
+ParameterNameChange: androidx.compose.runtime.Recomposer#join(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.runtime.Recomposer.join
+ParameterNameChange: androidx.compose.runtime.Recomposer#runRecomposeAndApplyChanges(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.runtime.Recomposer.runRecomposeAndApplyChanges
+ParameterNameChange: androidx.compose.runtime.RecomposerKt#withRunningRecomposer(kotlin.jvm.functions.Function3<? super kotlinx.coroutines.CoroutineScope,? super androidx.compose.runtime.Recomposer,? super kotlin.coroutines.Continuation<? super R>,?>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.runtime.RecomposerKt.withRunningRecomposer
+
+
RemovedMethod: androidx.compose.runtime.SkippableUpdater#SkippableUpdater():
Removed constructor androidx.compose.runtime.SkippableUpdater()
RemovedMethod: androidx.compose.runtime.Updater#Updater():
diff --git a/compose/runtime/runtime/api/current.txt b/compose/runtime/runtime/api/current.txt
index e8650e2..2fb10ee 100644
--- a/compose/runtime/runtime/api/current.txt
+++ b/compose/runtime/runtime/api/current.txt
@@ -10,7 +10,7 @@
method protected final void move(java.util.List<T>, int from, int to, int count);
method protected abstract void onClear();
method protected final void remove(java.util.List<T>, int index, int count);
- method protected void setCurrent(T! current);
+ method protected void setCurrent(T!);
method public void up();
property public T! current;
property public final T! root;
@@ -46,7 +46,7 @@
method public void cancel(optional java.util.concurrent.CancellationException cancellationException);
method public boolean getHasAwaiters();
method public void sendFrame(long timeNanos);
- method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
property public final boolean hasAwaiters;
}
@@ -261,7 +261,7 @@
public interface MonotonicFrameClock extends kotlin.coroutines.CoroutineContext.Element {
method public default kotlin.coroutines.CoroutineContext.Key<?> getKey();
- method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
property public default kotlin.coroutines.CoroutineContext.Key<?> key;
field public static final androidx.compose.runtime.MonotonicFrameClock.Key Key;
}
@@ -271,9 +271,9 @@
public final class MonotonicFrameClockKt {
method public static androidx.compose.runtime.MonotonicFrameClock getMonotonicFrameClock(kotlin.coroutines.CoroutineContext);
- method public static suspend inline <R> Object? withFrameMillis(androidx.compose.runtime.MonotonicFrameClock, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend <R> Object? withFrameMillis(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ method public static suspend inline <R> Object? withFrameMillis(androidx.compose.runtime.MonotonicFrameClock, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend <R> Object? withFrameMillis(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
}
public final class MovableContentKt {
@@ -291,7 +291,7 @@
@androidx.compose.runtime.Stable public interface MutableState<T> extends androidx.compose.runtime.State<T> {
method public operator T! component1();
method public operator kotlin.jvm.functions.Function1<T,kotlin.Unit> component2();
- method public void setValue(T! value);
+ method public void setValue(T!);
property public abstract T! value;
}
@@ -306,12 +306,12 @@
method public boolean isPaused();
method public void pause();
method public void resume();
- method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
property public final boolean isPaused;
}
public interface ProduceStateScope<T> extends androidx.compose.runtime.MutableState<T> kotlinx.coroutines.CoroutineScope {
- method public suspend Object? awaitDispose(kotlin.jvm.functions.Function0<kotlin.Unit> onDispose, kotlin.coroutines.Continuation<?> p);
+ method public suspend Object? awaitDispose(kotlin.jvm.functions.Function0<kotlin.Unit> onDispose, kotlin.coroutines.Continuation<?>);
}
@androidx.compose.runtime.Stable public abstract class ProvidableCompositionLocal<T> extends androidx.compose.runtime.CompositionLocal<T> {
@@ -341,15 +341,15 @@
public final class Recomposer extends androidx.compose.runtime.CompositionContext {
ctor public Recomposer(kotlin.coroutines.CoroutineContext effectCoroutineContext);
method public androidx.compose.runtime.RecomposerInfo asRecomposerInfo();
- method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public void cancel();
method public void close();
method public long getChangeCount();
method public kotlinx.coroutines.flow.StateFlow<androidx.compose.runtime.Recomposer.State> getCurrentState();
method public boolean getHasPendingWork();
method @Deprecated public kotlinx.coroutines.flow.Flow<androidx.compose.runtime.Recomposer.State> getState();
- method public suspend Object? join(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? runRecomposeAndApplyChanges(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? join(kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? runRecomposeAndApplyChanges(kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final long changeCount;
property public final kotlinx.coroutines.flow.StateFlow<androidx.compose.runtime.Recomposer.State> currentState;
property public final boolean hasPendingWork;
@@ -381,7 +381,7 @@
}
public final class RecomposerKt {
- method public static suspend <R> Object? withRunningRecomposer(kotlin.jvm.functions.Function3<? super kotlinx.coroutines.CoroutineScope,? super androidx.compose.runtime.Recomposer,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R> p);
+ method public static suspend <R> Object? withRunningRecomposer(kotlin.jvm.functions.Function3<? super kotlinx.coroutines.CoroutineScope,? super androidx.compose.runtime.Recomposer,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
}
public interface RememberObserver {
diff --git a/compose/runtime/runtime/api/public_plus_experimental_current.txt b/compose/runtime/runtime/api/public_plus_experimental_current.txt
index badb856..bf663ef 100644
--- a/compose/runtime/runtime/api/public_plus_experimental_current.txt
+++ b/compose/runtime/runtime/api/public_plus_experimental_current.txt
@@ -10,7 +10,7 @@
method protected final void move(java.util.List<T>, int from, int to, int count);
method protected abstract void onClear();
method protected final void remove(java.util.List<T>, int index, int count);
- method protected void setCurrent(T! current);
+ method protected void setCurrent(T!);
method public void up();
property public T! current;
property public final T! root;
@@ -46,7 +46,7 @@
method public void cancel(optional java.util.concurrent.CancellationException cancellationException);
method public boolean getHasAwaiters();
method public void sendFrame(long timeNanos);
- method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
property public final boolean hasAwaiters;
}
@@ -297,7 +297,7 @@
public interface MonotonicFrameClock extends kotlin.coroutines.CoroutineContext.Element {
method public default kotlin.coroutines.CoroutineContext.Key<?> getKey();
- method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
property public default kotlin.coroutines.CoroutineContext.Key<?> key;
field public static final androidx.compose.runtime.MonotonicFrameClock.Key Key;
}
@@ -307,9 +307,9 @@
public final class MonotonicFrameClockKt {
method public static androidx.compose.runtime.MonotonicFrameClock getMonotonicFrameClock(kotlin.coroutines.CoroutineContext);
- method public static suspend inline <R> Object? withFrameMillis(androidx.compose.runtime.MonotonicFrameClock, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend <R> Object? withFrameMillis(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ method public static suspend inline <R> Object? withFrameMillis(androidx.compose.runtime.MonotonicFrameClock, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend <R> Object? withFrameMillis(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
}
@androidx.compose.runtime.InternalComposeApi public final class MovableContent<P> {
@@ -339,7 +339,7 @@
@androidx.compose.runtime.Stable public interface MutableState<T> extends androidx.compose.runtime.State<T> {
method public operator T! component1();
method public operator kotlin.jvm.functions.Function1<T,kotlin.Unit> component2();
- method public void setValue(T! value);
+ method public void setValue(T!);
property public abstract T! value;
}
@@ -354,12 +354,12 @@
method public boolean isPaused();
method public void pause();
method public void resume();
- method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
property public final boolean isPaused;
}
public interface ProduceStateScope<T> extends androidx.compose.runtime.MutableState<T> kotlinx.coroutines.CoroutineScope {
- method public suspend Object? awaitDispose(kotlin.jvm.functions.Function0<kotlin.Unit> onDispose, kotlin.coroutines.Continuation<?> p);
+ method public suspend Object? awaitDispose(kotlin.jvm.functions.Function0<kotlin.Unit> onDispose, kotlin.coroutines.Continuation<?>);
}
@androidx.compose.runtime.Stable public abstract class ProvidableCompositionLocal<T> extends androidx.compose.runtime.CompositionLocal<T> {
@@ -389,16 +389,16 @@
public final class Recomposer extends androidx.compose.runtime.CompositionContext {
ctor public Recomposer(kotlin.coroutines.CoroutineContext effectCoroutineContext);
method public androidx.compose.runtime.RecomposerInfo asRecomposerInfo();
- method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public void cancel();
method public void close();
method public long getChangeCount();
method public kotlinx.coroutines.flow.StateFlow<androidx.compose.runtime.Recomposer.State> getCurrentState();
method public boolean getHasPendingWork();
method @Deprecated public kotlinx.coroutines.flow.Flow<androidx.compose.runtime.Recomposer.State> getState();
- method public suspend Object? join(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? runRecomposeAndApplyChanges(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method @androidx.compose.runtime.ExperimentalComposeApi public suspend Object? runRecomposeConcurrentlyAndApplyChanges(kotlin.coroutines.CoroutineContext recomposeCoroutineContext, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? join(kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? runRecomposeAndApplyChanges(kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method @androidx.compose.runtime.ExperimentalComposeApi public suspend Object? runRecomposeConcurrentlyAndApplyChanges(kotlin.coroutines.CoroutineContext recomposeCoroutineContext, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final long changeCount;
property public final kotlinx.coroutines.flow.StateFlow<androidx.compose.runtime.Recomposer.State> currentState;
property public final boolean hasPendingWork;
@@ -430,7 +430,7 @@
}
public final class RecomposerKt {
- method public static suspend <R> Object? withRunningRecomposer(kotlin.jvm.functions.Function3<? super kotlinx.coroutines.CoroutineScope,? super androidx.compose.runtime.Recomposer,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R> p);
+ method public static suspend <R> Object? withRunningRecomposer(kotlin.jvm.functions.Function3<? super kotlinx.coroutines.CoroutineScope,? super androidx.compose.runtime.Recomposer,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
}
public interface RememberObserver {
diff --git a/compose/runtime/runtime/api/restricted_current.ignore b/compose/runtime/runtime/api/restricted_current.ignore
index 1ea8546..88d1bf5 100644
--- a/compose/runtime/runtime/api/restricted_current.ignore
+++ b/compose/runtime/runtime/api/restricted_current.ignore
@@ -13,6 +13,148 @@
Added method androidx.compose.runtime.ControlledComposition.delegateInvalidations(androidx.compose.runtime.ControlledComposition,int,kotlin.jvm.functions.Function0<? extends R>)
+AddedFinal: androidx.compose.runtime.Composer#apply(V, kotlin.jvm.functions.Function2<? super T,? super V,kotlin.Unit>):
+ Method androidx.compose.runtime.Composer.apply has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#changed(Object):
+ Method androidx.compose.runtime.Composer.changed has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#changed(boolean):
+ Method androidx.compose.runtime.Composer.changed has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#changed(byte):
+ Method androidx.compose.runtime.Composer.changed has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#changed(char):
+ Method androidx.compose.runtime.Composer.changed has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#changed(double):
+ Method androidx.compose.runtime.Composer.changed has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#changed(float):
+ Method androidx.compose.runtime.Composer.changed has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#changed(int):
+ Method androidx.compose.runtime.Composer.changed has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#changed(long):
+ Method androidx.compose.runtime.Composer.changed has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#changed(short):
+ Method androidx.compose.runtime.Composer.changed has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#collectParameterInformation():
+ Method androidx.compose.runtime.Composer.collectParameterInformation has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#createNode(kotlin.jvm.functions.Function0<? extends T>):
+ Method androidx.compose.runtime.Composer.createNode has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#disableReusing():
+ Method androidx.compose.runtime.Composer.disableReusing has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#enableReusing():
+ Method androidx.compose.runtime.Composer.enableReusing has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#endDefaults():
+ Method androidx.compose.runtime.Composer.endDefaults has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#endMovableGroup():
+ Method androidx.compose.runtime.Composer.endMovableGroup has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#endNode():
+ Method androidx.compose.runtime.Composer.endNode has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#endReplaceableGroup():
+ Method androidx.compose.runtime.Composer.endReplaceableGroup has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#endRestartGroup():
+ Method androidx.compose.runtime.Composer.endRestartGroup has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#endReusableGroup():
+ Method androidx.compose.runtime.Composer.endReusableGroup has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#getApplier():
+ Method androidx.compose.runtime.Composer.getApplier has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#getApplyCoroutineContext():
+ Method androidx.compose.runtime.Composer.getApplyCoroutineContext has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#getComposition():
+ Method androidx.compose.runtime.Composer.getComposition has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#getCompositionData():
+ Method androidx.compose.runtime.Composer.getCompositionData has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#getCompoundKeyHash():
+ Method androidx.compose.runtime.Composer.getCompoundKeyHash has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#getDefaultsInvalid():
+ Method androidx.compose.runtime.Composer.getDefaultsInvalid has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#getInserting():
+ Method androidx.compose.runtime.Composer.getInserting has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#getRecomposeScope():
+ Method androidx.compose.runtime.Composer.getRecomposeScope has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#getSkipping():
+ Method androidx.compose.runtime.Composer.getSkipping has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#joinKey(Object, Object):
+ Method androidx.compose.runtime.Composer.joinKey has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#rememberedValue():
+ Method androidx.compose.runtime.Composer.rememberedValue has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#skipCurrentGroup():
+ Method androidx.compose.runtime.Composer.skipCurrentGroup has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#skipToGroupEnd():
+ Method androidx.compose.runtime.Composer.skipToGroupEnd has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#sourceInformation(String):
+ Method androidx.compose.runtime.Composer.sourceInformation has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#sourceInformationMarkerEnd():
+ Method androidx.compose.runtime.Composer.sourceInformationMarkerEnd has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#sourceInformationMarkerStart(int, String):
+ Method androidx.compose.runtime.Composer.sourceInformationMarkerStart has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#startDefaults():
+ Method androidx.compose.runtime.Composer.startDefaults has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#startMovableGroup(int, Object):
+ Method androidx.compose.runtime.Composer.startMovableGroup has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#startNode():
+ Method androidx.compose.runtime.Composer.startNode has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#startReplaceableGroup(int):
+ Method androidx.compose.runtime.Composer.startReplaceableGroup has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#startRestartGroup(int):
+ Method androidx.compose.runtime.Composer.startRestartGroup has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#startReusableGroup(int, Object):
+ Method androidx.compose.runtime.Composer.startReusableGroup has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#startReusableNode():
+ Method androidx.compose.runtime.Composer.startReusableNode has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#updateRememberedValue(Object):
+ Method androidx.compose.runtime.Composer.updateRememberedValue has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.Composer#useNode():
+ Method androidx.compose.runtime.Composer.useNode has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#applyChanges():
+ Method androidx.compose.runtime.ControlledComposition.applyChanges has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#composeContent(kotlin.jvm.functions.Function0<kotlin.Unit>):
+ Method androidx.compose.runtime.ControlledComposition.composeContent has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#getHasPendingChanges():
+ Method androidx.compose.runtime.ControlledComposition.getHasPendingChanges has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#invalidateAll():
+ Method androidx.compose.runtime.ControlledComposition.invalidateAll has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#isComposing():
+ Method androidx.compose.runtime.ControlledComposition.isComposing has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#observesAnyOf(java.util.Set<?>):
+ Method androidx.compose.runtime.ControlledComposition.observesAnyOf has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#prepareCompose(kotlin.jvm.functions.Function0<kotlin.Unit>):
+ Method androidx.compose.runtime.ControlledComposition.prepareCompose has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#recompose():
+ Method androidx.compose.runtime.ControlledComposition.recompose has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#recordModificationsOf(java.util.Set<?>):
+ Method androidx.compose.runtime.ControlledComposition.recordModificationsOf has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#recordReadOf(Object):
+ Method androidx.compose.runtime.ControlledComposition.recordReadOf has added 'final' qualifier
+AddedFinal: androidx.compose.runtime.ControlledComposition#recordWriteOf(Object):
+ Method androidx.compose.runtime.ControlledComposition.recordWriteOf has added 'final' qualifier
+
+
+ParameterNameChange: androidx.compose.runtime.AbstractApplier#setCurrent(T) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.runtime.AbstractApplier.setCurrent
+ParameterNameChange: androidx.compose.runtime.BroadcastFrameClock#withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.runtime.BroadcastFrameClock.withFrameNanos
+ParameterNameChange: androidx.compose.runtime.MonotonicFrameClock#withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.runtime.MonotonicFrameClock.withFrameNanos
+ParameterNameChange: androidx.compose.runtime.MonotonicFrameClockKt#withFrameMillis(androidx.compose.runtime.MonotonicFrameClock, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.runtime.MonotonicFrameClockKt.withFrameMillis
+ParameterNameChange: androidx.compose.runtime.MonotonicFrameClockKt#withFrameMillis(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.runtime.MonotonicFrameClockKt.withFrameMillis
+ParameterNameChange: androidx.compose.runtime.MonotonicFrameClockKt#withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.runtime.MonotonicFrameClockKt.withFrameNanos
+ParameterNameChange: androidx.compose.runtime.MutableState#setValue(T) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.runtime.MutableState.setValue
+ParameterNameChange: androidx.compose.runtime.PausableMonotonicFrameClock#withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.runtime.PausableMonotonicFrameClock.withFrameNanos
+ParameterNameChange: androidx.compose.runtime.ProduceStateScope#awaitDispose(kotlin.jvm.functions.Function0<kotlin.Unit>, kotlin.coroutines.Continuation<?>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.runtime.ProduceStateScope.awaitDispose
+ParameterNameChange: androidx.compose.runtime.Recomposer#awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.runtime.Recomposer.awaitIdle
+ParameterNameChange: androidx.compose.runtime.Recomposer#join(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.runtime.Recomposer.join
+ParameterNameChange: androidx.compose.runtime.Recomposer#runRecomposeAndApplyChanges(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.runtime.Recomposer.runRecomposeAndApplyChanges
+ParameterNameChange: androidx.compose.runtime.RecomposerKt#withRunningRecomposer(kotlin.jvm.functions.Function3<? super kotlinx.coroutines.CoroutineScope,? super androidx.compose.runtime.Recomposer,? super kotlin.coroutines.Continuation<? super R>,?>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.runtime.RecomposerKt.withRunningRecomposer
+
+
RemovedMethod: androidx.compose.runtime.SkippableUpdater#SkippableUpdater():
Removed constructor androidx.compose.runtime.SkippableUpdater()
RemovedMethod: androidx.compose.runtime.Updater#Updater():
diff --git a/compose/runtime/runtime/api/restricted_current.txt b/compose/runtime/runtime/api/restricted_current.txt
index efd40ac..46d4a7f 100644
--- a/compose/runtime/runtime/api/restricted_current.txt
+++ b/compose/runtime/runtime/api/restricted_current.txt
@@ -10,7 +10,7 @@
method protected final void move(java.util.List<T>, int from, int to, int count);
method protected abstract void onClear();
method protected final void remove(java.util.List<T>, int index, int count);
- method protected void setCurrent(T! current);
+ method protected void setCurrent(T!);
method public void up();
property public T! current;
property public final T! root;
@@ -47,7 +47,7 @@
method public void cancel(optional java.util.concurrent.CancellationException cancellationException);
method public boolean getHasAwaiters();
method public void sendFrame(long timeNanos);
- method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
property public final boolean hasAwaiters;
}
@@ -287,7 +287,7 @@
public interface MonotonicFrameClock extends kotlin.coroutines.CoroutineContext.Element {
method public default kotlin.coroutines.CoroutineContext.Key<?> getKey();
- method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
property public default kotlin.coroutines.CoroutineContext.Key<?> key;
field public static final androidx.compose.runtime.MonotonicFrameClock.Key Key;
}
@@ -297,9 +297,9 @@
public final class MonotonicFrameClockKt {
method public static androidx.compose.runtime.MonotonicFrameClock getMonotonicFrameClock(kotlin.coroutines.CoroutineContext);
- method public static suspend inline <R> Object? withFrameMillis(androidx.compose.runtime.MonotonicFrameClock, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend <R> Object? withFrameMillis(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ method public static suspend inline <R> Object? withFrameMillis(androidx.compose.runtime.MonotonicFrameClock, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend <R> Object? withFrameMillis(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
}
public final class MovableContentKt {
@@ -317,7 +317,7 @@
@androidx.compose.runtime.Stable public interface MutableState<T> extends androidx.compose.runtime.State<T> {
method public operator T! component1();
method public operator kotlin.jvm.functions.Function1<T,kotlin.Unit> component2();
- method public void setValue(T! value);
+ method public void setValue(T!);
property public abstract T! value;
}
@@ -332,12 +332,12 @@
method public boolean isPaused();
method public void pause();
method public void resume();
- method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
property public final boolean isPaused;
}
public interface ProduceStateScope<T> extends androidx.compose.runtime.MutableState<T> kotlinx.coroutines.CoroutineScope {
- method public suspend Object? awaitDispose(kotlin.jvm.functions.Function0<kotlin.Unit> onDispose, kotlin.coroutines.Continuation<?> p);
+ method public suspend Object? awaitDispose(kotlin.jvm.functions.Function0<kotlin.Unit> onDispose, kotlin.coroutines.Continuation<?>);
}
@androidx.compose.runtime.Stable public abstract class ProvidableCompositionLocal<T> extends androidx.compose.runtime.CompositionLocal<T> {
@@ -367,15 +367,15 @@
public final class Recomposer extends androidx.compose.runtime.CompositionContext {
ctor public Recomposer(kotlin.coroutines.CoroutineContext effectCoroutineContext);
method public androidx.compose.runtime.RecomposerInfo asRecomposerInfo();
- method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public void cancel();
method public void close();
method public long getChangeCount();
method public kotlinx.coroutines.flow.StateFlow<androidx.compose.runtime.Recomposer.State> getCurrentState();
method public boolean getHasPendingWork();
method @Deprecated public kotlinx.coroutines.flow.Flow<androidx.compose.runtime.Recomposer.State> getState();
- method public suspend Object? join(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? runRecomposeAndApplyChanges(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? join(kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? runRecomposeAndApplyChanges(kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final long changeCount;
property public final kotlinx.coroutines.flow.StateFlow<androidx.compose.runtime.Recomposer.State> currentState;
property public final boolean hasPendingWork;
@@ -407,7 +407,7 @@
}
public final class RecomposerKt {
- method public static suspend <R> Object? withRunningRecomposer(kotlin.jvm.functions.Function3<? super kotlinx.coroutines.CoroutineScope,? super androidx.compose.runtime.Recomposer,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R> p);
+ method public static suspend <R> Object? withRunningRecomposer(kotlin.jvm.functions.Function3<? super kotlinx.coroutines.CoroutineScope,? super androidx.compose.runtime.Recomposer,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
}
public interface RememberObserver {
diff --git a/compose/runtime/runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/runtime/benchmark/collection/MutableVectorBenchmark.kt b/compose/runtime/runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/runtime/benchmark/collection/MutableVectorBenchmark.kt
index 6aba265..21cb181 100644
--- a/compose/runtime/runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/runtime/benchmark/collection/MutableVectorBenchmark.kt
+++ b/compose/runtime/runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/runtime/benchmark/collection/MutableVectorBenchmark.kt
@@ -126,7 +126,7 @@
val list = ArrayList<Int>(arraySize)
benchmarkRule.measureRepeated {
list.addAll(content)
- while (list.isNotEmpty()) {
+ repeat(arraySize) {
list.removeAt(list.lastIndex)
}
}
@@ -137,7 +137,7 @@
val list = MutableVector<Int>(arraySize)
benchmarkRule.measureRepeated {
list.addAll(content)
- while (list.isNotEmpty()) {
+ repeat(arraySize) {
list.removeAt(list.lastIndex)
}
}
@@ -148,7 +148,7 @@
val list = ArrayList<Int>(arraySize)
benchmarkRule.measureRepeated {
list.addAll(content)
- while (list.isNotEmpty()) {
+ repeat(arraySize) {
list.removeAt(0)
}
}
@@ -159,7 +159,7 @@
val list = MutableVector<Int>(arraySize)
benchmarkRule.measureRepeated {
list.addAll(content)
- while (list.isNotEmpty()) {
+ repeat(arraySize) {
list.removeAt(0)
}
}
@@ -260,12 +260,15 @@
@Test
fun addAllArrayList() {
val list = mutableListOf(*content)
+ val list2 = ArrayList<Int>(list.size * 4)
benchmarkRule.measureRepeated {
- val list2 = mutableListOf<Int>()
list2.addAll(list)
list2.addAll(list)
list2.addAll(list)
list2.addAll(list)
+ runWithTimingDisabled {
+ list2.clear()
+ }
}
}
@@ -291,12 +294,15 @@
@Test
fun addAllVector() {
val list = mutableVectorOf(*content)
+ val list2 = MutableVector<Int>(list.size * 4)
benchmarkRule.measureRepeated {
- val list2 = mutableVectorOf<Int>()
list2.addAll(list)
list2.addAll(list)
list2.addAll(list)
list2.addAll(list)
+ runWithTimingDisabled {
+ list2.clear()
+ }
}
}
@@ -308,13 +314,14 @@
@Test fun addAllVectorRotateInput() {
val listOfLists = List(16) { mutableVectorOf(*content) }
var counter = 0
+ val list2 = MutableVector<Int>(content.size * 4)
benchmarkRule.measureRepeated {
val list = listOfLists[counter % 16]
- val list2 = mutableVectorOf<Int>()
list2.addAll(list)
list2.addAll(list)
list2.addAll(list)
list2.addAll(list)
+ list2.clear()
counter++
}
}
@@ -322,24 +329,30 @@
@Test
fun insertAllArrayList() {
val list = mutableListOf(*content)
+ val list2 = ArrayList<Int>(content.size * 4)
benchmarkRule.measureRepeated {
- val list2 = mutableListOf<Int>()
list2.addAll(0, list)
list2.addAll(0, list)
list2.addAll(0, list)
list2.addAll(0, list)
+ runWithTimingDisabled {
+ list2.clear()
+ }
}
}
@Test
fun insertAllVector() {
val list = mutableVectorOf(*content)
+ val list2 = MutableVector<Int>(list.size * 4)
benchmarkRule.measureRepeated {
- val list2 = mutableVectorOf<Int>()
list2.addAll(0, list)
list2.addAll(0, list)
list2.addAll(0, list)
list2.addAll(0, list)
+ runWithTimingDisabled {
+ list2.clear()
+ }
}
}
@@ -349,7 +362,7 @@
list.addAll(content)
benchmarkRule.measureRepeated {
repeat(arraySize) {
- list[it] = list[it] + 1
+ list[it] = list[(it + 1) % 100]
}
}
}
@@ -360,8 +373,8 @@
list.addAll(content)
benchmarkRule.measureRepeated {
repeat(arraySize) {
- list[it] = list[it] + 1
+ list[it] = list[(it + 1) % 100]
}
}
}
-}
\ No newline at end of file
+}
diff --git a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/MutableVector.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/MutableVector.kt
index ac747dc..72de7b1 100644
--- a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/MutableVector.kt
+++ b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/MutableVector.kt
@@ -162,6 +162,7 @@
destination = content,
destinationOffset = size
)
+ size += elements.size
return true
}
diff --git a/compose/runtime/runtime/src/commonTest/kotlin/androidx/compose/runtime/collection/MutableVectorTest.kt b/compose/runtime/runtime/src/commonTest/kotlin/androidx/compose/runtime/collection/MutableVectorTest.kt
index 2cdad76..9fcac1a 100644
--- a/compose/runtime/runtime/src/commonTest/kotlin/androidx/compose/runtime/collection/MutableVectorTest.kt
+++ b/compose/runtime/runtime/src/commonTest/kotlin/androidx/compose/runtime/collection/MutableVectorTest.kt
@@ -436,6 +436,17 @@
}
@Test
+ fun addAllArray() {
+ val a = arrayOf(3, 4, 5)
+ val v = mutableVectorOf(1, 2)
+ v.addAll(a)
+ assertEquals(5, v.size)
+ assertEquals(3, v[2])
+ assertEquals(4, v[3])
+ assertEquals(5, v[4])
+ }
+
+ @Test
fun clear() {
val l = mutableVectorOf<Int>()
l.addAll(list)
@@ -443,7 +454,7 @@
l.clear()
assertTrue(l.isEmpty())
repeat(5) {
- l.content[it] == null
+ assertNull(l.content[it])
}
}
diff --git a/compose/ui/ui-geometry/api/current.ignore b/compose/ui/ui-geometry/api/current.ignore
index 1f4f96f..1963ca7 100644
--- a/compose/ui/ui-geometry/api/current.ignore
+++ b/compose/ui/ui-geometry/api/current.ignore
@@ -1,4 +1,14 @@
// Baseline format: 1.0
+ParameterNameChange: androidx.compose.ui.geometry.MutableRect#setBottom(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.geometry.MutableRect.setBottom
+ParameterNameChange: androidx.compose.ui.geometry.MutableRect#setLeft(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.geometry.MutableRect.setLeft
+ParameterNameChange: androidx.compose.ui.geometry.MutableRect#setRight(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.geometry.MutableRect.setRight
+ParameterNameChange: androidx.compose.ui.geometry.MutableRect#setTop(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.geometry.MutableRect.setTop
+
+
RemovedMethod: androidx.compose.ui.geometry.CornerRadius#CornerRadius():
Removed constructor androidx.compose.ui.geometry.CornerRadius()
RemovedMethod: androidx.compose.ui.geometry.Offset#Offset():
diff --git a/compose/ui/ui-geometry/api/current.txt b/compose/ui/ui-geometry/api/current.txt
index ef46309..936778a 100644
--- a/compose/ui/ui-geometry/api/current.txt
+++ b/compose/ui/ui-geometry/api/current.txt
@@ -43,10 +43,10 @@
method @androidx.compose.runtime.Stable public void intersect(float left, float top, float right, float bottom);
method public boolean isEmpty();
method public void set(float left, float top, float right, float bottom);
- method public void setBottom(float bottom);
- method public void setLeft(float left);
- method public void setRight(float right);
- method public void setTop(float top);
+ method public void setBottom(float);
+ method public void setLeft(float);
+ method public void setRight(float);
+ method public void setTop(float);
property public final float bottom;
property public final inline float height;
property public final boolean isEmpty;
diff --git a/compose/ui/ui-geometry/api/public_plus_experimental_current.txt b/compose/ui/ui-geometry/api/public_plus_experimental_current.txt
index ef46309..936778a 100644
--- a/compose/ui/ui-geometry/api/public_plus_experimental_current.txt
+++ b/compose/ui/ui-geometry/api/public_plus_experimental_current.txt
@@ -43,10 +43,10 @@
method @androidx.compose.runtime.Stable public void intersect(float left, float top, float right, float bottom);
method public boolean isEmpty();
method public void set(float left, float top, float right, float bottom);
- method public void setBottom(float bottom);
- method public void setLeft(float left);
- method public void setRight(float right);
- method public void setTop(float top);
+ method public void setBottom(float);
+ method public void setLeft(float);
+ method public void setRight(float);
+ method public void setTop(float);
property public final float bottom;
property public final inline float height;
property public final boolean isEmpty;
diff --git a/compose/ui/ui-geometry/api/restricted_current.ignore b/compose/ui/ui-geometry/api/restricted_current.ignore
index 1f4f96f..1963ca7 100644
--- a/compose/ui/ui-geometry/api/restricted_current.ignore
+++ b/compose/ui/ui-geometry/api/restricted_current.ignore
@@ -1,4 +1,14 @@
// Baseline format: 1.0
+ParameterNameChange: androidx.compose.ui.geometry.MutableRect#setBottom(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.geometry.MutableRect.setBottom
+ParameterNameChange: androidx.compose.ui.geometry.MutableRect#setLeft(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.geometry.MutableRect.setLeft
+ParameterNameChange: androidx.compose.ui.geometry.MutableRect#setRight(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.geometry.MutableRect.setRight
+ParameterNameChange: androidx.compose.ui.geometry.MutableRect#setTop(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.geometry.MutableRect.setTop
+
+
RemovedMethod: androidx.compose.ui.geometry.CornerRadius#CornerRadius():
Removed constructor androidx.compose.ui.geometry.CornerRadius()
RemovedMethod: androidx.compose.ui.geometry.Offset#Offset():
diff --git a/compose/ui/ui-geometry/api/restricted_current.txt b/compose/ui/ui-geometry/api/restricted_current.txt
index ef46309..936778a 100644
--- a/compose/ui/ui-geometry/api/restricted_current.txt
+++ b/compose/ui/ui-geometry/api/restricted_current.txt
@@ -43,10 +43,10 @@
method @androidx.compose.runtime.Stable public void intersect(float left, float top, float right, float bottom);
method public boolean isEmpty();
method public void set(float left, float top, float right, float bottom);
- method public void setBottom(float bottom);
- method public void setLeft(float left);
- method public void setRight(float right);
- method public void setTop(float top);
+ method public void setBottom(float);
+ method public void setLeft(float);
+ method public void setRight(float);
+ method public void setTop(float);
property public final float bottom;
property public final inline float height;
property public final boolean isEmpty;
diff --git a/compose/ui/ui-graphics/api/current.ignore b/compose/ui/ui-graphics/api/current.ignore
index 01ec803..2e8c07c 100644
--- a/compose/ui/ui-graphics/api/current.ignore
+++ b/compose/ui/ui-graphics/api/current.ignore
@@ -1,4 +1,64 @@
// Baseline format: 1.0
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setAlpha(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setAlpha
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setAntiAlias(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setAntiAlias
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setBlendMode(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setBlendMode
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setColor(long) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setColor
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setColorFilter(androidx.compose.ui.graphics.ColorFilter) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setColorFilter
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setFilterQuality(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setFilterQuality
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setPathEffect(androidx.compose.ui.graphics.PathEffect) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setPathEffect
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setShader(android.graphics.Shader) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setShader
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setStrokeCap(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setStrokeCap
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setStrokeJoin(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setStrokeJoin
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setStrokeMiterLimit(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setStrokeMiterLimit
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setStrokeWidth(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setStrokeWidth
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setStyle(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setStyle
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPath#setFillType(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPath.setFillType
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setAlpha(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setAlpha
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setAntiAlias(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setAntiAlias
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setBlendMode(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setBlendMode
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setColor(long) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setColor
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setColorFilter(androidx.compose.ui.graphics.ColorFilter) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setColorFilter
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setFilterQuality(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setFilterQuality
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setPathEffect(androidx.compose.ui.graphics.PathEffect) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setPathEffect
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setShader(android.graphics.Shader) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setShader
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setStrokeCap(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setStrokeCap
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setStrokeJoin(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setStrokeJoin
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setStrokeMiterLimit(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setStrokeMiterLimit
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setStrokeWidth(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setStrokeWidth
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setStyle(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setStyle
+ParameterNameChange: androidx.compose.ui.graphics.Path#setFillType(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Path.setFillType
+ParameterNameChange: androidx.compose.ui.graphics.drawscope.DrawContext#setSize(long) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.drawscope.DrawContext.setSize
+
+
RemovedMethod: androidx.compose.ui.graphics.BlendMode#BlendMode():
Removed constructor androidx.compose.ui.graphics.BlendMode()
RemovedMethod: androidx.compose.ui.graphics.ClipOp#ClipOp():
diff --git a/compose/ui/ui-graphics/api/current.txt b/compose/ui/ui-graphics/api/current.txt
index d329e0f..36f7f0c 100644
--- a/compose/ui/ui-graphics/api/current.txt
+++ b/compose/ui/ui-graphics/api/current.txt
@@ -41,19 +41,19 @@
method public float getStrokeWidth();
method public int getStyle();
method public boolean isAntiAlias();
- method public void setAlpha(float value);
- method public void setAntiAlias(boolean value);
- method public void setBlendMode(int value);
- method public void setColor(long color);
- method public void setColorFilter(androidx.compose.ui.graphics.ColorFilter? value);
- method public void setFilterQuality(int value);
- method public void setPathEffect(androidx.compose.ui.graphics.PathEffect? value);
- method public void setShader(android.graphics.Shader? value);
- method public void setStrokeCap(int value);
- method public void setStrokeJoin(int value);
- method public void setStrokeMiterLimit(float value);
- method public void setStrokeWidth(float value);
- method public void setStyle(int value);
+ method public void setAlpha(float);
+ method public void setAntiAlias(boolean);
+ method public void setBlendMode(int);
+ method public void setColor(long);
+ method public void setColorFilter(androidx.compose.ui.graphics.ColorFilter?);
+ method public void setFilterQuality(int);
+ method public void setPathEffect(androidx.compose.ui.graphics.PathEffect?);
+ method public void setShader(android.graphics.Shader?);
+ method public void setStrokeCap(int);
+ method public void setStrokeJoin(int);
+ method public void setStrokeMiterLimit(float);
+ method public void setStrokeWidth(float);
+ method public void setStyle(int);
property public float alpha;
property public int blendMode;
property public long color;
@@ -98,7 +98,7 @@
method public void relativeMoveTo(float dx, float dy);
method public void relativeQuadraticBezierTo(float dx1, float dy1, float dx2, float dy2);
method public void reset();
- method public void setFillType(int value);
+ method public void setFillType(int);
method public void translate(long offset);
property public int fillType;
property public final android.graphics.Path internalPath;
@@ -560,19 +560,19 @@
method public float getStrokeWidth();
method public int getStyle();
method public boolean isAntiAlias();
- method public void setAlpha(float alpha);
- method public void setAntiAlias(boolean isAntiAlias);
- method public void setBlendMode(int blendMode);
- method public void setColor(long color);
- method public void setColorFilter(androidx.compose.ui.graphics.ColorFilter? colorFilter);
- method public void setFilterQuality(int filterQuality);
- method public void setPathEffect(androidx.compose.ui.graphics.PathEffect? pathEffect);
- method public void setShader(android.graphics.Shader? shader);
- method public void setStrokeCap(int strokeCap);
- method public void setStrokeJoin(int strokeJoin);
- method public void setStrokeMiterLimit(float strokeMiterLimit);
- method public void setStrokeWidth(float strokeWidth);
- method public void setStyle(int style);
+ method public void setAlpha(float);
+ method public void setAntiAlias(boolean);
+ method public void setBlendMode(int);
+ method public void setColor(long);
+ method public void setColorFilter(androidx.compose.ui.graphics.ColorFilter?);
+ method public void setFilterQuality(int);
+ method public void setPathEffect(androidx.compose.ui.graphics.PathEffect?);
+ method public void setShader(android.graphics.Shader?);
+ method public void setStrokeCap(int);
+ method public void setStrokeJoin(int);
+ method public void setStrokeMiterLimit(float);
+ method public void setStrokeWidth(float);
+ method public void setStyle(int);
property public abstract float alpha;
property public abstract int blendMode;
property public abstract long color;
@@ -628,7 +628,7 @@
method public void relativeMoveTo(float dx, float dy);
method public void relativeQuadraticBezierTo(float dx1, float dy1, float dx2, float dy2);
method public void reset();
- method public void setFillType(int fillType);
+ method public void setFillType(int);
method public void translate(long offset);
property public abstract int fillType;
property public abstract boolean isConvex;
@@ -1144,7 +1144,7 @@
method public androidx.compose.ui.graphics.Canvas getCanvas();
method public long getSize();
method public androidx.compose.ui.graphics.drawscope.DrawTransform getTransform();
- method public void setSize(long size);
+ method public void setSize(long);
property public abstract androidx.compose.ui.graphics.Canvas canvas;
property public abstract long size;
property public abstract androidx.compose.ui.graphics.drawscope.DrawTransform transform;
diff --git a/compose/ui/ui-graphics/api/public_plus_experimental_current.txt b/compose/ui/ui-graphics/api/public_plus_experimental_current.txt
index fd8130d..b63fe79 100644
--- a/compose/ui/ui-graphics/api/public_plus_experimental_current.txt
+++ b/compose/ui/ui-graphics/api/public_plus_experimental_current.txt
@@ -41,19 +41,19 @@
method public float getStrokeWidth();
method public int getStyle();
method public boolean isAntiAlias();
- method public void setAlpha(float value);
- method public void setAntiAlias(boolean value);
- method public void setBlendMode(int value);
- method public void setColor(long color);
- method public void setColorFilter(androidx.compose.ui.graphics.ColorFilter? value);
- method public void setFilterQuality(int value);
- method public void setPathEffect(androidx.compose.ui.graphics.PathEffect? value);
- method public void setShader(android.graphics.Shader? value);
- method public void setStrokeCap(int value);
- method public void setStrokeJoin(int value);
- method public void setStrokeMiterLimit(float value);
- method public void setStrokeWidth(float value);
- method public void setStyle(int value);
+ method public void setAlpha(float);
+ method public void setAntiAlias(boolean);
+ method public void setBlendMode(int);
+ method public void setColor(long);
+ method public void setColorFilter(androidx.compose.ui.graphics.ColorFilter?);
+ method public void setFilterQuality(int);
+ method public void setPathEffect(androidx.compose.ui.graphics.PathEffect?);
+ method public void setShader(android.graphics.Shader?);
+ method public void setStrokeCap(int);
+ method public void setStrokeJoin(int);
+ method public void setStrokeMiterLimit(float);
+ method public void setStrokeWidth(float);
+ method public void setStyle(int);
property public float alpha;
property public int blendMode;
property public long color;
@@ -98,7 +98,7 @@
method public void relativeMoveTo(float dx, float dy);
method public void relativeQuadraticBezierTo(float dx1, float dy1, float dx2, float dy2);
method public void reset();
- method public void setFillType(int value);
+ method public void setFillType(int);
method public void translate(long offset);
property public int fillType;
property public final android.graphics.Path internalPath;
@@ -563,19 +563,19 @@
method public float getStrokeWidth();
method public int getStyle();
method public boolean isAntiAlias();
- method public void setAlpha(float alpha);
- method public void setAntiAlias(boolean isAntiAlias);
- method public void setBlendMode(int blendMode);
- method public void setColor(long color);
- method public void setColorFilter(androidx.compose.ui.graphics.ColorFilter? colorFilter);
- method public void setFilterQuality(int filterQuality);
- method public void setPathEffect(androidx.compose.ui.graphics.PathEffect? pathEffect);
- method public void setShader(android.graphics.Shader? shader);
- method public void setStrokeCap(int strokeCap);
- method public void setStrokeJoin(int strokeJoin);
- method public void setStrokeMiterLimit(float strokeMiterLimit);
- method public void setStrokeWidth(float strokeWidth);
- method public void setStyle(int style);
+ method public void setAlpha(float);
+ method public void setAntiAlias(boolean);
+ method public void setBlendMode(int);
+ method public void setColor(long);
+ method public void setColorFilter(androidx.compose.ui.graphics.ColorFilter?);
+ method public void setFilterQuality(int);
+ method public void setPathEffect(androidx.compose.ui.graphics.PathEffect?);
+ method public void setShader(android.graphics.Shader?);
+ method public void setStrokeCap(int);
+ method public void setStrokeJoin(int);
+ method public void setStrokeMiterLimit(float);
+ method public void setStrokeWidth(float);
+ method public void setStyle(int);
property public abstract float alpha;
property public abstract int blendMode;
property public abstract long color;
@@ -631,7 +631,7 @@
method public void relativeMoveTo(float dx, float dy);
method public void relativeQuadraticBezierTo(float dx1, float dy1, float dx2, float dy2);
method public void reset();
- method public void setFillType(int fillType);
+ method public void setFillType(int);
method public void translate(long offset);
property public abstract int fillType;
property public abstract boolean isConvex;
@@ -1147,7 +1147,7 @@
method public androidx.compose.ui.graphics.Canvas getCanvas();
method public long getSize();
method public androidx.compose.ui.graphics.drawscope.DrawTransform getTransform();
- method public void setSize(long size);
+ method public void setSize(long);
property public abstract androidx.compose.ui.graphics.Canvas canvas;
property public abstract long size;
property public abstract androidx.compose.ui.graphics.drawscope.DrawTransform transform;
diff --git a/compose/ui/ui-graphics/api/restricted_current.ignore b/compose/ui/ui-graphics/api/restricted_current.ignore
index 01ec803..9061a73 100644
--- a/compose/ui/ui-graphics/api/restricted_current.ignore
+++ b/compose/ui/ui-graphics/api/restricted_current.ignore
@@ -1,4 +1,72 @@
// Baseline format: 1.0
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setAlpha(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setAlpha
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setAntiAlias(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setAntiAlias
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setBlendMode(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setBlendMode
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setColor(long) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setColor
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setColorFilter(androidx.compose.ui.graphics.ColorFilter) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setColorFilter
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setFilterQuality(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setFilterQuality
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setPathEffect(androidx.compose.ui.graphics.PathEffect) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setPathEffect
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setShader(android.graphics.Shader) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setShader
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setStrokeCap(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setStrokeCap
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setStrokeJoin(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setStrokeJoin
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setStrokeMiterLimit(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setStrokeMiterLimit
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setStrokeWidth(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setStrokeWidth
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPaint#setStyle(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPaint.setStyle
+ParameterNameChange: androidx.compose.ui.graphics.AndroidPath#setFillType(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.AndroidPath.setFillType
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setAlpha(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setAlpha
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setAntiAlias(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setAntiAlias
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setBlendMode(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setBlendMode
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setColor(long) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setColor
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setColorFilter(androidx.compose.ui.graphics.ColorFilter) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setColorFilter
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setFilterQuality(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setFilterQuality
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setPathEffect(androidx.compose.ui.graphics.PathEffect) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setPathEffect
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setShader(android.graphics.Shader) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setShader
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setStrokeCap(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setStrokeCap
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setStrokeJoin(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setStrokeJoin
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setStrokeMiterLimit(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setStrokeMiterLimit
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setStrokeWidth(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setStrokeWidth
+ParameterNameChange: androidx.compose.ui.graphics.Paint#setStyle(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Paint.setStyle
+ParameterNameChange: androidx.compose.ui.graphics.Path#setFillType(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.Path.setFillType
+ParameterNameChange: androidx.compose.ui.graphics.drawscope.CanvasDrawScope.DrawParams#setCanvas(androidx.compose.ui.graphics.Canvas) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.drawscope.CanvasDrawScope.DrawParams.setCanvas
+ParameterNameChange: androidx.compose.ui.graphics.drawscope.CanvasDrawScope.DrawParams#setDensity(androidx.compose.ui.unit.Density) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.drawscope.CanvasDrawScope.DrawParams.setDensity
+ParameterNameChange: androidx.compose.ui.graphics.drawscope.CanvasDrawScope.DrawParams#setLayoutDirection(androidx.compose.ui.unit.LayoutDirection) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.drawscope.CanvasDrawScope.DrawParams.setLayoutDirection
+ParameterNameChange: androidx.compose.ui.graphics.drawscope.CanvasDrawScope.DrawParams#setSize(long) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.drawscope.CanvasDrawScope.DrawParams.setSize
+ParameterNameChange: androidx.compose.ui.graphics.drawscope.DrawContext#setSize(long) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.drawscope.DrawContext.setSize
+
+
RemovedMethod: androidx.compose.ui.graphics.BlendMode#BlendMode():
Removed constructor androidx.compose.ui.graphics.BlendMode()
RemovedMethod: androidx.compose.ui.graphics.ClipOp#ClipOp():
diff --git a/compose/ui/ui-graphics/api/restricted_current.txt b/compose/ui/ui-graphics/api/restricted_current.txt
index a278249..b5cf890 100644
--- a/compose/ui/ui-graphics/api/restricted_current.txt
+++ b/compose/ui/ui-graphics/api/restricted_current.txt
@@ -71,19 +71,19 @@
method public float getStrokeWidth();
method public int getStyle();
method public boolean isAntiAlias();
- method public void setAlpha(float value);
- method public void setAntiAlias(boolean value);
- method public void setBlendMode(int value);
- method public void setColor(long color);
- method public void setColorFilter(androidx.compose.ui.graphics.ColorFilter? value);
- method public void setFilterQuality(int value);
- method public void setPathEffect(androidx.compose.ui.graphics.PathEffect? value);
- method public void setShader(android.graphics.Shader? value);
- method public void setStrokeCap(int value);
- method public void setStrokeJoin(int value);
- method public void setStrokeMiterLimit(float value);
- method public void setStrokeWidth(float value);
- method public void setStyle(int value);
+ method public void setAlpha(float);
+ method public void setAntiAlias(boolean);
+ method public void setBlendMode(int);
+ method public void setColor(long);
+ method public void setColorFilter(androidx.compose.ui.graphics.ColorFilter?);
+ method public void setFilterQuality(int);
+ method public void setPathEffect(androidx.compose.ui.graphics.PathEffect?);
+ method public void setShader(android.graphics.Shader?);
+ method public void setStrokeCap(int);
+ method public void setStrokeJoin(int);
+ method public void setStrokeMiterLimit(float);
+ method public void setStrokeWidth(float);
+ method public void setStyle(int);
property public float alpha;
property public int blendMode;
property public long color;
@@ -128,7 +128,7 @@
method public void relativeMoveTo(float dx, float dy);
method public void relativeQuadraticBezierTo(float dx1, float dy1, float dx2, float dy2);
method public void reset();
- method public void setFillType(int value);
+ method public void setFillType(int);
method public void translate(long offset);
property public int fillType;
property public final android.graphics.Path internalPath;
@@ -592,19 +592,19 @@
method public float getStrokeWidth();
method public int getStyle();
method public boolean isAntiAlias();
- method public void setAlpha(float alpha);
- method public void setAntiAlias(boolean isAntiAlias);
- method public void setBlendMode(int blendMode);
- method public void setColor(long color);
- method public void setColorFilter(androidx.compose.ui.graphics.ColorFilter? colorFilter);
- method public void setFilterQuality(int filterQuality);
- method public void setPathEffect(androidx.compose.ui.graphics.PathEffect? pathEffect);
- method public void setShader(android.graphics.Shader? shader);
- method public void setStrokeCap(int strokeCap);
- method public void setStrokeJoin(int strokeJoin);
- method public void setStrokeMiterLimit(float strokeMiterLimit);
- method public void setStrokeWidth(float strokeWidth);
- method public void setStyle(int style);
+ method public void setAlpha(float);
+ method public void setAntiAlias(boolean);
+ method public void setBlendMode(int);
+ method public void setColor(long);
+ method public void setColorFilter(androidx.compose.ui.graphics.ColorFilter?);
+ method public void setFilterQuality(int);
+ method public void setPathEffect(androidx.compose.ui.graphics.PathEffect?);
+ method public void setShader(android.graphics.Shader?);
+ method public void setStrokeCap(int);
+ method public void setStrokeJoin(int);
+ method public void setStrokeMiterLimit(float);
+ method public void setStrokeWidth(float);
+ method public void setStyle(int);
property public abstract float alpha;
property public abstract int blendMode;
property public abstract long color;
@@ -660,7 +660,7 @@
method public void relativeMoveTo(float dx, float dy);
method public void relativeQuadraticBezierTo(float dx1, float dy1, float dx2, float dy2);
method public void reset();
- method public void setFillType(int fillType);
+ method public void setFillType(int);
method public void translate(long offset);
property public abstract int fillType;
property public abstract boolean isConvex;
@@ -1178,10 +1178,10 @@
method public androidx.compose.ui.unit.LayoutDirection getLayoutDirection();
method public long getSize();
method internal int hashCode();
- method public void setCanvas(androidx.compose.ui.graphics.Canvas canvas);
- method public void setDensity(androidx.compose.ui.unit.Density density);
- method public void setLayoutDirection(androidx.compose.ui.unit.LayoutDirection layoutDirection);
- method public void setSize(long size);
+ method public void setCanvas(androidx.compose.ui.graphics.Canvas);
+ method public void setDensity(androidx.compose.ui.unit.Density);
+ method public void setLayoutDirection(androidx.compose.ui.unit.LayoutDirection);
+ method public void setSize(long);
method internal String toString();
property public final androidx.compose.ui.graphics.Canvas canvas;
property public final androidx.compose.ui.unit.Density density;
@@ -1200,7 +1200,7 @@
method public androidx.compose.ui.graphics.Canvas getCanvas();
method public long getSize();
method public androidx.compose.ui.graphics.drawscope.DrawTransform getTransform();
- method public void setSize(long size);
+ method public void setSize(long);
property public abstract androidx.compose.ui.graphics.Canvas canvas;
property public abstract long size;
property public abstract androidx.compose.ui.graphics.drawscope.DrawTransform transform;
diff --git a/compose/ui/ui-inspection/src/androidTest/java/androidx/compose/ui/inspection/inspector/ParameterFactoryTest.kt b/compose/ui/ui-inspection/src/androidTest/java/androidx/compose/ui/inspection/inspector/ParameterFactoryTest.kt
index 27a6774..c07e136 100644
--- a/compose/ui/ui-inspection/src/androidTest/java/androidx/compose/ui/inspection/inspector/ParameterFactoryTest.kt
+++ b/compose/ui/ui-inspection/src/androidTest/java/androidx/compose/ui/inspection/inspector/ParameterFactoryTest.kt
@@ -889,7 +889,17 @@
parameter("fontSize", ParameterType.String, "Unspecified", index = 5)
parameter("letterSpacing", ParameterType.String, "Unspecified", index = 9)
parameter("lineHeight", ParameterType.String, "Unspecified", index = 10)
- parameter("textDecoration", ParameterType.String, "Underline", index = 15)
+ parameter("paragraphStyle", ParameterType.String, "ParagraphStyle", index = 12) {
+ parameter("lineHeight", ParameterType.String, "Unspecified", index = 0)
+ }
+ parameter("spanStyle", ParameterType.String, "SpanStyle", index = 15) {
+ parameter("background", ParameterType.String, "Unspecified")
+ parameter("color", ParameterType.Color, Color.Red.toArgb(), index = 2)
+ parameter("fontSize", ParameterType.String, "Unspecified", index = 5)
+ parameter("letterSpacing", ParameterType.String, "Unspecified", index = 9)
+ parameter("textDecoration", ParameterType.String, "Underline", index = 13)
+ }
+ parameter("textDecoration", ParameterType.String, "Underline", index = 17)
}
}
}
diff --git a/compose/ui/ui-test-junit4/api/api_lint.ignore b/compose/ui/ui-test-junit4/api/api_lint.ignore
index 54594b1..cb4bc02 100644
--- a/compose/ui/ui-test-junit4/api/api_lint.ignore
+++ b/compose/ui/ui-test-junit4/api/api_lint.ignore
@@ -1,3 +1,9 @@
// Baseline format: 1.0
+InvalidNullability: androidx.compose.ui.test.junit4.AndroidComposeTestRule#apply(org.junit.runners.model.Statement, org.junit.runner.Description) parameter #0:
+ Invalid nullability on parameter `base` in method `apply`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: 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/api/current.ignore b/compose/ui/ui-test-junit4/api/current.ignore
new file mode 100644
index 0000000..48720cb
--- /dev/null
+++ b/compose/ui/ui-test-junit4/api/current.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.compose.ui.test.junit4.AndroidComposeTestRule#awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.test.junit4.AndroidComposeTestRule.awaitIdle
+ParameterNameChange: androidx.compose.ui.test.junit4.ComposeTestRule#awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.test.junit4.ComposeTestRule.awaitIdle
diff --git a/compose/ui/ui-test-junit4/api/current.txt b/compose/ui/ui-test-junit4/api/current.txt
index b89ff81..f4427bd 100644
--- a/compose/ui/ui-test-junit4/api/current.txt
+++ b/compose/ui/ui-test-junit4/api/current.txt
@@ -11,7 +11,7 @@
public final class AndroidComposeTestRule<R extends org.junit.rules.TestRule, A extends androidx.activity.ComponentActivity> implements androidx.compose.ui.test.junit4.ComposeContentTestRule {
ctor public AndroidComposeTestRule(R activityRule, kotlin.jvm.functions.Function1<? super R,? extends A> activityProvider);
method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
- method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public A getActivity();
method public R getActivityRule();
method public androidx.compose.ui.unit.Density getDensity();
@@ -57,7 +57,7 @@
}
public interface ComposeTestRule extends org.junit.rules.TestRule androidx.compose.ui.test.SemanticsNodeInteractionsProvider {
- method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public androidx.compose.ui.unit.Density getDensity();
method public androidx.compose.ui.test.MainTestClock getMainClock();
method public void registerIdlingResource(androidx.compose.ui.test.IdlingResource idlingResource);
diff --git a/compose/ui/ui-test-junit4/api/public_plus_experimental_current.txt b/compose/ui/ui-test-junit4/api/public_plus_experimental_current.txt
index b89ff81..f4427bd 100644
--- a/compose/ui/ui-test-junit4/api/public_plus_experimental_current.txt
+++ b/compose/ui/ui-test-junit4/api/public_plus_experimental_current.txt
@@ -11,7 +11,7 @@
public final class AndroidComposeTestRule<R extends org.junit.rules.TestRule, A extends androidx.activity.ComponentActivity> implements androidx.compose.ui.test.junit4.ComposeContentTestRule {
ctor public AndroidComposeTestRule(R activityRule, kotlin.jvm.functions.Function1<? super R,? extends A> activityProvider);
method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
- method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public A getActivity();
method public R getActivityRule();
method public androidx.compose.ui.unit.Density getDensity();
@@ -57,7 +57,7 @@
}
public interface ComposeTestRule extends org.junit.rules.TestRule androidx.compose.ui.test.SemanticsNodeInteractionsProvider {
- method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public androidx.compose.ui.unit.Density getDensity();
method public androidx.compose.ui.test.MainTestClock getMainClock();
method public void registerIdlingResource(androidx.compose.ui.test.IdlingResource idlingResource);
diff --git a/compose/ui/ui-test-junit4/api/restricted_current.ignore b/compose/ui/ui-test-junit4/api/restricted_current.ignore
new file mode 100644
index 0000000..48720cb
--- /dev/null
+++ b/compose/ui/ui-test-junit4/api/restricted_current.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.compose.ui.test.junit4.AndroidComposeTestRule#awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.test.junit4.AndroidComposeTestRule.awaitIdle
+ParameterNameChange: androidx.compose.ui.test.junit4.ComposeTestRule#awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.test.junit4.ComposeTestRule.awaitIdle
diff --git a/compose/ui/ui-test-junit4/api/restricted_current.txt b/compose/ui/ui-test-junit4/api/restricted_current.txt
index b89ff81..f4427bd 100644
--- a/compose/ui/ui-test-junit4/api/restricted_current.txt
+++ b/compose/ui/ui-test-junit4/api/restricted_current.txt
@@ -11,7 +11,7 @@
public final class AndroidComposeTestRule<R extends org.junit.rules.TestRule, A extends androidx.activity.ComponentActivity> implements androidx.compose.ui.test.junit4.ComposeContentTestRule {
ctor public AndroidComposeTestRule(R activityRule, kotlin.jvm.functions.Function1<? super R,? extends A> activityProvider);
method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
- method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public A getActivity();
method public R getActivityRule();
method public androidx.compose.ui.unit.Density getDensity();
@@ -57,7 +57,7 @@
}
public interface ComposeTestRule extends org.junit.rules.TestRule androidx.compose.ui.test.SemanticsNodeInteractionsProvider {
- method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? awaitIdle(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public androidx.compose.ui.unit.Density getDensity();
method public androidx.compose.ui.test.MainTestClock getMainClock();
method public void registerIdlingResource(androidx.compose.ui.test.IdlingResource idlingResource);
diff --git a/compose/ui/ui-test/api/current.ignore b/compose/ui/ui-test/api/current.ignore
new file mode 100644
index 0000000..f74c6fd
--- /dev/null
+++ b/compose/ui/ui-test/api/current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.compose.ui.test.MainTestClock#setAutoAdvance(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.test.MainTestClock.setAutoAdvance
diff --git a/compose/ui/ui-test/api/current.txt b/compose/ui/ui-test/api/current.txt
index 90fc4c9..0b62099 100644
--- a/compose/ui/ui-test/api/current.txt
+++ b/compose/ui/ui-test/api/current.txt
@@ -244,7 +244,7 @@
method public void advanceTimeUntil(optional long timeoutMillis, kotlin.jvm.functions.Function0<java.lang.Boolean> condition);
method public boolean getAutoAdvance();
method public long getCurrentTime();
- method public void setAutoAdvance(boolean autoAdvance);
+ method public void setAutoAdvance(boolean);
property public abstract boolean autoAdvance;
property public abstract long currentTime;
}
diff --git a/compose/ui/ui-test/api/public_plus_experimental_current.txt b/compose/ui/ui-test/api/public_plus_experimental_current.txt
index da11a6c..88391e3 100644
--- a/compose/ui/ui-test/api/public_plus_experimental_current.txt
+++ b/compose/ui/ui-test/api/public_plus_experimental_current.txt
@@ -257,7 +257,7 @@
method public void advanceTimeUntil(optional long timeoutMillis, kotlin.jvm.functions.Function0<java.lang.Boolean> condition);
method public boolean getAutoAdvance();
method public long getCurrentTime();
- method public void setAutoAdvance(boolean autoAdvance);
+ method public void setAutoAdvance(boolean);
property public abstract boolean autoAdvance;
property public abstract long currentTime;
}
@@ -414,7 +414,7 @@
ctor public TestMonotonicFrameClock(kotlinx.coroutines.CoroutineScope coroutineScope, kotlinx.coroutines.test.TestCoroutineScheduler delayController, optional long frameDelayNanos);
method public long getFrameDelayNanos();
method public boolean getHasAwaiters();
- method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
property public final long frameDelayNanos;
property public final boolean hasAwaiters;
}
diff --git a/compose/ui/ui-test/api/restricted_current.ignore b/compose/ui/ui-test/api/restricted_current.ignore
new file mode 100644
index 0000000..f74c6fd
--- /dev/null
+++ b/compose/ui/ui-test/api/restricted_current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.compose.ui.test.MainTestClock#setAutoAdvance(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.test.MainTestClock.setAutoAdvance
diff --git a/compose/ui/ui-test/api/restricted_current.txt b/compose/ui/ui-test/api/restricted_current.txt
index 1e5b419..bab6121 100644
--- a/compose/ui/ui-test/api/restricted_current.txt
+++ b/compose/ui/ui-test/api/restricted_current.txt
@@ -245,7 +245,7 @@
method public void advanceTimeUntil(optional long timeoutMillis, kotlin.jvm.functions.Function0<java.lang.Boolean> condition);
method public boolean getAutoAdvance();
method public long getCurrentTime();
- method public void setAutoAdvance(boolean autoAdvance);
+ method public void setAutoAdvance(boolean);
property public abstract boolean autoAdvance;
property public abstract long currentTime;
}
diff --git a/compose/ui/ui-text-google-fonts/src/main/java/androidx/compose/ui/text/googlefonts/GoogleFont.kt b/compose/ui/ui-text-google-fonts/src/main/java/androidx/compose/ui/text/googlefonts/GoogleFont.kt
index 3fdda51..37b891f 100644
--- a/compose/ui/ui-text-google-fonts/src/main/java/androidx/compose/ui/text/googlefonts/GoogleFont.kt
+++ b/compose/ui/ui-text-google-fonts/src/main/java/androidx/compose/ui/text/googlefonts/GoogleFont.kt
@@ -197,9 +197,7 @@
override val weight: FontWeight,
override val style: FontStyle,
val bestEffort: Boolean
-) : AndroidFont(FontLoadingStrategy.Async) {
- override val typefaceLoader: TypefaceLoader
- get() = GoogleFontTypefaceLoader
+) : AndroidFont(FontLoadingStrategy.Async, GoogleFontTypefaceLoader) {
fun toFontRequest(): FontRequest {
val query = "name=${name.encode()}&weight=${weight.weight}" +
"&italic=${style.toQueryParam()}&besteffort=${bestEffortQueryParam()}"
diff --git a/compose/ui/ui-text/api/current.txt b/compose/ui/ui-text/api/current.txt
index 9fc7883..7609a75 100644
--- a/compose/ui/ui-text/api/current.txt
+++ b/compose/ui/ui-text/api/current.txt
@@ -86,7 +86,7 @@
public final class MultiParagraph {
ctor public MultiParagraph(androidx.compose.ui.text.MultiParagraphIntrinsics intrinsics, optional int maxLines, optional boolean ellipsis, float width);
ctor @Deprecated public MultiParagraph(androidx.compose.ui.text.AnnotatedString annotatedString, androidx.compose.ui.text.TextStyle style, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.Font.ResourceLoader resourceLoader);
- ctor public MultiParagraph(androidx.compose.ui.text.AnnotatedString annotatedString, androidx.compose.ui.text.TextStyle style, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.FontFamily.Resolver fontFamilyResolver);
+ ctor public MultiParagraph(androidx.compose.ui.text.AnnotatedString annotatedString, androidx.compose.ui.text.TextStyle style, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.FontFamily.Resolver fontFamilyResolver, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis);
method public androidx.compose.ui.text.style.ResolvedTextDirection getBidiRunDirection(int offset);
method public androidx.compose.ui.geometry.Rect getBoundingBox(int offset);
method public androidx.compose.ui.geometry.Rect getCursorRect(int offset);
@@ -208,7 +208,7 @@
public final class ParagraphKt {
method @Deprecated public static androidx.compose.ui.text.Paragraph Paragraph(String text, androidx.compose.ui.text.TextStyle style, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.SpanStyle>> spanStyles, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.Font.ResourceLoader resourceLoader);
- method public static androidx.compose.ui.text.Paragraph Paragraph(String text, androidx.compose.ui.text.TextStyle style, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.SpanStyle>> spanStyles, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.FontFamily.Resolver fontFamilyResolver);
+ method public static androidx.compose.ui.text.Paragraph Paragraph(String text, androidx.compose.ui.text.TextStyle style, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.FontFamily.Resolver fontFamilyResolver, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.SpanStyle>> spanStyles, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis);
method public static androidx.compose.ui.text.Paragraph Paragraph(androidx.compose.ui.text.ParagraphIntrinsics paragraphIntrinsics, optional int maxLines, optional boolean ellipsis, float width);
}
@@ -550,15 +550,15 @@
package androidx.compose.ui.text.font {
public abstract class AndroidFont implements androidx.compose.ui.text.font.Font {
- ctor public AndroidFont(int loadingStrategy);
+ ctor public AndroidFont(int loadingStrategy, androidx.compose.ui.text.font.AndroidFont.TypefaceLoader typefaceLoader);
method public final int getLoadingStrategy();
- method public abstract androidx.compose.ui.text.font.AndroidFont.TypefaceLoader getTypefaceLoader();
+ method public final androidx.compose.ui.text.font.AndroidFont.TypefaceLoader getTypefaceLoader();
property public final int loadingStrategy;
- property public abstract androidx.compose.ui.text.font.AndroidFont.TypefaceLoader typefaceLoader;
+ property public final androidx.compose.ui.text.font.AndroidFont.TypefaceLoader typefaceLoader;
}
public static interface AndroidFont.TypefaceLoader {
- method public suspend Object? awaitLoad(android.content.Context context, androidx.compose.ui.text.font.AndroidFont font, kotlin.coroutines.Continuation<? super android.graphics.Typeface> p);
+ method public suspend Object? awaitLoad(android.content.Context context, androidx.compose.ui.text.font.AndroidFont font, kotlin.coroutines.Continuation<? super android.graphics.Typeface>);
method public android.graphics.Typeface? loadBlocking(android.content.Context context, androidx.compose.ui.text.font.AndroidFont font);
}
@@ -625,7 +625,7 @@
}
public static sealed interface FontFamily.Resolver {
- method public suspend Object? preload(androidx.compose.ui.text.font.FontFamily fontFamily, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? preload(androidx.compose.ui.text.font.FontFamily fontFamily, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public androidx.compose.runtime.State<java.lang.Object> resolve(optional androidx.compose.ui.text.font.FontFamily? fontFamily, optional androidx.compose.ui.text.font.FontWeight fontWeight, optional int fontStyle, optional int fontSynthesis);
}
diff --git a/compose/ui/ui-text/api/public_plus_experimental_current.txt b/compose/ui/ui-text/api/public_plus_experimental_current.txt
index 2e58c88..47d9540 100644
--- a/compose/ui/ui-text/api/public_plus_experimental_current.txt
+++ b/compose/ui/ui-text/api/public_plus_experimental_current.txt
@@ -95,7 +95,7 @@
public final class MultiParagraph {
ctor public MultiParagraph(androidx.compose.ui.text.MultiParagraphIntrinsics intrinsics, optional int maxLines, optional boolean ellipsis, float width);
ctor @Deprecated public MultiParagraph(androidx.compose.ui.text.AnnotatedString annotatedString, androidx.compose.ui.text.TextStyle style, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.Font.ResourceLoader resourceLoader);
- ctor public MultiParagraph(androidx.compose.ui.text.AnnotatedString annotatedString, androidx.compose.ui.text.TextStyle style, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.FontFamily.Resolver fontFamilyResolver);
+ ctor public MultiParagraph(androidx.compose.ui.text.AnnotatedString annotatedString, androidx.compose.ui.text.TextStyle style, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.FontFamily.Resolver fontFamilyResolver, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis);
method public androidx.compose.ui.text.style.ResolvedTextDirection getBidiRunDirection(int offset);
method public androidx.compose.ui.geometry.Rect getBoundingBox(int offset);
method public androidx.compose.ui.geometry.Rect getCursorRect(int offset);
@@ -217,7 +217,7 @@
public final class ParagraphKt {
method @Deprecated public static androidx.compose.ui.text.Paragraph Paragraph(String text, androidx.compose.ui.text.TextStyle style, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.SpanStyle>> spanStyles, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.Font.ResourceLoader resourceLoader);
- method public static androidx.compose.ui.text.Paragraph Paragraph(String text, androidx.compose.ui.text.TextStyle style, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.SpanStyle>> spanStyles, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.FontFamily.Resolver fontFamilyResolver);
+ method public static androidx.compose.ui.text.Paragraph Paragraph(String text, androidx.compose.ui.text.TextStyle style, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.FontFamily.Resolver fontFamilyResolver, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.SpanStyle>> spanStyles, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis);
method public static androidx.compose.ui.text.Paragraph Paragraph(androidx.compose.ui.text.ParagraphIntrinsics paragraphIntrinsics, optional int maxLines, optional boolean ellipsis, float width);
}
@@ -609,15 +609,15 @@
package androidx.compose.ui.text.font {
public abstract class AndroidFont implements androidx.compose.ui.text.font.Font {
- ctor public AndroidFont(int loadingStrategy);
+ ctor public AndroidFont(int loadingStrategy, androidx.compose.ui.text.font.AndroidFont.TypefaceLoader typefaceLoader);
method public final int getLoadingStrategy();
- method public abstract androidx.compose.ui.text.font.AndroidFont.TypefaceLoader getTypefaceLoader();
+ method public final androidx.compose.ui.text.font.AndroidFont.TypefaceLoader getTypefaceLoader();
property public final int loadingStrategy;
- property public abstract androidx.compose.ui.text.font.AndroidFont.TypefaceLoader typefaceLoader;
+ property public final androidx.compose.ui.text.font.AndroidFont.TypefaceLoader typefaceLoader;
}
public static interface AndroidFont.TypefaceLoader {
- method public suspend Object? awaitLoad(android.content.Context context, androidx.compose.ui.text.font.AndroidFont font, kotlin.coroutines.Continuation<? super android.graphics.Typeface> p);
+ method public suspend Object? awaitLoad(android.content.Context context, androidx.compose.ui.text.font.AndroidFont font, kotlin.coroutines.Continuation<? super android.graphics.Typeface>);
method public android.graphics.Typeface? loadBlocking(android.content.Context context, androidx.compose.ui.text.font.AndroidFont font);
}
@@ -698,7 +698,7 @@
}
public static sealed interface FontFamily.Resolver {
- method public suspend Object? preload(androidx.compose.ui.text.font.FontFamily fontFamily, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? preload(androidx.compose.ui.text.font.FontFamily fontFamily, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public androidx.compose.runtime.State<java.lang.Object> resolve(optional androidx.compose.ui.text.font.FontFamily? fontFamily, optional androidx.compose.ui.text.font.FontWeight fontWeight, optional int fontStyle, optional int fontSynthesis);
}
diff --git a/compose/ui/ui-text/api/restricted_current.txt b/compose/ui/ui-text/api/restricted_current.txt
index 9fc7883..7609a75 100644
--- a/compose/ui/ui-text/api/restricted_current.txt
+++ b/compose/ui/ui-text/api/restricted_current.txt
@@ -86,7 +86,7 @@
public final class MultiParagraph {
ctor public MultiParagraph(androidx.compose.ui.text.MultiParagraphIntrinsics intrinsics, optional int maxLines, optional boolean ellipsis, float width);
ctor @Deprecated public MultiParagraph(androidx.compose.ui.text.AnnotatedString annotatedString, androidx.compose.ui.text.TextStyle style, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.Font.ResourceLoader resourceLoader);
- ctor public MultiParagraph(androidx.compose.ui.text.AnnotatedString annotatedString, androidx.compose.ui.text.TextStyle style, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.FontFamily.Resolver fontFamilyResolver);
+ ctor public MultiParagraph(androidx.compose.ui.text.AnnotatedString annotatedString, androidx.compose.ui.text.TextStyle style, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.FontFamily.Resolver fontFamilyResolver, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis);
method public androidx.compose.ui.text.style.ResolvedTextDirection getBidiRunDirection(int offset);
method public androidx.compose.ui.geometry.Rect getBoundingBox(int offset);
method public androidx.compose.ui.geometry.Rect getCursorRect(int offset);
@@ -208,7 +208,7 @@
public final class ParagraphKt {
method @Deprecated public static androidx.compose.ui.text.Paragraph Paragraph(String text, androidx.compose.ui.text.TextStyle style, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.SpanStyle>> spanStyles, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.Font.ResourceLoader resourceLoader);
- method public static androidx.compose.ui.text.Paragraph Paragraph(String text, androidx.compose.ui.text.TextStyle style, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.SpanStyle>> spanStyles, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.FontFamily.Resolver fontFamilyResolver);
+ method public static androidx.compose.ui.text.Paragraph Paragraph(String text, androidx.compose.ui.text.TextStyle style, float width, androidx.compose.ui.unit.Density density, androidx.compose.ui.text.font.FontFamily.Resolver fontFamilyResolver, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.SpanStyle>> spanStyles, optional java.util.List<androidx.compose.ui.text.AnnotatedString.Range<androidx.compose.ui.text.Placeholder>> placeholders, optional int maxLines, optional boolean ellipsis);
method public static androidx.compose.ui.text.Paragraph Paragraph(androidx.compose.ui.text.ParagraphIntrinsics paragraphIntrinsics, optional int maxLines, optional boolean ellipsis, float width);
}
@@ -550,15 +550,15 @@
package androidx.compose.ui.text.font {
public abstract class AndroidFont implements androidx.compose.ui.text.font.Font {
- ctor public AndroidFont(int loadingStrategy);
+ ctor public AndroidFont(int loadingStrategy, androidx.compose.ui.text.font.AndroidFont.TypefaceLoader typefaceLoader);
method public final int getLoadingStrategy();
- method public abstract androidx.compose.ui.text.font.AndroidFont.TypefaceLoader getTypefaceLoader();
+ method public final androidx.compose.ui.text.font.AndroidFont.TypefaceLoader getTypefaceLoader();
property public final int loadingStrategy;
- property public abstract androidx.compose.ui.text.font.AndroidFont.TypefaceLoader typefaceLoader;
+ property public final androidx.compose.ui.text.font.AndroidFont.TypefaceLoader typefaceLoader;
}
public static interface AndroidFont.TypefaceLoader {
- method public suspend Object? awaitLoad(android.content.Context context, androidx.compose.ui.text.font.AndroidFont font, kotlin.coroutines.Continuation<? super android.graphics.Typeface> p);
+ method public suspend Object? awaitLoad(android.content.Context context, androidx.compose.ui.text.font.AndroidFont font, kotlin.coroutines.Continuation<? super android.graphics.Typeface>);
method public android.graphics.Typeface? loadBlocking(android.content.Context context, androidx.compose.ui.text.font.AndroidFont font);
}
@@ -625,7 +625,7 @@
}
public static sealed interface FontFamily.Resolver {
- method public suspend Object? preload(androidx.compose.ui.text.font.FontFamily fontFamily, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? preload(androidx.compose.ui.text.font.FontFamily fontFamily, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public androidx.compose.runtime.State<java.lang.Object> resolve(optional androidx.compose.ui.text.font.FontFamily? fontFamily, optional androidx.compose.ui.text.font.FontWeight fontWeight, optional int fontStyle, optional int fontSynthesis);
}
diff --git a/compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverImplTest.kt b/compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverImplTest.kt
index 4d0fad8..fe25aad 100644
--- a/compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverImplTest.kt
+++ b/compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverImplTest.kt
@@ -468,8 +468,7 @@
}
}
val fontFamily = FontFamily(
- object : AndroidFont(FontLoadingStrategy.Blocking) {
- override val typefaceLoader: TypefaceLoader = unstableLoader
+ object : AndroidFont(FontLoadingStrategy.Blocking, unstableLoader) {
override val weight: FontWeight = FontWeight.Normal
override val style: FontStyle = FontStyle.Normal
}
diff --git a/compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontListFontFamilyTypefaceAdapterTest.kt b/compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontListFontFamilyTypefaceAdapterTest.kt
index 3e69050..761092c 100644
--- a/compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontListFontFamilyTypefaceAdapterTest.kt
+++ b/compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontListFontFamilyTypefaceAdapterTest.kt
@@ -567,8 +567,7 @@
return null
}
}
- val asyncFont = object : AndroidFont(FontLoadingStrategy.Async) {
- override val typefaceLoader: TypefaceLoader = cancellingLoader
+ val asyncFont = object : AndroidFont(FontLoadingStrategy.Async, cancellingLoader) {
override val weight: FontWeight = FontWeight.Normal
override val style: FontStyle = FontStyle.Normal
}
@@ -644,8 +643,7 @@
return Typeface.SERIF
}
}
- val font = object : AndroidFont(FontLoadingStrategy.Async) {
- override val typefaceLoader: TypefaceLoader = typefaceLoader
+ val font = object : AndroidFont(FontLoadingStrategy.Async, typefaceLoader) {
override val weight: FontWeight = FontWeight.W400
override val style: FontStyle = FontStyle.Normal
}
diff --git a/compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/testutils/AsyncTestFonts.kt b/compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/testutils/AsyncTestFonts.kt
index 616831f..c7aea13 100644
--- a/compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/testutils/AsyncTestFonts.kt
+++ b/compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/testutils/AsyncTestFonts.kt
@@ -18,7 +18,6 @@
import android.content.Context
import android.graphics.Typeface
-import androidx.compose.ui.text.ExperimentalTextApi
import androidx.compose.ui.text.font.AndroidFont
import androidx.compose.ui.text.font.Font
import androidx.compose.ui.text.font.FontLoadingStrategy.Companion.Async
@@ -132,39 +131,36 @@
}
}
-@OptIn(ExperimentalTextApi::class)
class AsyncFauxFont(
- override val typefaceLoader: AsyncTestTypefaceLoader,
+ typefaceLoader: AsyncTestTypefaceLoader,
override val weight: FontWeight = FontWeight.Normal,
override val style: FontStyle = FontStyle.Normal,
val name: String = "AsyncFauxFont"
-) : AndroidFont(Async) {
+) : AndroidFont(Async, typefaceLoader) {
override fun toString(): String {
return "$name[$weight, $style]"
}
}
-@OptIn(ExperimentalTextApi::class)
class OptionalFauxFont(
- override val typefaceLoader: AsyncTestTypefaceLoader,
+ typefaceLoader: AsyncTestTypefaceLoader,
internal val typeface: Typeface?,
override val weight: FontWeight = FontWeight.Normal,
override val style: FontStyle = FontStyle.Normal,
val name: String = "OptionalFauxFont"
-) : AndroidFont(OptionalLocal) {
+) : AndroidFont(OptionalLocal, typefaceLoader) {
override fun toString(): String {
return "$name[$weight, $style]"
}
}
-@OptIn(ExperimentalTextApi::class)
class BlockingFauxFont(
- override val typefaceLoader: AsyncTestTypefaceLoader,
+ typefaceLoader: AsyncTestTypefaceLoader,
internal val typeface: Typeface,
override val weight: FontWeight = FontWeight.Normal,
override val style: FontStyle = FontStyle.Normal,
val name: String = "BlockingFauxFont"
-) : AndroidFont(Blocking) {
+) : AndroidFont(Blocking, typefaceLoader) {
override fun toString(): String {
return "$name[$weight, $style]"
}
diff --git a/compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/AndroidFont.kt b/compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/AndroidFont.kt
index 16b12f5..a7dd397 100644
--- a/compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/AndroidFont.kt
+++ b/compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/AndroidFont.kt
@@ -144,19 +144,16 @@
* fun Font(CustomFontDescription(...), FontWeight, FontStyle): Font
*```
*
+ * @param loadingStrategy loadingStrategy this font will provide in fallback chains
+ * @param typefaceLoader a loader that knows how to load this [AndroidFont], may be shared between
+ * several fonts
*/
abstract class AndroidFont @OptIn(ExperimentalTextApi::class) constructor(
- final override val loadingStrategy: FontLoadingStrategy
+ final override val loadingStrategy: FontLoadingStrategy,
+ val typefaceLoader: TypefaceLoader
) : Font {
/**
- * A loader that knows how to load this [AndroidFont].
- *
- * This may be shared between several fonts.
- */
- abstract val typefaceLoader: TypefaceLoader
-
- /**
* Loader for loading an [AndroidFont] and producing an [android.graphics.Typeface].
*
* This interface is not intended to be used by application developers for text display. To load
@@ -198,17 +195,12 @@
* to throw. Note that this method will never be called for fonts with
* [FontLoadingStrategy.Async].
*
- * This method may throw a [RuntimeException] if the font fails to load, though it is
- * preferred to return null if the font is [FontLoadingStrategy.OptionalLocal] for
- * performance.
- *
* It is possible for [loadBlocking] to be called for the same instance of [AndroidFont] in
* parallel. Implementations should support parallel concurrent loads, or de-dup.
*
* @param context current Android context for loading the font
* @param font the font to load which contains this loader as [AndroidFont.typefaceLoader]
* @return [android.graphics.Typeface] for loaded font, or null if the font fails to load
- * @throws RuntimeException subclass may optionally be thrown if the font fails to load
*/
fun loadBlocking(context: Context, font: AndroidFont): Typeface?
@@ -235,16 +227,17 @@
* @param context current Android context for loading the font
* @param font the font to load which contains this loader as [AndroidFont.typefaceLoader]
* @return [android.graphics.Typeface] for loaded font, or null if not available
- * @throws RuntimeException subclass may optionally be thrown if the font fails to load
*
*/
suspend fun awaitLoad(context: Context, font: AndroidFont): Typeface?
}
}
-internal abstract class AndroidPreloadedFont : AndroidFont(Blocking) {
+internal abstract class AndroidPreloadedFont : AndroidFont(
+ Blocking,
+ AndroidPreloadedFontTypefaceLoader
+) {
abstract val typefaceInternal: Typeface?
- override val typefaceLoader: TypefaceLoader = AndroidPreloadedFontTypefaceLoader
abstract val cacheKey: String?
}
diff --git a/compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/DeviceFontFamilyNameFont.kt b/compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/DeviceFontFamilyNameFont.kt
index 31dc85e..0ac895b 100644
--- a/compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/DeviceFontFamilyNameFont.kt
+++ b/compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/DeviceFontFamilyNameFont.kt
@@ -76,8 +76,7 @@
private val familyName: DeviceFontFamilyName,
override val weight: FontWeight,
override val style: FontStyle
-) : AndroidFont(FontLoadingStrategy.OptionalLocal) {
- override val typefaceLoader: TypefaceLoader = NamedFontLoader
+) : AndroidFont(FontLoadingStrategy.OptionalLocal, NamedFontLoader) {
val resolvedTypeface: Typeface? = lookupFont(familyName.name, weight, style)
diff --git a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/MultiParagraph.kt b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/MultiParagraph.kt
index 8f7fd26..47f3237 100644
--- a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/MultiParagraph.kt
+++ b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/MultiParagraph.kt
@@ -101,15 +101,15 @@
*
* @param annotatedString the text to be laid out
* @param style the [TextStyle] to be applied to the whole text
+ * @param width how wide the text is allowed to be
+ * @param density density of the device
+ * @param fontFamilyResolver to be used to load the font given in [SpanStyle]s
* @param placeholders a list of [Placeholder]s that specify ranges of text which will be
* skipped during layout and replaced with [Placeholder]. It's required that the range of each
* [Placeholder] doesn't cross paragraph boundary, otherwise [IllegalArgumentException] is
* thrown.
* @param maxLines the maximum number of lines that the text can have
* @param ellipsis whether to ellipsize text, applied only when [maxLines] is set
- * @param width how wide the text is allowed to be
- * @param density density of the device
- * @param fontFamilyResolver to be used to load the font given in [SpanStyle]s
*
* @see Placeholder
* @throws IllegalArgumentException if [ParagraphStyle.textDirection] is not set, or
@@ -118,12 +118,12 @@
constructor(
annotatedString: AnnotatedString,
style: TextStyle,
- placeholders: List<AnnotatedString.Range<Placeholder>> = listOf(),
- maxLines: Int = Int.MAX_VALUE,
- ellipsis: Boolean = false,
width: Float,
density: Density,
- fontFamilyResolver: FontFamily.Resolver
+ fontFamilyResolver: FontFamily.Resolver,
+ placeholders: List<AnnotatedString.Range<Placeholder>> = listOf(),
+ maxLines: Int = Int.MAX_VALUE,
+ ellipsis: Boolean = false
) : this(
intrinsics = MultiParagraphIntrinsics(
annotatedString = annotatedString,
diff --git a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Paragraph.kt b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Paragraph.kt
index 58dc8ae..8075225 100644
--- a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Paragraph.kt
+++ b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Paragraph.kt
@@ -296,27 +296,27 @@
*
* @param text the text to be laid out
* @param style the [TextStyle] to be applied to the whole text
+ * @param width how wide the text is allowed to be
+ * @param density density of the device
+ * @param fontFamilyResolver [FontFamily.Resolver] to be used to load the font given in [SpanStyle]s
* @param spanStyles [SpanStyle]s to be applied to parts of text
* @param placeholders a list of placeholder metrics which tells [Paragraph] where should
* be left blank to leave space for inline elements.
* @param maxLines the maximum number of lines that the text can have
* @param ellipsis whether to ellipsize text, applied only when [maxLines] is set
- * @param width how wide the text is allowed to be
- * @param density density of the device
- * @param fontFamilyResolver [FontFamily.Resolver] to be used to load the font given in [SpanStyle]s
*
* @throws IllegalArgumentException if [ParagraphStyle.textDirection] is not set
*/
fun Paragraph(
text: String,
style: TextStyle,
+ width: Float,
+ density: Density,
+ fontFamilyResolver: FontFamily.Resolver,
spanStyles: List<AnnotatedString.Range<SpanStyle>> = listOf(),
placeholders: List<AnnotatedString.Range<Placeholder>> = listOf(),
maxLines: Int = DefaultMaxLines,
- ellipsis: Boolean = false,
- width: Float,
- density: Density,
- fontFamilyResolver: FontFamily.Resolver
+ ellipsis: Boolean = false
): Paragraph = ActualParagraph(
text,
style,
diff --git a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/ParagraphStyle.kt b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/ParagraphStyle.kt
index 896f35c..93005b5 100644
--- a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/ParagraphStyle.kt
+++ b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/ParagraphStyle.kt
@@ -22,9 +22,12 @@
import androidx.compose.ui.text.style.TextDirection
import androidx.compose.ui.text.style.TextIndent
import androidx.compose.ui.text.style.lerp
+import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.TextUnit
import androidx.compose.ui.unit.isUnspecified
+private val DefaultLineHeight = TextUnit.Unspecified
+
/**
* Paragraph styling configuration for a paragraph. The difference between [SpanStyle] and
* `ParagraphStyle` is that, `ParagraphStyle` can be applied to a whole [Paragraph] while
@@ -38,8 +41,8 @@
* @param textAlign The alignment of the text within the lines of the paragraph.
* @param textDirection The algorithm to be used to resolve the final text direction:
* Left To Right or Right To Left.
- * @param textIndent The indentation of the paragraph.
* @param lineHeight Line height for the [Paragraph] in [TextUnit] unit, e.g. SP or EM.
+ * @param textIndent The indentation of the paragraph.
* @param platformStyle Platform specific [ParagraphStyle] parameters.
*
* @see Paragraph
@@ -57,6 +60,27 @@
@get:ExperimentalTextApi val platformStyle: PlatformParagraphStyle? = null
) {
+ /**
+ * Paragraph styling configuration for a paragraph. The difference between [SpanStyle] and
+ * `ParagraphStyle` is that, `ParagraphStyle` can be applied to a whole [Paragraph] while
+ * [SpanStyle] can be applied at the character level.
+ * Once a portion of the text is marked with a `ParagraphStyle`, that portion will be separated from
+ * the remaining as if a line feed character was added.
+ *
+ * @sample androidx.compose.ui.text.samples.ParagraphStyleSample
+ * @sample androidx.compose.ui.text.samples.ParagraphStyleAnnotatedStringsSample
+ *
+ * @param textAlign The alignment of the text within the lines of the paragraph.
+ * @param textDirection The algorithm to be used to resolve the final text direction:
+ * Left To Right or Right To Left.
+ * @param lineHeight Line height for the [Paragraph] in [TextUnit] unit, e.g. SP or EM.
+ * @param textIndent The indentation of the paragraph.
+ *
+ * @see Paragraph
+ * @see AnnotatedString
+ * @see SpanStyle
+ * @see TextStyle
+ */
@OptIn(ExperimentalTextApi::class)
constructor(
textAlign: TextAlign? = null,
@@ -227,4 +251,16 @@
val startNonNull = start ?: PlatformParagraphStyle.Default
val stopNonNull = stop ?: PlatformParagraphStyle.Default
return startNonNull.lerp(stopNonNull, fraction)
-}
\ No newline at end of file
+}
+
+@OptIn(ExperimentalTextApi::class)
+internal fun resolveParagraphStyleDefaults(
+ style: ParagraphStyle,
+ direction: LayoutDirection
+) = ParagraphStyle(
+ textAlign = style.textAlign ?: TextAlign.Start,
+ textDirection = resolveTextDirection(direction, style.textDirection),
+ lineHeight = if (style.lineHeight.isUnspecified) DefaultLineHeight else style.lineHeight,
+ textIndent = style.textIndent ?: TextIndent.None,
+ platformStyle = style.platformStyle
+)
diff --git a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/SpanStyle.kt b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/SpanStyle.kt
index a516e13..095bf2d 100644
--- a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/SpanStyle.kt
+++ b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/SpanStyle.kt
@@ -35,6 +35,15 @@
import androidx.compose.ui.unit.TextUnit
import androidx.compose.ui.unit.isUnspecified
import androidx.compose.ui.unit.lerp
+import androidx.compose.ui.unit.sp
+
+/** The default font size if none is specified. */
+private val DefaultFontSize = 14.sp
+private val DefaultLetterSpacing = 0.sp
+private val DefaultBackgroundColor = Color.Transparent
+// TODO(nona): Introduce TextUnit.Original for representing "do not change the original result".
+// Need to distinguish from Inherit.
+private val DefaultColor = Color.Black
/**
* Styling configuration for a text span. This configuration only allows character level styling,
@@ -51,7 +60,7 @@
* @param fontWeight The typeface thickness to use when painting the text (e.g., bold).
* @param fontStyle The typeface variant to use when drawing the letters (e.g., italic).
* @param fontSynthesis Whether to synthesize font weight and/or style when the requested weight or
- * style cannot be found in the provided custom font family.
+ * style cannot be found in the provided font family.
* @param fontFamily The font family to be used when rendering the text.
* @param fontFeatureSettings The advanced typography settings provided by font. The format is the
* same as the CSS font-feature-settings attribute:
@@ -89,6 +98,38 @@
@get:ExperimentalTextApi val platformStyle: PlatformSpanStyle? = null
) {
+ /**
+ * Styling configuration for a text span. This configuration only allows character level styling,
+ * in order to set paragraph level styling such as line height, or text alignment please see
+ * [ParagraphStyle].
+ *
+ * @sample androidx.compose.ui.text.samples.SpanStyleSample
+ *
+ * @sample androidx.compose.ui.text.samples.AnnotatedStringBuilderSample
+ *
+ * @param color The text color.
+ * @param fontSize The size of glyphs (in logical pixels) to use when painting the text. This
+ * may be [TextUnit.Unspecified] for inheriting from another [SpanStyle].
+ * @param fontWeight The typeface thickness to use when painting the text (e.g., bold).
+ * @param fontStyle The typeface variant to use when drawing the letters (e.g., italic).
+ * @param fontSynthesis Whether to synthesize font weight and/or style when the requested weight
+ * or style cannot be found in the provided font family.
+ * @param fontFamily The font family to be used when rendering the text.
+ * @param fontFeatureSettings The advanced typography settings provided by font. The format is
+ * the same as the CSS font-feature-settings attribute:
+ * https://www.w3.org/TR/css-fonts-3/#font-feature-settings-prop
+ * @param letterSpacing The amount of space (in em) to add between each letter.
+ * @param baselineShift The amount by which the text is shifted up from the current baseline.
+ * @param textGeometricTransform The geometric transformation applied the text.
+ * @param localeList The locale list used to select region-specific glyphs.
+ * @param background The background color for the text.
+ * @param textDecoration The decorations to paint on the text (e.g., an underline).
+ * @param shadow The shadow effect applied on the text.
+ *
+ * @see AnnotatedString
+ * @see TextStyle
+ * @see ParagraphStyle
+ */
@OptIn(ExperimentalTextApi::class)
constructor(
color: Color = Color.Unspecified,
@@ -416,3 +457,26 @@
val stopNonNull = stop ?: PlatformSpanStyle.Default
return startNonNull.lerp(stopNonNull, fraction)
}
+
+@OptIn(ExperimentalTextApi::class)
+internal fun resolveSpanStyleDefaults(style: SpanStyle) = SpanStyle(
+ color = style.color.takeOrElse { DefaultColor },
+ fontSize = if (style.fontSize.isUnspecified) DefaultFontSize else style.fontSize,
+ fontWeight = style.fontWeight ?: FontWeight.Normal,
+ fontStyle = style.fontStyle ?: FontStyle.Normal,
+ fontSynthesis = style.fontSynthesis ?: FontSynthesis.All,
+ fontFamily = style.fontFamily ?: FontFamily.Default,
+ fontFeatureSettings = style.fontFeatureSettings ?: "",
+ letterSpacing = if (style.letterSpacing.isUnspecified) {
+ DefaultLetterSpacing
+ } else {
+ style.letterSpacing
+ },
+ baselineShift = style.baselineShift ?: BaselineShift.None,
+ textGeometricTransform = style.textGeometricTransform ?: TextGeometricTransform.None,
+ localeList = style.localeList ?: LocaleList.current,
+ background = style.background.takeOrElse { DefaultBackgroundColor },
+ textDecoration = style.textDecoration ?: TextDecoration.None,
+ shadow = style.shadow ?: Shadow.None,
+ platformStyle = style.platformStyle
+)
\ No newline at end of file
diff --git a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/TextStyle.kt b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/TextStyle.kt
index 071dd58..a1bb217 100644
--- a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/TextStyle.kt
+++ b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/TextStyle.kt
@@ -20,7 +20,6 @@
import androidx.compose.runtime.Stable
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shadow
-import androidx.compose.ui.graphics.takeOrElse
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontSynthesis
@@ -34,84 +33,151 @@
import androidx.compose.ui.text.style.TextIndent
import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.TextUnit
-import androidx.compose.ui.unit.isUnspecified
-import androidx.compose.ui.unit.sp
-
-/** The default font size if none is specified. */
-private val DefaultFontSize = 14.sp
-private val DefaultLetterSpacing = 0.sp
-private val DefaultBackgroundColor = Color.Transparent
-
-// TODO(nona): Introduce TextUnit.Original for representing "do not change the original result".
-// Need to distinguish from Inherit.
-private val DefaultLineHeight = TextUnit.Unspecified
-private val DefaultColor = Color.Black
/**
* Styling configuration for a `Text`.
*
* @sample androidx.compose.ui.text.samples.TextStyleSample
*
- * @param color The text color.
- * @param fontSize The size of glyphs to use when painting the text. This
- * may be [TextUnit.Unspecified] for inheriting from another [TextStyle].
- * @param fontWeight The typeface thickness to use when painting the text (e.g., bold).
- * @param fontStyle The typeface variant to use when drawing the letters (e.g., italic).
- * @param fontSynthesis Whether to synthesize font weight and/or style when the requested weight or
- * style cannot be found in the provided custom font family.
- * @param fontFamily The font family to be used when rendering the text.
- * @param fontFeatureSettings The advanced typography settings provided by font. The format is the
- * same as the CSS font-feature-settings attribute:
- * https://www.w3.org/TR/css-fonts-3/#font-feature-settings-prop
- * @param letterSpacing The amount of space to add between each letter.
- * @param baselineShift The amount by which the text is shifted up from the current baseline.
- * @param textGeometricTransform The geometric transformation applied the text.
- * @param localeList The locale list used to select region-specific glyphs.
- * @param background The background color for the text.
- * @param textDecoration The decorations to paint on the text (e.g., an underline).
- * @param shadow The shadow effect applied on the text.
- * @param textAlign The alignment of the text within the lines of the paragraph.
- * @param textDirection The algorithm to be used to resolve the final text and paragraph
- * direction: Left To Right or Right To Left. If no value is provided the system will use the
- * [LayoutDirection] as the primary signal.
- * @param textIndent The indentation of the paragraph.
- * @param lineHeight Line height for the [Paragraph] in [TextUnit] unit, e.g. SP or EM.
* @param platformStyle Platform specific [TextStyle] parameters.
*
* @see AnnotatedString
* @see SpanStyle
* @see ParagraphStyle
*/
-// NOTE(text-perf-review): I suggest we implement this class as
-// class TextStyle(val spanStyle: SpanStyle, val paragraphStyle: ParagraphStyle)
-// This would allow for more efficient merge implementations where we don't have to reallocate
-// each of the parts, and we always end up calling toSpanStyle() and toParagraphStyle() anyway.
-// This would also result in a slightly better equals implementation when we are comparing things
-// with shared parts (ie, "Structural sharing")
@Immutable
-class TextStyle @ExperimentalTextApi constructor(
- val color: Color = Color.Unspecified,
- val fontSize: TextUnit = TextUnit.Unspecified,
- val fontWeight: FontWeight? = null,
- val fontStyle: FontStyle? = null,
- val fontSynthesis: FontSynthesis? = null,
- val fontFamily: FontFamily? = null,
- val fontFeatureSettings: String? = null,
- val letterSpacing: TextUnit = TextUnit.Unspecified,
- val baselineShift: BaselineShift? = null,
- val textGeometricTransform: TextGeometricTransform? = null,
- val localeList: LocaleList? = null,
- val background: Color = Color.Unspecified,
- val textDecoration: TextDecoration? = null,
- val shadow: Shadow? = null,
- val textAlign: TextAlign? = null,
- val textDirection: TextDirection? = null,
- val lineHeight: TextUnit = TextUnit.Unspecified,
- val textIndent: TextIndent? = null,
+class TextStyle
+@OptIn(ExperimentalTextApi::class)
+internal constructor(
+ internal val spanStyle: SpanStyle,
+ internal val paragraphStyle: ParagraphStyle,
@Suppress("EXPERIMENTAL_ANNOTATION_ON_WRONG_TARGET")
@get:ExperimentalTextApi val platformStyle: PlatformTextStyle? = null
) {
@OptIn(ExperimentalTextApi::class)
+ internal constructor(
+ spanStyle: SpanStyle,
+ paragraphStyle: ParagraphStyle,
+ ) : this(
+ spanStyle = spanStyle,
+ paragraphStyle = paragraphStyle,
+ platformStyle = createPlatformTextStyleInternal(
+ spanStyle.platformStyle,
+ paragraphStyle.platformStyle
+ )
+ )
+
+ /**
+ * Styling configuration for a `Text`.
+ *
+ * @sample androidx.compose.ui.text.samples.TextStyleSample
+ *
+ * @param color The text color.
+ * @param fontSize The size of glyphs to use when painting the text. This
+ * may be [TextUnit.Unspecified] for inheriting from another [TextStyle].
+ * @param fontWeight The typeface thickness to use when painting the text (e.g., bold).
+ * @param fontStyle The typeface variant to use when drawing the letters (e.g., italic).
+ * @param fontSynthesis Whether to synthesize font weight and/or style when the requested weight
+ * or style cannot be found in the provided font family.
+ * @param fontFamily The font family to be used when rendering the text.
+ * @param fontFeatureSettings The advanced typography settings provided by font. The format is
+ * the same as the CSS font-feature-settings attribute:
+ * https://www.w3.org/TR/css-fonts-3/#font-feature-settings-prop
+ * @param letterSpacing The amount of space to add between each letter.
+ * @param baselineShift The amount by which the text is shifted up from the current baseline.
+ * @param textGeometricTransform The geometric transformation applied the text.
+ * @param localeList The locale list used to select region-specific glyphs.
+ * @param background The background color for the text.
+ * @param textDecoration The decorations to paint on the text (e.g., an underline).
+ * @param shadow The shadow effect applied on the text.
+ * @param textAlign The alignment of the text within the lines of the paragraph.
+ * @param textDirection The algorithm to be used to resolve the final text and paragraph
+ * direction: Left To Right or Right To Left. If no value is provided the system will use the
+ * [LayoutDirection] as the primary signal.
+ * @param lineHeight Line height for the [Paragraph] in [TextUnit] unit, e.g. SP or EM.
+ * @param textIndent The indentation of the paragraph.
+ * @param platformStyle Platform specific [TextStyle] parameters.
+ */
+ @ExperimentalTextApi
+ constructor(
+ color: Color = Color.Unspecified,
+ fontSize: TextUnit = TextUnit.Unspecified,
+ fontWeight: FontWeight? = null,
+ fontStyle: FontStyle? = null,
+ fontSynthesis: FontSynthesis? = null,
+ fontFamily: FontFamily? = null,
+ fontFeatureSettings: String? = null,
+ letterSpacing: TextUnit = TextUnit.Unspecified,
+ baselineShift: BaselineShift? = null,
+ textGeometricTransform: TextGeometricTransform? = null,
+ localeList: LocaleList? = null,
+ background: Color = Color.Unspecified,
+ textDecoration: TextDecoration? = null,
+ shadow: Shadow? = null,
+ textAlign: TextAlign? = null,
+ textDirection: TextDirection? = null,
+ lineHeight: TextUnit = TextUnit.Unspecified,
+ textIndent: TextIndent? = null,
+ platformStyle: PlatformTextStyle? = null
+ ) : this(
+ SpanStyle(
+ color = color,
+ fontSize = fontSize,
+ fontWeight = fontWeight,
+ fontStyle = fontStyle,
+ fontSynthesis = fontSynthesis,
+ fontFamily = fontFamily,
+ fontFeatureSettings = fontFeatureSettings,
+ letterSpacing = letterSpacing,
+ baselineShift = baselineShift,
+ textGeometricTransform = textGeometricTransform,
+ localeList = localeList,
+ background = background,
+ textDecoration = textDecoration,
+ shadow = shadow,
+ platformStyle = platformStyle?.spanStyle
+ ),
+ ParagraphStyle(
+ textAlign = textAlign,
+ textDirection = textDirection,
+ lineHeight = lineHeight,
+ textIndent = textIndent,
+ platformStyle = platformStyle?.paragraphStyle
+ ),
+ platformStyle = platformStyle
+ )
+
+ /**
+ * Styling configuration for a `Text`.
+ *
+ * @sample androidx.compose.ui.text.samples.TextStyleSample
+ *
+ * @param color The text color.
+ * @param fontSize The size of glyphs to use when painting the text. This
+ * may be [TextUnit.Unspecified] for inheriting from another [TextStyle].
+ * @param fontWeight The typeface thickness to use when painting the text (e.g., bold).
+ * @param fontStyle The typeface variant to use when drawing the letters (e.g., italic).
+ * @param fontSynthesis Whether to synthesize font weight and/or style when the requested weight
+ * or style cannot be found in the provided font family.
+ * @param fontFamily The font family to be used when rendering the text.
+ * @param fontFeatureSettings The advanced typography settings provided by font. The format is
+ * the same as the CSS font-feature-settings attribute:
+ * https://www.w3.org/TR/css-fonts-3/#font-feature-settings-prop
+ * @param letterSpacing The amount of space to add between each letter.
+ * @param baselineShift The amount by which the text is shifted up from the current baseline.
+ * @param textGeometricTransform The geometric transformation applied the text.
+ * @param localeList The locale list used to select region-specific glyphs.
+ * @param background The background color for the text.
+ * @param textDecoration The decorations to paint on the text (e.g., an underline).
+ * @param shadow The shadow effect applied on the text.
+ * @param textAlign The alignment of the text within the lines of the paragraph.
+ * @param textDirection The algorithm to be used to resolve the final text and paragraph
+ * direction: Left To Right or Right To Left. If no value is provided the system will use the
+ * [LayoutDirection] as the primary signal.
+ * @param lineHeight Line height for the [Paragraph] in [TextUnit] unit, e.g. SP or EM.
+ * @param textIndent The indentation of the paragraph.
+ */
+ @OptIn(ExperimentalTextApi::class)
constructor(
color: Color = Color.Unspecified,
fontSize: TextUnit = TextUnit.Unspecified,
@@ -153,70 +219,11 @@
platformStyle = null
)
- @OptIn(ExperimentalTextApi::class)
- internal constructor(spanStyle: SpanStyle, paragraphStyle: ParagraphStyle) : this(
- color = spanStyle.color,
- fontSize = spanStyle.fontSize,
- fontWeight = spanStyle.fontWeight,
- fontStyle = spanStyle.fontStyle,
- fontSynthesis = spanStyle.fontSynthesis,
- fontFamily = spanStyle.fontFamily,
- fontFeatureSettings = spanStyle.fontFeatureSettings,
- letterSpacing = spanStyle.letterSpacing,
- baselineShift = spanStyle.baselineShift,
- textGeometricTransform = spanStyle.textGeometricTransform,
- localeList = spanStyle.localeList,
- background = spanStyle.background,
- textDecoration = spanStyle.textDecoration,
- shadow = spanStyle.shadow,
- textAlign = paragraphStyle.textAlign,
- textDirection = paragraphStyle.textDirection,
- lineHeight = paragraphStyle.lineHeight,
- textIndent = paragraphStyle.textIndent,
- platformStyle = createPlatformTextStyleInternal(
- spanStyle.platformStyle,
- paragraphStyle.platformStyle
- )
- )
-
- init {
- if (!lineHeight.isUnspecified) {
- // Since we are checking if it's negative, no need to convert Sp into Px at this point.
- check(lineHeight.value >= 0f) {
- "lineHeight can't be negative (${lineHeight.value})"
- }
- }
- }
-
- @OptIn(ExperimentalTextApi::class)
@Stable
- fun toSpanStyle(): SpanStyle = SpanStyle(
- color = color,
- fontSize = fontSize,
- fontWeight = fontWeight,
- fontStyle = fontStyle,
- fontSynthesis = fontSynthesis,
- fontFamily = fontFamily,
- fontFeatureSettings = fontFeatureSettings,
- letterSpacing = letterSpacing,
- baselineShift = baselineShift,
- textGeometricTransform = textGeometricTransform,
- localeList = localeList,
- background = background,
- textDecoration = textDecoration,
- shadow = shadow,
- platformStyle = platformStyle?.spanStyle
- )
+ fun toSpanStyle(): SpanStyle = spanStyle
- @OptIn(ExperimentalTextApi::class)
@Stable
- fun toParagraphStyle(): ParagraphStyle = ParagraphStyle(
- textAlign = textAlign,
- textDirection = textDirection,
- lineHeight = lineHeight,
- textIndent = textIndent,
- platformStyle = platformStyle?.paragraphStyle
- )
+ fun toParagraphStyle(): ParagraphStyle = paragraphStyle
/**
* Returns a new text style that is a combination of this style and the given [other] style.
@@ -282,24 +289,24 @@
@OptIn(ExperimentalTextApi::class)
fun copy(
- color: Color = this.color,
- fontSize: TextUnit = this.fontSize,
- fontWeight: FontWeight? = this.fontWeight,
- fontStyle: FontStyle? = this.fontStyle,
- fontSynthesis: FontSynthesis? = this.fontSynthesis,
- fontFamily: FontFamily? = this.fontFamily,
- fontFeatureSettings: String? = this.fontFeatureSettings,
- letterSpacing: TextUnit = this.letterSpacing,
- baselineShift: BaselineShift? = this.baselineShift,
- textGeometricTransform: TextGeometricTransform? = this.textGeometricTransform,
- localeList: LocaleList? = this.localeList,
- background: Color = this.background,
- textDecoration: TextDecoration? = this.textDecoration,
- shadow: Shadow? = this.shadow,
- textAlign: TextAlign? = this.textAlign,
- textDirection: TextDirection? = this.textDirection,
- lineHeight: TextUnit = this.lineHeight,
- textIndent: TextIndent? = this.textIndent
+ color: Color = this.spanStyle.color,
+ fontSize: TextUnit = this.spanStyle.fontSize,
+ fontWeight: FontWeight? = this.spanStyle.fontWeight,
+ fontStyle: FontStyle? = this.spanStyle.fontStyle,
+ fontSynthesis: FontSynthesis? = this.spanStyle.fontSynthesis,
+ fontFamily: FontFamily? = this.spanStyle.fontFamily,
+ fontFeatureSettings: String? = this.spanStyle.fontFeatureSettings,
+ letterSpacing: TextUnit = this.spanStyle.letterSpacing,
+ baselineShift: BaselineShift? = this.spanStyle.baselineShift,
+ textGeometricTransform: TextGeometricTransform? = this.spanStyle.textGeometricTransform,
+ localeList: LocaleList? = this.spanStyle.localeList,
+ background: Color = this.spanStyle.background,
+ textDecoration: TextDecoration? = this.spanStyle.textDecoration,
+ shadow: Shadow? = this.spanStyle.shadow,
+ textAlign: TextAlign? = this.paragraphStyle.textAlign,
+ textDirection: TextDirection? = this.paragraphStyle.textDirection,
+ lineHeight: TextUnit = this.paragraphStyle.lineHeight,
+ textIndent: TextIndent? = this.paragraphStyle.textIndent
): TextStyle {
return TextStyle(
color = color,
@@ -326,24 +333,24 @@
@ExperimentalTextApi
fun copy(
- color: Color = this.color,
- fontSize: TextUnit = this.fontSize,
- fontWeight: FontWeight? = this.fontWeight,
- fontStyle: FontStyle? = this.fontStyle,
- fontSynthesis: FontSynthesis? = this.fontSynthesis,
- fontFamily: FontFamily? = this.fontFamily,
- fontFeatureSettings: String? = this.fontFeatureSettings,
- letterSpacing: TextUnit = this.letterSpacing,
- baselineShift: BaselineShift? = this.baselineShift,
- textGeometricTransform: TextGeometricTransform? = this.textGeometricTransform,
- localeList: LocaleList? = this.localeList,
- background: Color = this.background,
- textDecoration: TextDecoration? = this.textDecoration,
- shadow: Shadow? = this.shadow,
- textAlign: TextAlign? = this.textAlign,
- textDirection: TextDirection? = this.textDirection,
- lineHeight: TextUnit = this.lineHeight,
- textIndent: TextIndent? = this.textIndent,
+ color: Color = this.spanStyle.color,
+ fontSize: TextUnit = this.spanStyle.fontSize,
+ fontWeight: FontWeight? = this.spanStyle.fontWeight,
+ fontStyle: FontStyle? = this.spanStyle.fontStyle,
+ fontSynthesis: FontSynthesis? = this.spanStyle.fontSynthesis,
+ fontFamily: FontFamily? = this.spanStyle.fontFamily,
+ fontFeatureSettings: String? = this.spanStyle.fontFeatureSettings,
+ letterSpacing: TextUnit = this.spanStyle.letterSpacing,
+ baselineShift: BaselineShift? = this.spanStyle.baselineShift,
+ textGeometricTransform: TextGeometricTransform? = this.spanStyle.textGeometricTransform,
+ localeList: LocaleList? = this.spanStyle.localeList,
+ background: Color = this.spanStyle.background,
+ textDecoration: TextDecoration? = this.spanStyle.textDecoration,
+ shadow: Shadow? = this.spanStyle.shadow,
+ textAlign: TextAlign? = this.paragraphStyle.textAlign,
+ textDirection: TextDirection? = this.paragraphStyle.textDirection,
+ lineHeight: TextUnit = this.paragraphStyle.lineHeight,
+ textIndent: TextIndent? = this.paragraphStyle.textIndent,
platformStyle: PlatformTextStyle? = this.platformStyle
): TextStyle {
return TextStyle(
@@ -369,29 +376,110 @@
)
}
+ /**
+ * The text color.
+ */
+ val color: Color get() = this.spanStyle.color
+
+ /**
+ * The size of glyphs to use when painting the text. This
+ * may be [TextUnit.Unspecified] for inheriting from another [TextStyle].
+ */
+ val fontSize: TextUnit get() = this.spanStyle.fontSize
+
+ /**
+ * The typeface thickness to use when painting the text (e.g., bold).
+ */
+ val fontWeight: FontWeight? get() = this.spanStyle.fontWeight
+
+ /**
+ * The typeface variant to use when drawing the letters (e.g., italic).
+ */
+ val fontStyle: FontStyle? get() = this.spanStyle.fontStyle
+
+ /**
+ * Whether to synthesize font weight and/or style when the requested weight or
+ * style cannot be found in the provided font family.
+ */
+ val fontSynthesis: FontSynthesis? get() = this.spanStyle.fontSynthesis
+
+ /**
+ * The font family to be used when rendering the text.
+ */
+ val fontFamily: FontFamily? get() = this.spanStyle.fontFamily
+
+ /**
+ * The advanced typography settings provided by font. The format is the
+ * same as the CSS font-feature-settings attribute:
+ * https://www.w3.org/TR/css-fonts-3/#font-feature-settings-prop
+ */
+ val fontFeatureSettings: String? get() = this.spanStyle.fontFeatureSettings
+
+ /**
+ * The amount of space to add between each letter.
+ */
+ val letterSpacing: TextUnit get() = this.spanStyle.letterSpacing
+
+ /**
+ * The amount by which the text is shifted up from the current baseline.
+ */
+ val baselineShift: BaselineShift? get() = this.spanStyle.baselineShift
+
+ /**
+ * The geometric transformation applied the text.
+ */
+ val textGeometricTransform: TextGeometricTransform? get() =
+ this.spanStyle.textGeometricTransform
+
+ /**
+ * The locale list used to select region-specific glyphs.
+ */
+ val localeList: LocaleList? get() = this.spanStyle.localeList
+
+ /**
+ * The background color for the text.
+ */
+ val background: Color get() = this.spanStyle.background
+
+ /**
+ * The decorations to paint on the text (e.g., an underline).
+ */
+ val textDecoration: TextDecoration? get() = this.spanStyle.textDecoration
+
+ /**
+ * The shadow effect applied on the text.
+ */
+ val shadow: Shadow? get() = this.spanStyle.shadow
+
+ /**
+ * The alignment of the text within the lines of the paragraph.
+ */
+ val textAlign: TextAlign? get() = this.paragraphStyle.textAlign
+
+ /**
+ * The algorithm to be used to resolve the final text and paragraph
+ * direction: Left To Right or Right To Left. If no value is provided the system will use the
+ * [LayoutDirection] as the primary signal.
+ */
+ val textDirection: TextDirection? get() = this.paragraphStyle.textDirection
+
+ /**
+ * Line height for the [Paragraph] in [TextUnit] unit, e.g. SP or EM.
+ */
+ val lineHeight: TextUnit get() = this.paragraphStyle.lineHeight
+
+ /**
+ * The indentation of the paragraph.
+ */
+ val textIndent: TextIndent? get() = this.paragraphStyle.textIndent
+
@OptIn(ExperimentalTextApi::class)
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other !is TextStyle) return false
- if (color != other.color) return false
- if (fontSize != other.fontSize) return false
- if (fontWeight != other.fontWeight) return false
- if (fontStyle != other.fontStyle) return false
- if (fontSynthesis != other.fontSynthesis) return false
- if (fontFamily != other.fontFamily) return false
- if (fontFeatureSettings != other.fontFeatureSettings) return false
- if (letterSpacing != other.letterSpacing) return false
- if (baselineShift != other.baselineShift) return false
- if (textGeometricTransform != other.textGeometricTransform) return false
- if (localeList != other.localeList) return false
- if (background != other.background) return false
- if (textDecoration != other.textDecoration) return false
- if (shadow != other.shadow) return false
- if (textAlign != other.textAlign) return false
- if (textDirection != other.textDirection) return false
- if (lineHeight != other.lineHeight) return false
- if (textIndent != other.textIndent) return false
+ if (spanStyle != other.spanStyle) return false
+ if (paragraphStyle != other.paragraphStyle) return false
if (platformStyle != other.platformStyle) return false
return true
@@ -399,24 +487,8 @@
@OptIn(ExperimentalTextApi::class)
override fun hashCode(): Int {
- var result = color.hashCode()
- result = 31 * result + fontSize.hashCode()
- result = 31 * result + (fontWeight?.hashCode() ?: 0)
- result = 31 * result + (fontStyle?.hashCode() ?: 0)
- result = 31 * result + (fontSynthesis?.hashCode() ?: 0)
- result = 31 * result + (fontFamily?.hashCode() ?: 0)
- result = 31 * result + (fontFeatureSettings?.hashCode() ?: 0)
- result = 31 * result + letterSpacing.hashCode()
- result = 31 * result + (baselineShift?.hashCode() ?: 0)
- result = 31 * result + (textGeometricTransform?.hashCode() ?: 0)
- result = 31 * result + (localeList?.hashCode() ?: 0)
- result = 31 * result + background.hashCode()
- result = 31 * result + (textDecoration?.hashCode() ?: 0)
- result = 31 * result + (shadow?.hashCode() ?: 0)
- result = 31 * result + (textAlign?.hashCode() ?: 0)
- result = 31 * result + (textDirection?.hashCode() ?: 0)
- result = 31 * result + lineHeight.hashCode()
- result = 31 * result + (textIndent?.hashCode() ?: 0)
+ var result = spanStyle.hashCode()
+ result = 31 * result + paragraphStyle.hashCode()
result = 31 * result + (platformStyle?.hashCode() ?: 0)
return result
}
@@ -484,28 +556,8 @@
*/
@OptIn(ExperimentalTextApi::class)
fun resolveDefaults(style: TextStyle, direction: LayoutDirection) = TextStyle(
- color = style.color.takeOrElse { DefaultColor },
- fontSize = if (style.fontSize.isUnspecified) DefaultFontSize else style.fontSize,
- fontWeight = style.fontWeight ?: FontWeight.Normal,
- fontStyle = style.fontStyle ?: FontStyle.Normal,
- fontSynthesis = style.fontSynthesis ?: FontSynthesis.All,
- fontFamily = style.fontFamily ?: FontFamily.Default,
- fontFeatureSettings = style.fontFeatureSettings ?: "",
- letterSpacing = if (style.letterSpacing.isUnspecified) {
- DefaultLetterSpacing
- } else {
- style.letterSpacing
- },
- baselineShift = style.baselineShift ?: BaselineShift.None,
- textGeometricTransform = style.textGeometricTransform ?: TextGeometricTransform.None,
- localeList = style.localeList ?: LocaleList.current,
- background = style.background.takeOrElse { DefaultBackgroundColor },
- textDecoration = style.textDecoration ?: TextDecoration.None,
- shadow = style.shadow ?: Shadow.None,
- textAlign = style.textAlign ?: TextAlign.Start,
- textDirection = resolveTextDirection(direction, style.textDirection),
- lineHeight = if (style.lineHeight.isUnspecified) DefaultLineHeight else style.lineHeight,
- textIndent = style.textIndent ?: TextIndent.None,
+ spanStyle = resolveSpanStyleDefaults(style.spanStyle),
+ paragraphStyle = resolveParagraphStyleDefaults(style.paragraphStyle, direction),
platformStyle = style.platformStyle
)
diff --git a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamily.kt b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamily.kt
index 3011228..a061646 100644
--- a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamily.kt
+++ b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamily.kt
@@ -80,7 +80,7 @@
* Platform specific [FontFamily] will resolve according to platform behavior, as documented
* for each [FontFamily].
*
- * @param fontFamily family to resolve
+ * @param fontFamily family to resolve. If `null` will use [FontFamily.Default]
* @param fontWeight desired font weight
* @param fontStyle desired font style
* @param fontSynthesis configuration for font synthesis
diff --git a/compose/ui/ui-text/src/test/java/androidx/compose/ui/text/TextSpanParagraphStyleTest.kt b/compose/ui/ui-text/src/test/java/androidx/compose/ui/text/TextSpanParagraphStyleTest.kt
index 0244e40..78a0d34 100644
--- a/compose/ui/ui-text/src/test/java/androidx/compose/ui/text/TextSpanParagraphStyleTest.kt
+++ b/compose/ui/ui-text/src/test/java/androidx/compose/ui/text/TextSpanParagraphStyleTest.kt
@@ -17,59 +17,112 @@
package androidx.compose.ui.text
import com.google.common.truth.Truth.assertThat
+import com.google.common.truth.Truth.assert_
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
import kotlin.reflect.KClass
+import kotlin.reflect.KFunction
import kotlin.reflect.KParameter
+import kotlin.reflect.KProperty1
import kotlin.reflect.KType
+import kotlin.reflect.full.memberProperties
import kotlin.reflect.full.primaryConstructor
@RunWith(JUnit4::class)
class TextSpanParagraphStyleTest {
@Test
- fun spanStyle_is_covered_by_TextStyle() {
+ fun spanStyle_constructor_is_covered_by_TextStyle() {
val spanStyleParameters = constructorParams(SpanStyle::class)
- val textStyleParameters = constructorParams(TextStyle::class)
- // for every SpanStyle parameter, expecting that parameter to be in TextStyle
- // this guards that if a parameter is added to SpanStyle, it should be added
- // to TextStyle
- assertThat(textStyleParameters).containsAtLeastElementsIn(spanStyleParameters)
+ for (constructor in TextStyle::class.constructors) {
+ val textStyleParameters = constructorParams(constructor)
+ // for every SpanStyle parameter, expecting that parameter to be in TextStyle
+ // this guards that if a parameter is added to SpanStyle, it should be added
+ // to TextStyle
+ if (textStyleParameters.containsAll(spanStyleParameters)) return
+ }
+
+ assert_().fail()
+ }
+
+ @Test
+ fun spanStyle_properties_is_covered_by_TextStyle() {
+ val spanStyleProperties = memberProperties(SpanStyle::class)
+ val textStyleProperties = memberProperties(TextStyle::class)
+ assertThat(textStyleProperties).containsAtLeastElementsIn(spanStyleProperties)
}
@Test
fun paragraphStyle_is_covered_by_TextStyle() {
val paragraphStyleParameters = constructorParams(ParagraphStyle::class)
- val textStyleParameters = constructorParams(TextStyle::class)
- // for every ParagraphStyle parameter, expecting that parameter to be in TextStyle
- // this guards that if a parameter is added to ParagraphStyle, it should be added
- // to TextStyle
- assertThat(textStyleParameters).containsAtLeastElementsIn(paragraphStyleParameters)
+ for (constructor in TextStyle::class.constructors) {
+ val textStyleParameters = constructorParams(constructor)
+ // for every ParagraphStyle parameter, expecting that parameter to be in TextStyle
+ // this guards that if a parameter is added to ParagraphStyle, it should be added
+ // to TextStyle
+ if (textStyleParameters.containsAll(paragraphStyleParameters)) return
+ }
+
+ assert_().fail()
+ }
+
+ @Test
+ fun paragraphStyle_properties_is_covered_by_TextStyle() {
+ val paragraphStyleProperties = memberProperties(ParagraphStyle::class)
+ val textStyleProperties = memberProperties(TextStyle::class)
+ assertThat(textStyleProperties).containsAtLeastElementsIn(paragraphStyleProperties)
}
@Test
fun textStyle_covered_by_ParagraphStyle_and_SpanStyle() {
val spanStyleParameters = constructorParams(SpanStyle::class)
val paragraphStyleParameters = constructorParams(ParagraphStyle::class)
- val textStyleParameters = constructorParams(TextStyle::class)
+ val allParameters = spanStyleParameters + paragraphStyleParameters
- // for every TextStyle parameter, expecting that parameter to be in either ParagraphStyle
- // or SpanStyle
- // this guards that if a parameter is added to TextStyle, it should be added
- // to one of SpanStyle or ParagraphStyle
- assertThat(spanStyleParameters + paragraphStyleParameters).containsAtLeastElementsIn(
- textStyleParameters
- )
+ for (constructor in TextStyle::class.constructors) {
+ val textStyleParameters = constructorParams(constructor)
+ // for every TextStyle parameter, expecting that parameter to be in either ParagraphStyle
+ // or SpanStyle
+ // this guards that if a parameter is added to TextStyle, it should be added
+ // to one of SpanStyle or ParagraphStyle
+ if (allParameters.containsAll(textStyleParameters) &&
+ textStyleParameters.containsAll(allParameters)
+ ) return
+ }
+
+ assert_().fail()
+ }
+
+ @Test
+ fun testStyle_properties_is_covered_by_ParagraphStyle_and_SpanStyle() {
+ val spanStyleProperties = memberProperties(SpanStyle::class)
+ val paragraphStyleProperties = memberProperties(ParagraphStyle::class)
+ val allProperties = spanStyleProperties + paragraphStyleProperties
+ val textStyleProperties = memberProperties(TextStyle::class).filter {
+ it.name != "spanStyle" && it.name != "paragraphStyle"
+ }
+ assertThat(allProperties).containsAtLeastElementsIn(textStyleProperties)
}
private fun <T : Any> constructorParams(clazz: KClass<T>): List<Parameter> {
- return clazz.primaryConstructor?.parameters?.map { Parameter(it) }?.filter {
+ return clazz.primaryConstructor?.let { constructorParams(it) } ?: listOf()
+ }
+
+ private fun <T : Any> constructorParams(constructor: KFunction<T>): List<Parameter> {
+ return constructor.parameters.map { Parameter(it) }.filter {
// types of platformStyle is different for each of TextStyle/ParagraphStyle/SpanStyle
"platformStyle" != it.name
- } ?: listOf()
+ }
+ }
+
+ private fun <T : Any> memberProperties(clazz: KClass<T>): Collection<Property> {
+ return clazz.memberProperties.map { Property(it) }.filter {
+ // types of platformStyle is different for each of TextStyle/ParagraphStyle/SpanStyle
+ "platformStyle" != it.name
+ }
}
private data class Parameter(
@@ -87,4 +140,11 @@
parameter.kind
)
}
+
+ private data class Property(
+ val name: String?,
+ val type: KType
+ ) {
+ constructor(parameter: KProperty1<*, *>) : this(parameter.name, parameter.returnType)
+ }
}
diff --git a/compose/ui/ui/api/current.ignore b/compose/ui/ui/api/current.ignore
index e77ec14..c7c1c73 100644
--- a/compose/ui/ui/api/current.ignore
+++ b/compose/ui/ui/api/current.ignore
@@ -7,6 +7,140 @@
Attempted to remove @NonNull annotation from method androidx.compose.ui.input.pointer.PointerInputChange.copy(long,long,long,boolean,long,long,boolean,androidx.compose.ui.input.pointer.ConsumedData,int)
+ParameterNameChange: androidx.compose.ui.focus.FocusOrder#setDown(androidx.compose.ui.focus.FocusRequester) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.focus.FocusOrder.setDown
+ParameterNameChange: androidx.compose.ui.focus.FocusOrder#setEnd(androidx.compose.ui.focus.FocusRequester) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.focus.FocusOrder.setEnd
+ParameterNameChange: androidx.compose.ui.focus.FocusOrder#setLeft(androidx.compose.ui.focus.FocusRequester) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.focus.FocusOrder.setLeft
+ParameterNameChange: androidx.compose.ui.focus.FocusOrder#setNext(androidx.compose.ui.focus.FocusRequester) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.focus.FocusOrder.setNext
+ParameterNameChange: androidx.compose.ui.focus.FocusOrder#setPrevious(androidx.compose.ui.focus.FocusRequester) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.focus.FocusOrder.setPrevious
+ParameterNameChange: androidx.compose.ui.focus.FocusOrder#setRight(androidx.compose.ui.focus.FocusRequester) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.focus.FocusOrder.setRight
+ParameterNameChange: androidx.compose.ui.focus.FocusOrder#setStart(androidx.compose.ui.focus.FocusRequester) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.focus.FocusOrder.setStart
+ParameterNameChange: androidx.compose.ui.focus.FocusOrder#setUp(androidx.compose.ui.focus.FocusRequester) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.focus.FocusOrder.setUp
+ParameterNameChange: androidx.compose.ui.focus.FocusProperties#setCanFocus(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.focus.FocusProperties.setCanFocus
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setAlpha(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setAlpha
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setCameraDistance(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setCameraDistance
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setClip(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setClip
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setRenderEffect(androidx.compose.ui.graphics.RenderEffect) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setRenderEffect
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setRotationX(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setRotationX
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setRotationY(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setRotationY
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setRotationZ(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setRotationZ
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setScaleX(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setScaleX
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setScaleY(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setScaleY
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setShadowElevation(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setShadowElevation
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setShape(androidx.compose.ui.graphics.Shape) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setShape
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setTransformOrigin(long) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setTransformOrigin
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setTranslationX(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setTranslationX
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setTranslationY(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setTranslationY
+ParameterNameChange: androidx.compose.ui.input.nestedscroll.NestedScrollConnection#onPostFling(long, long, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.ui.input.nestedscroll.NestedScrollConnection.onPostFling
+ParameterNameChange: androidx.compose.ui.input.nestedscroll.NestedScrollConnection#onPreFling(long, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.input.nestedscroll.NestedScrollConnection.onPreFling
+ParameterNameChange: androidx.compose.ui.input.nestedscroll.NestedScrollDispatcher#dispatchPostFling(long, long, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.ui.input.nestedscroll.NestedScrollDispatcher.dispatchPostFling
+ParameterNameChange: androidx.compose.ui.input.nestedscroll.NestedScrollDispatcher#dispatchPreFling(long, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.input.nestedscroll.NestedScrollDispatcher.dispatchPreFling
+ParameterNameChange: androidx.compose.ui.input.pointer.AwaitPointerEventScope#awaitPointerEvent(androidx.compose.ui.input.pointer.PointerEventPass, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerEvent>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.input.pointer.AwaitPointerEventScope.awaitPointerEvent
+ParameterNameChange: androidx.compose.ui.input.pointer.AwaitPointerEventScope#withTimeout(long, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.ui.input.pointer.AwaitPointerEventScope.withTimeout
+ParameterNameChange: androidx.compose.ui.input.pointer.AwaitPointerEventScope#withTimeoutOrNull(long, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.ui.input.pointer.AwaitPointerEventScope.withTimeoutOrNull
+ParameterNameChange: androidx.compose.ui.input.pointer.ConsumedData#setDownChange(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.input.pointer.ConsumedData.setDownChange
+ParameterNameChange: androidx.compose.ui.input.pointer.ConsumedData#setPositionChange(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.input.pointer.ConsumedData.setPositionChange
+ParameterNameChange: androidx.compose.ui.input.pointer.PointerInputScope#awaitPointerEventScope(kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super R>,?>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.input.pointer.PointerInputScope.awaitPointerEventScope
+ParameterNameChange: androidx.compose.ui.input.pointer.PointerInputScope#setInterceptOutOfBoundsChildEvents(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.input.pointer.PointerInputScope.setInterceptOutOfBoundsChildEvents
+ParameterNameChange: androidx.compose.ui.layout.Placeable#setMeasuredSize(long) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.layout.Placeable.setMeasuredSize
+ParameterNameChange: androidx.compose.ui.layout.Placeable#setMeasurementConstraints(long) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.layout.Placeable.setMeasurementConstraints
+ParameterNameChange: androidx.compose.ui.node.Ref#setValue(T) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.node.Ref.setValue
+ParameterNameChange: androidx.compose.ui.platform.AbstractComposeView#setShowLayoutBounds(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.platform.AbstractComposeView.setShowLayoutBounds
+ParameterNameChange: androidx.compose.ui.platform.AndroidUiFrameClock#withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.platform.AndroidUiFrameClock.withFrameNanos
+ParameterNameChange: androidx.compose.ui.platform.InfiniteAnimationPolicy#onInfiniteOperation(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.platform.InfiniteAnimationPolicy.onInfiniteOperation
+ParameterNameChange: androidx.compose.ui.platform.InspectableValueKt#setDebugInspectorInfoEnabled(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.platform.InspectableValueKt.setDebugInspectorInfoEnabled
+ParameterNameChange: androidx.compose.ui.platform.InspectorInfo#setName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.platform.InspectorInfo.setName
+ParameterNameChange: androidx.compose.ui.platform.InspectorInfo#setValue(Object) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.platform.InspectorInfo.setValue
+ParameterNameChange: androidx.compose.ui.platform.ViewRootForTest.Companion#setOnViewCreatedCallback(kotlin.jvm.functions.Function1<? super androidx.compose.ui.platform.ViewRootForTest,kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.platform.ViewRootForTest.Companion.setOnViewCreatedCallback
+ParameterNameChange: androidx.compose.ui.platform.WindowRecomposer_androidKt#setCompositionContext(android.view.View, androidx.compose.runtime.CompositionContext) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.platform.WindowRecomposer_androidKt.setCompositionContext
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsConfiguration#setClearingSemantics(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.semantics.SemanticsConfiguration.setClearingSemantics
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsConfiguration#setMergingSemanticsOfDescendants(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.semantics.SemanticsConfiguration.setMergingSemanticsOfDescendants
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setCollectionInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.CollectionInfo) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setCollectionInfo
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setCollectionItemInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.CollectionItemInfo) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setCollectionItemInfo
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setContentDescription(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setContentDescription
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setCustomActions(androidx.compose.ui.semantics.SemanticsPropertyReceiver, java.util.List<androidx.compose.ui.semantics.CustomAccessibilityAction>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setCustomActions
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setEditableText(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.text.AnnotatedString) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setEditableText
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setFocused(androidx.compose.ui.semantics.SemanticsPropertyReceiver, boolean) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setFocused
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setHorizontalScrollAxisRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ScrollAxisRange) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setHorizontalScrollAxisRange
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setImeAction(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setImeAction
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setLiveRegion(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setLiveRegion
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setPaneTitle(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setPaneTitle
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setProgressBarRangeInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ProgressBarRangeInfo) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setProgressBarRangeInfo
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setRole(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setRole
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setSelected(androidx.compose.ui.semantics.SemanticsPropertyReceiver, boolean) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setSelected
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setStateDescription(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setStateDescription
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setTestTag(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setTestTag
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setText(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.text.AnnotatedString) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setText
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setTextSelectionRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, long) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setTextSelectionRange
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setToggleableState(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.state.ToggleableState) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setToggleableState
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setVerticalScrollAxisRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ScrollAxisRange) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setVerticalScrollAxisRange
+
+
RemovedClass: androidx.compose.ui.focus.FocusNodeUtilsKt:
Removed class androidx.compose.ui.focus.FocusNodeUtilsKt
RemovedClass: androidx.compose.ui.input.nestedscroll.NestedScrollDelegatingWrapperKt:
diff --git a/compose/ui/ui/api/current.txt b/compose/ui/ui/api/current.txt
index f4d18ea..5108de4 100644
--- a/compose/ui/ui/api/current.txt
+++ b/compose/ui/ui/api/current.txt
@@ -321,14 +321,14 @@
method @Deprecated public androidx.compose.ui.focus.FocusRequester getRight();
method @Deprecated public androidx.compose.ui.focus.FocusRequester getStart();
method @Deprecated public androidx.compose.ui.focus.FocusRequester getUp();
- method @Deprecated public void setDown(androidx.compose.ui.focus.FocusRequester down);
- method @Deprecated public void setEnd(androidx.compose.ui.focus.FocusRequester end);
- method @Deprecated public void setLeft(androidx.compose.ui.focus.FocusRequester left);
- method @Deprecated public void setNext(androidx.compose.ui.focus.FocusRequester next);
- method @Deprecated public void setPrevious(androidx.compose.ui.focus.FocusRequester previous);
- method @Deprecated public void setRight(androidx.compose.ui.focus.FocusRequester right);
- method @Deprecated public void setStart(androidx.compose.ui.focus.FocusRequester start);
- method @Deprecated public void setUp(androidx.compose.ui.focus.FocusRequester up);
+ method @Deprecated public void setDown(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setEnd(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setLeft(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setNext(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setPrevious(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setRight(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setStart(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setUp(androidx.compose.ui.focus.FocusRequester);
property public final androidx.compose.ui.focus.FocusRequester down;
property public final androidx.compose.ui.focus.FocusRequester end;
property public final androidx.compose.ui.focus.FocusRequester left;
@@ -359,15 +359,15 @@
method public default androidx.compose.ui.focus.FocusRequester getRight();
method public default androidx.compose.ui.focus.FocusRequester getStart();
method public default androidx.compose.ui.focus.FocusRequester getUp();
- method public void setCanFocus(boolean canFocus);
- method public default void setDown(androidx.compose.ui.focus.FocusRequester _);
- method public default void setEnd(androidx.compose.ui.focus.FocusRequester _);
- method public default void setLeft(androidx.compose.ui.focus.FocusRequester _);
- method public default void setNext(androidx.compose.ui.focus.FocusRequester _);
- method public default void setPrevious(androidx.compose.ui.focus.FocusRequester _);
- method public default void setRight(androidx.compose.ui.focus.FocusRequester _);
- method public default void setStart(androidx.compose.ui.focus.FocusRequester _);
- method public default void setUp(androidx.compose.ui.focus.FocusRequester _);
+ method public void setCanFocus(boolean);
+ method public default void setDown(androidx.compose.ui.focus.FocusRequester);
+ method public default void setEnd(androidx.compose.ui.focus.FocusRequester);
+ method public default void setLeft(androidx.compose.ui.focus.FocusRequester);
+ method public default void setNext(androidx.compose.ui.focus.FocusRequester);
+ method public default void setPrevious(androidx.compose.ui.focus.FocusRequester);
+ method public default void setRight(androidx.compose.ui.focus.FocusRequester);
+ method public default void setStart(androidx.compose.ui.focus.FocusRequester);
+ method public default void setUp(androidx.compose.ui.focus.FocusRequester);
property public abstract boolean canFocus;
property public default androidx.compose.ui.focus.FocusRequester down;
property public default androidx.compose.ui.focus.FocusRequester end;
@@ -458,22 +458,22 @@
method public long getTransformOrigin();
method public float getTranslationX();
method public float getTranslationY();
- method public void setAlpha(float alpha);
- method public default void setAmbientShadowColor(long ambientShadowColor);
- method public void setCameraDistance(float cameraDistance);
- method public void setClip(boolean clip);
- method public default void setRenderEffect(androidx.compose.ui.graphics.RenderEffect? _);
- method public void setRotationX(float rotationX);
- method public void setRotationY(float rotationY);
- method public void setRotationZ(float rotationZ);
- method public void setScaleX(float scaleX);
- method public void setScaleY(float scaleY);
- method public void setShadowElevation(float shadowElevation);
- method public void setShape(androidx.compose.ui.graphics.Shape shape);
- method public default void setSpotShadowColor(long spotShadowColor);
- method public void setTransformOrigin(long transformOrigin);
- method public void setTranslationX(float translationX);
- method public void setTranslationY(float translationY);
+ method public void setAlpha(float);
+ method public default void setAmbientShadowColor(long);
+ method public void setCameraDistance(float);
+ method public void setClip(boolean);
+ method public default void setRenderEffect(androidx.compose.ui.graphics.RenderEffect?);
+ method public void setRotationX(float);
+ method public void setRotationY(float);
+ method public void setRotationZ(float);
+ method public void setScaleX(float);
+ method public void setScaleY(float);
+ method public void setShadowElevation(float);
+ method public void setShape(androidx.compose.ui.graphics.Shape);
+ method public default void setSpotShadowColor(long);
+ method public void setTransformOrigin(long);
+ method public void setTranslationX(float);
+ method public void setTranslationY(float);
property public abstract float alpha;
property public default long ambientShadowColor;
property public abstract float cameraDistance;
@@ -1439,17 +1439,17 @@
package androidx.compose.ui.input.nestedscroll {
public interface NestedScrollConnection {
- method public default suspend Object? onPostFling(long consumed, long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity> p);
+ method public default suspend Object? onPostFling(long consumed, long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>);
method public default long onPostScroll(long consumed, long available, int source);
- method public default suspend Object? onPreFling(long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity> p);
+ method public default suspend Object? onPreFling(long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>);
method public default long onPreScroll(long available, int source);
}
public final class NestedScrollDispatcher {
ctor public NestedScrollDispatcher();
- method public suspend Object? dispatchPostFling(long consumed, long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity> p);
+ method public suspend Object? dispatchPostFling(long consumed, long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>);
method public long dispatchPostScroll(long consumed, long available, int source);
- method public suspend Object? dispatchPreFling(long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity> p);
+ method public suspend Object? dispatchPreFling(long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>);
method public long dispatchPreScroll(long available, int source);
method public kotlinx.coroutines.CoroutineScope getCoroutineScope();
property public final kotlinx.coroutines.CoroutineScope coroutineScope;
@@ -1480,13 +1480,13 @@
package androidx.compose.ui.input.pointer {
@kotlin.coroutines.RestrictsSuspension public interface AwaitPointerEventScope extends androidx.compose.ui.unit.Density {
- method public suspend Object? awaitPointerEvent(optional androidx.compose.ui.input.pointer.PointerEventPass pass, optional kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerEvent> p);
+ method public suspend Object? awaitPointerEvent(optional androidx.compose.ui.input.pointer.PointerEventPass pass, optional kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerEvent>);
method public androidx.compose.ui.input.pointer.PointerEvent getCurrentEvent();
method public default long getExtendedTouchPadding();
method public long getSize();
method public androidx.compose.ui.platform.ViewConfiguration getViewConfiguration();
- method public default suspend <T> Object? withTimeout(long timeMillis, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public default suspend <T> Object? withTimeoutOrNull(long timeMillis, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
+ method public default suspend <T> Object? withTimeout(long timeMillis, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public default suspend <T> Object? withTimeoutOrNull(long timeMillis, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
property public abstract androidx.compose.ui.input.pointer.PointerEvent currentEvent;
property public default long extendedTouchPadding;
property public abstract long size;
@@ -1497,8 +1497,8 @@
ctor public ConsumedData(optional boolean positionChange, optional boolean downChange);
method public boolean getDownChange();
method public boolean getPositionChange();
- method public void setDownChange(boolean downChange);
- method public void setPositionChange(boolean positionChange);
+ method public void setDownChange(boolean);
+ method public void setPositionChange(boolean);
property public final boolean downChange;
property public final boolean positionChange;
}
@@ -1659,12 +1659,12 @@
}
public interface PointerInputScope extends androidx.compose.ui.unit.Density {
- method public suspend <R> Object? awaitPointerEventScope(kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? awaitPointerEventScope(kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
method public default long getExtendedTouchPadding();
method public default boolean getInterceptOutOfBoundsChildEvents();
method public long getSize();
method public androidx.compose.ui.platform.ViewConfiguration getViewConfiguration();
- method public default void setInterceptOutOfBoundsChildEvents(boolean _);
+ method public default void setInterceptOutOfBoundsChildEvents(boolean);
property public default long extendedTouchPadding;
property public default boolean interceptOutOfBoundsChildEvents;
property public abstract long size;
@@ -2004,8 +2004,8 @@
method protected final long getMeasurementConstraints();
method public final int getWidth();
method protected abstract void placeAt(long position, float zIndex, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.GraphicsLayerScope,kotlin.Unit>? layerBlock);
- method protected final void setMeasuredSize(long value);
- method protected final void setMeasurementConstraints(long value);
+ method protected final void setMeasuredSize(long);
+ method protected final void setMeasurementConstraints(long);
property protected final long apparentToRealOffset;
property public final int height;
property public int measuredHeight;
@@ -2162,7 +2162,7 @@
public final class Ref<T> {
ctor public Ref();
method public T? getValue();
- method public void setValue(T? value);
+ method public void setValue(T?);
property public final T? value;
}
@@ -2196,7 +2196,7 @@
method protected final void onLayout(boolean changed, int left, int top, int right, int bottom);
method protected final void onMeasure(int widthMeasureSpec, int heightMeasureSpec);
method public final void setParentCompositionContext(androidx.compose.runtime.CompositionContext? parent);
- method public final void setShowLayoutBounds(boolean value);
+ method public final void setShowLayoutBounds(boolean);
method public final void setViewCompositionStrategy(androidx.compose.ui.platform.ViewCompositionStrategy strategy);
property public final boolean hasComposition;
property protected boolean shouldCreateCompositionOnAttachedToWindow;
@@ -2251,7 +2251,7 @@
public final class AndroidUiFrameClock implements androidx.compose.runtime.MonotonicFrameClock {
ctor public AndroidUiFrameClock(android.view.Choreographer choreographer);
method public android.view.Choreographer getChoreographer();
- method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
property public final android.view.Choreographer choreographer;
}
@@ -2323,7 +2323,7 @@
public interface InfiniteAnimationPolicy extends kotlin.coroutines.CoroutineContext.Element {
method public default kotlin.coroutines.CoroutineContext.Key<?> getKey();
- method public suspend <R> Object? onInfiniteOperation(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? onInfiniteOperation(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
property public default kotlin.coroutines.CoroutineContext.Key<?> key;
field public static final androidx.compose.ui.platform.InfiniteAnimationPolicy.Key Key;
}
@@ -2355,7 +2355,7 @@
method public static kotlin.jvm.functions.Function1<androidx.compose.ui.platform.InspectorInfo,kotlin.Unit> getNoInspectorInfo();
method public static inline androidx.compose.ui.Modifier inspectable(androidx.compose.ui.Modifier, kotlin.jvm.functions.Function1<? super androidx.compose.ui.platform.InspectorInfo,kotlin.Unit> inspectorInfo, kotlin.jvm.functions.Function1<? super androidx.compose.ui.Modifier,? extends androidx.compose.ui.Modifier> factory);
method public static boolean isDebugInspectorInfoEnabled();
- method public static void setDebugInspectorInfoEnabled(boolean isDebugInspectorInfoEnabled);
+ method public static void setDebugInspectorInfoEnabled(boolean);
property public static final kotlin.jvm.functions.Function1<androidx.compose.ui.platform.InspectorInfo,kotlin.Unit> NoInspectorInfo;
property public static final boolean isDebugInspectorInfoEnabled;
}
@@ -2370,8 +2370,8 @@
method public String? getName();
method public androidx.compose.ui.platform.ValueElementSequence getProperties();
method public Object? getValue();
- method public void setName(String? name);
- method public void setValue(Object? value);
+ method public void setName(String?);
+ method public void setValue(Object?);
property public final String? name;
property public final androidx.compose.ui.platform.ValueElementSequence properties;
property public final Object? value;
@@ -2500,7 +2500,7 @@
public static final class ViewRootForTest.Companion {
method public kotlin.jvm.functions.Function1<androidx.compose.ui.platform.ViewRootForTest,kotlin.Unit>? getOnViewCreatedCallback();
- method public void setOnViewCreatedCallback(kotlin.jvm.functions.Function1<? super androidx.compose.ui.platform.ViewRootForTest,kotlin.Unit>? onViewCreatedCallback);
+ method public void setOnViewCreatedCallback(kotlin.jvm.functions.Function1<? super androidx.compose.ui.platform.ViewRootForTest,kotlin.Unit>?);
property public final kotlin.jvm.functions.Function1<androidx.compose.ui.platform.ViewRootForTest,kotlin.Unit>? onViewCreatedCallback;
}
@@ -2515,7 +2515,7 @@
public final class WindowRecomposer_androidKt {
method public static androidx.compose.runtime.CompositionContext? findViewTreeCompositionContext(android.view.View);
method public static androidx.compose.runtime.CompositionContext? getCompositionContext(android.view.View);
- method public static void setCompositionContext(android.view.View, androidx.compose.runtime.CompositionContext? value);
+ method public static void setCompositionContext(android.view.View, androidx.compose.runtime.CompositionContext?);
}
public final class Wrapper_androidKt {
@@ -2719,8 +2719,8 @@
method public boolean isMergingSemanticsOfDescendants();
method public java.util.Iterator<java.util.Map.Entry<androidx.compose.ui.semantics.SemanticsPropertyKey<?>,java.lang.Object>> iterator();
method public <T> void set(androidx.compose.ui.semantics.SemanticsPropertyKey<T> key, T? value);
- method public void setClearingSemantics(boolean isClearingSemantics);
- method public void setMergingSemanticsOfDescendants(boolean isMergingSemanticsOfDescendants);
+ method public void setClearingSemantics(boolean);
+ method public void setMergingSemanticsOfDescendants(boolean);
property public final boolean isClearingSemantics;
property public final boolean isMergingSemanticsOfDescendants;
}
@@ -2885,28 +2885,28 @@
method public static void scrollBy(androidx.compose.ui.semantics.SemanticsPropertyReceiver, optional String? label, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,java.lang.Boolean>? action);
method public static void scrollToIndex(androidx.compose.ui.semantics.SemanticsPropertyReceiver, optional String? label, kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> action);
method public static void selectableGroup(androidx.compose.ui.semantics.SemanticsPropertyReceiver);
- method public static void setCollectionInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.CollectionInfo collectionInfo);
- method public static void setCollectionItemInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.CollectionItemInfo collectionItemInfo);
- method public static void setContentDescription(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String value);
- method public static void setCustomActions(androidx.compose.ui.semantics.SemanticsPropertyReceiver, java.util.List<androidx.compose.ui.semantics.CustomAccessibilityAction> customActions);
- method public static void setEditableText(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.text.AnnotatedString editableText);
- method public static void setFocused(androidx.compose.ui.semantics.SemanticsPropertyReceiver, boolean focused);
- method public static void setHorizontalScrollAxisRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ScrollAxisRange horizontalScrollAxisRange);
- method public static void setImeAction(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int imeAction);
- method public static void setLiveRegion(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int liveRegion);
- method public static void setPaneTitle(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String paneTitle);
+ method public static void setCollectionInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.CollectionInfo);
+ method public static void setCollectionItemInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.CollectionItemInfo);
+ method public static void setContentDescription(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String);
+ method public static void setCustomActions(androidx.compose.ui.semantics.SemanticsPropertyReceiver, java.util.List<androidx.compose.ui.semantics.CustomAccessibilityAction>);
+ method public static void setEditableText(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.text.AnnotatedString);
+ method public static void setFocused(androidx.compose.ui.semantics.SemanticsPropertyReceiver, boolean);
+ method public static void setHorizontalScrollAxisRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ScrollAxisRange);
+ method public static void setImeAction(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int);
+ method public static void setLiveRegion(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int);
+ method public static void setPaneTitle(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String);
method public static void setProgress(androidx.compose.ui.semantics.SemanticsPropertyReceiver, optional String? label, kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean>? action);
- method public static void setProgressBarRangeInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ProgressBarRangeInfo progressBarRangeInfo);
- method public static void setRole(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int role);
- method public static void setSelected(androidx.compose.ui.semantics.SemanticsPropertyReceiver, boolean selected);
+ method public static void setProgressBarRangeInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ProgressBarRangeInfo);
+ method public static void setRole(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int);
+ method public static void setSelected(androidx.compose.ui.semantics.SemanticsPropertyReceiver, boolean);
method public static void setSelection(androidx.compose.ui.semantics.SemanticsPropertyReceiver, optional String? label, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super java.lang.Integer,? super java.lang.Boolean,java.lang.Boolean>? action);
- method public static void setStateDescription(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String stateDescription);
- method public static void setTestTag(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String testTag);
- method public static void setText(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.text.AnnotatedString value);
+ method public static void setStateDescription(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String);
+ method public static void setTestTag(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String);
+ method public static void setText(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.text.AnnotatedString);
method public static void setText(androidx.compose.ui.semantics.SemanticsPropertyReceiver, optional String? label, kotlin.jvm.functions.Function1<? super androidx.compose.ui.text.AnnotatedString,java.lang.Boolean>? action);
- method public static void setTextSelectionRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, long textSelectionRange);
- method public static void setToggleableState(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.state.ToggleableState toggleableState);
- method public static void setVerticalScrollAxisRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ScrollAxisRange verticalScrollAxisRange);
+ method public static void setTextSelectionRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, long);
+ method public static void setToggleableState(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.state.ToggleableState);
+ method public static void setVerticalScrollAxisRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ScrollAxisRange);
}
public final class SemanticsPropertyKey<T> {
diff --git a/compose/ui/ui/api/public_plus_experimental_current.txt b/compose/ui/ui/api/public_plus_experimental_current.txt
index 92b0072..cacff46 100644
--- a/compose/ui/ui/api/public_plus_experimental_current.txt
+++ b/compose/ui/ui/api/public_plus_experimental_current.txt
@@ -191,7 +191,7 @@
method public androidx.compose.ui.geometry.Rect? getBoundingBox();
method public int getId();
method public kotlin.jvm.functions.Function1<java.lang.String,kotlin.Unit>? getOnFill();
- method public void setBoundingBox(androidx.compose.ui.geometry.Rect? boundingBox);
+ method public void setBoundingBox(androidx.compose.ui.geometry.Rect?);
property public final java.util.List<androidx.compose.ui.autofill.AutofillType> autofillTypes;
property public final androidx.compose.ui.geometry.Rect? boundingBox;
property public final int id;
@@ -396,14 +396,14 @@
method @Deprecated public androidx.compose.ui.focus.FocusRequester getRight();
method @Deprecated public androidx.compose.ui.focus.FocusRequester getStart();
method @Deprecated public androidx.compose.ui.focus.FocusRequester getUp();
- method @Deprecated public void setDown(androidx.compose.ui.focus.FocusRequester down);
- method @Deprecated public void setEnd(androidx.compose.ui.focus.FocusRequester end);
- method @Deprecated public void setLeft(androidx.compose.ui.focus.FocusRequester left);
- method @Deprecated public void setNext(androidx.compose.ui.focus.FocusRequester next);
- method @Deprecated public void setPrevious(androidx.compose.ui.focus.FocusRequester previous);
- method @Deprecated public void setRight(androidx.compose.ui.focus.FocusRequester right);
- method @Deprecated public void setStart(androidx.compose.ui.focus.FocusRequester start);
- method @Deprecated public void setUp(androidx.compose.ui.focus.FocusRequester up);
+ method @Deprecated public void setDown(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setEnd(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setLeft(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setNext(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setPrevious(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setRight(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setStart(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setUp(androidx.compose.ui.focus.FocusRequester);
property public final androidx.compose.ui.focus.FocusRequester down;
property public final androidx.compose.ui.focus.FocusRequester end;
property public final androidx.compose.ui.focus.FocusRequester left;
@@ -434,15 +434,15 @@
method public default androidx.compose.ui.focus.FocusRequester getRight();
method public default androidx.compose.ui.focus.FocusRequester getStart();
method public default androidx.compose.ui.focus.FocusRequester getUp();
- method public void setCanFocus(boolean canFocus);
- method public default void setDown(androidx.compose.ui.focus.FocusRequester _);
- method public default void setEnd(androidx.compose.ui.focus.FocusRequester _);
- method public default void setLeft(androidx.compose.ui.focus.FocusRequester _);
- method public default void setNext(androidx.compose.ui.focus.FocusRequester _);
- method public default void setPrevious(androidx.compose.ui.focus.FocusRequester _);
- method public default void setRight(androidx.compose.ui.focus.FocusRequester _);
- method public default void setStart(androidx.compose.ui.focus.FocusRequester _);
- method public default void setUp(androidx.compose.ui.focus.FocusRequester _);
+ method public void setCanFocus(boolean);
+ method public default void setDown(androidx.compose.ui.focus.FocusRequester);
+ method public default void setEnd(androidx.compose.ui.focus.FocusRequester);
+ method public default void setLeft(androidx.compose.ui.focus.FocusRequester);
+ method public default void setNext(androidx.compose.ui.focus.FocusRequester);
+ method public default void setPrevious(androidx.compose.ui.focus.FocusRequester);
+ method public default void setRight(androidx.compose.ui.focus.FocusRequester);
+ method public default void setStart(androidx.compose.ui.focus.FocusRequester);
+ method public default void setUp(androidx.compose.ui.focus.FocusRequester);
property public abstract boolean canFocus;
property public default androidx.compose.ui.focus.FocusRequester down;
property public default androidx.compose.ui.focus.FocusRequester end;
@@ -554,22 +554,22 @@
method public long getTransformOrigin();
method public float getTranslationX();
method public float getTranslationY();
- method public void setAlpha(float alpha);
- method public default void setAmbientShadowColor(long ambientShadowColor);
- method public void setCameraDistance(float cameraDistance);
- method public void setClip(boolean clip);
- method public default void setRenderEffect(androidx.compose.ui.graphics.RenderEffect? _);
- method public void setRotationX(float rotationX);
- method public void setRotationY(float rotationY);
- method public void setRotationZ(float rotationZ);
- method public void setScaleX(float scaleX);
- method public void setScaleY(float scaleY);
- method public void setShadowElevation(float shadowElevation);
- method public void setShape(androidx.compose.ui.graphics.Shape shape);
- method public default void setSpotShadowColor(long spotShadowColor);
- method public void setTransformOrigin(long transformOrigin);
- method public void setTranslationX(float translationX);
- method public void setTranslationY(float translationY);
+ method public void setAlpha(float);
+ method public default void setAmbientShadowColor(long);
+ method public void setCameraDistance(float);
+ method public void setClip(boolean);
+ method public default void setRenderEffect(androidx.compose.ui.graphics.RenderEffect?);
+ method public void setRotationX(float);
+ method public void setRotationY(float);
+ method public void setRotationZ(float);
+ method public void setScaleX(float);
+ method public void setScaleY(float);
+ method public void setShadowElevation(float);
+ method public void setShape(androidx.compose.ui.graphics.Shape);
+ method public default void setSpotShadowColor(long);
+ method public void setTransformOrigin(long);
+ method public void setTranslationX(float);
+ method public void setTranslationY(float);
property public abstract float alpha;
property public default long ambientShadowColor;
property public abstract float cameraDistance;
@@ -1536,17 +1536,17 @@
package androidx.compose.ui.input.nestedscroll {
public interface NestedScrollConnection {
- method public default suspend Object? onPostFling(long consumed, long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity> p);
+ method public default suspend Object? onPostFling(long consumed, long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>);
method public default long onPostScroll(long consumed, long available, int source);
- method public default suspend Object? onPreFling(long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity> p);
+ method public default suspend Object? onPreFling(long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>);
method public default long onPreScroll(long available, int source);
}
public final class NestedScrollDispatcher {
ctor public NestedScrollDispatcher();
- method public suspend Object? dispatchPostFling(long consumed, long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity> p);
+ method public suspend Object? dispatchPostFling(long consumed, long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>);
method public long dispatchPostScroll(long consumed, long available, int source);
- method public suspend Object? dispatchPreFling(long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity> p);
+ method public suspend Object? dispatchPreFling(long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>);
method public long dispatchPreScroll(long available, int source);
method public kotlinx.coroutines.CoroutineScope getCoroutineScope();
property public final kotlinx.coroutines.CoroutineScope coroutineScope;
@@ -1577,13 +1577,13 @@
package androidx.compose.ui.input.pointer {
@kotlin.coroutines.RestrictsSuspension public interface AwaitPointerEventScope extends androidx.compose.ui.unit.Density {
- method public suspend Object? awaitPointerEvent(optional androidx.compose.ui.input.pointer.PointerEventPass pass, optional kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerEvent> p);
+ method public suspend Object? awaitPointerEvent(optional androidx.compose.ui.input.pointer.PointerEventPass pass, optional kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerEvent>);
method public androidx.compose.ui.input.pointer.PointerEvent getCurrentEvent();
method public default long getExtendedTouchPadding();
method public long getSize();
method public androidx.compose.ui.platform.ViewConfiguration getViewConfiguration();
- method public default suspend <T> Object? withTimeout(long timeMillis, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public default suspend <T> Object? withTimeoutOrNull(long timeMillis, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
+ method public default suspend <T> Object? withTimeout(long timeMillis, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public default suspend <T> Object? withTimeoutOrNull(long timeMillis, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
property public abstract androidx.compose.ui.input.pointer.PointerEvent currentEvent;
property public default long extendedTouchPadding;
property public abstract long size;
@@ -1594,8 +1594,8 @@
ctor public ConsumedData(optional boolean positionChange, optional boolean downChange);
method public boolean getDownChange();
method public boolean getPositionChange();
- method public void setDownChange(boolean downChange);
- method public void setPositionChange(boolean positionChange);
+ method public void setDownChange(boolean);
+ method public void setPositionChange(boolean);
property public final boolean downChange;
property public final boolean positionChange;
}
@@ -1784,12 +1784,12 @@
}
public interface PointerInputScope extends androidx.compose.ui.unit.Density {
- method public suspend <R> Object? awaitPointerEventScope(kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? awaitPointerEventScope(kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
method public default long getExtendedTouchPadding();
method public default boolean getInterceptOutOfBoundsChildEvents();
method public long getSize();
method public androidx.compose.ui.platform.ViewConfiguration getViewConfiguration();
- method public default void setInterceptOutOfBoundsChildEvents(boolean _);
+ method public default void setInterceptOutOfBoundsChildEvents(boolean);
property public default long extendedTouchPadding;
property public default boolean interceptOutOfBoundsChildEvents;
property public abstract long size;
@@ -2147,8 +2147,8 @@
method protected final long getMeasurementConstraints();
method public final int getWidth();
method protected abstract void placeAt(long position, float zIndex, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.GraphicsLayerScope,kotlin.Unit>? layerBlock);
- method protected final void setMeasuredSize(long value);
- method protected final void setMeasurementConstraints(long value);
+ method protected final void setMeasuredSize(long);
+ method protected final void setMeasurementConstraints(long);
property protected final long apparentToRealOffset;
property public final int height;
property public int measuredHeight;
@@ -2179,7 +2179,7 @@
@Deprecated @androidx.compose.ui.ExperimentalComposeUiApi public interface RelocationModifier extends androidx.compose.ui.Modifier.Element {
method @Deprecated public androidx.compose.ui.geometry.Rect computeDestination(androidx.compose.ui.geometry.Rect source, androidx.compose.ui.layout.LayoutCoordinates layoutCoordinates);
- method @Deprecated public suspend Object? performRelocation(androidx.compose.ui.geometry.Rect source, androidx.compose.ui.geometry.Rect destination, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @Deprecated public suspend Object? performRelocation(androidx.compose.ui.geometry.Rect source, androidx.compose.ui.geometry.Rect destination, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class RelocationModifierKt {
@@ -2188,7 +2188,7 @@
@Deprecated @androidx.compose.ui.ExperimentalComposeUiApi public final class RelocationRequester {
ctor @Deprecated public RelocationRequester();
- method @Deprecated public suspend Object? bringIntoView(optional androidx.compose.ui.geometry.Rect? rect, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @Deprecated public suspend Object? bringIntoView(optional androidx.compose.ui.geometry.Rect? rect, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class RelocationRequesterModifierKt {
@@ -2322,7 +2322,7 @@
public final class Ref<T> {
ctor public Ref();
method public T? getValue();
- method public void setValue(T? value);
+ method public void setValue(T?);
property public final T? value;
}
@@ -2356,7 +2356,7 @@
method protected final void onLayout(boolean changed, int left, int top, int right, int bottom);
method protected final void onMeasure(int widthMeasureSpec, int heightMeasureSpec);
method public final void setParentCompositionContext(androidx.compose.runtime.CompositionContext? parent);
- method public final void setShowLayoutBounds(boolean value);
+ method public final void setShowLayoutBounds(boolean);
method public final void setViewCompositionStrategy(androidx.compose.ui.platform.ViewCompositionStrategy strategy);
property public final boolean hasComposition;
property protected boolean shouldCreateCompositionOnAttachedToWindow;
@@ -2411,7 +2411,7 @@
public final class AndroidUiFrameClock implements androidx.compose.runtime.MonotonicFrameClock {
ctor public AndroidUiFrameClock(android.view.Choreographer choreographer);
method public android.view.Choreographer getChoreographer();
- method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
property public final android.view.Choreographer choreographer;
}
@@ -2487,7 +2487,7 @@
public interface InfiniteAnimationPolicy extends kotlin.coroutines.CoroutineContext.Element {
method public default kotlin.coroutines.CoroutineContext.Key<?> getKey();
- method public suspend <R> Object? onInfiniteOperation(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? onInfiniteOperation(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
property public default kotlin.coroutines.CoroutineContext.Key<?> key;
field public static final androidx.compose.ui.platform.InfiniteAnimationPolicy.Key Key;
}
@@ -2519,7 +2519,7 @@
method public static kotlin.jvm.functions.Function1<androidx.compose.ui.platform.InspectorInfo,kotlin.Unit> getNoInspectorInfo();
method public static inline androidx.compose.ui.Modifier inspectable(androidx.compose.ui.Modifier, kotlin.jvm.functions.Function1<? super androidx.compose.ui.platform.InspectorInfo,kotlin.Unit> inspectorInfo, kotlin.jvm.functions.Function1<? super androidx.compose.ui.Modifier,? extends androidx.compose.ui.Modifier> factory);
method public static boolean isDebugInspectorInfoEnabled();
- method public static void setDebugInspectorInfoEnabled(boolean isDebugInspectorInfoEnabled);
+ method public static void setDebugInspectorInfoEnabled(boolean);
property public static final kotlin.jvm.functions.Function1<androidx.compose.ui.platform.InspectorInfo,kotlin.Unit> NoInspectorInfo;
property public static final boolean isDebugInspectorInfoEnabled;
}
@@ -2534,8 +2534,8 @@
method public String? getName();
method public androidx.compose.ui.platform.ValueElementSequence getProperties();
method public Object? getValue();
- method public void setName(String? name);
- method public void setValue(Object? value);
+ method public void setName(String?);
+ method public void setValue(Object?);
property public final String? name;
property public final androidx.compose.ui.platform.ValueElementSequence properties;
property public final Object? value;
@@ -2679,7 +2679,7 @@
public static final class ViewRootForTest.Companion {
method public kotlin.jvm.functions.Function1<androidx.compose.ui.platform.ViewRootForTest,kotlin.Unit>? getOnViewCreatedCallback();
- method public void setOnViewCreatedCallback(kotlin.jvm.functions.Function1<? super androidx.compose.ui.platform.ViewRootForTest,kotlin.Unit>? onViewCreatedCallback);
+ method public void setOnViewCreatedCallback(kotlin.jvm.functions.Function1<? super androidx.compose.ui.platform.ViewRootForTest,kotlin.Unit>?);
property public final kotlin.jvm.functions.Function1<androidx.compose.ui.platform.ViewRootForTest,kotlin.Unit>? onViewCreatedCallback;
}
@@ -2711,7 +2711,7 @@
method @androidx.compose.ui.ExperimentalComposeUiApi public static androidx.compose.runtime.Recomposer createLifecycleAwareWindowRecomposer(android.view.View, optional kotlin.coroutines.CoroutineContext coroutineContext, optional androidx.lifecycle.Lifecycle? lifecycle);
method public static androidx.compose.runtime.CompositionContext? findViewTreeCompositionContext(android.view.View);
method public static androidx.compose.runtime.CompositionContext? getCompositionContext(android.view.View);
- method public static void setCompositionContext(android.view.View, androidx.compose.runtime.CompositionContext? value);
+ method public static void setCompositionContext(android.view.View, androidx.compose.runtime.CompositionContext?);
}
public final class Wrapper_androidKt {
@@ -2915,8 +2915,8 @@
method public boolean isMergingSemanticsOfDescendants();
method public java.util.Iterator<java.util.Map.Entry<androidx.compose.ui.semantics.SemanticsPropertyKey<?>,java.lang.Object>> iterator();
method public <T> void set(androidx.compose.ui.semantics.SemanticsPropertyKey<T> key, T? value);
- method public void setClearingSemantics(boolean isClearingSemantics);
- method public void setMergingSemanticsOfDescendants(boolean isMergingSemanticsOfDescendants);
+ method public void setClearingSemantics(boolean);
+ method public void setMergingSemanticsOfDescendants(boolean);
property public final boolean isClearingSemantics;
property public final boolean isMergingSemanticsOfDescendants;
}
@@ -3082,28 +3082,28 @@
method public static void scrollBy(androidx.compose.ui.semantics.SemanticsPropertyReceiver, optional String? label, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,java.lang.Boolean>? action);
method public static void scrollToIndex(androidx.compose.ui.semantics.SemanticsPropertyReceiver, optional String? label, kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> action);
method public static void selectableGroup(androidx.compose.ui.semantics.SemanticsPropertyReceiver);
- method public static void setCollectionInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.CollectionInfo collectionInfo);
- method public static void setCollectionItemInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.CollectionItemInfo collectionItemInfo);
- method public static void setContentDescription(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String value);
- method public static void setCustomActions(androidx.compose.ui.semantics.SemanticsPropertyReceiver, java.util.List<androidx.compose.ui.semantics.CustomAccessibilityAction> customActions);
- method public static void setEditableText(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.text.AnnotatedString editableText);
- method public static void setFocused(androidx.compose.ui.semantics.SemanticsPropertyReceiver, boolean focused);
- method public static void setHorizontalScrollAxisRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ScrollAxisRange horizontalScrollAxisRange);
- method public static void setImeAction(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int imeAction);
- method public static void setLiveRegion(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int liveRegion);
- method public static void setPaneTitle(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String paneTitle);
+ method public static void setCollectionInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.CollectionInfo);
+ method public static void setCollectionItemInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.CollectionItemInfo);
+ method public static void setContentDescription(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String);
+ method public static void setCustomActions(androidx.compose.ui.semantics.SemanticsPropertyReceiver, java.util.List<androidx.compose.ui.semantics.CustomAccessibilityAction>);
+ method public static void setEditableText(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.text.AnnotatedString);
+ method public static void setFocused(androidx.compose.ui.semantics.SemanticsPropertyReceiver, boolean);
+ method public static void setHorizontalScrollAxisRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ScrollAxisRange);
+ method public static void setImeAction(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int);
+ method public static void setLiveRegion(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int);
+ method public static void setPaneTitle(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String);
method public static void setProgress(androidx.compose.ui.semantics.SemanticsPropertyReceiver, optional String? label, kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean>? action);
- method public static void setProgressBarRangeInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ProgressBarRangeInfo progressBarRangeInfo);
- method public static void setRole(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int role);
- method public static void setSelected(androidx.compose.ui.semantics.SemanticsPropertyReceiver, boolean selected);
+ method public static void setProgressBarRangeInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ProgressBarRangeInfo);
+ method public static void setRole(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int);
+ method public static void setSelected(androidx.compose.ui.semantics.SemanticsPropertyReceiver, boolean);
method public static void setSelection(androidx.compose.ui.semantics.SemanticsPropertyReceiver, optional String? label, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super java.lang.Integer,? super java.lang.Boolean,java.lang.Boolean>? action);
- method public static void setStateDescription(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String stateDescription);
- method public static void setTestTag(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String testTag);
- method public static void setText(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.text.AnnotatedString value);
+ method public static void setStateDescription(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String);
+ method public static void setTestTag(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String);
+ method public static void setText(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.text.AnnotatedString);
method public static void setText(androidx.compose.ui.semantics.SemanticsPropertyReceiver, optional String? label, kotlin.jvm.functions.Function1<? super androidx.compose.ui.text.AnnotatedString,java.lang.Boolean>? action);
- method public static void setTextSelectionRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, long textSelectionRange);
- method public static void setToggleableState(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.state.ToggleableState toggleableState);
- method public static void setVerticalScrollAxisRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ScrollAxisRange verticalScrollAxisRange);
+ method public static void setTextSelectionRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, long);
+ method public static void setToggleableState(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.state.ToggleableState);
+ method public static void setVerticalScrollAxisRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ScrollAxisRange);
}
public final class SemanticsPropertyKey<T> {
diff --git a/compose/ui/ui/api/restricted_current.ignore b/compose/ui/ui/api/restricted_current.ignore
index e77ec14..f265caf 100644
--- a/compose/ui/ui/api/restricted_current.ignore
+++ b/compose/ui/ui/api/restricted_current.ignore
@@ -7,6 +7,150 @@
Attempted to remove @NonNull annotation from method androidx.compose.ui.input.pointer.PointerInputChange.copy(long,long,long,boolean,long,long,boolean,androidx.compose.ui.input.pointer.ConsumedData,int)
+ParameterNameChange: androidx.compose.ui.focus.FocusOrder#setDown(androidx.compose.ui.focus.FocusRequester) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.focus.FocusOrder.setDown
+ParameterNameChange: androidx.compose.ui.focus.FocusOrder#setEnd(androidx.compose.ui.focus.FocusRequester) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.focus.FocusOrder.setEnd
+ParameterNameChange: androidx.compose.ui.focus.FocusOrder#setLeft(androidx.compose.ui.focus.FocusRequester) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.focus.FocusOrder.setLeft
+ParameterNameChange: androidx.compose.ui.focus.FocusOrder#setNext(androidx.compose.ui.focus.FocusRequester) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.focus.FocusOrder.setNext
+ParameterNameChange: androidx.compose.ui.focus.FocusOrder#setPrevious(androidx.compose.ui.focus.FocusRequester) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.focus.FocusOrder.setPrevious
+ParameterNameChange: androidx.compose.ui.focus.FocusOrder#setRight(androidx.compose.ui.focus.FocusRequester) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.focus.FocusOrder.setRight
+ParameterNameChange: androidx.compose.ui.focus.FocusOrder#setStart(androidx.compose.ui.focus.FocusRequester) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.focus.FocusOrder.setStart
+ParameterNameChange: androidx.compose.ui.focus.FocusOrder#setUp(androidx.compose.ui.focus.FocusRequester) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.focus.FocusOrder.setUp
+ParameterNameChange: androidx.compose.ui.focus.FocusProperties#setCanFocus(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.focus.FocusProperties.setCanFocus
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setAlpha(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setAlpha
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setCameraDistance(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setCameraDistance
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setClip(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setClip
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setRenderEffect(androidx.compose.ui.graphics.RenderEffect) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setRenderEffect
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setRotationX(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setRotationX
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setRotationY(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setRotationY
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setRotationZ(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setRotationZ
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setScaleX(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setScaleX
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setScaleY(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setScaleY
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setShadowElevation(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setShadowElevation
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setShape(androidx.compose.ui.graphics.Shape) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setShape
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setTransformOrigin(long) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setTransformOrigin
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setTranslationX(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setTranslationX
+ParameterNameChange: androidx.compose.ui.graphics.GraphicsLayerScope#setTranslationY(float) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.graphics.GraphicsLayerScope.setTranslationY
+ParameterNameChange: androidx.compose.ui.input.nestedscroll.NestedScrollConnection#onPostFling(long, long, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.ui.input.nestedscroll.NestedScrollConnection.onPostFling
+ParameterNameChange: androidx.compose.ui.input.nestedscroll.NestedScrollConnection#onPreFling(long, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.input.nestedscroll.NestedScrollConnection.onPreFling
+ParameterNameChange: androidx.compose.ui.input.nestedscroll.NestedScrollDispatcher#dispatchPostFling(long, long, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.ui.input.nestedscroll.NestedScrollDispatcher.dispatchPostFling
+ParameterNameChange: androidx.compose.ui.input.nestedscroll.NestedScrollDispatcher#dispatchPreFling(long, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.input.nestedscroll.NestedScrollDispatcher.dispatchPreFling
+ParameterNameChange: androidx.compose.ui.input.pointer.AwaitPointerEventScope#awaitPointerEvent(androidx.compose.ui.input.pointer.PointerEventPass, kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerEvent>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.input.pointer.AwaitPointerEventScope.awaitPointerEvent
+ParameterNameChange: androidx.compose.ui.input.pointer.AwaitPointerEventScope#withTimeout(long, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.ui.input.pointer.AwaitPointerEventScope.withTimeout
+ParameterNameChange: androidx.compose.ui.input.pointer.AwaitPointerEventScope#withTimeoutOrNull(long, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.compose.ui.input.pointer.AwaitPointerEventScope.withTimeoutOrNull
+ParameterNameChange: androidx.compose.ui.input.pointer.ConsumedData#setDownChange(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.input.pointer.ConsumedData.setDownChange
+ParameterNameChange: androidx.compose.ui.input.pointer.ConsumedData#setPositionChange(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.input.pointer.ConsumedData.setPositionChange
+ParameterNameChange: androidx.compose.ui.input.pointer.PointerInputScope#awaitPointerEventScope(kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super R>,?>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.input.pointer.PointerInputScope.awaitPointerEventScope
+ParameterNameChange: androidx.compose.ui.input.pointer.PointerInputScope#setInterceptOutOfBoundsChildEvents(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.input.pointer.PointerInputScope.setInterceptOutOfBoundsChildEvents
+ParameterNameChange: androidx.compose.ui.layout.Placeable#setMeasuredSize(long) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.layout.Placeable.setMeasuredSize
+ParameterNameChange: androidx.compose.ui.layout.Placeable#setMeasurementConstraints(long) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.layout.Placeable.setMeasurementConstraints
+ParameterNameChange: androidx.compose.ui.node.ComposeUiNode#setDensity(androidx.compose.ui.unit.Density) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.node.ComposeUiNode.setDensity
+ParameterNameChange: androidx.compose.ui.node.ComposeUiNode#setLayoutDirection(androidx.compose.ui.unit.LayoutDirection) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.node.ComposeUiNode.setLayoutDirection
+ParameterNameChange: androidx.compose.ui.node.ComposeUiNode#setMeasurePolicy(androidx.compose.ui.layout.MeasurePolicy) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.node.ComposeUiNode.setMeasurePolicy
+ParameterNameChange: androidx.compose.ui.node.ComposeUiNode#setModifier(androidx.compose.ui.Modifier) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.node.ComposeUiNode.setModifier
+ParameterNameChange: androidx.compose.ui.node.ComposeUiNode#setViewConfiguration(androidx.compose.ui.platform.ViewConfiguration) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.node.ComposeUiNode.setViewConfiguration
+ParameterNameChange: androidx.compose.ui.node.Ref#setValue(T) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.node.Ref.setValue
+ParameterNameChange: androidx.compose.ui.platform.AbstractComposeView#setShowLayoutBounds(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.platform.AbstractComposeView.setShowLayoutBounds
+ParameterNameChange: androidx.compose.ui.platform.AndroidUiFrameClock#withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.platform.AndroidUiFrameClock.withFrameNanos
+ParameterNameChange: androidx.compose.ui.platform.InfiniteAnimationPolicy#onInfiniteOperation(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?>, kotlin.coroutines.Continuation<? super R>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.platform.InfiniteAnimationPolicy.onInfiniteOperation
+ParameterNameChange: androidx.compose.ui.platform.InspectableValueKt#setDebugInspectorInfoEnabled(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.platform.InspectableValueKt.setDebugInspectorInfoEnabled
+ParameterNameChange: androidx.compose.ui.platform.InspectorInfo#setName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.platform.InspectorInfo.setName
+ParameterNameChange: androidx.compose.ui.platform.InspectorInfo#setValue(Object) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.platform.InspectorInfo.setValue
+ParameterNameChange: androidx.compose.ui.platform.ViewRootForTest.Companion#setOnViewCreatedCallback(kotlin.jvm.functions.Function1<? super androidx.compose.ui.platform.ViewRootForTest,kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.platform.ViewRootForTest.Companion.setOnViewCreatedCallback
+ParameterNameChange: androidx.compose.ui.platform.WindowRecomposer_androidKt#setCompositionContext(android.view.View, androidx.compose.runtime.CompositionContext) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.platform.WindowRecomposer_androidKt.setCompositionContext
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsConfiguration#setClearingSemantics(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.semantics.SemanticsConfiguration.setClearingSemantics
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsConfiguration#setMergingSemanticsOfDescendants(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.compose.ui.semantics.SemanticsConfiguration.setMergingSemanticsOfDescendants
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setCollectionInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.CollectionInfo) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setCollectionInfo
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setCollectionItemInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.CollectionItemInfo) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setCollectionItemInfo
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setContentDescription(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setContentDescription
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setCustomActions(androidx.compose.ui.semantics.SemanticsPropertyReceiver, java.util.List<androidx.compose.ui.semantics.CustomAccessibilityAction>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setCustomActions
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setEditableText(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.text.AnnotatedString) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setEditableText
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setFocused(androidx.compose.ui.semantics.SemanticsPropertyReceiver, boolean) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setFocused
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setHorizontalScrollAxisRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ScrollAxisRange) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setHorizontalScrollAxisRange
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setImeAction(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setImeAction
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setLiveRegion(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setLiveRegion
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setPaneTitle(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setPaneTitle
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setProgressBarRangeInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ProgressBarRangeInfo) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setProgressBarRangeInfo
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setRole(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setRole
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setSelected(androidx.compose.ui.semantics.SemanticsPropertyReceiver, boolean) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setSelected
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setStateDescription(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setStateDescription
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setTestTag(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setTestTag
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setText(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.text.AnnotatedString) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setText
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setTextSelectionRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, long) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setTextSelectionRange
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setToggleableState(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.state.ToggleableState) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setToggleableState
+ParameterNameChange: androidx.compose.ui.semantics.SemanticsPropertiesKt#setVerticalScrollAxisRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ScrollAxisRange) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.compose.ui.semantics.SemanticsPropertiesKt.setVerticalScrollAxisRange
+
+
RemovedClass: androidx.compose.ui.focus.FocusNodeUtilsKt:
Removed class androidx.compose.ui.focus.FocusNodeUtilsKt
RemovedClass: androidx.compose.ui.input.nestedscroll.NestedScrollDelegatingWrapperKt:
diff --git a/compose/ui/ui/api/restricted_current.txt b/compose/ui/ui/api/restricted_current.txt
index 01453aa..b89a179 100644
--- a/compose/ui/ui/api/restricted_current.txt
+++ b/compose/ui/ui/api/restricted_current.txt
@@ -321,14 +321,14 @@
method @Deprecated public androidx.compose.ui.focus.FocusRequester getRight();
method @Deprecated public androidx.compose.ui.focus.FocusRequester getStart();
method @Deprecated public androidx.compose.ui.focus.FocusRequester getUp();
- method @Deprecated public void setDown(androidx.compose.ui.focus.FocusRequester down);
- method @Deprecated public void setEnd(androidx.compose.ui.focus.FocusRequester end);
- method @Deprecated public void setLeft(androidx.compose.ui.focus.FocusRequester left);
- method @Deprecated public void setNext(androidx.compose.ui.focus.FocusRequester next);
- method @Deprecated public void setPrevious(androidx.compose.ui.focus.FocusRequester previous);
- method @Deprecated public void setRight(androidx.compose.ui.focus.FocusRequester right);
- method @Deprecated public void setStart(androidx.compose.ui.focus.FocusRequester start);
- method @Deprecated public void setUp(androidx.compose.ui.focus.FocusRequester up);
+ method @Deprecated public void setDown(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setEnd(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setLeft(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setNext(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setPrevious(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setRight(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setStart(androidx.compose.ui.focus.FocusRequester);
+ method @Deprecated public void setUp(androidx.compose.ui.focus.FocusRequester);
property public final androidx.compose.ui.focus.FocusRequester down;
property public final androidx.compose.ui.focus.FocusRequester end;
property public final androidx.compose.ui.focus.FocusRequester left;
@@ -359,15 +359,15 @@
method public default androidx.compose.ui.focus.FocusRequester getRight();
method public default androidx.compose.ui.focus.FocusRequester getStart();
method public default androidx.compose.ui.focus.FocusRequester getUp();
- method public void setCanFocus(boolean canFocus);
- method public default void setDown(androidx.compose.ui.focus.FocusRequester _);
- method public default void setEnd(androidx.compose.ui.focus.FocusRequester _);
- method public default void setLeft(androidx.compose.ui.focus.FocusRequester _);
- method public default void setNext(androidx.compose.ui.focus.FocusRequester _);
- method public default void setPrevious(androidx.compose.ui.focus.FocusRequester _);
- method public default void setRight(androidx.compose.ui.focus.FocusRequester _);
- method public default void setStart(androidx.compose.ui.focus.FocusRequester _);
- method public default void setUp(androidx.compose.ui.focus.FocusRequester _);
+ method public void setCanFocus(boolean);
+ method public default void setDown(androidx.compose.ui.focus.FocusRequester);
+ method public default void setEnd(androidx.compose.ui.focus.FocusRequester);
+ method public default void setLeft(androidx.compose.ui.focus.FocusRequester);
+ method public default void setNext(androidx.compose.ui.focus.FocusRequester);
+ method public default void setPrevious(androidx.compose.ui.focus.FocusRequester);
+ method public default void setRight(androidx.compose.ui.focus.FocusRequester);
+ method public default void setStart(androidx.compose.ui.focus.FocusRequester);
+ method public default void setUp(androidx.compose.ui.focus.FocusRequester);
property public abstract boolean canFocus;
property public default androidx.compose.ui.focus.FocusRequester down;
property public default androidx.compose.ui.focus.FocusRequester end;
@@ -458,22 +458,22 @@
method public long getTransformOrigin();
method public float getTranslationX();
method public float getTranslationY();
- method public void setAlpha(float alpha);
- method public default void setAmbientShadowColor(long ambientShadowColor);
- method public void setCameraDistance(float cameraDistance);
- method public void setClip(boolean clip);
- method public default void setRenderEffect(androidx.compose.ui.graphics.RenderEffect? _);
- method public void setRotationX(float rotationX);
- method public void setRotationY(float rotationY);
- method public void setRotationZ(float rotationZ);
- method public void setScaleX(float scaleX);
- method public void setScaleY(float scaleY);
- method public void setShadowElevation(float shadowElevation);
- method public void setShape(androidx.compose.ui.graphics.Shape shape);
- method public default void setSpotShadowColor(long spotShadowColor);
- method public void setTransformOrigin(long transformOrigin);
- method public void setTranslationX(float translationX);
- method public void setTranslationY(float translationY);
+ method public void setAlpha(float);
+ method public default void setAmbientShadowColor(long);
+ method public void setCameraDistance(float);
+ method public void setClip(boolean);
+ method public default void setRenderEffect(androidx.compose.ui.graphics.RenderEffect?);
+ method public void setRotationX(float);
+ method public void setRotationY(float);
+ method public void setRotationZ(float);
+ method public void setScaleX(float);
+ method public void setScaleY(float);
+ method public void setShadowElevation(float);
+ method public void setShape(androidx.compose.ui.graphics.Shape);
+ method public default void setSpotShadowColor(long);
+ method public void setTransformOrigin(long);
+ method public void setTranslationX(float);
+ method public void setTranslationY(float);
property public abstract float alpha;
property public default long ambientShadowColor;
property public abstract float cameraDistance;
@@ -1439,17 +1439,17 @@
package androidx.compose.ui.input.nestedscroll {
public interface NestedScrollConnection {
- method public default suspend Object? onPostFling(long consumed, long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity> p);
+ method public default suspend Object? onPostFling(long consumed, long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>);
method public default long onPostScroll(long consumed, long available, int source);
- method public default suspend Object? onPreFling(long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity> p);
+ method public default suspend Object? onPreFling(long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>);
method public default long onPreScroll(long available, int source);
}
public final class NestedScrollDispatcher {
ctor public NestedScrollDispatcher();
- method public suspend Object? dispatchPostFling(long consumed, long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity> p);
+ method public suspend Object? dispatchPostFling(long consumed, long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>);
method public long dispatchPostScroll(long consumed, long available, int source);
- method public suspend Object? dispatchPreFling(long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity> p);
+ method public suspend Object? dispatchPreFling(long available, kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity>);
method public long dispatchPreScroll(long available, int source);
method public kotlinx.coroutines.CoroutineScope getCoroutineScope();
property public final kotlinx.coroutines.CoroutineScope coroutineScope;
@@ -1480,13 +1480,13 @@
package androidx.compose.ui.input.pointer {
@kotlin.coroutines.RestrictsSuspension public interface AwaitPointerEventScope extends androidx.compose.ui.unit.Density {
- method public suspend Object? awaitPointerEvent(optional androidx.compose.ui.input.pointer.PointerEventPass pass, optional kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerEvent> p);
+ method public suspend Object? awaitPointerEvent(optional androidx.compose.ui.input.pointer.PointerEventPass pass, optional kotlin.coroutines.Continuation<? super androidx.compose.ui.input.pointer.PointerEvent>);
method public androidx.compose.ui.input.pointer.PointerEvent getCurrentEvent();
method public default long getExtendedTouchPadding();
method public long getSize();
method public androidx.compose.ui.platform.ViewConfiguration getViewConfiguration();
- method public default suspend <T> Object? withTimeout(long timeMillis, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public default suspend <T> Object? withTimeoutOrNull(long timeMillis, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
+ method public default suspend <T> Object? withTimeout(long timeMillis, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public default suspend <T> Object? withTimeoutOrNull(long timeMillis, kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
property public abstract androidx.compose.ui.input.pointer.PointerEvent currentEvent;
property public default long extendedTouchPadding;
property public abstract long size;
@@ -1497,8 +1497,8 @@
ctor public ConsumedData(optional boolean positionChange, optional boolean downChange);
method public boolean getDownChange();
method public boolean getPositionChange();
- method public void setDownChange(boolean downChange);
- method public void setPositionChange(boolean positionChange);
+ method public void setDownChange(boolean);
+ method public void setPositionChange(boolean);
property public final boolean downChange;
property public final boolean positionChange;
}
@@ -1659,12 +1659,12 @@
}
public interface PointerInputScope extends androidx.compose.ui.unit.Density {
- method public suspend <R> Object? awaitPointerEventScope(kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? awaitPointerEventScope(kotlin.jvm.functions.Function2<? super androidx.compose.ui.input.pointer.AwaitPointerEventScope,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
method public default long getExtendedTouchPadding();
method public default boolean getInterceptOutOfBoundsChildEvents();
method public long getSize();
method public androidx.compose.ui.platform.ViewConfiguration getViewConfiguration();
- method public default void setInterceptOutOfBoundsChildEvents(boolean _);
+ method public default void setInterceptOutOfBoundsChildEvents(boolean);
property public default long extendedTouchPadding;
property public default boolean interceptOutOfBoundsChildEvents;
property public abstract long size;
@@ -2005,8 +2005,8 @@
method protected final long getMeasurementConstraints();
method public final int getWidth();
method protected abstract void placeAt(long position, float zIndex, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.GraphicsLayerScope,kotlin.Unit>? layerBlock);
- method protected final void setMeasuredSize(long value);
- method protected final void setMeasurementConstraints(long value);
+ method protected final void setMeasuredSize(long);
+ method protected final void setMeasurementConstraints(long);
property protected final long apparentToRealOffset;
property public final int height;
property public int measuredHeight;
@@ -2160,11 +2160,11 @@
method public androidx.compose.ui.layout.MeasurePolicy getMeasurePolicy();
method public androidx.compose.ui.Modifier getModifier();
method public androidx.compose.ui.platform.ViewConfiguration getViewConfiguration();
- method public void setDensity(androidx.compose.ui.unit.Density density);
- method public void setLayoutDirection(androidx.compose.ui.unit.LayoutDirection layoutDirection);
- method public void setMeasurePolicy(androidx.compose.ui.layout.MeasurePolicy measurePolicy);
- method public void setModifier(androidx.compose.ui.Modifier modifier);
- method public void setViewConfiguration(androidx.compose.ui.platform.ViewConfiguration viewConfiguration);
+ method public void setDensity(androidx.compose.ui.unit.Density);
+ method public void setLayoutDirection(androidx.compose.ui.unit.LayoutDirection);
+ method public void setMeasurePolicy(androidx.compose.ui.layout.MeasurePolicy);
+ method public void setModifier(androidx.compose.ui.Modifier);
+ method public void setViewConfiguration(androidx.compose.ui.platform.ViewConfiguration);
property public abstract androidx.compose.ui.unit.Density density;
property public abstract androidx.compose.ui.unit.LayoutDirection layoutDirection;
property public abstract androidx.compose.ui.layout.MeasurePolicy measurePolicy;
@@ -2197,7 +2197,7 @@
public final class Ref<T> {
ctor public Ref();
method public T? getValue();
- method public void setValue(T? value);
+ method public void setValue(T?);
property public final T? value;
}
@@ -2231,7 +2231,7 @@
method protected final void onLayout(boolean changed, int left, int top, int right, int bottom);
method protected final void onMeasure(int widthMeasureSpec, int heightMeasureSpec);
method public final void setParentCompositionContext(androidx.compose.runtime.CompositionContext? parent);
- method public final void setShowLayoutBounds(boolean value);
+ method public final void setShowLayoutBounds(boolean);
method public final void setViewCompositionStrategy(androidx.compose.ui.platform.ViewCompositionStrategy strategy);
property public final boolean hasComposition;
property protected boolean shouldCreateCompositionOnAttachedToWindow;
@@ -2286,7 +2286,7 @@
public final class AndroidUiFrameClock implements androidx.compose.runtime.MonotonicFrameClock {
ctor public AndroidUiFrameClock(android.view.Choreographer choreographer);
method public android.view.Choreographer getChoreographer();
- method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R>);
property public final android.view.Choreographer choreographer;
}
@@ -2358,7 +2358,7 @@
public interface InfiniteAnimationPolicy extends kotlin.coroutines.CoroutineContext.Element {
method public default kotlin.coroutines.CoroutineContext.Key<?> getKey();
- method public suspend <R> Object? onInfiniteOperation(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? onInfiniteOperation(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
property public default kotlin.coroutines.CoroutineContext.Key<?> key;
field public static final androidx.compose.ui.platform.InfiniteAnimationPolicy.Key Key;
}
@@ -2391,7 +2391,7 @@
method public static inline androidx.compose.ui.Modifier inspectable(androidx.compose.ui.Modifier, kotlin.jvm.functions.Function1<? super androidx.compose.ui.platform.InspectorInfo,kotlin.Unit> inspectorInfo, kotlin.jvm.functions.Function1<? super androidx.compose.ui.Modifier,? extends androidx.compose.ui.Modifier> factory);
method @kotlin.PublishedApi internal static androidx.compose.ui.Modifier inspectableWrapper(androidx.compose.ui.Modifier, kotlin.jvm.functions.Function1<? super androidx.compose.ui.platform.InspectorInfo,kotlin.Unit> inspectorInfo, androidx.compose.ui.Modifier wrapped);
method public static boolean isDebugInspectorInfoEnabled();
- method public static void setDebugInspectorInfoEnabled(boolean isDebugInspectorInfoEnabled);
+ method public static void setDebugInspectorInfoEnabled(boolean);
property public static final kotlin.jvm.functions.Function1<androidx.compose.ui.platform.InspectorInfo,kotlin.Unit> NoInspectorInfo;
property public static final boolean isDebugInspectorInfoEnabled;
}
@@ -2406,8 +2406,8 @@
method public String? getName();
method public androidx.compose.ui.platform.ValueElementSequence getProperties();
method public Object? getValue();
- method public void setName(String? name);
- method public void setValue(Object? value);
+ method public void setName(String?);
+ method public void setValue(Object?);
property public final String? name;
property public final androidx.compose.ui.platform.ValueElementSequence properties;
property public final Object? value;
@@ -2536,7 +2536,7 @@
public static final class ViewRootForTest.Companion {
method public kotlin.jvm.functions.Function1<androidx.compose.ui.platform.ViewRootForTest,kotlin.Unit>? getOnViewCreatedCallback();
- method public void setOnViewCreatedCallback(kotlin.jvm.functions.Function1<? super androidx.compose.ui.platform.ViewRootForTest,kotlin.Unit>? onViewCreatedCallback);
+ method public void setOnViewCreatedCallback(kotlin.jvm.functions.Function1<? super androidx.compose.ui.platform.ViewRootForTest,kotlin.Unit>?);
property public final kotlin.jvm.functions.Function1<androidx.compose.ui.platform.ViewRootForTest,kotlin.Unit>? onViewCreatedCallback;
}
@@ -2551,7 +2551,7 @@
public final class WindowRecomposer_androidKt {
method public static androidx.compose.runtime.CompositionContext? findViewTreeCompositionContext(android.view.View);
method public static androidx.compose.runtime.CompositionContext? getCompositionContext(android.view.View);
- method public static void setCompositionContext(android.view.View, androidx.compose.runtime.CompositionContext? value);
+ method public static void setCompositionContext(android.view.View, androidx.compose.runtime.CompositionContext?);
}
public final class Wrapper_androidKt {
@@ -2755,8 +2755,8 @@
method public boolean isMergingSemanticsOfDescendants();
method public java.util.Iterator<java.util.Map.Entry<androidx.compose.ui.semantics.SemanticsPropertyKey<?>,java.lang.Object>> iterator();
method public <T> void set(androidx.compose.ui.semantics.SemanticsPropertyKey<T> key, T? value);
- method public void setClearingSemantics(boolean isClearingSemantics);
- method public void setMergingSemanticsOfDescendants(boolean isMergingSemanticsOfDescendants);
+ method public void setClearingSemantics(boolean);
+ method public void setMergingSemanticsOfDescendants(boolean);
property public final boolean isClearingSemantics;
property public final boolean isMergingSemanticsOfDescendants;
}
@@ -2921,28 +2921,28 @@
method public static void scrollBy(androidx.compose.ui.semantics.SemanticsPropertyReceiver, optional String? label, kotlin.jvm.functions.Function2<? super java.lang.Float,? super java.lang.Float,java.lang.Boolean>? action);
method public static void scrollToIndex(androidx.compose.ui.semantics.SemanticsPropertyReceiver, optional String? label, kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Boolean> action);
method public static void selectableGroup(androidx.compose.ui.semantics.SemanticsPropertyReceiver);
- method public static void setCollectionInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.CollectionInfo collectionInfo);
- method public static void setCollectionItemInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.CollectionItemInfo collectionItemInfo);
- method public static void setContentDescription(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String value);
- method public static void setCustomActions(androidx.compose.ui.semantics.SemanticsPropertyReceiver, java.util.List<androidx.compose.ui.semantics.CustomAccessibilityAction> customActions);
- method public static void setEditableText(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.text.AnnotatedString editableText);
- method public static void setFocused(androidx.compose.ui.semantics.SemanticsPropertyReceiver, boolean focused);
- method public static void setHorizontalScrollAxisRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ScrollAxisRange horizontalScrollAxisRange);
- method public static void setImeAction(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int imeAction);
- method public static void setLiveRegion(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int liveRegion);
- method public static void setPaneTitle(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String paneTitle);
+ method public static void setCollectionInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.CollectionInfo);
+ method public static void setCollectionItemInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.CollectionItemInfo);
+ method public static void setContentDescription(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String);
+ method public static void setCustomActions(androidx.compose.ui.semantics.SemanticsPropertyReceiver, java.util.List<androidx.compose.ui.semantics.CustomAccessibilityAction>);
+ method public static void setEditableText(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.text.AnnotatedString);
+ method public static void setFocused(androidx.compose.ui.semantics.SemanticsPropertyReceiver, boolean);
+ method public static void setHorizontalScrollAxisRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ScrollAxisRange);
+ method public static void setImeAction(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int);
+ method public static void setLiveRegion(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int);
+ method public static void setPaneTitle(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String);
method public static void setProgress(androidx.compose.ui.semantics.SemanticsPropertyReceiver, optional String? label, kotlin.jvm.functions.Function1<? super java.lang.Float,java.lang.Boolean>? action);
- method public static void setProgressBarRangeInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ProgressBarRangeInfo progressBarRangeInfo);
- method public static void setRole(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int role);
- method public static void setSelected(androidx.compose.ui.semantics.SemanticsPropertyReceiver, boolean selected);
+ method public static void setProgressBarRangeInfo(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ProgressBarRangeInfo);
+ method public static void setRole(androidx.compose.ui.semantics.SemanticsPropertyReceiver, int);
+ method public static void setSelected(androidx.compose.ui.semantics.SemanticsPropertyReceiver, boolean);
method public static void setSelection(androidx.compose.ui.semantics.SemanticsPropertyReceiver, optional String? label, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super java.lang.Integer,? super java.lang.Boolean,java.lang.Boolean>? action);
- method public static void setStateDescription(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String stateDescription);
- method public static void setTestTag(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String testTag);
- method public static void setText(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.text.AnnotatedString value);
+ method public static void setStateDescription(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String);
+ method public static void setTestTag(androidx.compose.ui.semantics.SemanticsPropertyReceiver, String);
+ method public static void setText(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.text.AnnotatedString);
method public static void setText(androidx.compose.ui.semantics.SemanticsPropertyReceiver, optional String? label, kotlin.jvm.functions.Function1<? super androidx.compose.ui.text.AnnotatedString,java.lang.Boolean>? action);
- method public static void setTextSelectionRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, long textSelectionRange);
- method public static void setToggleableState(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.state.ToggleableState toggleableState);
- method public static void setVerticalScrollAxisRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ScrollAxisRange verticalScrollAxisRange);
+ method public static void setTextSelectionRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, long);
+ method public static void setToggleableState(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.state.ToggleableState);
+ method public static void setVerticalScrollAxisRange(androidx.compose.ui.semantics.SemanticsPropertyReceiver, androidx.compose.ui.semantics.ScrollAxisRange);
}
public final class SemanticsPropertyKey<T> {
diff --git a/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/platform/AndroidViewCompatTest.kt b/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/platform/AndroidViewCompatTest.kt
index ad2e1c3..ac80799 100644
--- a/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/platform/AndroidViewCompatTest.kt
+++ b/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/platform/AndroidViewCompatTest.kt
@@ -55,7 +55,6 @@
import androidx.compose.testutils.assertPixels
import androidx.compose.ui.Align
import androidx.compose.ui.Modifier
-import androidx.compose.ui.draw.drawBehind
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.graphicsLayer
@@ -779,31 +778,24 @@
rule.runOnIdle { assertEquals(invalidatesDuringScroll + 1, view!!.draws) }
}
+ @SdkSuppress(minSdkVersion = Build.VERSION_CODES.M)
@Test
fun testWebViewIsRelaidOut_afterPageLoad() {
var boxY = 0
- var pageFinished = false
- val latch = CountDownLatch(2)
+ val latch = CountDownLatch(1)
rule.setContent {
Column {
AndroidView(
factory = {
val webView = WebView(it)
webView.webViewClient = object : WebViewClient() {
- override fun onPageFinished(view: WebView?, url: String?) {
- super.onPageFinished(view, url)
+ override fun onPageCommitVisible(view: WebView?, url: String?) {
+ super.onPageCommitVisible(view, url)
latch.countDown()
- pageFinished = true
}
}
webView.loadData("This is a test text", "text/html", "UTF-8")
webView
- },
- modifier = Modifier.drawBehind {
- // We would like to use onPageCommitVisible instead of onPageFinished,
- // such that this modifier would not be needed at all, but
- // onPageCommitVisible was only added in API 23.
- if (pageFinished) latch.countDown()
}
)
Box(Modifier.onGloballyPositioned { boxY = it.positionInRoot().y.roundToInt() })
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/CompositionLocals.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/CompositionLocals.kt
index 6daab6f..875cc70 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/CompositionLocals.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/CompositionLocals.kt
@@ -101,6 +101,9 @@
noLocalProvidedFor("LocalFontLoader")
}
+/**
+ * The CompositionLocal for compose font resolution from FontFamily.
+ */
val LocalFontFamilyResolver = staticCompositionLocalOf<FontFamily.Resolver> {
noLocalProvidedFor("LocalFontFamilyResolver")
}
diff --git a/concurrent/concurrent-futures-ktx/api/current.ignore b/concurrent/concurrent-futures-ktx/api/current.ignore
new file mode 100644
index 0000000..ec71fe1
--- /dev/null
+++ b/concurrent/concurrent-futures-ktx/api/current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.concurrent.futures.ListenableFutureKt#await(com.google.common.util.concurrent.ListenableFuture<T>, kotlin.coroutines.Continuation<? super T>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.concurrent.futures.ListenableFutureKt.await
diff --git a/concurrent/concurrent-futures-ktx/api/current.txt b/concurrent/concurrent-futures-ktx/api/current.txt
index d03a085..b407caf 100644
--- a/concurrent/concurrent-futures-ktx/api/current.txt
+++ b/concurrent/concurrent-futures-ktx/api/current.txt
@@ -2,7 +2,7 @@
package androidx.concurrent.futures {
public final class ListenableFutureKt {
- method public static suspend <T> Object? await(com.google.common.util.concurrent.ListenableFuture<T>, kotlin.coroutines.Continuation<? super T> p);
+ method public static suspend <T> Object? await(com.google.common.util.concurrent.ListenableFuture<T>, kotlin.coroutines.Continuation<? super T>);
}
}
diff --git a/concurrent/concurrent-futures-ktx/api/public_plus_experimental_current.txt b/concurrent/concurrent-futures-ktx/api/public_plus_experimental_current.txt
index d03a085..b407caf 100644
--- a/concurrent/concurrent-futures-ktx/api/public_plus_experimental_current.txt
+++ b/concurrent/concurrent-futures-ktx/api/public_plus_experimental_current.txt
@@ -2,7 +2,7 @@
package androidx.concurrent.futures {
public final class ListenableFutureKt {
- method public static suspend <T> Object? await(com.google.common.util.concurrent.ListenableFuture<T>, kotlin.coroutines.Continuation<? super T> p);
+ method public static suspend <T> Object? await(com.google.common.util.concurrent.ListenableFuture<T>, kotlin.coroutines.Continuation<? super T>);
}
}
diff --git a/concurrent/concurrent-futures-ktx/api/restricted_current.ignore b/concurrent/concurrent-futures-ktx/api/restricted_current.ignore
new file mode 100644
index 0000000..ec71fe1
--- /dev/null
+++ b/concurrent/concurrent-futures-ktx/api/restricted_current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.concurrent.futures.ListenableFutureKt#await(com.google.common.util.concurrent.ListenableFuture<T>, kotlin.coroutines.Continuation<? super T>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.concurrent.futures.ListenableFutureKt.await
diff --git a/concurrent/concurrent-futures-ktx/api/restricted_current.txt b/concurrent/concurrent-futures-ktx/api/restricted_current.txt
index d03a085..b407caf 100644
--- a/concurrent/concurrent-futures-ktx/api/restricted_current.txt
+++ b/concurrent/concurrent-futures-ktx/api/restricted_current.txt
@@ -2,7 +2,7 @@
package androidx.concurrent.futures {
public final class ListenableFutureKt {
- method public static suspend <T> Object? await(com.google.common.util.concurrent.ListenableFuture<T>, kotlin.coroutines.Continuation<? super T> p);
+ method public static suspend <T> Object? await(com.google.common.util.concurrent.ListenableFuture<T>, kotlin.coroutines.Continuation<? super T>);
}
}
diff --git a/core/core-animation-testing/api/api_lint.ignore b/core/core-animation-testing/api/api_lint.ignore
new file mode 100644
index 0000000..27e1eaa
--- /dev/null
+++ b/core/core-animation-testing/api/api_lint.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+InvalidNullability: androidx.core.animation.AnimatorTestRule#apply(org.junit.runners.model.Statement, org.junit.runner.Description) parameter #0:
+ Invalid nullability on parameter `base` in method `apply`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.animation.AnimatorTestRule#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.
diff --git a/core/core-animation/api/api_lint.ignore b/core/core-animation/api/api_lint.ignore
index f3eb632..ba4c8f6 100644
--- a/core/core-animation/api/api_lint.ignore
+++ b/core/core-animation/api/api_lint.ignore
@@ -1,4 +1,12 @@
// Baseline format: 1.0
+BannedThrow: androidx.core.animation.AnimatorInflater#loadAnimator(android.content.Context, int):
+ Methods must not throw unchecked exceptions
+BannedThrow: androidx.core.animation.AnimatorInflater#loadAnimator(android.content.res.Resources, android.content.res.Resources.Theme, int):
+ Methods must not throw unchecked exceptions
+BannedThrow: androidx.core.animation.AnimatorInflater#loadInterpolator(android.content.Context, int):
+ Methods must not throw unchecked exceptions
+
+
BuilderSetStyle: androidx.core.animation.AnimatorSet.Builder#after(androidx.core.animation.Animator):
Builder methods names should use setFoo() / addFoo() / clearFoo() style: method androidx.core.animation.AnimatorSet.Builder.after(androidx.core.animation.Animator)
BuilderSetStyle: androidx.core.animation.AnimatorSet.Builder#after(long):
diff --git a/core/core-ktx/api/current.ignore b/core/core-ktx/api/current.ignore
new file mode 100644
index 0000000..150db83
--- /dev/null
+++ b/core/core-ktx/api/current.ignore
@@ -0,0 +1,7 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.core.view.ViewKt#setGone(android.view.View, boolean) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.core.view.ViewKt.setGone
+ParameterNameChange: androidx.core.view.ViewKt#setInvisible(android.view.View, boolean) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.core.view.ViewKt.setInvisible
+ParameterNameChange: androidx.core.view.ViewKt#setVisible(android.view.View, boolean) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.core.view.ViewKt.setVisible
diff --git a/core/core-ktx/api/current.txt b/core/core-ktx/api/current.txt
index 4790832..521f26c 100644
--- a/core/core-ktx/api/current.txt
+++ b/core/core-ktx/api/current.txt
@@ -604,10 +604,10 @@
method public static inline boolean isVisible(android.view.View);
method public static inline Runnable postDelayed(android.view.View, long delayInMillis, kotlin.jvm.functions.Function0<kotlin.Unit> action);
method @RequiresApi(16) public static inline Runnable postOnAnimationDelayed(android.view.View, long delayInMillis, kotlin.jvm.functions.Function0<kotlin.Unit> action);
- method public static inline void setGone(android.view.View, boolean value);
- method public static inline void setInvisible(android.view.View, boolean value);
+ method public static inline void setGone(android.view.View, boolean);
+ method public static inline void setInvisible(android.view.View, boolean);
method public static inline void setPadding(android.view.View, @Px int size);
- method public static inline void setVisible(android.view.View, boolean value);
+ method public static inline void setVisible(android.view.View, boolean);
method public static inline void updateLayoutParams(android.view.View, kotlin.jvm.functions.Function1<? super android.view.ViewGroup.LayoutParams,kotlin.Unit> block);
method public static inline <reified T extends android.view.ViewGroup.LayoutParams> void updateLayoutParams(android.view.View, kotlin.jvm.functions.Function1<? super T,? extends kotlin.Unit> block);
method public static inline void updatePadding(android.view.View, optional @Px int left, optional @Px int top, optional @Px int right, optional @Px int bottom);
diff --git a/core/core-ktx/api/public_plus_experimental_current.txt b/core/core-ktx/api/public_plus_experimental_current.txt
index 4790832..521f26c 100644
--- a/core/core-ktx/api/public_plus_experimental_current.txt
+++ b/core/core-ktx/api/public_plus_experimental_current.txt
@@ -604,10 +604,10 @@
method public static inline boolean isVisible(android.view.View);
method public static inline Runnable postDelayed(android.view.View, long delayInMillis, kotlin.jvm.functions.Function0<kotlin.Unit> action);
method @RequiresApi(16) public static inline Runnable postOnAnimationDelayed(android.view.View, long delayInMillis, kotlin.jvm.functions.Function0<kotlin.Unit> action);
- method public static inline void setGone(android.view.View, boolean value);
- method public static inline void setInvisible(android.view.View, boolean value);
+ method public static inline void setGone(android.view.View, boolean);
+ method public static inline void setInvisible(android.view.View, boolean);
method public static inline void setPadding(android.view.View, @Px int size);
- method public static inline void setVisible(android.view.View, boolean value);
+ method public static inline void setVisible(android.view.View, boolean);
method public static inline void updateLayoutParams(android.view.View, kotlin.jvm.functions.Function1<? super android.view.ViewGroup.LayoutParams,kotlin.Unit> block);
method public static inline <reified T extends android.view.ViewGroup.LayoutParams> void updateLayoutParams(android.view.View, kotlin.jvm.functions.Function1<? super T,? extends kotlin.Unit> block);
method public static inline void updatePadding(android.view.View, optional @Px int left, optional @Px int top, optional @Px int right, optional @Px int bottom);
diff --git a/core/core-ktx/api/restricted_current.ignore b/core/core-ktx/api/restricted_current.ignore
new file mode 100644
index 0000000..150db83
--- /dev/null
+++ b/core/core-ktx/api/restricted_current.ignore
@@ -0,0 +1,7 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.core.view.ViewKt#setGone(android.view.View, boolean) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.core.view.ViewKt.setGone
+ParameterNameChange: androidx.core.view.ViewKt#setInvisible(android.view.View, boolean) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.core.view.ViewKt.setInvisible
+ParameterNameChange: androidx.core.view.ViewKt#setVisible(android.view.View, boolean) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.core.view.ViewKt.setVisible
diff --git a/core/core-ktx/api/restricted_current.txt b/core/core-ktx/api/restricted_current.txt
index 4790832..521f26c 100644
--- a/core/core-ktx/api/restricted_current.txt
+++ b/core/core-ktx/api/restricted_current.txt
@@ -604,10 +604,10 @@
method public static inline boolean isVisible(android.view.View);
method public static inline Runnable postDelayed(android.view.View, long delayInMillis, kotlin.jvm.functions.Function0<kotlin.Unit> action);
method @RequiresApi(16) public static inline Runnable postOnAnimationDelayed(android.view.View, long delayInMillis, kotlin.jvm.functions.Function0<kotlin.Unit> action);
- method public static inline void setGone(android.view.View, boolean value);
- method public static inline void setInvisible(android.view.View, boolean value);
+ method public static inline void setGone(android.view.View, boolean);
+ method public static inline void setInvisible(android.view.View, boolean);
method public static inline void setPadding(android.view.View, @Px int size);
- method public static inline void setVisible(android.view.View, boolean value);
+ method public static inline void setVisible(android.view.View, boolean);
method public static inline void updateLayoutParams(android.view.View, kotlin.jvm.functions.Function1<? super android.view.ViewGroup.LayoutParams,kotlin.Unit> block);
method public static inline <reified T extends android.view.ViewGroup.LayoutParams> void updateLayoutParams(android.view.View, kotlin.jvm.functions.Function1<? super T,? extends kotlin.Unit> block);
method public static inline void updatePadding(android.view.View, optional @Px int left, optional @Px int top, optional @Px int right, optional @Px int bottom);
diff --git a/core/core/api/api_lint.ignore b/core/core/api/api_lint.ignore
index 8005752..afba1c0 100644
--- a/core/core/api/api_lint.ignore
+++ b/core/core/api/api_lint.ignore
@@ -141,10 +141,28 @@
Use ListenableFuture (library), or a combination of OutcomeReceiver<R,E>, Executor, and CancellationSignal (platform) instead of java.util.concurrent.Future (method androidx.core.text.PrecomputedTextCompat.getTextFuture(CharSequence,androidx.core.text.PrecomputedTextCompat.Params,java.util.concurrent.Executor))
+BannedThrow: androidx.core.content.res.ResourcesCompat#getCachedFont(android.content.Context, int):
+ Methods must not throw unchecked exceptions
+BannedThrow: androidx.core.content.res.ResourcesCompat#getColor(android.content.res.Resources, int, android.content.res.Resources.Theme):
+ Methods must not throw unchecked exceptions
+BannedThrow: androidx.core.content.res.ResourcesCompat#getColorStateList(android.content.res.Resources, int, android.content.res.Resources.Theme):
+ Methods must not throw unchecked exceptions
+BannedThrow: androidx.core.content.res.ResourcesCompat#getDrawable(android.content.res.Resources, int, android.content.res.Resources.Theme):
+ Methods must not throw unchecked exceptions
+BannedThrow: androidx.core.content.res.ResourcesCompat#getDrawableForDensity(android.content.res.Resources, int, int, android.content.res.Resources.Theme):
+ Methods must not throw unchecked exceptions
+BannedThrow: androidx.core.content.res.ResourcesCompat#getFont(android.content.Context, int):
+ Methods must not throw unchecked exceptions
+BannedThrow: androidx.core.content.res.ResourcesCompat#getFont(android.content.Context, int, androidx.core.content.res.ResourcesCompat.FontCallback, android.os.Handler):
+ Methods must not throw unchecked exceptions
+BannedThrow: androidx.core.net.MailTo#parse(String):
+ Methods must not throw unchecked exceptions
+BannedThrow: androidx.core.net.MailTo#parse(android.net.Uri):
+ Methods must not throw unchecked exceptions
BannedThrow: androidx.core.widget.TextViewCompat#setAutoSizeTextTypeUniformWithConfiguration(android.widget.TextView, int, int, int, int):
- Methods must not mention RuntimeException subclasses in throws clauses (was `java.lang.IllegalArgumentException`)
+ Methods must not throw unchecked exceptions
BannedThrow: androidx.core.widget.TextViewCompat#setAutoSizeTextTypeUniformWithPresetSizes(android.widget.TextView, int[], int):
- Methods must not mention RuntimeException subclasses in throws clauses (was `java.lang.IllegalArgumentException`)
+ Methods must not throw unchecked exceptions
BuilderSetStyle: androidx.core.app.NotificationCompat.Action.Builder#extend(androidx.core.app.NotificationCompat.Action.Extender):
@@ -227,6 +245,62 @@
Symmetric method for `isLongpressEnabled` must be named `setLongpressEnabled`; was `setIsLongpressEnabled`
+InvalidNullability: androidx.core.app.JobIntentService#onBind(android.content.Intent) parameter #0:
+ Invalid nullability on parameter `intent` in method `onBind`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.content.FileProvider#attachInfo(android.content.Context, android.content.pm.ProviderInfo) parameter #0:
+ Invalid nullability on parameter `context` in method `attachInfo`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.content.FileProvider#attachInfo(android.content.Context, android.content.pm.ProviderInfo) parameter #1:
+ Invalid nullability on parameter `info` in method `attachInfo`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.content.FileProvider#insert(android.net.Uri, android.content.ContentValues) parameter #1:
+ Invalid nullability on parameter `values` in method `insert`. Parameters of overrides cannot be NonNull if super parameter is Nullable.
+InvalidNullability: androidx.core.content.FileProvider#update(android.net.Uri, android.content.ContentValues, String, String[]) parameter #1:
+ Invalid nullability on parameter `values` in method `update`. Parameters of overrides cannot be NonNull if super parameter is Nullable.
+InvalidNullability: androidx.core.content.UnusedAppRestrictionsBackportService#onBind(android.content.Intent):
+ Invalid nullability on method `onBind` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.core.graphics.drawable.RoundedBitmapDrawable#onBoundsChange(android.graphics.Rect) parameter #0:
+ Invalid nullability on parameter `bounds` in method `onBoundsChange`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.location.LocationListenerCompat#onStatusChanged(String, int, android.os.Bundle) parameter #0:
+ Invalid nullability on parameter `provider` in method `onStatusChanged`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.view.OneShotPreDrawListener#onViewAttachedToWindow(android.view.View) parameter #0:
+ Invalid nullability on parameter `v` in method `onViewAttachedToWindow`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.view.OneShotPreDrawListener#onViewDetachedFromWindow(android.view.View) parameter #0:
+ Invalid nullability on parameter `v` in method `onViewDetachedFromWindow`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.widget.NestedScrollView#addView(android.view.View) parameter #0:
+ Invalid nullability on parameter `child` in method `addView`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.widget.NestedScrollView#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.
+InvalidNullability: androidx.core.widget.NestedScrollView#measureChild(android.view.View, int, int) parameter #0:
+ Invalid nullability on parameter `child` in method `measureChild`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.widget.NestedScrollView#onGenericMotionEvent(android.view.MotionEvent) parameter #0:
+ Invalid nullability on parameter `event` in method `onGenericMotionEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.widget.NestedScrollView#onInterceptTouchEvent(android.view.MotionEvent) parameter #0:
+ Invalid nullability on parameter `ev` in method `onInterceptTouchEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.widget.NestedScrollView#onNestedFling(android.view.View, float, float, boolean) parameter #0:
+ Invalid nullability on parameter `target` in method `onNestedFling`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.widget.NestedScrollView#onNestedPreFling(android.view.View, float, float) parameter #0:
+ Invalid nullability on parameter `target` in method `onNestedPreFling`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.widget.NestedScrollView#onNestedPreScroll(android.view.View, int, int, int[]) parameter #0:
+ Invalid nullability on parameter `target` in method `onNestedPreScroll`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.widget.NestedScrollView#onNestedPreScroll(android.view.View, int, int, int[]) parameter #3:
+ Invalid nullability on parameter `consumed` in method `onNestedPreScroll`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.widget.NestedScrollView#onNestedScroll(android.view.View, int, int, int, int) parameter #0:
+ Invalid nullability on parameter `target` in method `onNestedScroll`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.widget.NestedScrollView#onNestedScrollAccepted(android.view.View, android.view.View, int) parameter #0:
+ Invalid nullability on parameter `child` in method `onNestedScrollAccepted`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.widget.NestedScrollView#onNestedScrollAccepted(android.view.View, android.view.View, int) parameter #1:
+ Invalid nullability on parameter `target` in method `onNestedScrollAccepted`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.widget.NestedScrollView#onStartNestedScroll(android.view.View, android.view.View, int) parameter #0:
+ Invalid nullability on parameter `child` in method `onStartNestedScroll`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.widget.NestedScrollView#onStartNestedScroll(android.view.View, android.view.View, int) parameter #1:
+ Invalid nullability on parameter `target` in method `onStartNestedScroll`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.widget.NestedScrollView#onStopNestedScroll(android.view.View) parameter #0:
+ Invalid nullability on parameter `target` in method `onStopNestedScroll`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.widget.NestedScrollView#onTouchEvent(android.view.MotionEvent) parameter #0:
+ Invalid nullability on parameter `ev` in method `onTouchEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.core.widget.NestedScrollView#requestChildRectangleOnScreen(android.view.View, android.graphics.Rect, boolean) parameter #0:
+ Invalid nullability on parameter `child` in method `requestChildRectangleOnScreen`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+
+
KotlinOperator: androidx.core.os.LocaleListCompat#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)
diff --git a/customview/customview-poolingcontainer/api/current.txt b/customview/customview-poolingcontainer/api/current.txt
index 9b61222..0f36bc7 100644
--- a/customview/customview-poolingcontainer/api/current.txt
+++ b/customview/customview-poolingcontainer/api/current.txt
@@ -8,7 +8,7 @@
method public static boolean isPoolingContainer(android.view.View);
method public static boolean isWithinPoolingContainer(android.view.View);
method public static void removePoolingContainerListener(android.view.View, androidx.customview.poolingcontainer.PoolingContainerListener listener);
- method public static void setPoolingContainer(android.view.View, boolean value);
+ method public static void setPoolingContainer(android.view.View, boolean);
}
public fun interface PoolingContainerListener {
diff --git a/customview/customview-poolingcontainer/api/public_plus_experimental_current.txt b/customview/customview-poolingcontainer/api/public_plus_experimental_current.txt
index 9b61222..0f36bc7 100644
--- a/customview/customview-poolingcontainer/api/public_plus_experimental_current.txt
+++ b/customview/customview-poolingcontainer/api/public_plus_experimental_current.txt
@@ -8,7 +8,7 @@
method public static boolean isPoolingContainer(android.view.View);
method public static boolean isWithinPoolingContainer(android.view.View);
method public static void removePoolingContainerListener(android.view.View, androidx.customview.poolingcontainer.PoolingContainerListener listener);
- method public static void setPoolingContainer(android.view.View, boolean value);
+ method public static void setPoolingContainer(android.view.View, boolean);
}
public fun interface PoolingContainerListener {
diff --git a/customview/customview-poolingcontainer/api/restricted_current.txt b/customview/customview-poolingcontainer/api/restricted_current.txt
index 9b61222..0f36bc7 100644
--- a/customview/customview-poolingcontainer/api/restricted_current.txt
+++ b/customview/customview-poolingcontainer/api/restricted_current.txt
@@ -8,7 +8,7 @@
method public static boolean isPoolingContainer(android.view.View);
method public static boolean isWithinPoolingContainer(android.view.View);
method public static void removePoolingContainerListener(android.view.View, androidx.customview.poolingcontainer.PoolingContainerListener listener);
- method public static void setPoolingContainer(android.view.View, boolean value);
+ method public static void setPoolingContainer(android.view.View, boolean);
}
public fun interface PoolingContainerListener {
diff --git a/datastore/datastore-core/api/current.ignore b/datastore/datastore-core/api/current.ignore
new file mode 100644
index 0000000..c6d6684
--- /dev/null
+++ b/datastore/datastore-core/api/current.ignore
@@ -0,0 +1,15 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.datastore.core.DataMigration#cleanUp(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.datastore.core.DataMigration.cleanUp
+ParameterNameChange: androidx.datastore.core.DataMigration#migrate(T, kotlin.coroutines.Continuation<? super T>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.datastore.core.DataMigration.migrate
+ParameterNameChange: androidx.datastore.core.DataMigration#shouldMigrate(T, kotlin.coroutines.Continuation<? super java.lang.Boolean>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.datastore.core.DataMigration.shouldMigrate
+ParameterNameChange: androidx.datastore.core.DataStore#updateData(kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.datastore.core.DataStore.updateData
+ParameterNameChange: androidx.datastore.core.Serializer#readFrom(java.io.InputStream, kotlin.coroutines.Continuation<? super T>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.datastore.core.Serializer.readFrom
+ParameterNameChange: androidx.datastore.core.Serializer#writeTo(T, java.io.OutputStream, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.datastore.core.Serializer.writeTo
+ParameterNameChange: androidx.datastore.core.handlers.ReplaceFileCorruptionHandler#handleCorruption(androidx.datastore.core.CorruptionException, kotlin.coroutines.Continuation<? super T>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.datastore.core.handlers.ReplaceFileCorruptionHandler.handleCorruption
diff --git a/datastore/datastore-core/api/current.txt b/datastore/datastore-core/api/current.txt
index abfdd9c..61fa0ec 100644
--- a/datastore/datastore-core/api/current.txt
+++ b/datastore/datastore-core/api/current.txt
@@ -6,14 +6,14 @@
}
public interface DataMigration<T> {
- method public suspend Object? cleanUp(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? migrate(T? currentData, kotlin.coroutines.Continuation<? super T> p);
- method public suspend Object? shouldMigrate(T? currentData, kotlin.coroutines.Continuation<? super java.lang.Boolean> p);
+ method public suspend Object? cleanUp(kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? migrate(T? currentData, kotlin.coroutines.Continuation<? super T>);
+ method public suspend Object? shouldMigrate(T? currentData, kotlin.coroutines.Continuation<? super java.lang.Boolean>);
}
public interface DataStore<T> {
method public kotlinx.coroutines.flow.Flow<T> getData();
- method public suspend Object? updateData(kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> transform, kotlin.coroutines.Continuation<? super T> p);
+ method public suspend Object? updateData(kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> transform, kotlin.coroutines.Continuation<? super T>);
property public abstract kotlinx.coroutines.flow.Flow<T> data;
}
@@ -27,8 +27,8 @@
public interface Serializer<T> {
method public T! getDefaultValue();
- method public suspend Object? readFrom(java.io.InputStream input, kotlin.coroutines.Continuation<? super T> p);
- method public suspend Object? writeTo(T? t, java.io.OutputStream output, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? readFrom(java.io.InputStream input, kotlin.coroutines.Continuation<? super T>);
+ method public suspend Object? writeTo(T? t, java.io.OutputStream output, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public abstract T! defaultValue;
}
@@ -38,7 +38,7 @@
public final class ReplaceFileCorruptionHandler<T> {
ctor public ReplaceFileCorruptionHandler(kotlin.jvm.functions.Function1<? super androidx.datastore.core.CorruptionException,? extends T> produceNewData);
- method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public suspend Object? handleCorruption(androidx.datastore.core.CorruptionException ex, kotlin.coroutines.Continuation<? super T> p) throws java.io.IOException;
+ method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public suspend Object? handleCorruption(androidx.datastore.core.CorruptionException ex, kotlin.coroutines.Continuation<? super T>) throws java.io.IOException;
}
}
diff --git a/datastore/datastore-core/api/public_plus_experimental_current.txt b/datastore/datastore-core/api/public_plus_experimental_current.txt
index abfdd9c..61fa0ec 100644
--- a/datastore/datastore-core/api/public_plus_experimental_current.txt
+++ b/datastore/datastore-core/api/public_plus_experimental_current.txt
@@ -6,14 +6,14 @@
}
public interface DataMigration<T> {
- method public suspend Object? cleanUp(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? migrate(T? currentData, kotlin.coroutines.Continuation<? super T> p);
- method public suspend Object? shouldMigrate(T? currentData, kotlin.coroutines.Continuation<? super java.lang.Boolean> p);
+ method public suspend Object? cleanUp(kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? migrate(T? currentData, kotlin.coroutines.Continuation<? super T>);
+ method public suspend Object? shouldMigrate(T? currentData, kotlin.coroutines.Continuation<? super java.lang.Boolean>);
}
public interface DataStore<T> {
method public kotlinx.coroutines.flow.Flow<T> getData();
- method public suspend Object? updateData(kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> transform, kotlin.coroutines.Continuation<? super T> p);
+ method public suspend Object? updateData(kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> transform, kotlin.coroutines.Continuation<? super T>);
property public abstract kotlinx.coroutines.flow.Flow<T> data;
}
@@ -27,8 +27,8 @@
public interface Serializer<T> {
method public T! getDefaultValue();
- method public suspend Object? readFrom(java.io.InputStream input, kotlin.coroutines.Continuation<? super T> p);
- method public suspend Object? writeTo(T? t, java.io.OutputStream output, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? readFrom(java.io.InputStream input, kotlin.coroutines.Continuation<? super T>);
+ method public suspend Object? writeTo(T? t, java.io.OutputStream output, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public abstract T! defaultValue;
}
@@ -38,7 +38,7 @@
public final class ReplaceFileCorruptionHandler<T> {
ctor public ReplaceFileCorruptionHandler(kotlin.jvm.functions.Function1<? super androidx.datastore.core.CorruptionException,? extends T> produceNewData);
- method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public suspend Object? handleCorruption(androidx.datastore.core.CorruptionException ex, kotlin.coroutines.Continuation<? super T> p) throws java.io.IOException;
+ method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public suspend Object? handleCorruption(androidx.datastore.core.CorruptionException ex, kotlin.coroutines.Continuation<? super T>) throws java.io.IOException;
}
}
diff --git a/datastore/datastore-core/api/restricted_current.ignore b/datastore/datastore-core/api/restricted_current.ignore
new file mode 100644
index 0000000..c6d6684
--- /dev/null
+++ b/datastore/datastore-core/api/restricted_current.ignore
@@ -0,0 +1,15 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.datastore.core.DataMigration#cleanUp(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.datastore.core.DataMigration.cleanUp
+ParameterNameChange: androidx.datastore.core.DataMigration#migrate(T, kotlin.coroutines.Continuation<? super T>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.datastore.core.DataMigration.migrate
+ParameterNameChange: androidx.datastore.core.DataMigration#shouldMigrate(T, kotlin.coroutines.Continuation<? super java.lang.Boolean>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.datastore.core.DataMigration.shouldMigrate
+ParameterNameChange: androidx.datastore.core.DataStore#updateData(kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.datastore.core.DataStore.updateData
+ParameterNameChange: androidx.datastore.core.Serializer#readFrom(java.io.InputStream, kotlin.coroutines.Continuation<? super T>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.datastore.core.Serializer.readFrom
+ParameterNameChange: androidx.datastore.core.Serializer#writeTo(T, java.io.OutputStream, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.datastore.core.Serializer.writeTo
+ParameterNameChange: androidx.datastore.core.handlers.ReplaceFileCorruptionHandler#handleCorruption(androidx.datastore.core.CorruptionException, kotlin.coroutines.Continuation<? super T>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.datastore.core.handlers.ReplaceFileCorruptionHandler.handleCorruption
diff --git a/datastore/datastore-core/api/restricted_current.txt b/datastore/datastore-core/api/restricted_current.txt
index abfdd9c..61fa0ec 100644
--- a/datastore/datastore-core/api/restricted_current.txt
+++ b/datastore/datastore-core/api/restricted_current.txt
@@ -6,14 +6,14 @@
}
public interface DataMigration<T> {
- method public suspend Object? cleanUp(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? migrate(T? currentData, kotlin.coroutines.Continuation<? super T> p);
- method public suspend Object? shouldMigrate(T? currentData, kotlin.coroutines.Continuation<? super java.lang.Boolean> p);
+ method public suspend Object? cleanUp(kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? migrate(T? currentData, kotlin.coroutines.Continuation<? super T>);
+ method public suspend Object? shouldMigrate(T? currentData, kotlin.coroutines.Continuation<? super java.lang.Boolean>);
}
public interface DataStore<T> {
method public kotlinx.coroutines.flow.Flow<T> getData();
- method public suspend Object? updateData(kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> transform, kotlin.coroutines.Continuation<? super T> p);
+ method public suspend Object? updateData(kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> transform, kotlin.coroutines.Continuation<? super T>);
property public abstract kotlinx.coroutines.flow.Flow<T> data;
}
@@ -27,8 +27,8 @@
public interface Serializer<T> {
method public T! getDefaultValue();
- method public suspend Object? readFrom(java.io.InputStream input, kotlin.coroutines.Continuation<? super T> p);
- method public suspend Object? writeTo(T? t, java.io.OutputStream output, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? readFrom(java.io.InputStream input, kotlin.coroutines.Continuation<? super T>);
+ method public suspend Object? writeTo(T? t, java.io.OutputStream output, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public abstract T! defaultValue;
}
@@ -38,7 +38,7 @@
public final class ReplaceFileCorruptionHandler<T> {
ctor public ReplaceFileCorruptionHandler(kotlin.jvm.functions.Function1<? super androidx.datastore.core.CorruptionException,? extends T> produceNewData);
- method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public suspend Object? handleCorruption(androidx.datastore.core.CorruptionException ex, kotlin.coroutines.Continuation<? super T> p) throws java.io.IOException;
+ method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public suspend Object? handleCorruption(androidx.datastore.core.CorruptionException ex, kotlin.coroutines.Continuation<? super T>) throws java.io.IOException;
}
}
diff --git a/datastore/datastore-preferences-core/api/current.ignore b/datastore/datastore-preferences-core/api/current.ignore
new file mode 100644
index 0000000..92ab16a
--- /dev/null
+++ b/datastore/datastore-preferences-core/api/current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.datastore.preferences.core.PreferencesKt#edit(androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences>, kotlin.jvm.functions.Function2<? super androidx.datastore.preferences.core.MutablePreferences,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super androidx.datastore.preferences.core.Preferences>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.datastore.preferences.core.PreferencesKt.edit
diff --git a/datastore/datastore-preferences-core/api/current.txt b/datastore/datastore-preferences-core/api/current.txt
index 408c099..bb156b0 100644
--- a/datastore/datastore-preferences-core/api/current.txt
+++ b/datastore/datastore-preferences-core/api/current.txt
@@ -57,7 +57,7 @@
}
public final class PreferencesKt {
- method public static suspend Object? edit(androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences>, kotlin.jvm.functions.Function2<? super androidx.datastore.preferences.core.MutablePreferences,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> transform, kotlin.coroutines.Continuation<? super androidx.datastore.preferences.core.Preferences> p);
+ method public static suspend Object? edit(androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences>, kotlin.jvm.functions.Function2<? super androidx.datastore.preferences.core.MutablePreferences,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> transform, kotlin.coroutines.Continuation<? super androidx.datastore.preferences.core.Preferences>);
}
}
diff --git a/datastore/datastore-preferences-core/api/public_plus_experimental_current.txt b/datastore/datastore-preferences-core/api/public_plus_experimental_current.txt
index 408c099..bb156b0 100644
--- a/datastore/datastore-preferences-core/api/public_plus_experimental_current.txt
+++ b/datastore/datastore-preferences-core/api/public_plus_experimental_current.txt
@@ -57,7 +57,7 @@
}
public final class PreferencesKt {
- method public static suspend Object? edit(androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences>, kotlin.jvm.functions.Function2<? super androidx.datastore.preferences.core.MutablePreferences,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> transform, kotlin.coroutines.Continuation<? super androidx.datastore.preferences.core.Preferences> p);
+ method public static suspend Object? edit(androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences>, kotlin.jvm.functions.Function2<? super androidx.datastore.preferences.core.MutablePreferences,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> transform, kotlin.coroutines.Continuation<? super androidx.datastore.preferences.core.Preferences>);
}
}
diff --git a/datastore/datastore-preferences-core/api/restricted_current.ignore b/datastore/datastore-preferences-core/api/restricted_current.ignore
new file mode 100644
index 0000000..92ab16a
--- /dev/null
+++ b/datastore/datastore-preferences-core/api/restricted_current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.datastore.preferences.core.PreferencesKt#edit(androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences>, kotlin.jvm.functions.Function2<? super androidx.datastore.preferences.core.MutablePreferences,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super androidx.datastore.preferences.core.Preferences>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.datastore.preferences.core.PreferencesKt.edit
diff --git a/datastore/datastore-preferences-core/api/restricted_current.txt b/datastore/datastore-preferences-core/api/restricted_current.txt
index 408c099..bb156b0 100644
--- a/datastore/datastore-preferences-core/api/restricted_current.txt
+++ b/datastore/datastore-preferences-core/api/restricted_current.txt
@@ -57,7 +57,7 @@
}
public final class PreferencesKt {
- method public static suspend Object? edit(androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences>, kotlin.jvm.functions.Function2<? super androidx.datastore.preferences.core.MutablePreferences,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> transform, kotlin.coroutines.Continuation<? super androidx.datastore.preferences.core.Preferences> p);
+ method public static suspend Object? edit(androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences>, kotlin.jvm.functions.Function2<? super androidx.datastore.preferences.core.MutablePreferences,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> transform, kotlin.coroutines.Continuation<? super androidx.datastore.preferences.core.Preferences>);
}
}
diff --git a/datastore/datastore/api/api_lint.ignore b/datastore/datastore/api/api_lint.ignore
index 18fc7f7..b424651 100644
--- a/datastore/datastore/api/api_lint.ignore
+++ b/datastore/datastore/api/api_lint.ignore
@@ -1,4 +1,10 @@
// Baseline format: 1.0
+InvalidNullability: 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.
+InvalidNullability: 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/api/current.ignore b/datastore/datastore/api/current.ignore
new file mode 100644
index 0000000..1301f27
--- /dev/null
+++ b/datastore/datastore/api/current.ignore
@@ -0,0 +1,7 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.datastore.migrations.SharedPreferencesMigration#cleanUp(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.datastore.migrations.SharedPreferencesMigration.cleanUp
+ParameterNameChange: androidx.datastore.migrations.SharedPreferencesMigration#migrate(T, kotlin.coroutines.Continuation<? super T>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.datastore.migrations.SharedPreferencesMigration.migrate
+ParameterNameChange: androidx.datastore.migrations.SharedPreferencesMigration#shouldMigrate(T, kotlin.coroutines.Continuation<? super java.lang.Boolean>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.datastore.migrations.SharedPreferencesMigration.shouldMigrate
diff --git a/datastore/datastore/api/current.txt b/datastore/datastore/api/current.txt
index 46a48c7..029f07b 100644
--- a/datastore/datastore/api/current.txt
+++ b/datastore/datastore/api/current.txt
@@ -20,9 +20,9 @@
ctor public SharedPreferencesMigration(android.content.Context context, String sharedPreferencesName, optional java.util.Set<java.lang.String> keysToMigrate, optional kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super java.lang.Boolean>,?> shouldRunMigration, kotlin.jvm.functions.Function3<? super androidx.datastore.migrations.SharedPreferencesView,? super T,? super kotlin.coroutines.Continuation<? super T>,?> migrate);
ctor public SharedPreferencesMigration(android.content.Context context, String sharedPreferencesName, optional java.util.Set<java.lang.String> keysToMigrate, kotlin.jvm.functions.Function3<? super androidx.datastore.migrations.SharedPreferencesView,? super T,? super kotlin.coroutines.Continuation<? super T>,?> migrate);
ctor public SharedPreferencesMigration(android.content.Context context, String sharedPreferencesName, kotlin.jvm.functions.Function3<? super androidx.datastore.migrations.SharedPreferencesView,? super T,? super kotlin.coroutines.Continuation<? super T>,?> migrate);
- method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public suspend Object? cleanUp(kotlin.coroutines.Continuation<? super kotlin.Unit> p) throws java.io.IOException;
- method public suspend Object? migrate(T? currentData, kotlin.coroutines.Continuation<? super T> p);
- method public suspend Object? shouldMigrate(T? currentData, kotlin.coroutines.Continuation<? super java.lang.Boolean> p);
+ method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public suspend Object? cleanUp(kotlin.coroutines.Continuation<? super kotlin.Unit>) throws java.io.IOException;
+ method public suspend Object? migrate(T? currentData, kotlin.coroutines.Continuation<? super T>);
+ method public suspend Object? shouldMigrate(T? currentData, kotlin.coroutines.Continuation<? super java.lang.Boolean>);
}
public final class SharedPreferencesMigrationKt {
diff --git a/datastore/datastore/api/public_plus_experimental_current.txt b/datastore/datastore/api/public_plus_experimental_current.txt
index 46a48c7..029f07b 100644
--- a/datastore/datastore/api/public_plus_experimental_current.txt
+++ b/datastore/datastore/api/public_plus_experimental_current.txt
@@ -20,9 +20,9 @@
ctor public SharedPreferencesMigration(android.content.Context context, String sharedPreferencesName, optional java.util.Set<java.lang.String> keysToMigrate, optional kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super java.lang.Boolean>,?> shouldRunMigration, kotlin.jvm.functions.Function3<? super androidx.datastore.migrations.SharedPreferencesView,? super T,? super kotlin.coroutines.Continuation<? super T>,?> migrate);
ctor public SharedPreferencesMigration(android.content.Context context, String sharedPreferencesName, optional java.util.Set<java.lang.String> keysToMigrate, kotlin.jvm.functions.Function3<? super androidx.datastore.migrations.SharedPreferencesView,? super T,? super kotlin.coroutines.Continuation<? super T>,?> migrate);
ctor public SharedPreferencesMigration(android.content.Context context, String sharedPreferencesName, kotlin.jvm.functions.Function3<? super androidx.datastore.migrations.SharedPreferencesView,? super T,? super kotlin.coroutines.Continuation<? super T>,?> migrate);
- method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public suspend Object? cleanUp(kotlin.coroutines.Continuation<? super kotlin.Unit> p) throws java.io.IOException;
- method public suspend Object? migrate(T? currentData, kotlin.coroutines.Continuation<? super T> p);
- method public suspend Object? shouldMigrate(T? currentData, kotlin.coroutines.Continuation<? super java.lang.Boolean> p);
+ method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public suspend Object? cleanUp(kotlin.coroutines.Continuation<? super kotlin.Unit>) throws java.io.IOException;
+ method public suspend Object? migrate(T? currentData, kotlin.coroutines.Continuation<? super T>);
+ method public suspend Object? shouldMigrate(T? currentData, kotlin.coroutines.Continuation<? super java.lang.Boolean>);
}
public final class SharedPreferencesMigrationKt {
diff --git a/datastore/datastore/api/restricted_current.ignore b/datastore/datastore/api/restricted_current.ignore
new file mode 100644
index 0000000..1301f27
--- /dev/null
+++ b/datastore/datastore/api/restricted_current.ignore
@@ -0,0 +1,7 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.datastore.migrations.SharedPreferencesMigration#cleanUp(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.datastore.migrations.SharedPreferencesMigration.cleanUp
+ParameterNameChange: androidx.datastore.migrations.SharedPreferencesMigration#migrate(T, kotlin.coroutines.Continuation<? super T>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.datastore.migrations.SharedPreferencesMigration.migrate
+ParameterNameChange: androidx.datastore.migrations.SharedPreferencesMigration#shouldMigrate(T, kotlin.coroutines.Continuation<? super java.lang.Boolean>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.datastore.migrations.SharedPreferencesMigration.shouldMigrate
diff --git a/datastore/datastore/api/restricted_current.txt b/datastore/datastore/api/restricted_current.txt
index 46a48c7..029f07b 100644
--- a/datastore/datastore/api/restricted_current.txt
+++ b/datastore/datastore/api/restricted_current.txt
@@ -20,9 +20,9 @@
ctor public SharedPreferencesMigration(android.content.Context context, String sharedPreferencesName, optional java.util.Set<java.lang.String> keysToMigrate, optional kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super java.lang.Boolean>,?> shouldRunMigration, kotlin.jvm.functions.Function3<? super androidx.datastore.migrations.SharedPreferencesView,? super T,? super kotlin.coroutines.Continuation<? super T>,?> migrate);
ctor public SharedPreferencesMigration(android.content.Context context, String sharedPreferencesName, optional java.util.Set<java.lang.String> keysToMigrate, kotlin.jvm.functions.Function3<? super androidx.datastore.migrations.SharedPreferencesView,? super T,? super kotlin.coroutines.Continuation<? super T>,?> migrate);
ctor public SharedPreferencesMigration(android.content.Context context, String sharedPreferencesName, kotlin.jvm.functions.Function3<? super androidx.datastore.migrations.SharedPreferencesView,? super T,? super kotlin.coroutines.Continuation<? super T>,?> migrate);
- method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public suspend Object? cleanUp(kotlin.coroutines.Continuation<? super kotlin.Unit> p) throws java.io.IOException;
- method public suspend Object? migrate(T? currentData, kotlin.coroutines.Continuation<? super T> p);
- method public suspend Object? shouldMigrate(T? currentData, kotlin.coroutines.Continuation<? super java.lang.Boolean> p);
+ method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public suspend Object? cleanUp(kotlin.coroutines.Continuation<? super kotlin.Unit>) throws java.io.IOException;
+ method public suspend Object? migrate(T? currentData, kotlin.coroutines.Continuation<? super T>);
+ method public suspend Object? shouldMigrate(T? currentData, kotlin.coroutines.Continuation<? super java.lang.Boolean>);
}
public final class SharedPreferencesMigrationKt {
diff --git a/development/update_playground.sh b/development/update_playground.sh
index 8d4c8ba..2df4eac 100755
--- a/development/update_playground.sh
+++ b/development/update_playground.sh
@@ -1,21 +1,29 @@
#!/bin/bash
MODE=${1:-s}
+
+# Needed for compat between GNU sed (Linux default) and BSD sed (OSX default).
+# - GNU sed requires no space between value for -i
+# - BSD sed requires that a value be passed for -i.
+function fn_sed_inplace {
+ sed -i.bak "$@" && rm "${@: -1}.bak"
+}
+
function fn_update_snapshot {
BUILDID_ANDROIDX=`curl -s https://androidx.dev/snapshots/builds | sed -nr 's|.*snapshots/builds/([0-9]*).*|\1|gp' | head -n 1`
echo "Updating snapshot id: $BUILDID_ANDROIDX"
- sed -i '' "s/androidx.playground.snapshotBuildId=.*/androidx.playground.snapshotBuildId=$BUILDID_ANDROIDX/g" playground-common/playground.properties
+ fn_sed_inplace "s/androidx.playground.snapshotBuildId=.*/androidx.playground.snapshotBuildId=$BUILDID_ANDROIDX/g" playground-common/playground.properties
}
function fn_update_metalava {
BUILDID_METALAVA=`curl -s https://androidx.dev/metalava/builds | sed -nr 's|.*metalava/builds/([0-9]*).*|\1|gp' | head -n 1`
echo "Updating metalava id: $BUILDID_METALAVA"
- sed -i '' "s/androidx.playground.metalavaBuildId=.*/androidx.playground.metalavaBuildId=$BUILDID_METALAVA/g" playground-common/playground.properties
+ fn_sed_inplace "s/androidx.playground.metalavaBuildId=.*/androidx.playground.metalavaBuildId=$BUILDID_METALAVA/g" playground-common/playground.properties
}
function fn_update_dokka {
BUILDID_DOKKA=`curl -s https://androidx.dev/dokka/builds | sed -nr 's|.*dokka/builds/([0-9]*).*|\1|gp' | head -n 1`
echo "Updating dokka id: $BUILDID_DOKKA"
- sed -i '' "s/androidx.playground.dokkaBuildId=.*/androidx.playground.dokkaBuildId=$BUILDID_DOKKA/g" playground-common/playground.properties
+ fn_sed_inplace "s/androidx.playground.dokkaBuildId=.*/androidx.playground.dokkaBuildId=$BUILDID_DOKKA/g" playground-common/playground.properties
}
if [ "$MODE" == "s" ]; then
diff --git a/docs-tip-of-tree/build.gradle b/docs-tip-of-tree/build.gradle
index 925cdf1..023f597 100644
--- a/docs-tip-of-tree/build.gradle
+++ b/docs-tip-of-tree/build.gradle
@@ -64,6 +64,7 @@
samples(project(":compose:material:material-icons-core:material-icons-core-samples"))
docs(project(":compose:material:material-ripple"))
docs(project(":compose:material:material-window"))
+ samples(project(":compose:material:material-window:material-window-samples"))
samples(project(":compose:material:material:material-samples"))
docs(project(":compose:runtime:runtime"))
docs(project(":compose:runtime:runtime-livedata"))
diff --git a/docs/api_guidelines.md b/docs/api_guidelines.md
index e732660..257c7da 100644
--- a/docs/api_guidelines.md
+++ b/docs/api_guidelines.md
@@ -92,6 +92,22 @@
./create_project.py androidx.foo foo-bar
```
+If you see an error message `No module named 'toml'` try the following steps.
+
+* Install necessary tools if they are not already installed
+ * (Linux) `sudo apt-get install virtualenv python3-venv`
+ * (Mac) `pip3 install virtualenv`
+* Create a virtual environment with `virtualenv androidx_project_creator` (you
+ can choose another name for your virtualenv if you wish).
+* Install the `toml` library in your virtual env with
+ `androidx_project_creator/bin/pip3 install toml`
+* Run the project creator script from your virtual env with
+ `androidx_project_creator/bin/python3
+ ./development/project-creator/create_project.py androidx.foo foo-bar`
+* Delete your virtual env with `rm -rf ./androidx-project_creator`
+ * virtualenv will automatically .gitignore itself, but you may want to to
+ remove it anyway.
+
#### Common sub-feature names {#module-naming-subfeature}
* `-testing` for an artifact intended to be used while testing usages of your
@@ -1622,14 +1638,47 @@
#### With return values {#async-return}
+###### Kotlin
+
Traditionally, asynchronous work on Android that results in an output value
would use a callback; however, better alternatives exist for libraries.
-Kotlin libraries should prefer
+Kotlin libraries should consider
[coroutines](https://kotlinlang.org/docs/reference/coroutines-overview.html) and
-`suspend` functions, but please refer to the guidance on
-[allowable dependencies](#dependencies-coroutines) before adding a new
-dependency on coroutines.
+`suspend` functions for APIs according to the following rules, but please refer
+to the guidance on [allowable dependencies](#dependencies-coroutines) before
+adding a new dependency on coroutines.
+
+Kotlin suspend fun vs blocking | Behavior
+------------------------------------ | --------------------------
+blocking function with @WorkerThread | API is blocking
+suspend | API is async (e.g. Future)
+
+In general, do not introduce a suspend function entirely to switch threads for
+blocking calls. To do so correctly requires that we allow the developer to
+configure the Dispatcher. As there is already a coroutines-based API for
+changing dispatchers (withContext) that the caller may use to switch threads, it
+is unecessary API overhead to provide a duplicate mechanism. In addition, it
+unecessary limits callers to coroutine contexts.
+
+```kotlin
+// DO expose blocking calls as blocking calls
+@WorkerThread
+fun blockingCall()
+
+// DON'T wrap in suspend functions (only to switch threads)
+suspend fun blockingCallWrappedInSuspend(
+ dispatcher: CoroutineDispatcher = Dispatchers.Default
+) = withContext(dispatcher) { /* ... */ }
+
+// DO expose async calls as suspend funs
+suspend fun asyncCall(): ReturnValue
+
+// DON'T expose async calls as a callback-based API (for the main API)
+fun asyncCall(executor: Executor, callback: (ReturnValue) -> Unit)
+```
+
+###### Java
Java libraries should prefer `ListenableFuture` and the
[`CallbackToFutureAdapter`](https://developer.android.com/reference/androidx/concurrent/futures/CallbackToFutureAdapter)
@@ -2011,14 +2060,11 @@
new lint check, and it is prohibitively expensive / not possible to fix the
errors generated by enabling this lint check.
-To update a lint baseline (`lint-baseline.xml`) after you have fixed issues,
-first **manually delete the `lint-baseline.xml` file** for your project and then
-run the `lintDebug` task for your project with the argument
-`-PupdateLintBaseline`.
+To update a lint baseline (`lint-baseline.xml`) after you have fixed issues, run
+the `updateLintBaseline` task.
```shell
-rm core/core/lint-baseline.xml
-./gradlew :core:core:lintDebug -PupdateLintBaseline
+./gradlew :core:core:updateLintBaseline
```
## Metalava API Lint
diff --git a/docs/index.md b/docs/index.md
index ff3003a..0a9bae4 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -35,7 +35,7 @@
developed new policies around versioning and release, and developed tools to
make it easy for developers to migrate.
-Revision 28.0.0 of the Support Library, which launched as stable in September
+Revision `28.0.0` of the Support Library, which launched as stable in September
2018, was the last feature release in the `android.support` package. There will
be no further releases under Support Library packaging.
@@ -46,4 +46,5 @@
Have a bug or feature request? Please check our
[public Issue Tracker component](http://issuetracker.google.com/issues/new?component=192731&template=842428)
for duplicates first, then file against the appropriate sub-component according
-to the library package or infrastructure system.
+to the library package or infrastructure system. Learn more at
+[Issue tracking](onboarding.md#tracking-bugs).
diff --git a/docs/lint_guide.md b/docs/lint_guide.md
index 9a0fdb7..49b20707 100644
--- a/docs/lint_guide.md
+++ b/docs/lint_guide.md
@@ -1,4 +1,4 @@
-# Adding custom Lint checks
+# Adding custom lint checks
[TOC]
@@ -16,7 +16,7 @@
### Create a module
-If this is the first Lint rule for a library, you will need to create a module
+If this is the first lint rule for a library, you will need to create a module
by doing the following:
Include the project in the top-level `settings.gradle` file so that it shows up
@@ -57,7 +57,7 @@
type = LibraryType.LINT
mavenVersion = LibraryVersions.MYLIBRARY
mavenGroup = LibraryGroups.MYLIBRARY
- inceptionYear = "2019"
+ inceptionYear = "2022"
description = "Lint checks for MyLibrary"
}
```
@@ -74,25 +74,32 @@
```kotlin
class MyLibraryIssueRegistry : IssueRegistry() {
- override val api = 11
override val minApi = CURRENT_API
+ override val api = 13
override val issues get() = listOf(MyLibraryDetector.ISSUE)
+ override val vendor = Vendor(
+ feedbackUrl = "https://issuetracker.google.com/issues/new?component=######",
+ identifier = "androidx.mylibrary",
+ vendorName = "Android Open Source Project",
+ )
}
```
-The maximum version this Lint check will will work with is defined by `api =
-11`, where versions `0`-`11` correspond to Lint/Studio versions `3.0`-`3.11`.
+The maximum version this lint check will will work with is defined by `api =
+13`. Typically, this should track `CURRENT_API`.
-`minApi = CURRENT_API` sets the lowest version of Lint that this will work with.
+`minApi = CURRENT_API` sets the lowest version of the Lint tool that this will
+work with.
-`CURRENT_API` is defined by the Lint API version against which your project is
-compiled, as defined in the module's `build.gradle` file. Jetpack Lint modules
-should compile using the Lint API version referenced in
-[Dependencies.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:buildSrc/public/src/main/kotlin/androidx/build/dependencies/Dependencies.kt;l=176).
+`CURRENT_API` is defined by the Lint tool API version against which your project
+is compiled, as defined in the module's `build.gradle` file. Jetpack lint check
+modules should compile using the Lint tool API version referenced in
+[libs.versions.toml](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:gradle/libs.versions.toml;l=8).
-We guarantee that our Lint checks work with the versions referenced by `minApi`
+We guarantee that our lint checks work with the versions referenced by `minApi`
and `api` by running our tests with both versions. For newer versions of Android
-Studio (and consequently, Lint) the API variable will need to be updated.
+Studio (and consequently, the Lint tool) the API variable will need to be
+updated.
The `IssueRegistry` requires a list of all of the issues to check. You must
override the `IssueRegistry.getIssues()` method. Here, we override that method
@@ -100,14 +107,14 @@
[Example `IssueRegistry` Implementation](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:fragment/fragment-lint/src/main/java/androidx/fragment/lint/FragmentIssueRegistry.kt)
-There are 4 primary types of Lint checks:
+There are 4 primary types of lint checks:
1. Code - Applied to source code, ex. `.java` and `.kt` files
1. XML - Applied to XML resource files
1. Android Manifest - Applied to `AndroidManifest.xml`
1. Gradle - Applied to Gradle configuration files, ex. `build.gradle`
-It is also possible to apply Lint checks to compiled bytecode (`.class` files)
+It is also possible to apply lint checks to compiled bytecode (`.class` files)
or binary resource files like images, but these are less common.
## PSI & UAST mapping
@@ -250,7 +257,7 @@
## Code detector
-These are Lint checks that will apply to source code files -- primarily Java and
+These are lint checks that will apply to source code files -- primarily Java and
Kotlin, but can also be used for other similar file types. All code detectors
that analyze Java or Kotlin files should implement the
[SourceCodeScanner](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-master-dev:lint/libs/lint-api/src/main/java/com/android/tools/lint/detector/api/SourceCodeScanner.kt).
@@ -259,7 +266,7 @@
#### Calls to specific methods
-##### getApplicableMethodNames
+##### `getApplicableMethodNames`
This defines the list of methods where lint will call the visitMethodCall
callback.
@@ -268,10 +275,10 @@
override fun getApplicableMethodNames(): List<String>? = listOf(METHOD_NAMES)
```
-##### visitMethodCall
+##### `visitMethodCall`
-This defines the callback that Lint will call when it encounters a call to an
-applicable method.
+This defines the callback that the Lint tool will call when it encounters a call
+to an applicable method.
```kotlin
override fun visitMethodCall(context: JavaContext, node: UCallExpression, method: PsiMethod) {}
@@ -279,7 +286,7 @@
#### Calls to specific class instantiations
-##### getApplicableConstructorTypes
+##### `getApplicableConstructorTypes`
```kotlin
override fun getApplicableConstructorTypes(): List<String>? = listOf(CLASS_NAMES)
@@ -293,13 +300,13 @@
#### Classes that extend given superclasses
-##### getApplicableSuperClasses
+##### `getApplicableSuperClasses`
```kotlin
override fun applicableSuperClasses(): List<String>? = listOf(CLASS_NAMES)
```
-##### visitClass
+##### `visitClass`
```kotlin
override fun visitClass(context: JavaContext, declaration: UClass) {}
@@ -322,12 +329,12 @@
### Method call analysis
-#### resolve()
+#### `resolve()`
Resolves into a `UCallExpression` or `UMethod` to perform analysis requiring the
method body or containing class.
-#### ReceiverType
+#### `receiverType`
Each `UCallExpression` has a `receiverType` corresponding to the `PsiType` of
the receiver of the method call.
@@ -381,10 +388,14 @@
Since this class also depends on the `LifecycleOwner` class it is necessary to
create another stub for this.
+NOTE `package-info.java` cannot be represented by a source stub and must be
+provided as bytecode. See [Updating bytecode](#tips-bytecode) for tips on using
+bytecode in lint tests.
+
## XML resource detector
-These are Lint rules that will apply to resource files including `anim`,
-`layout`, `values`, etc. Lint rules being applied to resource files should
+These are lint checks that will apply to resource files including `anim`,
+`layout`, `values`, etc. lint checks being applied to resource files should
extend
[`ResourceXmlDetector`](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-master-dev:lint/libs/lint-api/src/main/java/com/android/tools/lint/detector/api/ResourceXmlDetector.java).
The `Detector` must define the issue it is going to detect, most commonly as a
@@ -418,7 +429,7 @@
visitElement(context: XmlContext, element: Element)
```
-#### appliesTo
+#### `appliesTo`
This determines the
[ResourceFolderType](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-master-dev:layoutlib-api/src/main/java/com/android/resources/ResourceFolderType.java)
@@ -430,19 +441,19 @@
}
```
-#### getApplicableElements
+#### `getApplicableElements`
-This defines the list of elements where Lint will call your visitElement
-callback method when encountered.
+This defines the list of elements where the Lint tool will call your
+`visitElement` callback method when encountered.
```kotlin
override fun getApplicableElements(): Collection<String>? = Collections.singleton(ELEMENT)
```
-#### visitElement
+#### `visitElement`
This defines the behavior when an applicable element is found. Here you normally
-place the actions you want to take if a violation of the Lint check is found.
+place the actions you want to take if a violation of the lint check is found.
```kotlin
override fun visitElement(context: XmlContext, element: Element) {
@@ -471,11 +482,11 @@
### Testing
-You need tests for two things. First, you must test that the API Lint version is
-properly set. That is done with a simple `ApiLintVersionTest` class. It asserts
-the api version code set earlier in the `IssueRegistry()` class. This test
-intentionally fails in the IDE because different Lint API versions are used in
-the studio and command line.
+You need tests for two things. First, you must test that the Lint tool API
+version is properly set. That is done with a simple `ApiLintVersionTest` class.
+It asserts the API version code set earlier in the `IssueRegistry()` class. This
+test intentionally fails in the IDE because different Lint tool API versions are
+used in Studio and the command line.
Example `ApiLintVersionTest`:
@@ -515,7 +526,7 @@
[`TestLintResult`](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-master-dev:lint/libs/lint-tests/src/main/java/com/android/tools/lint/checks/infrastructure/TestLintResult.kt).
`TestLintResult` provides methods for checking the outcome of the provided
`TestLintTask`. `ExpectClean()` means the output is expected to be clean because
-the lint rule was followed. `Expect()` takes a string literal of the expected
+the lint check was followed. `Expect()` takes a string literal of the expected
output of the `TestLintTask` and compares the actual result to the input string.
If a quick fix was implemented, you can check that the fix is correct by calling
`checkFix()` and providing the expected output file stub.
@@ -536,7 +547,7 @@
### API surface
-#### checkDslPropertyAssignment
+#### `checkDslPropertyAssignment`
Analyzes each DSL property assignment, providing the property and value strings.
@@ -558,14 +569,14 @@
be quote enclosed in the value parameter. Any constant values cannot be resolved
to their values.
-The cookie parameters should be used for reporting Lint errors. To report an
-issue on the value, use `context.getLocation(statementCookie)`.
+The cookie parameters should be used for reporting lint check errors. To report
+an issue on the value, use `context.getLocation(statementCookie)`.
-## Enabling Lint for a library
+## Enabling lint checks for a library
-Once the Lint module is implemented we need to enable it for the desired
+Once the lint module is implemented we need to enable it for the desired
library. This can be done by adding a `lintPublish` rule to the `build.gradle`
-of the library the Lint check should apply to.
+of the library the lint check should apply to.
```
lintPublish(project(':mylibrary:mylibrary-lint'))
@@ -586,16 +597,16 @@
### Analyzing multiple different file types
-Sometimes it is necessary to implement multiple different scanners in a Lint
+Sometimes it is necessary to implement multiple different scanners in a lint
detector. For example, the
[Unused Resource](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-master-dev:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/UnusedResourceDetector.java)
-Lint check implements an XML and SourceCodeScanner in order to determine if
+lint check implements an XML and SourceCodeScanner in order to determine if
resources defined in XML files are ever references in the Java/Kotlin source
code.
#### File type iteration order
-The Lint system processes files in a predefined order:
+The Lint tool processes files in a predefined order:
1. Manifests
1. Android XML Resources (alphabetical by folder type)
@@ -616,7 +627,7 @@
contains most of the canonical names for Android core library classes, as well
as XML tag names.
-### Updating bytecode and checksum in tests
+### Updating bytecode and checksum in tests {#tips-bytecode}
When updating a file that is used in a lint test, the following error may appear
when running tests:
diff --git a/docs/onboarding.md b/docs/onboarding.md
index dbd3f84..933a00c 100644
--- a/docs/onboarding.md
+++ b/docs/onboarding.md
@@ -28,7 +28,7 @@
```
Then, modify `~/.zshrc` (or `~/.bash_profile` if using `bash`) to ensure you can
-find local binaries from the command line. We assume you're using zsh, but the
+find local binaries from the command line. We assume you're using `zsh`, but the
following should work with `bash` as well.
```shell
@@ -36,7 +36,7 @@
```
You will need to either start a new terminal session or run `source ~/.zshrc`
-(or `source ~/.bash_profile` if using bash) to pick up the new path.
+(or `source ~/.bash_profile` if using `bash`) to pick up the new path.
If you encounter an SSL `CERTIFICATE_VERIFY_FAILED` error or warning about
Python 2 being no longer supported, you will need to install Python 3 and alias
@@ -57,16 +57,20 @@
information about SSL/TLS certificate validation and the running the "Install
Certificates.command".
+Next, double-check where your `repo
Next, open your `~/.zshrc` (or `~/.bash_profile` if using bash) and add the
following lines to wrap the `repo` command:
```shell
# Force repo to run with Python3
function repo() {
- command python3 "$(which repo)" $@
+ command python3 ~/bin/repo $@
}
```
+Make sure to reload the updated profile by starting a new terminal session or
+running `source ~/.zshrc` or `source ~/.bash_profile` as appropriate.
+
### Windows {#setup-win}
Sorry, Windows is not a supported platform for AndroidX development.
@@ -204,6 +208,9 @@
normally would for application or library development -- right-click on a test
or sample to run or debug it, search through classes, and so on.
+If you get a “Unregistered VCS root detected” message, click “Add root” to
+enable the Git/VCS integration for Android Studio.
+
If you see any errors (red underlines), click Gradle's elephant button in the
toolbar ("Sync Project with Gradle Files") and they should resolve once the
build completes.
@@ -258,6 +265,23 @@
[Android documentation](https://source.android.com/setup/create/coding-tasks#workflow)
for a high level overview of this basic workflow.
+If you see the following prompt, choose `always`:
+
+```
+Run hook scripts from https://android.googlesource.com/platform/manifest (yes/always/NO)?
+```
+
+If the upload succeeds, you'll see an output like:
+
+```
+remote:
+remote: New Changes:
+remote: https://android-review.googlesource.com/c/platform/frameworks/support/+/720062 Further README updates
+remote:
+```
+
+To edit your change, use `git commit --amend`, and re-upload.
+
NOTE If you encounter issues with `repo upload`, consider running upload with
trace enabled, e.g. `GIT_DAPPER_TRACE=1 repo --trace upload . --cbr -y`. These
logs can be helpful for reporting issues to the team that manages our git
@@ -425,7 +449,7 @@
```
Places the documentation in
-`{androidx-main}/out/dist/out/androidx/docs-tip-of-tree/build/dokkaKotlinDocs`
+`{androidx-main}/out/androidx/docs-tip-of-tree/build/dokkaKotlinDocs`
#### Dackka docs
@@ -439,9 +463,9 @@
Location of generated refdocs:
* docs-public (what is published to DAC):
- `{androidx-main}/out/dist/out/androidx/docs-public/build/dackkaDocs`
+ `{androidx-main}/out/androidx/docs-public/build/dackkaDocs`
* docs-tip-of-tree:
- `{androidx-main}/out/dist/out/androidx/docs-tip-of-tree/build/dackkaDocs`
+ `{androidx-main}/out/androidx/docs-tip-of-tree/build/dackkaDocs`
#### Release docs
@@ -646,6 +670,15 @@
that you have checked in. You will reference this constant in your library's
`build.gradle` dependencies.
+#### Dependency verification
+
+If the new dependency you are importing is unsigned, or is signed with a new,
+unrecognized key, then you will need to add new dependency verification metadata
+to indicate to Gradle that this new dependency is trusted. Instructions for how
+to do this are currently in the
+[README](https://android.googlesource.com/platform/frameworks/support/+/androidx-main/gradle/README.md)
+in the development subfolder
+
#### Updating an existing dependency
If an older version of a dependency prebuilt was already checked in, please
@@ -684,7 +717,30 @@
100% of their public API surface. Additionally, all CLs must include a `Test:`
stanza indicating which tests were used to verify correctness. Any CLs
implementing bug fixes are expected to include new regression tests specific to
-the issue being fixed
+the issue being fixed.
+
+### Running Tests
+
+#### Single Test Class or Method
+
+1. Open the desired test file in Android Studio.
+2. Right-click on a test class or @Test method name and select `Run FooBarTest`
+
+#### Full Test Package
+
+1. In the project side panel open the desired module.
+2. Find the directory with the tests
+3. Right-click on the directory and select `Run androidx.foobar`
+
+### Running Sample Apps
+
+The AndroidX repository has a set of Android applications that exercise AndroidX
+code. These applications can be useful when you want to debug a real running
+application, or reproduce a problem interactively, before writing test code.
+
+These applications are named either `<libraryname>-integration-tests-testapp`,
+or `support-\*-demos` (e.g. `support-v4-demos` or `support-leanback-demos`). You
+can run them by clicking `Run > Run ...` and choosing the desired application.
See the [Testing](testing.md) page for more resources on writing, running, and
monitoring tests.
@@ -848,32 +904,20 @@
repository artifact:
```shell
-# Creates <path-to-checkout>/out/dist/sdk-repo-linux-m2repository-##.zip
+# Creates <path-to-checkout>/out/androidx/build/support_repo/
./gradlew createArchive
```
-Next, take the ZIP output from this task and extract the contents to the Android
-SDK path that you are using for your alternate (non-AndroidX) version of Android
-Studio. For example, you may be using `~/Android/SDK/extras` if you are using
-the default Android Studio SDK for app development or
-`prebuilts/fullsdk-linux/extras` if you are using fullsdk for platform
-development.
-
-```shell
-# Creates or overwrites android/m2repository
-cd <path-to-sdk>/extras
-unzip <path-to-checkout>/out/dist/top-of-tree-m2repository-##.zip
-```
-
-In the project's 'build.gradle' within 'repositories' notify studio of the
-location of m2repository:
+Using for your alternate (non-AndroidX) version of Android Studio open the
+project's 'build.gradle' and add the following within 'repositories' to make
+Android Gradle Plugin look for binaries in newly built repository:
```groovy
allprojects {
repositories {
...
maven {
- url "<path-to-sdk>/extras/m2repository"
+ url "<path-to-sdk>/out/androidx/build/support_repo/"
}
}
}
diff --git a/docs/testability.md b/docs/testability.md
index ea5c3e3..b4f0918 100644
--- a/docs/testability.md
+++ b/docs/testability.md
@@ -80,14 +80,14 @@
library.
NOTE Android API Guidelines require that methods accepting a callback
-[must also take an Executor](https://android.googlesource.com/platform/developers/docs/+/refs/heads/master/api-guidelines/index.md#callbacks-listener)
+[must also take an Executor](https://android.googlesource.com/platform/developers/docs/+/refs/heads/master/api-guidelines/index.md#provide-executor)
For example, the Room library allows developers to
[pass different executors](https://developer.android.com/reference/androidx/room/RoomDatabase.Builder#setQueryExecutor\(java.util.concurrent.Executor\))
for background query operations. When writing a test, developers can invoke this
with a custom executor where they can track work completion.
-* [sample test](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-master-dev:room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SuspendingQueryTest.kt;l=672)
+* [sample test](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SuspendingQueryTest.kt;l=672)
If the external resource you require does not make sense as a public API, such
as a main thread executor, then you can provide a testing artifact which will
@@ -95,7 +95,7 @@
executor to function but for an application, customizing it does not make sense
(as there is only 1 "pre-defined" main thread for an app). For testing purposes,
the Lifecycle library provides a testing artifact which includes
-[TestRules](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-master-dev:arch/core-testing/src/main/java/androidx/arch/core/executor/testing/CountingTaskExecutorRule.java)
+[TestRules](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:arch/core-testing/src/main/java/androidx/arch/core/executor/testing/CountingTaskExecutorRule.java)
to change them.
#### Fakes for external dependencies
@@ -106,7 +106,7 @@
might be a good idea to have an interface for that functionality and also
provide a fake that can record such calls. If you don't think that interface
makes sense as a library configuration, you can
-[restrict](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-master-dev:annotation/annotation/src/main/java/androidx/annotation/RestrictTo.java)
+[restrict](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:annotation/annotation/src/main/java/androidx/annotation/RestrictTo.java)
that interface to your library group and provide a testing artifacts with the
fake so that developer can observe side effects only in tests while you can
avoid creating unnecessary APIs.
@@ -128,7 +128,7 @@
developers to use them only in tests while giving them the confidence that it
will behave as close as possible to a real implementation. For the case above,
`LifecycleRegistry` provides an API to
-[create](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-master-dev:lifecycle/lifecycle-runtime/src/main/java/androidx/lifecycle/LifecycleRegistry.java;l=334)
+[create](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:lifecycle/lifecycle-runtime/src/main/java/androidx/lifecycle/LifecycleRegistry.java;l=340)
an instance of it that will not enforce thread restrictions.
NOTE Even though the implementation referenced above is acceptable, it is always
@@ -147,7 +147,7 @@
For such cases, it is a good practice to provide a fake implementation out of
the box that can be controlled in tests. For example, the Lifecycle library
provides a
-[fake implementation](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-master-dev:lifecycle/lifecycle-runtime-testing/src/main/java/androidx/lifecycle/testing/TestLifecycleOwner.kt)
+[fake implementation](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:lifecycle/lifecycle-runtime-testing/src/main/java/androidx/lifecycle/testing/TestLifecycleOwner.kt)
for the `LifecycleOwner` class that can be manipulated in tests to create
different use cases.
diff --git a/docs/testing.md b/docs/testing.md
index d6ad752..2829821 100644
--- a/docs/testing.md
+++ b/docs/testing.md
@@ -32,7 +32,7 @@
users -- and library developers -- to write tests, see the
[Testability](testability.md) guide.
-### What gets tested, and when
+### What gets tested, and when {#affected-module-detector}
We use the
[AffectedModuleDetector](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:buildSrc/private/src/main/kotlin/androidx/build/dependencyTracker/AffectedModuleDetector.kt)
@@ -50,9 +50,9 @@
The remaining devices are tested only in postsubmit. In postsubmit, all host and
device tests are run for all modules.
-### Test annotations
+### Test annotations {#annotations}
-#### Test size and runners
+#### Test size and runners {#test-size}
All device tests *should* be given a size annotation, which is one of:
@@ -72,7 +72,7 @@
`@MediumTest` | 1000ms
`@LargeTest` | 100000ms
-#### Disabling tests
+#### Disabling tests {#disabling-tests}
To disable a device-side test in presubmit testing only -- but still have it run
in postsubmit -- use the
@@ -85,7 +85,7 @@
annotation. Do *not* use Android's `@Suppress` annotation, which only works with
Android test runners and will *not* work for host-side tests.
-#### Filtering devices
+#### Filtering devices {#filtering-devices}
To restrict a test to a range of SDKs, use
[`@SdkSuppress`](https://developer.android.com/reference/androidx/test/filters/SdkSuppress)
@@ -97,8 +97,8 @@
// Target SDKs 17 through 19, inclusive
@SdkSuppress(minSdkVersion = 17, maxSdkVersion = 19)
-// Target pre-release SDK R only
-@SdkSuppress(minSdkVersion = Build.VERSION_CODES.R, isCodeName = "R")
+// Target pre-release SDK T only
+@SdkSuppress(minSdkVersion = Build.VERSION_CODES.TIRAMISU, codeName = "Tiramisu")
```
You may also gate portions of test implementation code using `SDK_INT` or
@@ -112,7 +112,7 @@
that a bug in Cuttlefish, so please file those bugs instead of only looking for
a workaround.
-### Animations in tests
+### Animations in tests {#animations}
Animations are disabled for tests by default. This helps avoid flakes due to
timing and also makes tests faster.
@@ -121,7 +121,7 @@
animations for a particular test or test class. For those cases, you can use the
[`AnimationDurationScaleRule`](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:testutils/testutils-runtime/src/main/java/androidx/testutils/AnimationDurationScaleRule.kt).
-### Robolectric
+### Robolectric {#robolectric}
Robolectric tests are supported in AndroidX; however, if you targeting a
pre-release version of the Android SDK then you may see an error like
@@ -155,9 +155,12 @@
NOTE You can reuse the emulator and system images from a "normal" installation
of Android Studio by linking the `emulator` and `system_images` directories to a
-standard Android SDK path and restarting Android Studio: `cd
+standard Android SDK path and restarting Android Studio. **This is set up
+automatically by `studiow` on Google-managed devices with a standard Android SDK
+path.** In other cases, it may be set up manually with something like: `cd
prebuilts/fullsdk-darwin ln -s ~/Library/Android/sdk/emulator emulator ln -s
-~/Library/Android/sdk/system-images system-images`
+~/Library/Android/sdk/system-images system-images` (substituting `fullsdk-linux`
+and your local SDK path as appropriate)
## Debugging with platform SDK sources {#sources}
diff --git a/docs/versioning.md b/docs/versioning.md
index 42bec31..b54025f 100644
--- a/docs/versioning.md
+++ b/docs/versioning.md
@@ -2,25 +2,29 @@
[TOC]
+This page covers Jetpack's usage of Semantic Versioning and pre-release cycles,
+including the expectations at each cycle and criteria for moving to the next
+cycle or SemVer revision.
+
## Semantic versioning
-Artifacts follow strict semantic versioning. The version for a finalized release
-will follow the format `<major>.<minor>.<bugfix>` with an optional
-`-<alpha|beta|rc><nn>` suffix. Internal or nightly releases should use the
-`-SNAPSHOT` suffix to indicate that the release bits are subject to change.
-
-Also check out the [Versioning FAQ](faq.md#version).
+Artifacts follow strict [semantic versioning](http://semver.org) with an added
+inter-version sequence of pre-release revisions. The version for a finalized
+release will follow the format `<major>.<minor>.<bugfix>` with an optional
+`-<alpha|beta|rc><nn>` suffix. Internal or nightly releases (via
+[androidx.dev](http://androidx.dev)) should use the `-SNAPSHOT` suffix.
### Notation
Major (`x.0.0`)
: An artifact's major version indicates a guaranteed forward-compatibility
- window. For example, a developer could update an artifact versioned `2.0.0`
- to `2.7.3` without taking any additional action.
+ window. The number is incremented only when introducing breaking API or
+ behavioral changes.
Minor (`1.x.0`)
: Minor indicates compatible public API changes. This number is incremented
- when APIs are added, including the addition of `@Deprecated` annotations.
+ when APIs are added, including the addition of
+ [`@Deprecated` annotations](api_guidelines.md#deprecation-and-removal).
Binary compatibility must be preserved between minor version changes.
Bugfix (`1.0.x`)
@@ -34,17 +38,13 @@
: Feature development and API stabilization phase.
Beta (`1.0.0-betaXX`)
-: Functional stabilization phase.
+: Functional stabilization phase. Suitable for production use.
RC (`1.0.0-rcXX`)
: Verification phase.
Stable (no-suffix)
-: Final releases are well-tested, both by internal tests and external clients,
- and their API surface is reviewed and finalized. While APIs may be
- deprecated in future versions and removed in subsequent major version bumps,
- any APIs added at this stage should be considered semi-permanent as major
- version bumps are [strongly discouraged](#major-implications).
+: Recommended for production use.
### Major (`x.0.0`) {#major}
@@ -52,7 +52,8 @@
For example, a developer could update an artifact versioned `2.0.0` to `2.7.3`
without taking any additional action; however, updating from `2.7.3` to `3.0.0`
may require a complete rewrite of their application or cause conflicts with
-their dependencies.
+their dependencies. Major version bumps are
+[strongly discouraged](#major-implications).
#### When to increment {#major-when}
@@ -342,7 +343,7 @@
1. Update the version listed in `frameworks/support/libraryversions.toml`
1. If your library is a `beta` or `rc01` version, run `./gradlew
<your-lib>:updateApi`. This will create an API txt file for the new version
- of your library. For other versions, this step is not reqired
+ of your library. For other versions, this step is not required
1. Verify changes with `./gradlew checkApi verifyDependencyVersions`.
1. Commit these change as one commit.
1. Upload these changes to Gerrit for review.
@@ -352,14 +353,14 @@
## `-ktx` Modules {#ktx}
-Kotlin Extension modules (`-ktx`) for regular Java modules follow the same
-requirements, but with one exception. They must match the version of the Java
-module that they extend.
+[Kotlin extension libraries](api_guidelines.md#module-ktx) (`-ktx`) follow the
+same versioning requirements as other libraries, but with one exception: they
+must match the version of the Java libraries that they extend.
-For example, let's say you are developing a java library
-`androidx.foo:foo-bar:1.1.0-alpha01` and you want to add a kotlin extension
-module `androidx.foo:foo-bar-ktx` module. Your new `androidx.foo:foo-bar-ktx`
-module will start at version `1.1.0-alpha01` instead of `1.0.0-alpha01`.
+For example, let's say you are developing a Java library
+`androidx.foo:foo-bar:1.1.0-alpha01` and you want to add a Kotlin extension
+library `androidx.foo:foo-bar-ktx`. Your new `androidx.foo:foo-bar-ktx` library
+will start at version `1.1.0-alpha01` instead of `1.0.0-alpha01`.
If your `androidx.foo:foo-bar` module was in version `1.0.0-alpha06`, then the
-kotlin extension module would start in version `1.0.0-alpha06`.
+Kotlin extension module would start in version `1.0.0-alpha06`.
diff --git a/draganddrop/draganddrop/build.gradle b/draganddrop/draganddrop/build.gradle
index 9595f67..5e8aa01 100644
--- a/draganddrop/draganddrop/build.gradle
+++ b/draganddrop/draganddrop/build.gradle
@@ -26,7 +26,6 @@
api("androidx.appcompat:appcompat:1.4.0")
api("androidx.core:core:1.7.0")
annotationProcessor(libs.nullaway)
- implementation("androidx.core:core:1.3.0-beta01")
androidTestImplementation(libs.robolectric)
androidTestImplementation(libs.mockitoAndroid)
diff --git a/emoji2/emoji2-views/api/api_lint.ignore b/emoji2/emoji2-views/api/api_lint.ignore
new file mode 100644
index 0000000..037f638
--- /dev/null
+++ b/emoji2/emoji2-views/api/api_lint.ignore
@@ -0,0 +1,15 @@
+// Baseline format: 1.0
+InvalidNullability: androidx.emoji2.widget.EmojiButton#setCustomSelectionActionModeCallback(android.view.ActionMode.Callback) parameter #0:
+ Invalid nullability on parameter `actionModeCallback` in method `setCustomSelectionActionModeCallback`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.emoji2.widget.EmojiButton#setFilters(android.text.InputFilter[]) parameter #0:
+ Invalid nullability on parameter `filters` in method `setFilters`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.emoji2.widget.EmojiEditText#onCreateInputConnection(android.view.inputmethod.EditorInfo):
+ Invalid nullability on method `onCreateInputConnection` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.emoji2.widget.EmojiEditText#onCreateInputConnection(android.view.inputmethod.EditorInfo) parameter #0:
+ Invalid nullability on parameter `outAttrs` in method `onCreateInputConnection`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.emoji2.widget.EmojiEditText#setCustomSelectionActionModeCallback(android.view.ActionMode.Callback) parameter #0:
+ Invalid nullability on parameter `actionModeCallback` in method `setCustomSelectionActionModeCallback`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.emoji2.widget.EmojiTextView#setCustomSelectionActionModeCallback(android.view.ActionMode.Callback) parameter #0:
+ Invalid nullability on parameter `actionModeCallback` in method `setCustomSelectionActionModeCallback`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.emoji2.widget.EmojiTextView#setFilters(android.text.InputFilter[]) parameter #0:
+ Invalid nullability on parameter `filters` in method `setFilters`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
diff --git a/enterprise/enterprise-feedback/api/api_lint.ignore b/enterprise/enterprise-feedback/api/api_lint.ignore
index a55a161..4e06fba 100644
--- a/enterprise/enterprise-feedback/api/api_lint.ignore
+++ b/enterprise/enterprise-feedback/api/api_lint.ignore
@@ -5,6 +5,10 @@
Registration methods should have overload that accepts delivery Executor: `setStatesImmediate`
+InvalidNullability: androidx.enterprise.feedback.KeyedAppStatesService#onBind(android.content.Intent) parameter #0:
+ Invalid nullability on parameter `intent` in method `onBind`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+
+
StaticFinalBuilder: androidx.enterprise.feedback.KeyedAppState.KeyedAppStateBuilder:
Builder must be final: androidx.enterprise.feedback.KeyedAppState.KeyedAppStateBuilder
StaticFinalBuilder: androidx.enterprise.feedback.ReceivedKeyedAppState.ReceivedKeyedAppStateBuilder:
diff --git a/fragment/fragment/api/api_lint.ignore b/fragment/fragment/api/api_lint.ignore
index fa19689..4bc224d 100644
--- a/fragment/fragment/api/api_lint.ignore
+++ b/fragment/fragment/api/api_lint.ignore
@@ -23,6 +23,40 @@
Symmetric method for `setAllowReturnTransitionOverlap` must be named `isAllowReturnTransitionOverlap`; was `getAllowReturnTransitionOverlap`
+InvalidNullability: androidx.fragment.app.DialogFragment#onCancel(android.content.DialogInterface) parameter #0:
+ Invalid nullability on parameter `dialog` in method `onCancel`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.fragment.app.DialogFragment#onDismiss(android.content.DialogInterface) parameter #0:
+ Invalid nullability on parameter `dialog` in method `onDismiss`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.fragment.app.Fragment#onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo) parameter #0:
+ Invalid nullability on parameter `menu` in method `onCreateContextMenu`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.fragment.app.Fragment#onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo) parameter #1:
+ Invalid nullability on parameter `v` in method `onCreateContextMenu`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.fragment.app.Fragment.SavedState#writeToParcel(android.os.Parcel, int) parameter #0:
+ Invalid nullability on parameter `dest` in method `writeToParcel`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.fragment.app.FragmentContainerView#addView(android.view.View, int, android.view.ViewGroup.LayoutParams) parameter #0:
+ Invalid nullability on parameter `child` in method `addView`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: androidx.fragment.app.FragmentContainerView#endViewTransition(android.view.View) parameter #0:
+ Invalid nullability on parameter `view` in method `endViewTransition`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.fragment.app.FragmentContainerView#onApplyWindowInsets(android.view.WindowInsets) parameter #0:
+ Invalid nullability on parameter `insets` in method `onApplyWindowInsets`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.fragment.app.FragmentContainerView#removeView(android.view.View) parameter #0:
+ Invalid nullability on parameter `view` in method `removeView`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.fragment.app.FragmentContainerView#removeViewInLayout(android.view.View) parameter #0:
+ Invalid nullability on parameter `view` in method `removeViewInLayout`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.fragment.app.FragmentContainerView#setOnApplyWindowInsetsListener(android.view.View.OnApplyWindowInsetsListener) parameter #0:
+ Invalid nullability on parameter `listener` in method `setOnApplyWindowInsetsListener`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.fragment.app.FragmentContainerView#startViewTransition(android.view.View) parameter #0:
+ 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:
diff --git a/fragment/fragment/api/current.ignore b/fragment/fragment/api/current.ignore
index 5135e70..653547a 100644
--- a/fragment/fragment/api/current.ignore
+++ b/fragment/fragment/api/current.ignore
@@ -1,4 +1,8 @@
// Baseline format: 1.0
+ParameterNameChange: androidx.fragment.app.strictmode.FragmentStrictMode#setDefaultPolicy(androidx.fragment.app.strictmode.FragmentStrictMode.Policy) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.fragment.app.strictmode.FragmentStrictMode.setDefaultPolicy
+
+
RemovedMethod: androidx.fragment.app.FragmentActivity#onMultiWindowModeChanged(boolean):
Removed method androidx.fragment.app.FragmentActivity.onMultiWindowModeChanged(boolean)
RemovedMethod: androidx.fragment.app.FragmentActivity#onPictureInPictureModeChanged(boolean):
diff --git a/fragment/fragment/api/current.txt b/fragment/fragment/api/current.txt
index ebbaad9..0a55a9e 100644
--- a/fragment/fragment/api/current.txt
+++ b/fragment/fragment/api/current.txt
@@ -464,7 +464,7 @@
public final class FragmentStrictMode {
method public androidx.fragment.app.strictmode.FragmentStrictMode.Policy getDefaultPolicy();
method @VisibleForTesting public void onPolicyViolation(androidx.fragment.app.strictmode.Violation violation);
- method public void setDefaultPolicy(androidx.fragment.app.strictmode.FragmentStrictMode.Policy defaultPolicy);
+ method public void setDefaultPolicy(androidx.fragment.app.strictmode.FragmentStrictMode.Policy);
property public final androidx.fragment.app.strictmode.FragmentStrictMode.Policy defaultPolicy;
field public static final androidx.fragment.app.strictmode.FragmentStrictMode INSTANCE;
}
diff --git a/fragment/fragment/api/public_plus_experimental_current.txt b/fragment/fragment/api/public_plus_experimental_current.txt
index ebbaad9..0a55a9e 100644
--- a/fragment/fragment/api/public_plus_experimental_current.txt
+++ b/fragment/fragment/api/public_plus_experimental_current.txt
@@ -464,7 +464,7 @@
public final class FragmentStrictMode {
method public androidx.fragment.app.strictmode.FragmentStrictMode.Policy getDefaultPolicy();
method @VisibleForTesting public void onPolicyViolation(androidx.fragment.app.strictmode.Violation violation);
- method public void setDefaultPolicy(androidx.fragment.app.strictmode.FragmentStrictMode.Policy defaultPolicy);
+ method public void setDefaultPolicy(androidx.fragment.app.strictmode.FragmentStrictMode.Policy);
property public final androidx.fragment.app.strictmode.FragmentStrictMode.Policy defaultPolicy;
field public static final androidx.fragment.app.strictmode.FragmentStrictMode INSTANCE;
}
diff --git a/fragment/fragment/api/restricted_current.ignore b/fragment/fragment/api/restricted_current.ignore
index 064bc98..995cd20 100644
--- a/fragment/fragment/api/restricted_current.ignore
+++ b/fragment/fragment/api/restricted_current.ignore
@@ -1,4 +1,8 @@
// Baseline format: 1.0
+ParameterNameChange: androidx.fragment.app.strictmode.FragmentStrictMode#setDefaultPolicy(androidx.fragment.app.strictmode.FragmentStrictMode.Policy) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.fragment.app.strictmode.FragmentStrictMode.setDefaultPolicy
+
+
RemovedDeprecatedMethod: androidx.fragment.app.FragmentActivity#onPrepareOptionsPanel(android.view.View, android.view.Menu):
Removed deprecated method androidx.fragment.app.FragmentActivity.onPrepareOptionsPanel(android.view.View,android.view.Menu)
diff --git a/fragment/fragment/api/restricted_current.txt b/fragment/fragment/api/restricted_current.txt
index 798d160..9e7cc35 100644
--- a/fragment/fragment/api/restricted_current.txt
+++ b/fragment/fragment/api/restricted_current.txt
@@ -493,7 +493,7 @@
public final class FragmentStrictMode {
method public androidx.fragment.app.strictmode.FragmentStrictMode.Policy getDefaultPolicy();
method @VisibleForTesting public void onPolicyViolation(androidx.fragment.app.strictmode.Violation violation);
- method public void setDefaultPolicy(androidx.fragment.app.strictmode.FragmentStrictMode.Policy defaultPolicy);
+ method public void setDefaultPolicy(androidx.fragment.app.strictmode.FragmentStrictMode.Policy);
property public final androidx.fragment.app.strictmode.FragmentStrictMode.Policy defaultPolicy;
field public static final androidx.fragment.app.strictmode.FragmentStrictMode INSTANCE;
}
diff --git a/glance/glance-appwidget/api/api_lint.ignore b/glance/glance-appwidget/api/api_lint.ignore
new file mode 100644
index 0000000..43a9537
--- /dev/null
+++ b/glance/glance-appwidget/api/api_lint.ignore
@@ -0,0 +1,21 @@
+// Baseline format: 1.0
+InvalidNullability: androidx.glance.appwidget.GlanceAppWidgetReceiver#onAppWidgetOptionsChanged(android.content.Context, android.appwidget.AppWidgetManager, int, android.os.Bundle) parameter #0:
+ Invalid nullability on parameter `context` in method `onAppWidgetOptionsChanged`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.glance.appwidget.GlanceAppWidgetReceiver#onAppWidgetOptionsChanged(android.content.Context, android.appwidget.AppWidgetManager, int, android.os.Bundle) parameter #1:
+ Invalid nullability on parameter `appWidgetManager` in method `onAppWidgetOptionsChanged`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.glance.appwidget.GlanceAppWidgetReceiver#onAppWidgetOptionsChanged(android.content.Context, android.appwidget.AppWidgetManager, int, android.os.Bundle) parameter #3:
+ Invalid nullability on parameter `newOptions` in method `onAppWidgetOptionsChanged`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.glance.appwidget.GlanceAppWidgetReceiver#onDeleted(android.content.Context, int[]) parameter #0:
+ Invalid nullability on parameter `context` in method `onDeleted`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.glance.appwidget.GlanceAppWidgetReceiver#onDeleted(android.content.Context, int[]) parameter #1:
+ Invalid nullability on parameter `appWidgetIds` in method `onDeleted`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.glance.appwidget.GlanceAppWidgetReceiver#onReceive(android.content.Context, android.content.Intent) parameter #0:
+ Invalid nullability on parameter `context` in method `onReceive`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.glance.appwidget.GlanceAppWidgetReceiver#onReceive(android.content.Context, android.content.Intent) parameter #1:
+ Invalid nullability on parameter `intent` in method `onReceive`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.glance.appwidget.GlanceAppWidgetReceiver#onUpdate(android.content.Context, android.appwidget.AppWidgetManager, int[]) parameter #0:
+ Invalid nullability on parameter `context` in method `onUpdate`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.glance.appwidget.GlanceAppWidgetReceiver#onUpdate(android.content.Context, android.appwidget.AppWidgetManager, int[]) parameter #1:
+ Invalid nullability on parameter `appWidgetManager` in method `onUpdate`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.glance.appwidget.GlanceAppWidgetReceiver#onUpdate(android.content.Context, android.appwidget.AppWidgetManager, int[]) parameter #2:
+ Invalid nullability on parameter `appWidgetIds` in method `onUpdate`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
diff --git a/glance/glance-appwidget/api/current.txt b/glance/glance-appwidget/api/current.txt
index c18e0ad..4f77155 100644
--- a/glance/glance-appwidget/api/current.txt
+++ b/glance/glance-appwidget/api/current.txt
@@ -52,21 +52,21 @@
method @androidx.compose.runtime.Composable public abstract void Content();
method public androidx.glance.appwidget.SizeMode getSizeMode();
method public androidx.glance.state.GlanceStateDefinition<?>? getStateDefinition();
- method public suspend Object? onDelete(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public final suspend Object? update(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? onDelete(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public final suspend Object? update(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public androidx.glance.appwidget.SizeMode sizeMode;
property public androidx.glance.state.GlanceStateDefinition<?>? stateDefinition;
}
public final class GlanceAppWidgetKt {
- method public static suspend Object? updateAll(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? updateAll(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public static suspend inline <reified State> void updateIf(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, kotlin.jvm.functions.Function1<? super State,? extends java.lang.Boolean> predicate);
}
public final class GlanceAppWidgetManager {
ctor public GlanceAppWidgetManager(android.content.Context context);
- method public suspend Object? getAppWidgetSizes(androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super java.util.List<? extends androidx.compose.ui.unit.DpSize>> p);
- method public suspend <T extends androidx.glance.appwidget.GlanceAppWidget> Object? getGlanceIds(Class<T> provider, kotlin.coroutines.Continuation<? super java.util.List<? extends androidx.glance.GlanceId>> p);
+ method public suspend Object? getAppWidgetSizes(androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super java.util.List<? extends androidx.compose.ui.unit.DpSize>>);
+ method public suspend <T extends androidx.glance.appwidget.GlanceAppWidget> Object? getGlanceIds(Class<T> provider, kotlin.coroutines.Continuation<? super java.util.List<? extends androidx.glance.GlanceId>>);
}
public final class GlanceAppWidgetManagerKt {
@@ -101,10 +101,8 @@
public final class ProgressIndicatorDefaults {
method public androidx.glance.unit.ColorProvider getBackgroundColorProvider();
- method public long getColor();
method public androidx.glance.unit.ColorProvider getIndicatorColorProvider();
property public final androidx.glance.unit.ColorProvider BackgroundColorProvider;
- property public final long Color;
property public final androidx.glance.unit.ColorProvider IndicatorColorProvider;
field public static final androidx.glance.appwidget.ProgressIndicatorDefaults INSTANCE;
}
@@ -166,7 +164,7 @@
package androidx.glance.appwidget.action {
public interface ActionCallback {
- method public suspend Object? onAction(android.content.Context context, androidx.glance.GlanceId glanceId, androidx.glance.action.ActionParameters parameters, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? onAction(android.content.Context context, androidx.glance.GlanceId glanceId, androidx.glance.action.ActionParameters parameters, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class ActionTrampolineKt {
@@ -272,10 +270,10 @@
package androidx.glance.appwidget.state {
public final class GlanceAppWidgetStateKt {
- method public static suspend <T> Object? getAppWidgetState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? getAppWidgetState(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? updateAppWidgetState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> updateState, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend Object? updateAppWidgetState(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.jvm.functions.Function2<? super androidx.datastore.preferences.core.MutablePreferences,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> updateState, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend <T> Object? getAppWidgetState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? getAppWidgetState(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? updateAppWidgetState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> updateState, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend Object? updateAppWidgetState(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.jvm.functions.Function2<? super androidx.datastore.preferences.core.MutablePreferences,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> updateState, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
}
diff --git a/glance/glance-appwidget/api/public_plus_experimental_current.txt b/glance/glance-appwidget/api/public_plus_experimental_current.txt
index 4097da7..a46cf1d 100644
--- a/glance/glance-appwidget/api/public_plus_experimental_current.txt
+++ b/glance/glance-appwidget/api/public_plus_experimental_current.txt
@@ -55,21 +55,21 @@
method @androidx.compose.runtime.Composable public abstract void Content();
method public androidx.glance.appwidget.SizeMode getSizeMode();
method public androidx.glance.state.GlanceStateDefinition<?>? getStateDefinition();
- method public suspend Object? onDelete(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public final suspend Object? update(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? onDelete(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public final suspend Object? update(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public androidx.glance.appwidget.SizeMode sizeMode;
property public androidx.glance.state.GlanceStateDefinition<?>? stateDefinition;
}
public final class GlanceAppWidgetKt {
- method public static suspend Object? updateAll(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? updateAll(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public static suspend inline <reified State> void updateIf(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, kotlin.jvm.functions.Function1<? super State,? extends java.lang.Boolean> predicate);
}
public final class GlanceAppWidgetManager {
ctor public GlanceAppWidgetManager(android.content.Context context);
- method public suspend Object? getAppWidgetSizes(androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super java.util.List<? extends androidx.compose.ui.unit.DpSize>> p);
- method public suspend <T extends androidx.glance.appwidget.GlanceAppWidget> Object? getGlanceIds(Class<T> provider, kotlin.coroutines.Continuation<? super java.util.List<? extends androidx.glance.GlanceId>> p);
+ method public suspend Object? getAppWidgetSizes(androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super java.util.List<? extends androidx.compose.ui.unit.DpSize>>);
+ method public suspend <T extends androidx.glance.appwidget.GlanceAppWidget> Object? getGlanceIds(Class<T> provider, kotlin.coroutines.Continuation<? super java.util.List<? extends androidx.glance.GlanceId>>);
}
public final class GlanceAppWidgetManagerKt {
@@ -86,7 +86,7 @@
@androidx.glance.appwidget.ExperimentalGlanceRemoteViewsApi public final class GlanceRemoteViews {
ctor public GlanceRemoteViews();
- method public suspend Object? compose(android.content.Context context, long size, optional Object? state, optional android.os.Bundle appWidgetOptions, kotlin.jvm.functions.Function0<kotlin.Unit> content, kotlin.coroutines.Continuation<? super androidx.glance.appwidget.RemoteViewsCompositionResult> p);
+ method public suspend Object? compose(android.content.Context context, long size, optional Object? state, optional android.os.Bundle appWidgetOptions, kotlin.jvm.functions.Function0<kotlin.Unit> content, kotlin.coroutines.Continuation<? super androidx.glance.appwidget.RemoteViewsCompositionResult>);
}
public final class GlanceRemoteViewsKt {
@@ -109,10 +109,8 @@
public final class ProgressIndicatorDefaults {
method public androidx.glance.unit.ColorProvider getBackgroundColorProvider();
- method public long getColor();
method public androidx.glance.unit.ColorProvider getIndicatorColorProvider();
property public final androidx.glance.unit.ColorProvider BackgroundColorProvider;
- property public final long Color;
property public final androidx.glance.unit.ColorProvider IndicatorColorProvider;
field public static final androidx.glance.appwidget.ProgressIndicatorDefaults INSTANCE;
}
@@ -180,7 +178,7 @@
package androidx.glance.appwidget.action {
public interface ActionCallback {
- method public suspend Object? onAction(android.content.Context context, androidx.glance.GlanceId glanceId, androidx.glance.action.ActionParameters parameters, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? onAction(android.content.Context context, androidx.glance.GlanceId glanceId, androidx.glance.action.ActionParameters parameters, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class ActionTrampolineKt {
@@ -286,10 +284,10 @@
package androidx.glance.appwidget.state {
public final class GlanceAppWidgetStateKt {
- method public static suspend <T> Object? getAppWidgetState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? getAppWidgetState(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? updateAppWidgetState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> updateState, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend Object? updateAppWidgetState(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.jvm.functions.Function2<? super androidx.datastore.preferences.core.MutablePreferences,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> updateState, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend <T> Object? getAppWidgetState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? getAppWidgetState(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? updateAppWidgetState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> updateState, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend Object? updateAppWidgetState(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.jvm.functions.Function2<? super androidx.datastore.preferences.core.MutablePreferences,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> updateState, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
}
diff --git a/glance/glance-appwidget/api/restricted_current.txt b/glance/glance-appwidget/api/restricted_current.txt
index c18e0ad..4f77155 100644
--- a/glance/glance-appwidget/api/restricted_current.txt
+++ b/glance/glance-appwidget/api/restricted_current.txt
@@ -52,21 +52,21 @@
method @androidx.compose.runtime.Composable public abstract void Content();
method public androidx.glance.appwidget.SizeMode getSizeMode();
method public androidx.glance.state.GlanceStateDefinition<?>? getStateDefinition();
- method public suspend Object? onDelete(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public final suspend Object? update(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? onDelete(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public final suspend Object? update(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public androidx.glance.appwidget.SizeMode sizeMode;
property public androidx.glance.state.GlanceStateDefinition<?>? stateDefinition;
}
public final class GlanceAppWidgetKt {
- method public static suspend Object? updateAll(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? updateAll(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public static suspend inline <reified State> void updateIf(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, kotlin.jvm.functions.Function1<? super State,? extends java.lang.Boolean> predicate);
}
public final class GlanceAppWidgetManager {
ctor public GlanceAppWidgetManager(android.content.Context context);
- method public suspend Object? getAppWidgetSizes(androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super java.util.List<? extends androidx.compose.ui.unit.DpSize>> p);
- method public suspend <T extends androidx.glance.appwidget.GlanceAppWidget> Object? getGlanceIds(Class<T> provider, kotlin.coroutines.Continuation<? super java.util.List<? extends androidx.glance.GlanceId>> p);
+ method public suspend Object? getAppWidgetSizes(androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super java.util.List<? extends androidx.compose.ui.unit.DpSize>>);
+ method public suspend <T extends androidx.glance.appwidget.GlanceAppWidget> Object? getGlanceIds(Class<T> provider, kotlin.coroutines.Continuation<? super java.util.List<? extends androidx.glance.GlanceId>>);
}
public final class GlanceAppWidgetManagerKt {
@@ -101,10 +101,8 @@
public final class ProgressIndicatorDefaults {
method public androidx.glance.unit.ColorProvider getBackgroundColorProvider();
- method public long getColor();
method public androidx.glance.unit.ColorProvider getIndicatorColorProvider();
property public final androidx.glance.unit.ColorProvider BackgroundColorProvider;
- property public final long Color;
property public final androidx.glance.unit.ColorProvider IndicatorColorProvider;
field public static final androidx.glance.appwidget.ProgressIndicatorDefaults INSTANCE;
}
@@ -166,7 +164,7 @@
package androidx.glance.appwidget.action {
public interface ActionCallback {
- method public suspend Object? onAction(android.content.Context context, androidx.glance.GlanceId glanceId, androidx.glance.action.ActionParameters parameters, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? onAction(android.content.Context context, androidx.glance.GlanceId glanceId, androidx.glance.action.ActionParameters parameters, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class ActionTrampolineKt {
@@ -272,10 +270,10 @@
package androidx.glance.appwidget.state {
public final class GlanceAppWidgetStateKt {
- method public static suspend <T> Object? getAppWidgetState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? getAppWidgetState(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? updateAppWidgetState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> updateState, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend Object? updateAppWidgetState(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.jvm.functions.Function2<? super androidx.datastore.preferences.core.MutablePreferences,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> updateState, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend <T> Object? getAppWidgetState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? getAppWidgetState(androidx.glance.appwidget.GlanceAppWidget, android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? updateAppWidgetState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> updateState, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend Object? updateAppWidgetState(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.jvm.functions.Function2<? super androidx.datastore.preferences.core.MutablePreferences,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> updateState, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
}
diff --git a/glance/glance-appwidget/src/androidMain/kotlin/androidx/glance/appwidget/LinearProgressIndicator.kt b/glance/glance-appwidget/src/androidMain/kotlin/androidx/glance/appwidget/LinearProgressIndicator.kt
index 216c487..5980189 100644
--- a/glance/glance-appwidget/src/androidMain/kotlin/androidx/glance/appwidget/LinearProgressIndicator.kt
+++ b/glance/glance-appwidget/src/androidMain/kotlin/androidx/glance/appwidget/LinearProgressIndicator.kt
@@ -101,7 +101,7 @@
* Default color for [LinearProgressIndicator].
* [Material color specification](https://material.io/design/color/the-color-system.html#color-theme-creation)
*/
- val Color = Color(0xFF6200EE)
+ private val Color = Color(0xFF6200EE)
/**
* Default ColorProvider for the progress indicator in [LinearProgressIndicator].
diff --git a/glance/glance-wear-tiles/api/current.txt b/glance/glance-wear-tiles/api/current.txt
index 697752e..18f67be 100644
--- a/glance/glance-wear-tiles/api/current.txt
+++ b/glance/glance-wear-tiles/api/current.txt
@@ -22,12 +22,12 @@
ctor public GlanceTileService(optional androidx.wear.tiles.LayoutElementBuilders.LayoutElement? errorUiLayout);
method @androidx.compose.runtime.Composable public abstract void Content();
method public androidx.glance.state.GlanceStateDefinition<?>? getStateDefinition();
- method public final suspend <T> Object? getTileState(kotlin.coroutines.Continuation<? super T> p);
+ method public final suspend <T> Object? getTileState(kotlin.coroutines.Continuation<? super T>);
method public androidx.glance.wear.tiles.TimelineMode getTimelineMode();
method protected final com.google.common.util.concurrent.ListenableFuture<androidx.wear.tiles.ResourceBuilders.Resources> onResourcesRequest(androidx.wear.tiles.RequestBuilders.ResourcesRequest requestParams);
method public void onStart(android.content.Intent? intent, int startId);
method protected final com.google.common.util.concurrent.ListenableFuture<androidx.wear.tiles.TileBuilders.Tile> onTileRequest(androidx.wear.tiles.RequestBuilders.TileRequest requestParams);
- method public final suspend <T> Object? updateTileState(kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> updateState, kotlin.coroutines.Continuation<? super T> p);
+ method public final suspend <T> Object? updateTileState(kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> updateState, kotlin.coroutines.Continuation<? super T>);
property public androidx.glance.state.GlanceStateDefinition<?>? stateDefinition;
property public androidx.glance.wear.tiles.TimelineMode timelineMode;
}
@@ -67,7 +67,7 @@
package androidx.glance.wear.tiles.action {
public interface ActionCallback {
- method public suspend Object? onAction(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? onAction(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class RunCallbackActionKt {
@@ -176,8 +176,8 @@
package androidx.glance.wear.tiles.state {
public final class GlanceWearTilesStateKt {
- method public static suspend <T> Object? getWearTileState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? updateWearTileState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> updateState, kotlin.coroutines.Continuation<? super T> p);
+ method public static suspend <T> Object? getWearTileState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? updateWearTileState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> updateState, kotlin.coroutines.Continuation<? super T>);
}
}
diff --git a/glance/glance-wear-tiles/api/public_plus_experimental_current.txt b/glance/glance-wear-tiles/api/public_plus_experimental_current.txt
index 697752e..18f67be 100644
--- a/glance/glance-wear-tiles/api/public_plus_experimental_current.txt
+++ b/glance/glance-wear-tiles/api/public_plus_experimental_current.txt
@@ -22,12 +22,12 @@
ctor public GlanceTileService(optional androidx.wear.tiles.LayoutElementBuilders.LayoutElement? errorUiLayout);
method @androidx.compose.runtime.Composable public abstract void Content();
method public androidx.glance.state.GlanceStateDefinition<?>? getStateDefinition();
- method public final suspend <T> Object? getTileState(kotlin.coroutines.Continuation<? super T> p);
+ method public final suspend <T> Object? getTileState(kotlin.coroutines.Continuation<? super T>);
method public androidx.glance.wear.tiles.TimelineMode getTimelineMode();
method protected final com.google.common.util.concurrent.ListenableFuture<androidx.wear.tiles.ResourceBuilders.Resources> onResourcesRequest(androidx.wear.tiles.RequestBuilders.ResourcesRequest requestParams);
method public void onStart(android.content.Intent? intent, int startId);
method protected final com.google.common.util.concurrent.ListenableFuture<androidx.wear.tiles.TileBuilders.Tile> onTileRequest(androidx.wear.tiles.RequestBuilders.TileRequest requestParams);
- method public final suspend <T> Object? updateTileState(kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> updateState, kotlin.coroutines.Continuation<? super T> p);
+ method public final suspend <T> Object? updateTileState(kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> updateState, kotlin.coroutines.Continuation<? super T>);
property public androidx.glance.state.GlanceStateDefinition<?>? stateDefinition;
property public androidx.glance.wear.tiles.TimelineMode timelineMode;
}
@@ -67,7 +67,7 @@
package androidx.glance.wear.tiles.action {
public interface ActionCallback {
- method public suspend Object? onAction(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? onAction(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class RunCallbackActionKt {
@@ -176,8 +176,8 @@
package androidx.glance.wear.tiles.state {
public final class GlanceWearTilesStateKt {
- method public static suspend <T> Object? getWearTileState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? updateWearTileState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> updateState, kotlin.coroutines.Continuation<? super T> p);
+ method public static suspend <T> Object? getWearTileState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? updateWearTileState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> updateState, kotlin.coroutines.Continuation<? super T>);
}
}
diff --git a/glance/glance-wear-tiles/api/restricted_current.txt b/glance/glance-wear-tiles/api/restricted_current.txt
index 697752e..18f67be 100644
--- a/glance/glance-wear-tiles/api/restricted_current.txt
+++ b/glance/glance-wear-tiles/api/restricted_current.txt
@@ -22,12 +22,12 @@
ctor public GlanceTileService(optional androidx.wear.tiles.LayoutElementBuilders.LayoutElement? errorUiLayout);
method @androidx.compose.runtime.Composable public abstract void Content();
method public androidx.glance.state.GlanceStateDefinition<?>? getStateDefinition();
- method public final suspend <T> Object? getTileState(kotlin.coroutines.Continuation<? super T> p);
+ method public final suspend <T> Object? getTileState(kotlin.coroutines.Continuation<? super T>);
method public androidx.glance.wear.tiles.TimelineMode getTimelineMode();
method protected final com.google.common.util.concurrent.ListenableFuture<androidx.wear.tiles.ResourceBuilders.Resources> onResourcesRequest(androidx.wear.tiles.RequestBuilders.ResourcesRequest requestParams);
method public void onStart(android.content.Intent? intent, int startId);
method protected final com.google.common.util.concurrent.ListenableFuture<androidx.wear.tiles.TileBuilders.Tile> onTileRequest(androidx.wear.tiles.RequestBuilders.TileRequest requestParams);
- method public final suspend <T> Object? updateTileState(kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> updateState, kotlin.coroutines.Continuation<? super T> p);
+ method public final suspend <T> Object? updateTileState(kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> updateState, kotlin.coroutines.Continuation<? super T>);
property public androidx.glance.state.GlanceStateDefinition<?>? stateDefinition;
property public androidx.glance.wear.tiles.TimelineMode timelineMode;
}
@@ -67,7 +67,7 @@
package androidx.glance.wear.tiles.action {
public interface ActionCallback {
- method public suspend Object? onAction(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? onAction(android.content.Context context, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class RunCallbackActionKt {
@@ -176,8 +176,8 @@
package androidx.glance.wear.tiles.state {
public final class GlanceWearTilesStateKt {
- method public static suspend <T> Object? getWearTileState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? updateWearTileState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> updateState, kotlin.coroutines.Continuation<? super T> p);
+ method public static suspend <T> Object? getWearTileState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? updateWearTileState(android.content.Context context, androidx.glance.state.GlanceStateDefinition<T> definition, androidx.glance.GlanceId glanceId, kotlin.jvm.functions.Function2<? super T,? super kotlin.coroutines.Continuation<? super T>,?> updateState, kotlin.coroutines.Continuation<? super T>);
}
}
diff --git a/glance/glance/api/current.txt b/glance/glance/api/current.txt
index 9fd0a83..bb7e6ef 100644
--- a/glance/glance/api/current.txt
+++ b/glance/glance/api/current.txt
@@ -282,12 +282,12 @@
package androidx.glance.state {
public interface GlanceStateDefinition<T> {
- method public suspend Object? getDataStore(android.content.Context context, String fileKey, kotlin.coroutines.Continuation<? super androidx.datastore.core.DataStore<T>> p);
+ method public suspend Object? getDataStore(android.content.Context context, String fileKey, kotlin.coroutines.Continuation<? super androidx.datastore.core.DataStore<T>>);
method public java.io.File getLocation(android.content.Context context, String fileKey);
}
public final class PreferencesGlanceStateDefinition implements androidx.glance.state.GlanceStateDefinition<androidx.datastore.preferences.core.Preferences> {
- method public suspend Object? getDataStore(android.content.Context context, String fileKey, kotlin.coroutines.Continuation<? super androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences>> p);
+ method public suspend Object? getDataStore(android.content.Context context, String fileKey, kotlin.coroutines.Continuation<? super androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences>>);
method public java.io.File getLocation(android.content.Context context, String fileKey);
field public static final androidx.glance.state.PreferencesGlanceStateDefinition INSTANCE;
}
diff --git a/glance/glance/api/public_plus_experimental_current.txt b/glance/glance/api/public_plus_experimental_current.txt
index 9fd0a83..bb7e6ef 100644
--- a/glance/glance/api/public_plus_experimental_current.txt
+++ b/glance/glance/api/public_plus_experimental_current.txt
@@ -282,12 +282,12 @@
package androidx.glance.state {
public interface GlanceStateDefinition<T> {
- method public suspend Object? getDataStore(android.content.Context context, String fileKey, kotlin.coroutines.Continuation<? super androidx.datastore.core.DataStore<T>> p);
+ method public suspend Object? getDataStore(android.content.Context context, String fileKey, kotlin.coroutines.Continuation<? super androidx.datastore.core.DataStore<T>>);
method public java.io.File getLocation(android.content.Context context, String fileKey);
}
public final class PreferencesGlanceStateDefinition implements androidx.glance.state.GlanceStateDefinition<androidx.datastore.preferences.core.Preferences> {
- method public suspend Object? getDataStore(android.content.Context context, String fileKey, kotlin.coroutines.Continuation<? super androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences>> p);
+ method public suspend Object? getDataStore(android.content.Context context, String fileKey, kotlin.coroutines.Continuation<? super androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences>>);
method public java.io.File getLocation(android.content.Context context, String fileKey);
field public static final androidx.glance.state.PreferencesGlanceStateDefinition INSTANCE;
}
diff --git a/glance/glance/api/restricted_current.txt b/glance/glance/api/restricted_current.txt
index 9fd0a83..bb7e6ef 100644
--- a/glance/glance/api/restricted_current.txt
+++ b/glance/glance/api/restricted_current.txt
@@ -282,12 +282,12 @@
package androidx.glance.state {
public interface GlanceStateDefinition<T> {
- method public suspend Object? getDataStore(android.content.Context context, String fileKey, kotlin.coroutines.Continuation<? super androidx.datastore.core.DataStore<T>> p);
+ method public suspend Object? getDataStore(android.content.Context context, String fileKey, kotlin.coroutines.Continuation<? super androidx.datastore.core.DataStore<T>>);
method public java.io.File getLocation(android.content.Context context, String fileKey);
}
public final class PreferencesGlanceStateDefinition implements androidx.glance.state.GlanceStateDefinition<androidx.datastore.preferences.core.Preferences> {
- method public suspend Object? getDataStore(android.content.Context context, String fileKey, kotlin.coroutines.Continuation<? super androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences>> p);
+ method public suspend Object? getDataStore(android.content.Context context, String fileKey, kotlin.coroutines.Continuation<? super androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences>>);
method public java.io.File getLocation(android.content.Context context, String fileKey);
field public static final androidx.glance.state.PreferencesGlanceStateDefinition INSTANCE;
}
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 3ff356b..0670484 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -135,7 +135,7 @@
leakcanary = { module = "com.squareup.leakcanary:leakcanary-android", version.ref = "leakcanary" }
leakcanaryInstrumentation = { module = "com.squareup.leakcanary:leakcanary-android-instrumentation", version.ref = "leakcanary" }
material = { module = "com.google.android.material:material", version = "1.2.1" }
-metalava = { module = "com.android.tools.metalava:metalava", version = "1.0.0-alpha05" }
+metalava = { module = "com.android.tools.metalava:metalava", version = "1.0.0-alpha06" }
mlkitBarcode = { module = "com.google.mlkit:barcode-scanning", version = "17.0.2" }
mockitoCore = { module = "org.mockito:mockito-core", version.ref = "mockito" }
mockitoAndroid = { module = "org.mockito:mockito-android", version.ref = "mockito" }
diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml
index 16a26ec..c1bab9f 100644
--- a/gradle/verification-metadata.xml
+++ b/gradle/verification-metadata.xml
@@ -737,16 +737,16 @@
<sha256 value="47a89be0fa0fedd476db5fd2c83487654d2a119c391f83a142be876667cf7dab" origin="Generated by Gradle"/>
</artifact>
</component>
- <!-- Unsigned -->
+ <!-- Unsigned https://github.com/gradle/gradle/issues/20349 -->
<component group="com.gradle" name="common-custom-user-data-gradle-plugin" version="1.6.5">
<artifact name="common-custom-user-data-gradle-plugin-1.6.5.pom">
<sha256 value="5f63192db4e0b9b71c8170e620f3e730efe87bfffa9a17943da0613eefb8ccf7"/>
</artifact>
</component>
- <!-- Unsigned -->
- <component group="com.gradle" name="gradle-enterprise-gradle-plugin" version="3.8.1">
- <artifact name="gradle-enterprise-gradle-plugin-3.8.1.pom">
- <sha256 value="e47a53196079934edf14b36b4b77e380d17327a3d8eeab05ba061ca3fc1334a5" origin="Generated by Gradle"/>
+ <!-- Unsigned https://github.com/gradle/gradle/issues/20349 -->
+ <component group="com.gradle" name="gradle-enterprise-gradle-plugin" version="3.9">
+ <artifact name="gradle-enterprise-gradle-plugin-3.9.pom">
+ <sha256 value="f1fd493a23e9582026a42c6efaa99a167770d8b755c1e173d45adf30aaefab6f" origin="Generated by Gradle"/>
</artifact>
</component>
<!-- Unsigned -->
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index ab0bf2e..73ec098 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -2,4 +2,4 @@
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=../../../../tools/external/gradle/gradle-7.4-bin.zip
+distributionUrl=../../../../tools/external/gradle/gradle-7.4.2-bin.zip
diff --git a/health/health-data-client/api/current.txt b/health/health-data-client/api/current.txt
index 3f835c8..7a80848 100644
--- a/health/health-data-client/api/current.txt
+++ b/health/health-data-client/api/current.txt
@@ -2,10 +2,10 @@
package androidx.health.data.client {
public interface HealthDataClient {
- method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.data.client.records.Record> recordType, java.util.List<java.lang.String> uidsList, java.util.List<java.lang.String> clientIdsList, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.data.client.records.Record> recordType, java.util.List<java.lang.String> uidsList, java.util.List<java.lang.String> clientIdsList, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public default static androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
method public default static androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context);
- method public suspend Object? insertRecords(java.util.List<? extends androidx.health.data.client.records.Record> records, kotlin.coroutines.Continuation<? super androidx.health.data.client.response.InsertRecordsResponse> p);
+ method public suspend Object? insertRecords(java.util.List<? extends androidx.health.data.client.records.Record> records, kotlin.coroutines.Continuation<? super androidx.health.data.client.response.InsertRecordsResponse>);
method public default static boolean isAvailable(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
method public default static boolean isAvailable(android.content.Context context);
field public static final androidx.health.data.client.HealthDataClient.Companion Companion;
@@ -176,6 +176,90 @@
field public static final String STANDING_UP = "standing_up";
}
+ public final class BodyTemperature implements androidx.health.data.client.records.Record {
+ ctor public BodyTemperature(double temperatureDegreesCelsius, optional String? measurementLocation, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ method public String? getMeasurementLocation();
+ method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public double getTemperatureDegreesCelsius();
+ method public java.time.Instant getTime();
+ method public java.time.ZoneOffset? getZoneOffset();
+ property public final String? measurementLocation;
+ property public androidx.health.data.client.metadata.Metadata metadata;
+ property public final double temperatureDegreesCelsius;
+ property public java.time.Instant time;
+ property public java.time.ZoneOffset? zoneOffset;
+ }
+
+ public final class BodyTemperatureMeasurementLocations {
+ field public static final String ARMPIT = "armpit";
+ field public static final String EAR = "ear";
+ field public static final String FINGER = "finger";
+ field public static final String FOREHEAD = "forehead";
+ field public static final androidx.health.data.client.records.BodyTemperatureMeasurementLocations INSTANCE;
+ field public static final String MOUTH = "mouth";
+ field public static final String RECTUM = "rectum";
+ field public static final String TEMPORAL_ARTERY = "temporal_artery";
+ field public static final String TOE = "toe";
+ field public static final String VAGINA = "vagina";
+ field public static final String WRIST = "wrist";
+ }
+
+ public final class Distance implements androidx.health.data.client.records.Record {
+ ctor public Distance(double distanceMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ method public double getDistanceMeters();
+ method public java.time.Instant getEndTime();
+ method public java.time.ZoneOffset? getEndZoneOffset();
+ method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public java.time.Instant getStartTime();
+ method public java.time.ZoneOffset? getStartZoneOffset();
+ property public final double distanceMeters;
+ property public java.time.Instant endTime;
+ property public java.time.ZoneOffset? endZoneOffset;
+ property public androidx.health.data.client.metadata.Metadata metadata;
+ property public java.time.Instant startTime;
+ property public java.time.ZoneOffset? startZoneOffset;
+ }
+
+ public final class ElevationGained implements androidx.health.data.client.records.Record {
+ ctor public ElevationGained(double elevationMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ method public double getElevationMeters();
+ method public java.time.Instant getEndTime();
+ method public java.time.ZoneOffset? getEndZoneOffset();
+ method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public java.time.Instant getStartTime();
+ method public java.time.ZoneOffset? getStartZoneOffset();
+ property public final double elevationMeters;
+ property public java.time.Instant endTime;
+ property public java.time.ZoneOffset? endZoneOffset;
+ property public androidx.health.data.client.metadata.Metadata metadata;
+ property public java.time.Instant startTime;
+ property public java.time.ZoneOffset? startZoneOffset;
+ }
+
+ public final class Height implements androidx.health.data.client.records.Record {
+ ctor public Height(double heightMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ method public double getHeightMeters();
+ method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public java.time.Instant getTime();
+ method public java.time.ZoneOffset? getZoneOffset();
+ property public final double heightMeters;
+ property public androidx.health.data.client.metadata.Metadata metadata;
+ property public java.time.Instant time;
+ property public java.time.ZoneOffset? zoneOffset;
+ }
+
+ public final class HipCircumference implements androidx.health.data.client.records.Record {
+ ctor public HipCircumference(double circumferenceMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ method public double getCircumferenceMeters();
+ method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public java.time.Instant getTime();
+ method public java.time.ZoneOffset? getZoneOffset();
+ property public final double circumferenceMeters;
+ property public androidx.health.data.client.metadata.Metadata metadata;
+ property public java.time.Instant time;
+ property public java.time.ZoneOffset? zoneOffset;
+ }
+
public final class OvulationTestResults {
field public static final androidx.health.data.client.records.OvulationTestResults INSTANCE;
field public static final String NEGATIVE = "negative";
diff --git a/health/health-data-client/api/public_plus_experimental_current.txt b/health/health-data-client/api/public_plus_experimental_current.txt
index 3f835c8..7a80848 100644
--- a/health/health-data-client/api/public_plus_experimental_current.txt
+++ b/health/health-data-client/api/public_plus_experimental_current.txt
@@ -2,10 +2,10 @@
package androidx.health.data.client {
public interface HealthDataClient {
- method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.data.client.records.Record> recordType, java.util.List<java.lang.String> uidsList, java.util.List<java.lang.String> clientIdsList, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.data.client.records.Record> recordType, java.util.List<java.lang.String> uidsList, java.util.List<java.lang.String> clientIdsList, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public default static androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
method public default static androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context);
- method public suspend Object? insertRecords(java.util.List<? extends androidx.health.data.client.records.Record> records, kotlin.coroutines.Continuation<? super androidx.health.data.client.response.InsertRecordsResponse> p);
+ method public suspend Object? insertRecords(java.util.List<? extends androidx.health.data.client.records.Record> records, kotlin.coroutines.Continuation<? super androidx.health.data.client.response.InsertRecordsResponse>);
method public default static boolean isAvailable(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
method public default static boolean isAvailable(android.content.Context context);
field public static final androidx.health.data.client.HealthDataClient.Companion Companion;
@@ -176,6 +176,90 @@
field public static final String STANDING_UP = "standing_up";
}
+ public final class BodyTemperature implements androidx.health.data.client.records.Record {
+ ctor public BodyTemperature(double temperatureDegreesCelsius, optional String? measurementLocation, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ method public String? getMeasurementLocation();
+ method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public double getTemperatureDegreesCelsius();
+ method public java.time.Instant getTime();
+ method public java.time.ZoneOffset? getZoneOffset();
+ property public final String? measurementLocation;
+ property public androidx.health.data.client.metadata.Metadata metadata;
+ property public final double temperatureDegreesCelsius;
+ property public java.time.Instant time;
+ property public java.time.ZoneOffset? zoneOffset;
+ }
+
+ public final class BodyTemperatureMeasurementLocations {
+ field public static final String ARMPIT = "armpit";
+ field public static final String EAR = "ear";
+ field public static final String FINGER = "finger";
+ field public static final String FOREHEAD = "forehead";
+ field public static final androidx.health.data.client.records.BodyTemperatureMeasurementLocations INSTANCE;
+ field public static final String MOUTH = "mouth";
+ field public static final String RECTUM = "rectum";
+ field public static final String TEMPORAL_ARTERY = "temporal_artery";
+ field public static final String TOE = "toe";
+ field public static final String VAGINA = "vagina";
+ field public static final String WRIST = "wrist";
+ }
+
+ public final class Distance implements androidx.health.data.client.records.Record {
+ ctor public Distance(double distanceMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ method public double getDistanceMeters();
+ method public java.time.Instant getEndTime();
+ method public java.time.ZoneOffset? getEndZoneOffset();
+ method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public java.time.Instant getStartTime();
+ method public java.time.ZoneOffset? getStartZoneOffset();
+ property public final double distanceMeters;
+ property public java.time.Instant endTime;
+ property public java.time.ZoneOffset? endZoneOffset;
+ property public androidx.health.data.client.metadata.Metadata metadata;
+ property public java.time.Instant startTime;
+ property public java.time.ZoneOffset? startZoneOffset;
+ }
+
+ public final class ElevationGained implements androidx.health.data.client.records.Record {
+ ctor public ElevationGained(double elevationMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ method public double getElevationMeters();
+ method public java.time.Instant getEndTime();
+ method public java.time.ZoneOffset? getEndZoneOffset();
+ method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public java.time.Instant getStartTime();
+ method public java.time.ZoneOffset? getStartZoneOffset();
+ property public final double elevationMeters;
+ property public java.time.Instant endTime;
+ property public java.time.ZoneOffset? endZoneOffset;
+ property public androidx.health.data.client.metadata.Metadata metadata;
+ property public java.time.Instant startTime;
+ property public java.time.ZoneOffset? startZoneOffset;
+ }
+
+ public final class Height implements androidx.health.data.client.records.Record {
+ ctor public Height(double heightMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ method public double getHeightMeters();
+ method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public java.time.Instant getTime();
+ method public java.time.ZoneOffset? getZoneOffset();
+ property public final double heightMeters;
+ property public androidx.health.data.client.metadata.Metadata metadata;
+ property public java.time.Instant time;
+ property public java.time.ZoneOffset? zoneOffset;
+ }
+
+ public final class HipCircumference implements androidx.health.data.client.records.Record {
+ ctor public HipCircumference(double circumferenceMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ method public double getCircumferenceMeters();
+ method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public java.time.Instant getTime();
+ method public java.time.ZoneOffset? getZoneOffset();
+ property public final double circumferenceMeters;
+ property public androidx.health.data.client.metadata.Metadata metadata;
+ property public java.time.Instant time;
+ property public java.time.ZoneOffset? zoneOffset;
+ }
+
public final class OvulationTestResults {
field public static final androidx.health.data.client.records.OvulationTestResults INSTANCE;
field public static final String NEGATIVE = "negative";
diff --git a/health/health-data-client/api/restricted_current.txt b/health/health-data-client/api/restricted_current.txt
index 87f0e38..af4a3ef 100644
--- a/health/health-data-client/api/restricted_current.txt
+++ b/health/health-data-client/api/restricted_current.txt
@@ -2,10 +2,10 @@
package androidx.health.data.client {
public interface HealthDataClient {
- method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.data.client.records.Record> recordType, java.util.List<java.lang.String> uidsList, java.util.List<java.lang.String> clientIdsList, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.data.client.records.Record> recordType, java.util.List<java.lang.String> uidsList, java.util.List<java.lang.String> clientIdsList, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public default static androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
method public default static androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context);
- method public suspend Object? insertRecords(java.util.List<? extends androidx.health.data.client.records.Record> records, kotlin.coroutines.Continuation<? super androidx.health.data.client.response.InsertRecordsResponse> p);
+ method public suspend Object? insertRecords(java.util.List<? extends androidx.health.data.client.records.Record> records, kotlin.coroutines.Continuation<? super androidx.health.data.client.response.InsertRecordsResponse>);
method public default static boolean isAvailable(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
method public default static boolean isAvailable(android.content.Context context);
field public static final androidx.health.data.client.HealthDataClient.Companion Companion;
@@ -176,6 +176,90 @@
field public static final String STANDING_UP = "standing_up";
}
+ public final class BodyTemperature implements androidx.health.data.client.records.InstantaneousRecord {
+ ctor public BodyTemperature(double temperatureDegreesCelsius, optional String? measurementLocation, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ method public String? getMeasurementLocation();
+ method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public double getTemperatureDegreesCelsius();
+ method public java.time.Instant getTime();
+ method public java.time.ZoneOffset? getZoneOffset();
+ property public final String? measurementLocation;
+ property public androidx.health.data.client.metadata.Metadata metadata;
+ property public final double temperatureDegreesCelsius;
+ property public java.time.Instant time;
+ property public java.time.ZoneOffset? zoneOffset;
+ }
+
+ public final class BodyTemperatureMeasurementLocations {
+ field public static final String ARMPIT = "armpit";
+ field public static final String EAR = "ear";
+ field public static final String FINGER = "finger";
+ field public static final String FOREHEAD = "forehead";
+ field public static final androidx.health.data.client.records.BodyTemperatureMeasurementLocations INSTANCE;
+ field public static final String MOUTH = "mouth";
+ field public static final String RECTUM = "rectum";
+ field public static final String TEMPORAL_ARTERY = "temporal_artery";
+ field public static final String TOE = "toe";
+ field public static final String VAGINA = "vagina";
+ field public static final String WRIST = "wrist";
+ }
+
+ public final class Distance implements androidx.health.data.client.records.IntervalRecord {
+ ctor public Distance(double distanceMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ method public double getDistanceMeters();
+ method public java.time.Instant getEndTime();
+ method public java.time.ZoneOffset? getEndZoneOffset();
+ method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public java.time.Instant getStartTime();
+ method public java.time.ZoneOffset? getStartZoneOffset();
+ property public final double distanceMeters;
+ property public java.time.Instant endTime;
+ property public java.time.ZoneOffset? endZoneOffset;
+ property public androidx.health.data.client.metadata.Metadata metadata;
+ property public java.time.Instant startTime;
+ property public java.time.ZoneOffset? startZoneOffset;
+ }
+
+ public final class ElevationGained implements androidx.health.data.client.records.IntervalRecord {
+ ctor public ElevationGained(double elevationMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ method public double getElevationMeters();
+ method public java.time.Instant getEndTime();
+ method public java.time.ZoneOffset? getEndZoneOffset();
+ method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public java.time.Instant getStartTime();
+ method public java.time.ZoneOffset? getStartZoneOffset();
+ property public final double elevationMeters;
+ property public java.time.Instant endTime;
+ property public java.time.ZoneOffset? endZoneOffset;
+ property public androidx.health.data.client.metadata.Metadata metadata;
+ property public java.time.Instant startTime;
+ property public java.time.ZoneOffset? startZoneOffset;
+ }
+
+ public final class Height implements androidx.health.data.client.records.InstantaneousRecord {
+ ctor public Height(double heightMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ method public double getHeightMeters();
+ method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public java.time.Instant getTime();
+ method public java.time.ZoneOffset? getZoneOffset();
+ property public final double heightMeters;
+ property public androidx.health.data.client.metadata.Metadata metadata;
+ property public java.time.Instant time;
+ property public java.time.ZoneOffset? zoneOffset;
+ }
+
+ public final class HipCircumference implements androidx.health.data.client.records.InstantaneousRecord {
+ ctor public HipCircumference(double circumferenceMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ method public double getCircumferenceMeters();
+ method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public java.time.Instant getTime();
+ method public java.time.ZoneOffset? getZoneOffset();
+ property public final double circumferenceMeters;
+ property public androidx.health.data.client.metadata.Metadata metadata;
+ property public java.time.Instant time;
+ property public java.time.ZoneOffset? zoneOffset;
+ }
+
@kotlin.PublishedApi internal interface InstantaneousRecord extends androidx.health.data.client.records.Record {
method public java.time.Instant getTime();
method public java.time.ZoneOffset? getZoneOffset();
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/HealthDataClient.kt b/health/health-data-client/src/main/java/androidx/health/data/client/HealthDataClient.kt
index 2a4f50c..621f373 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/HealthDataClient.kt
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/HealthDataClient.kt
@@ -21,11 +21,13 @@
import androidx.annotation.ChecksSdkIntAtLeast
import androidx.annotation.RestrictTo
import androidx.health.data.client.aggregate.AggregateDataRow
+import androidx.health.data.client.aggregate.AggregateDataRowGroupByDuration
import androidx.health.data.client.aggregate.AggregateMetric
import androidx.health.data.client.impl.HealthDataClientImpl
import androidx.health.data.client.metadata.DataOrigin
import androidx.health.data.client.permission.Permission
import androidx.health.data.client.records.Record
+import androidx.health.data.client.request.AggregateGroupByDurationRequest
import androidx.health.data.client.request.AggregateRequest
import androidx.health.data.client.request.ChangesTokenRequest
import androidx.health.data.client.request.ReadRecordsRequest
@@ -75,8 +77,7 @@
* @throws IOException For any disk I/O issues.
* @throws IllegalStateException If service is not available.
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY)
- suspend fun updateRecords(records: List<Record>)
+ @RestrictTo(RestrictTo.Scope.LIBRARY) suspend fun updateRecords(records: List<Record>)
/**
* Deletes one or more [Record] by their identifiers. Deletion of multiple [Record] is executed
@@ -150,10 +151,10 @@
* Reads [AggregateMetric]s according to requested read criteria: [Record]s from
* [dataOriginFilter] and within [timeRangeFilter].
*
- * @param request [AggregateRequest] object specifying [AggregateMetric]s to aggregate other
+ * @param request [AggregateRequest] object specifying [AggregateMetric]s to aggregate and other
* filters.
*
- * @return a response containing a [AggregateDataRow].
+ * @return the [AggregateDataRow] that contains aggregated values.
* @throws RemoteException For any IPC transportation failures.
* @throws SecurityException For requests with unpermitted access.
* @throws IOException For any disk I/O issues.
@@ -162,7 +163,31 @@
@RestrictTo(RestrictTo.Scope.LIBRARY)
suspend fun aggregate(request: AggregateRequest): AggregateDataRow
- // TODO(b/221725298): Adds overload with groupBy that return a list
+ /**
+ * Reads [AggregateMetric]s according to requested read criteria specified in
+ * [AggregateGroupByDurationRequest].
+ *
+ * This method is similar to [aggregate] but instead of returning one [AggregateDataRow] for the
+ * entire query's time interval, it returns a list of [AggregateDataRowGroupByDuration], with
+ * each row keyed by start and end time. For example: steps for today bucketed by hours.
+ *
+ * A [AggregateDataRowGroupByDuration] is returned only if there are [Record] points to
+ * aggregate within start and end time of the row.
+ *
+ * @param request [AggregateGroupByDurationRequest] object specifying [AggregateMetric]s to
+ * aggregate and other filters.
+ *
+ * @return a list of [AggregateDataRowGroupByDuration]s, each contains aggregated values and
+ * start/end time of the row. The list is sorted by time in ascending order.
+ * @throws RemoteException For any IPC transportation failures.
+ * @throws SecurityException For requests with unpermitted access.
+ * @throws IOException For any disk I/O issues.
+ * @throws IllegalStateException If service is not available.
+ */
+ @RestrictTo(RestrictTo.Scope.LIBRARY)
+ suspend fun aggregateGroupByDuration(
+ request: AggregateGroupByDurationRequest,
+ ): List<AggregateDataRowGroupByDuration>
/**
* Retrieves a changes-token, representing a point in time in the underlying Android Health
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateDataRow.kt b/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateDataRow.kt
index d4f6f1c..4590160 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateDataRow.kt
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateDataRow.kt
@@ -27,8 +27,6 @@
@RestrictTo(RestrictTo.Scope.LIBRARY)
class AggregateDataRow
internal constructor(
- // TODO(b/219327548): Accommodate optional aggregate groupBy keys (time range) when we add
- // groupBy.
internal val longValues: Map<String, Long>,
internal val doubleValues: Map<String, Double>,
/** List of [DataOrigin]s that contributed to the aggregation result. */
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateDataRowGroupByDuration.kt b/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateDataRowGroupByDuration.kt
new file mode 100644
index 0000000..1b46315
--- /dev/null
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateDataRowGroupByDuration.kt
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 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.health.data.client.aggregate
+
+import androidx.annotation.RestrictTo
+import java.time.Instant
+import java.time.ZoneOffset
+
+/**
+ * Represents an aggregation result row.
+ *
+ * See [HealthDataClient.aggregateGroupByDuration]
+ */
+@RestrictTo(RestrictTo.Scope.LIBRARY)
+@SuppressWarnings("NewApi")
+class AggregateDataRowGroupByDuration
+internal constructor(
+ public val data: AggregateDataRow,
+ public val startTime: Instant,
+ public val endTime: Instant,
+ public val zoneOffset: ZoneOffset,
+) {
+ init {
+ require(startTime.isBefore(endTime)) { "start time must be before end time" }
+ }
+}
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateMetric.kt b/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateMetric.kt
index 15d1f63..94decdf 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateMetric.kt
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateMetric.kt
@@ -25,14 +25,14 @@
/** Aggregation of the metric, for SDK internal use only. */
val aggregationSuffix: String
/** Optional field name of the metric, for SDK internal use only */
- val fieldName: String?
+ val aggregateFieldName: String?
}
/** Serve for internal use to look up a metric value from metric value dictionary. */
internal val AggregateMetric.metricKey: String
get() {
- return if (fieldName != null) {
- "${dataTypeName}_${fieldName}_$aggregationSuffix"
+ return if (aggregateFieldName != null) {
+ "${dataTypeName}_${aggregateFieldName}_$aggregationSuffix"
} else {
"${dataTypeName}_$aggregationSuffix"
}
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/DoubleAggregateMetric.kt b/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/DoubleAggregateMetric.kt
index aa11c81..e16de76 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/DoubleAggregateMetric.kt
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/DoubleAggregateMetric.kt
@@ -27,5 +27,5 @@
internal constructor(
override val dataTypeName: String,
override val aggregationSuffix: String,
- override val fieldName: String? = null
+ override val aggregateFieldName: String? = null
) : AggregateMetric
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/DurationAggregateMetric.kt b/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/DurationAggregateMetric.kt
index e6d3e0a..ac50645 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/DurationAggregateMetric.kt
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/DurationAggregateMetric.kt
@@ -24,7 +24,9 @@
*/
@RestrictTo(RestrictTo.Scope.LIBRARY)
class DurationAggregateMetric
-internal constructor(override val dataTypeName: String, override val aggregationSuffix: String) :
- AggregateMetric {
- override val fieldName: String? = null
+internal constructor(
+ override val dataTypeName: String,
+ override val aggregationSuffix: String,
+) : AggregateMetric {
+ override val aggregateFieldName: String? = null
}
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/LongAggregateMetric.kt b/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/LongAggregateMetric.kt
index bef9fe8..41f16ef 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/LongAggregateMetric.kt
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/LongAggregateMetric.kt
@@ -27,5 +27,5 @@
internal constructor(
override val dataTypeName: String,
override val aggregationSuffix: String,
- override val fieldName: String? = null
+ override val aggregateFieldName: String? = null
) : AggregateMetric
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/HealthDataClientImpl.kt b/health/health-data-client/src/main/java/androidx/health/data/client/impl/HealthDataClientImpl.kt
index 8416bf0..1668ac1 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/HealthDataClientImpl.kt
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/impl/HealthDataClientImpl.kt
@@ -17,6 +17,9 @@
import androidx.health.data.client.HealthDataClient
import androidx.health.data.client.aggregate.AggregateDataRow
+import androidx.health.data.client.aggregate.AggregateDataRowGroupByDuration
+import androidx.health.data.client.impl.converters.aggregate.retrieveAggregateDataRow
+import androidx.health.data.client.impl.converters.aggregate.toAggregateDataRowGroupByDuration
import androidx.health.data.client.impl.converters.datatype.toDataTypeIdPairProtoList
import androidx.health.data.client.impl.converters.datatype.toDataTypeName
import androidx.health.data.client.impl.converters.permission.toJetpackPermission
@@ -24,14 +27,14 @@
import androidx.health.data.client.impl.converters.records.toProto
import androidx.health.data.client.impl.converters.records.toRecord
import androidx.health.data.client.impl.converters.request.toDeleteDataRangeRequestProto
+import androidx.health.data.client.impl.converters.request.toProto
import androidx.health.data.client.impl.converters.request.toReadDataRangeRequestProto
import androidx.health.data.client.impl.converters.request.toReadDataRequestProto
import androidx.health.data.client.impl.converters.response.toChangesResponse
import androidx.health.data.client.impl.converters.response.toReadRecordsResponse
-import androidx.health.data.client.impl.converters.time.toProto
-import androidx.health.data.client.metadata.DataOrigin
import androidx.health.data.client.permission.Permission
import androidx.health.data.client.records.Record
+import androidx.health.data.client.request.AggregateGroupByDurationRequest
import androidx.health.data.client.request.AggregateRequest
import androidx.health.data.client.request.ChangesTokenRequest
import androidx.health.data.client.request.ReadRecordsRequest
@@ -74,7 +77,7 @@
override suspend fun deleteRecords(
recordType: KClass<out Record>,
uidsList: List<String>,
- clientIdsList: List<String>
+ clientIdsList: List<String>,
) {
delegate
.deleteData(
@@ -86,7 +89,7 @@
override suspend fun deleteRecords(
recordType: KClass<out Record>,
- timeRangeFilter: TimeRangeFilter
+ timeRangeFilter: TimeRangeFilter,
) {
delegate.deleteDataRange(toDeleteDataRangeRequestProto(recordType, timeRangeFilter)).await()
}
@@ -94,7 +97,7 @@
@Suppress("UNCHECKED_CAST") // Safe to cast as the type should match
override suspend fun <T : Record> readRecord(
recordType: KClass<T>,
- uid: String
+ uid: String,
): ReadRecordResponse<T> {
val proto = delegate.readData(toReadDataRequestProto(recordType, uid)).await()
return ReadRecordResponse(toRecord(proto) as T)
@@ -136,42 +139,21 @@
}
override suspend fun <T : Record> readRecords(
- request: ReadRecordsRequest<T>
+ request: ReadRecordsRequest<T>,
): ReadRecordsResponse<T> {
val proto = delegate.readDataRange(toReadDataRangeRequestProto(request)).await()
return toReadRecordsResponse(proto)
}
override suspend fun aggregate(request: AggregateRequest): AggregateDataRow {
- val responseProto =
- delegate
- .aggregate(
- RequestProto.AggregateDataRequest.newBuilder()
- .setTimeSpec(request.timeRangeFilter.toProto())
- .addAllDataOrigin(
- request.dataOriginFilter.map {
- DataProto.DataOrigin.newBuilder()
- .setApplicationId(it.packageName)
- .build()
- }
- )
- .addAllMetricSpec(
- request.metrics.map {
- RequestProto.AggregateMetricSpec.newBuilder()
- .setDataTypeName(it.dataTypeName)
- .setAggregationType(it.aggregationSuffix)
- .setFieldName(it.fieldName ?: "")
- .build()
- }
- )
- .build()
- )
- .await()
- val rowProto = responseProto.rowsList.first()
- return AggregateDataRow(
- longValues = rowProto.longValuesMap,
- doubleValues = rowProto.doubleValuesMap,
- dataOrigins = rowProto.dataOriginsList.map { DataOrigin(it.applicationId) }
- )
+ val responseProto = delegate.aggregate(request.toProto()).await()
+ return responseProto.rowsList.first().retrieveAggregateDataRow()
+ }
+
+ override suspend fun aggregateGroupByDuration(
+ request: AggregateGroupByDurationRequest,
+ ): List<AggregateDataRowGroupByDuration> {
+ val responseProto = delegate.aggregate(request.toProto()).await()
+ return responseProto.rowsList.map { it.toAggregateDataRowGroupByDuration() }.toList()
}
}
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/aggregate/AggregateMetricToProto.kt b/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/aggregate/AggregateMetricToProto.kt
new file mode 100644
index 0000000..c2d0811
--- /dev/null
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/aggregate/AggregateMetricToProto.kt
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 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.health.data.client.impl.converters.aggregate
+
+import androidx.health.data.client.aggregate.AggregateMetric
+import androidx.health.platform.client.proto.RequestProto
+
+fun AggregateMetric.toProto(): RequestProto.AggregateMetricSpec =
+ RequestProto.AggregateMetricSpec.newBuilder()
+ .setDataTypeName(dataTypeName)
+ .setAggregationType(aggregationSuffix)
+ .apply { aggregateFieldName?.let { fieldName = it } }
+ .build()
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/aggregate/ProtoToAggregateDataRow.kt b/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/aggregate/ProtoToAggregateDataRow.kt
new file mode 100644
index 0000000..3953711
--- /dev/null
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/aggregate/ProtoToAggregateDataRow.kt
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 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.health.data.client.impl.converters.aggregate
+
+import androidx.health.data.client.aggregate.AggregateDataRow
+import androidx.health.data.client.aggregate.AggregateDataRowGroupByDuration
+import androidx.health.data.client.metadata.DataOrigin
+import androidx.health.platform.client.proto.DataProto
+import java.time.Instant
+import java.time.ZoneOffset
+
+// ZoneOffset.ofTotalSeconds() has been banned but safe here for serialization.
+@SuppressWarnings("GoodTime, NewApi")
+fun DataProto.AggregateDataRow.toAggregateDataRowGroupByDuration():
+ AggregateDataRowGroupByDuration {
+ require(hasStartTimeEpochMs()) { "start time must be set" }
+ require(hasEndTimeEpochMs()) { "end time must be set" }
+
+ return AggregateDataRowGroupByDuration(
+ data = retrieveAggregateDataRow(),
+ startTime = Instant.ofEpochMilli(startTimeEpochMs),
+ endTime = Instant.ofEpochMilli(endTimeEpochMs),
+ zoneOffset = ZoneOffset.ofTotalSeconds(zoneOffsetSeconds)
+ )
+}
+
+fun DataProto.AggregateDataRow.retrieveAggregateDataRow() =
+ AggregateDataRow(
+ longValues = longValuesMap,
+ doubleValues = doubleValuesMap,
+ dataOrigins = dataOriginsList.map { DataOrigin(it.applicationId) }
+ )
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/ProtoToRecordConverters.kt b/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/ProtoToRecordConverters.kt
index 749d25b..e0849d3 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/ProtoToRecordConverters.kt
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/ProtoToRecordConverters.kt
@@ -441,6 +441,7 @@
vitaminKGrams = getDouble("vitaminK"),
zincGrams = getDouble("zinc"),
mealType = getEnum("mealType"),
+ name = getString("name"),
startTime = startTime,
startZoneOffset = startZoneOffset,
endTime = endTime,
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/RecordToProtoConverters.kt b/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/RecordToProtoConverters.kt
index e5afdd3..6265121 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/RecordToProtoConverters.kt
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/RecordToProtoConverters.kt
@@ -445,6 +445,7 @@
putValues("zinc", doubleVal(zincGrams))
}
mealType?.let { putValues("mealType", enumVal(it)) }
+ name?.let { putValues("name", stringVal(it)) }
}
.build()
is Repetitions ->
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/request/AggregateRequestToProto.kt b/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/request/AggregateRequestToProto.kt
new file mode 100644
index 0000000..1b66da6
--- /dev/null
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/request/AggregateRequestToProto.kt
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 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.health.data.client.impl.converters.request
+
+import androidx.health.data.client.impl.converters.aggregate.toProto
+import androidx.health.data.client.impl.converters.time.toProto
+import androidx.health.data.client.metadata.DataOrigin
+import androidx.health.data.client.request.AggregateGroupByDurationRequest
+import androidx.health.data.client.request.AggregateRequest
+import androidx.health.platform.client.proto.DataProto
+import androidx.health.platform.client.proto.RequestProto
+
+fun AggregateRequest.toProto(): RequestProto.AggregateDataRequest =
+ RequestProto.AggregateDataRequest.newBuilder()
+ .setTimeSpec(timeRangeFilter.toProto())
+ .addAllDataOrigin(dataOriginFilter.toProtoList())
+ .addAllMetricSpec(metrics.map { it.toProto() })
+ .build()
+
+@SuppressWarnings("NewApi")
+fun AggregateGroupByDurationRequest.toProto(): RequestProto.AggregateDataRequest =
+ RequestProto.AggregateDataRequest.newBuilder()
+ .setTimeSpec(timeRangeFilter.toProto())
+ .addAllDataOrigin(dataOriginFilter.toProtoList())
+ .addAllMetricSpec(metrics.map { it.toProto() })
+ .setSliceDurationMillis(timeRangeSlicer.toMillis())
+ .build()
+
+private fun List<DataOrigin>.toProtoList() =
+ this.map { DataProto.DataOrigin.newBuilder().setApplicationId(it.packageName).build() }
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/BodyTemperature.kt b/health/health-data-client/src/main/java/androidx/health/data/client/records/BodyTemperature.kt
index 71825a8..a7dc556 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/BodyTemperature.kt
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/records/BodyTemperature.kt
@@ -15,7 +15,6 @@
*/
package androidx.health.data.client.records
-import androidx.annotation.RestrictTo
import androidx.health.data.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
@@ -24,7 +23,6 @@
* Captures the body temperature of a user. Each record represents a single instantaneous body
* temperature measurement.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY)
public class BodyTemperature(
/** Temperature in degrees Celsius. Required field. Valid range: 0-100. */
public val temperatureDegreesCelsius: Double,
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/BodyTemperatureMeasurementLocations.kt b/health/health-data-client/src/main/java/androidx/health/data/client/records/BodyTemperatureMeasurementLocations.kt
index 84918dd..707ad7f 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/BodyTemperatureMeasurementLocations.kt
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/records/BodyTemperatureMeasurementLocations.kt
@@ -19,7 +19,6 @@
import androidx.annotation.StringDef
/** Where on the user's body a temperature measurement was taken from. */
-@RestrictTo(RestrictTo.Scope.LIBRARY)
public object BodyTemperatureMeasurementLocations {
const val ARMPIT = "armpit"
const val FINGER = "finger"
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/Distance.kt b/health/health-data-client/src/main/java/androidx/health/data/client/records/Distance.kt
index 74e40d7..8cbb3ea 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/Distance.kt
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/records/Distance.kt
@@ -15,7 +15,6 @@
*/
package androidx.health.data.client.records
-import androidx.annotation.RestrictTo
import androidx.health.data.client.aggregate.DoubleAggregateMetric
import androidx.health.data.client.metadata.Metadata
import java.time.Instant
@@ -25,9 +24,12 @@
* Captures distance travelled by the user since the last reading, in meters. The total distance
* over an interval can be calculated by adding together all the values during the interval. The
* start time of each record should represent the start of the interval in which the distance was
- * covered. The start time must be equal to or greater than the end time of the previous data point.
+ * covered.
+ *
+ * If break downs are preferred in scenario of a long workout, consider writing multiple distance
+ * records. The start time of each record should be equal to or greater than the end time of the
+ * previous record.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY)
public class Distance(
/** Distance in meters. Required field. Valid range: 0-1000000. */
public val distanceMeters: Double,
@@ -61,10 +63,10 @@
return result
}
- companion object {
+ internal companion object {
/** Metric identifier to retrieve total distance from [AggregateDataRow]. */
@JvmStatic
- val DISTANCE_TOTAL: DoubleAggregateMetric =
+ internal val DISTANCE_TOTAL: DoubleAggregateMetric =
DoubleAggregateMetric("Distance", "total", "distance")
}
}
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/ElevationGained.kt b/health/health-data-client/src/main/java/androidx/health/data/client/records/ElevationGained.kt
index 8ae8530..f5886d14 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/ElevationGained.kt
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/records/ElevationGained.kt
@@ -15,14 +15,12 @@
*/
package androidx.health.data.client.records
-import androidx.annotation.RestrictTo
import androidx.health.data.client.aggregate.DoubleAggregateMetric
import androidx.health.data.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
/** Captures the elevation gained by the user since the last reading. */
-@RestrictTo(RestrictTo.Scope.LIBRARY)
public class ElevationGained(
/** Elevation in meters. Required field. Valid range: -1000000-1000000. */
public val elevationMeters: Double,
@@ -56,10 +54,10 @@
return result
}
- companion object {
+ internal companion object {
/** Metric identifier to retrieve total elevation gained from [AggregateDataRow]. */
@JvmStatic
- val ELEVATION_TOTAL: DoubleAggregateMetric =
+ internal val ELEVATION_TOTAL: DoubleAggregateMetric =
DoubleAggregateMetric("ElevationGained", "total", "elevation")
}
}
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/Height.kt b/health/health-data-client/src/main/java/androidx/health/data/client/records/Height.kt
index 471f8b8..8d9b426 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/Height.kt
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/records/Height.kt
@@ -15,14 +15,12 @@
*/
package androidx.health.data.client.records
-import androidx.annotation.RestrictTo
import androidx.health.data.client.aggregate.DoubleAggregateMetric
import androidx.health.data.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
/** Captures the user's height in meters. */
-@RestrictTo(RestrictTo.Scope.LIBRARY)
public class Height(
/** Height in meters. Required field. Valid range: 0-3. */
public val heightMeters: Double,
@@ -51,17 +49,20 @@
return result
}
- companion object {
+ internal companion object {
/** Metric identifier to retrieve average height from [AggregateDataRow]. */
@JvmStatic
- val HEIGHT_AVG: DoubleAggregateMetric = DoubleAggregateMetric("Height", "avg", "height")
+ internal val HEIGHT_AVG: DoubleAggregateMetric =
+ DoubleAggregateMetric("Height", "avg", "height")
/** Metric identifier to retrieve minimum height from [AggregateDataRow]. */
@JvmStatic
- val HEIGHT_MIN: DoubleAggregateMetric = DoubleAggregateMetric("Height", "min", "height")
+ internal val HEIGHT_MIN: DoubleAggregateMetric =
+ DoubleAggregateMetric("Height", "min", "height")
/** Metric identifier to retrieve maximum height from [AggregateDataRow]. */
@JvmStatic
- val HEIGHT_MAX: DoubleAggregateMetric = DoubleAggregateMetric("Height", "max", "height")
+ internal val HEIGHT_MAX: DoubleAggregateMetric =
+ DoubleAggregateMetric("Height", "max", "height")
}
}
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/HipCircumference.kt b/health/health-data-client/src/main/java/androidx/health/data/client/records/HipCircumference.kt
index 716a6cd..e82d523 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/HipCircumference.kt
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/records/HipCircumference.kt
@@ -15,13 +15,11 @@
*/
package androidx.health.data.client.records
-import androidx.annotation.RestrictTo
import androidx.health.data.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
/** Captures the user's hip circumference in meters. */
-@RestrictTo(RestrictTo.Scope.LIBRARY)
public class HipCircumference(
/** Circumference in meters. Required field. Valid range: 0-10. */
public val circumferenceMeters: Double,
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/Nutrition.kt b/health/health-data-client/src/main/java/androidx/health/data/client/records/Nutrition.kt
index 9e2429d..0bd018c 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/Nutrition.kt
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/records/Nutrition.kt
@@ -107,6 +107,8 @@
public val vitaminKGrams: Double = 0.0,
/** Zinc in grams. Optional field. Valid range: 0-100. */
public val zincGrams: Double = 0.0,
+ /** Name for food or drink, provided by the user. Optional field. */
+ public val name: String? = null,
/**
* Type of meal related to the nutrients consumed. Optional, enum field. Allowed values:
* [MealType].
@@ -165,6 +167,7 @@
if (vitaminKGrams != other.vitaminKGrams) return false
if (zincGrams != other.zincGrams) return false
if (mealType != other.mealType) return false
+ if (name != other.name) return false
if (startTime != other.startTime) return false
if (startZoneOffset != other.startZoneOffset) return false
if (endTime != other.endTime) return false
@@ -219,6 +222,7 @@
result = 31 * result + vitaminKGrams.hashCode()
result = 31 * result + zincGrams.hashCode()
result = 31 * result + mealType.hashCode()
+ result = 31 * result + name.hashCode()
result = 31 * result + (startZoneOffset?.hashCode() ?: 0)
result = 31 * result + endTime.hashCode()
result = 31 * result + (endZoneOffset?.hashCode() ?: 0)
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/Pace.kt b/health/health-data-client/src/main/java/androidx/health/data/client/records/Pace.kt
deleted file mode 100644
index 5f36e7a..0000000
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/Pace.kt
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 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.health.data.client.records
-
-import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
-import java.time.Instant
-import java.time.ZoneOffset
-
-/**
- * Captures the user's pace in minutes per kilometer. The value represents the scalar magnitude of
- * the pace, so negative values should not occur.
- */
-@RestrictTo(RestrictTo.Scope.LIBRARY)
-public class Pace(
- /** Pace in minutes per kilometer. Required field. Valid range: 0-1000000. */
- public val pace: Double,
- override val time: Instant,
- override val zoneOffset: ZoneOffset?,
- override val metadata: Metadata = Metadata.EMPTY,
-) : InstantaneousRecord {
- override fun equals(other: Any?): Boolean {
- if (this === other) return true
- if (other !is Pace) return false
-
- if (pace != other.pace) return false
- if (time != other.time) return false
- if (zoneOffset != other.zoneOffset) return false
- if (metadata != other.metadata) return false
-
- return true
- }
-
- override fun hashCode(): Int {
- var result = 0
- result = 31 * result + pace.hashCode()
- result = 31 * result + time.hashCode()
- result = 31 * result + (zoneOffset?.hashCode() ?: 0)
- result = 31 * result + metadata.hashCode()
- return result
- }
-}
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/request/AggregateGroupByDurationRequest.kt b/health/health-data-client/src/main/java/androidx/health/data/client/request/AggregateGroupByDurationRequest.kt
new file mode 100644
index 0000000..a1552c8
--- /dev/null
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/request/AggregateGroupByDurationRequest.kt
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 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.health.data.client.request
+
+import androidx.annotation.RestrictTo
+import androidx.health.data.client.aggregate.AggregateMetric
+import androidx.health.data.client.metadata.DataOrigin
+import androidx.health.data.client.time.TimeRangeFilter
+import java.time.Duration
+
+/**
+ * Request object to read time bucketed aggregations for given [AggregateMetric]s in Android Health
+ * Platform.
+ *
+ * @property metrics Set of [AggregateMetric]s to aggregate, such as `Steps::STEPS_COUNT_TOTAL`.
+ * @property timeRangeFilter The [TimeRangeFilter] to read from.
+ * @property timeRangeSlicer The bucket size of each returned aggregate row. [timeRangeFilter] will
+ * be sliced into several equal-sized time buckets (except for the last one).
+ * @property dataOriginFilter List of [DataOrigin]s to read from, or empty for no filter.
+ */
+@RestrictTo(RestrictTo.Scope.LIBRARY)
+class AggregateGroupByDurationRequest(
+ internal val metrics: Set<AggregateMetric>,
+ internal val timeRangeFilter: TimeRangeFilter,
+ internal val timeRangeSlicer: Duration,
+ internal val dataOriginFilter: List<DataOrigin> = emptyList(),
+)
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/request/AggregateRequest.kt b/health/health-data-client/src/main/java/androidx/health/data/client/request/AggregateRequest.kt
index 949168d..895e1d2 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/request/AggregateRequest.kt
+++ b/health/health-data-client/src/main/java/androidx/health/data/client/request/AggregateRequest.kt
@@ -21,7 +21,7 @@
import androidx.health.data.client.time.TimeRangeFilter
/**
- * Request object to read aggregate for given [AggregateMetric]s in Android Health Platform.
+ * Request object to read aggregations for given [AggregateMetric]s in Android Health Platform.
*
* @property metrics Set of [AggregateMetric]s to aggregate, such as `Steps::STEPS_COUNT_TOTAL`.
* @property timeRangeFilter The [TimeRangeFilter] to read from.
diff --git a/health/health-data-client/src/main/proto/request.proto b/health/health-data-client/src/main/proto/request.proto
index 0c935ec..93e783a 100644
--- a/health/health-data-client/src/main/proto/request.proto
+++ b/health/health-data-client/src/main/proto/request.proto
@@ -100,7 +100,7 @@
optional TimeSpec time_spec = 1;
repeated AggregateMetricSpec metric_spec = 2;
repeated DataOrigin data_origin = 3;
- // TODO(b/219339660): Add group by here
+ optional int64 slice_duration_millis = 4;
}
message GetChangesTokenRequest {
diff --git a/health/health-data-client/src/test/java/androidx/health/data/client/impl/HealthDataClientImplTest.kt b/health/health-data-client/src/test/java/androidx/health/data/client/impl/HealthDataClientImplTest.kt
index 134f182..4394912 100644
--- a/health/health-data-client/src/test/java/androidx/health/data/client/impl/HealthDataClientImplTest.kt
+++ b/health/health-data-client/src/test/java/androidx/health/data/client/impl/HealthDataClientImplTest.kt
@@ -32,7 +32,9 @@
import androidx.health.data.client.records.ActiveEnergyBurned
import androidx.health.data.client.records.Nutrition
import androidx.health.data.client.records.Steps
+import androidx.health.data.client.records.Steps.Companion.STEPS_COUNT_TOTAL
import androidx.health.data.client.records.Weight
+import androidx.health.data.client.request.AggregateGroupByDurationRequest
import androidx.health.data.client.request.AggregateRequest
import androidx.health.data.client.request.ChangesTokenRequest
import androidx.health.data.client.request.ReadRecordsRequest
@@ -59,6 +61,7 @@
import androidx.test.espresso.intent.Intents
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.google.common.truth.Truth.assertThat
+import java.time.Duration
import java.time.Instant
import kotlin.test.assertFailsWith
import kotlinx.coroutines.Deferred
@@ -90,6 +93,11 @@
)
},
{ aggregate(AggregateRequest(setOf(), TimeRangeFilter.empty())) },
+ {
+ aggregateGroupByDuration(
+ AggregateGroupByDurationRequest(setOf(), TimeRangeFilter.empty(), Duration.ZERO)
+ )
+ },
{ getChanges("token") },
{ getChangesToken(ChangesTokenRequest(recordTypes = setOf(Steps::class))) }
)
@@ -301,10 +309,10 @@
endTime = Instant.ofEpochMilli(5678L),
endZoneOffset = null,
metadata =
- Metadata(
- uid = "testUid",
- device = Device(),
- )
+ Metadata(
+ uid = "testUid",
+ device = Device(),
+ )
)
)
}
@@ -361,24 +369,53 @@
endTime = Instant.ofEpochMilli(5678L),
endZoneOffset = null,
metadata =
- Metadata(
- uid = "testUid",
- device = Device(),
- )
+ Metadata(
+ uid = "testUid",
+ device = Device(),
+ )
)
)
}
@Test(timeout = 10000L)
- fun deleteRecords_steps() = runTest {
+ fun deleteRecordsById_steps() = runTest {
+ val deferred = async {
+ healthDataClient.deleteRecords(Steps::class, listOf("myUid"), listOf("myClientId"))
+ }
+
+ advanceUntilIdle()
+ waitForMainLooperIdle()
+ deferred.await()
+
+ val stepsTypeProto = DataProto.DataType.newBuilder().setName("Steps")
+ assertThat(fakeAhpServiceStub.lastDeleteDataRequest?.clientIds)
+ .containsExactly(
+ RequestProto.DataTypeIdPair.newBuilder()
+ .setDataType(stepsTypeProto)
+ .setId("myClientId")
+ .build()
+ )
+ assertThat(fakeAhpServiceStub.lastDeleteDataRequest?.uids)
+ .containsExactly(
+ RequestProto.DataTypeIdPair.newBuilder()
+ .setDataType(stepsTypeProto)
+ .setId("myUid")
+ .build()
+ )
+ }
+
+ @Test(timeout = 10000L)
+ fun deleteRecordsByRange_steps() = runTest {
val deferred = async {
healthDataClient.deleteRecords(
Steps::class,
timeRangeFilter = TimeRangeFilter.exact(endTime = Instant.ofEpochMilli(7890L)),
)
}
+
advanceUntilIdle()
waitForMainLooperIdle()
+
deferred.await()
assertThat(fakeAhpServiceStub.lastDeleteDataRangeRequest?.proto)
.isEqualTo(
@@ -475,6 +512,59 @@
)
}
+ @Test
+ fun aggregateGroupByDuration_totalSteps() = runTest {
+ val dataOrigin = DataProto.DataOrigin.newBuilder().setApplicationId("id").build()
+ val aggregateDataRow =
+ DataProto.AggregateDataRow.newBuilder()
+ .setStartTimeEpochMs(1234)
+ .setEndTimeEpochMs(4567)
+ .setZoneOffsetSeconds(999)
+ .addDataOrigins(dataOrigin)
+ .putLongValues("Steps_count_total", 1000)
+ .build()
+ fakeAhpServiceStub.aggregateDataResponse =
+ AggregateDataResponse(
+ ResponseProto.AggregateDataResponse.newBuilder().addRows(aggregateDataRow).build()
+ )
+ val deferred = async {
+ val startTime = Instant.ofEpochMilli(1234)
+ val endTime = Instant.ofEpochMilli(4567)
+ healthDataClient.aggregate(
+ AggregateRequest(
+ setOf(STEPS_COUNT_TOTAL),
+ TimeRangeFilter.exact(startTime, endTime)
+ )
+ )
+ }
+
+ advanceUntilIdle()
+ waitForMainLooperIdle()
+
+ val response: AggregateDataRow = deferred.await()
+ assertThat(response.hasMetric(STEPS_COUNT_TOTAL)).isTrue()
+ assertThat(response.getMetric(STEPS_COUNT_TOTAL)).isEqualTo(1000)
+ assertThat(response.dataOrigins).contains(DataOrigin("id"))
+ assertThat(fakeAhpServiceStub.lastAggregateRequest?.proto)
+ .isEqualTo(
+ RequestProto.AggregateDataRequest.newBuilder()
+ .setTimeSpec(
+ TimeProto.TimeSpec.newBuilder()
+ .setStartTimeEpochMs(1234)
+ .setEndTimeEpochMs(4567)
+ .build()
+ )
+ .addMetricSpec(
+ RequestProto.AggregateMetricSpec.newBuilder()
+ .setDataTypeName("Steps")
+ .setAggregationType("total")
+ .setFieldName("count")
+ .build()
+ )
+ .build()
+ )
+ }
+
@Test(timeout = 10000L)
fun getChangesToken() = runTest {
fakeAhpServiceStub.changesTokenResponse =
@@ -544,27 +634,6 @@
)
}
- @Test(timeout = 10000L)
- fun deleteRecordsById_steps() = runTest {
- val deferred = async {
- healthDataClient.deleteRecords(Steps::class, listOf("myUid"), listOf("myClientId"))
- }
-
- advanceUntilIdle()
- waitForMainLooperIdle()
- deferred.await()
-
- val stepsTypeProto = DataProto.DataType.newBuilder().setName("Steps")
- assertThat(fakeAhpServiceStub.lastDeleteDataRequest?.clientIds).containsExactly(
- RequestProto.DataTypeIdPair.newBuilder()
- .setDataType(stepsTypeProto).setId("myClientId").build()
- )
- assertThat(fakeAhpServiceStub.lastDeleteDataRequest?.uids).containsExactly(
- RequestProto.DataTypeIdPair.newBuilder()
- .setDataType(stepsTypeProto).setId("myUid").build()
- )
- }
-
private fun waitForMainLooperIdle() {
Shadows.shadowOf(Looper.getMainLooper()).idle()
}
diff --git a/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/aggregate/AggregateDataRowConverterTest.kt b/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/aggregate/AggregateDataRowConverterTest.kt
new file mode 100644
index 0000000..c05f0d7
--- /dev/null
+++ b/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/aggregate/AggregateDataRowConverterTest.kt
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 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.health.data.client.impl.converters.aggregate
+
+import androidx.health.data.client.aggregate.AggregateDataRow
+import androidx.health.data.client.aggregate.AggregateDataRowGroupByDuration
+import androidx.health.data.client.metadata.DataOrigin
+import androidx.health.platform.client.proto.DataProto
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import com.google.common.truth.Truth.assertThat
+import java.time.Instant
+import java.time.ZoneOffset
+import org.junit.Assert.assertThrows
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@RunWith(AndroidJUnit4::class)
+class AggregateDataRowConverterTest {
+ @Test
+ fun retrieveAggregateDataRow() {
+ val proto =
+ DataProto.AggregateDataRow.newBuilder()
+ .addDataOrigins(DataProto.DataOrigin.newBuilder().setApplicationId("testApp"))
+ .putDoubleValues("doubleKey", 123.4)
+ .putLongValues("longKey", 567)
+ .build()
+
+ proto
+ .retrieveAggregateDataRow()
+ .assertEquals(
+ AggregateDataRow(
+ longValues = mapOf(Pair("longKey", 567L)),
+ doubleValues = mapOf(Pair("doubleKey", 123.4)),
+ dataOrigins = listOf(DataOrigin("testApp")),
+ )
+ )
+ }
+
+ @Test
+ // ZoneOffset.ofTotalSeconds() has been banned but safe here for serialization.
+ @SuppressWarnings("GoodTime")
+ fun toAggregateDataRowGroupByDuration() {
+ val proto =
+ DataProto.AggregateDataRow.newBuilder()
+ .addDataOrigins(DataProto.DataOrigin.newBuilder().setApplicationId("testApp"))
+ .putDoubleValues("doubleKey", 123.4)
+ .putLongValues("longKey", 567)
+ .setStartTimeEpochMs(1111)
+ .setEndTimeEpochMs(9999)
+ .setZoneOffsetSeconds(123)
+ .build()
+
+ proto
+ .toAggregateDataRowGroupByDuration()
+ .assertEquals(
+ AggregateDataRowGroupByDuration(
+ data =
+ AggregateDataRow(
+ longValues = mapOf(Pair("longKey", 567L)),
+ doubleValues = mapOf(Pair("doubleKey", 123.4)),
+ dataOrigins = listOf(DataOrigin("testApp")),
+ ),
+ startTime = Instant.ofEpochMilli(1111),
+ endTime = Instant.ofEpochMilli(9999),
+ zoneOffset = ZoneOffset.ofTotalSeconds(123),
+ )
+ )
+ }
+
+ @Test
+ fun toAggregateDataRowGroupByDuration_startOrEndTimeNotSet_throws() {
+ val proto =
+ DataProto.AggregateDataRow.newBuilder()
+ .addDataOrigins(DataProto.DataOrigin.newBuilder().setApplicationId("testApp"))
+ .putDoubleValues("doubleKey", 123.4)
+ .putLongValues("longKey", 567)
+ .setStartTimeEpochMs(1111)
+ .setEndTimeEpochMs(9999)
+ .setZoneOffsetSeconds(123)
+ .build()
+
+ var thrown =
+ assertThrows(IllegalArgumentException::class.java) {
+ proto
+ .toBuilder()
+ .clearStartTimeEpochMs()
+ .build()
+ .toAggregateDataRowGroupByDuration()
+ }
+ assertThat(thrown.message).isEqualTo("start time must be set")
+ thrown =
+ assertThrows(IllegalArgumentException::class.java) {
+ proto.toBuilder().clearEndTimeEpochMs().build().toAggregateDataRowGroupByDuration()
+ }
+ assertThat(thrown.message).isEqualTo("end time must be set")
+ }
+
+ private fun AggregateDataRow.assertEquals(expected: AggregateDataRow) {
+ assertThat(longValues).isEqualTo(expected.longValues)
+ assertThat(doubleValues).isEqualTo(expected.doubleValues)
+ assertThat(dataOrigins).isEqualTo(expected.dataOrigins)
+ }
+
+ // ZoneOffset.ofTotalSeconds() has been banned but safe here for serialization.
+ @SuppressWarnings("GoodTime")
+ private fun AggregateDataRowGroupByDuration.assertEquals(
+ expected: AggregateDataRowGroupByDuration,
+ ) {
+ data.assertEquals(expected.data)
+ assertThat(startTime.toEpochMilli()).isEqualTo(1111)
+ assertThat(endTime.toEpochMilli()).isEqualTo(9999)
+ assertThat(zoneOffset.totalSeconds).isEqualTo(123)
+ }
+}
diff --git a/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/aggregate/AggregateMetricConverterTest.kt b/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/aggregate/AggregateMetricConverterTest.kt
new file mode 100644
index 0000000..0096887
--- /dev/null
+++ b/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/aggregate/AggregateMetricConverterTest.kt
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 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.health.data.client.impl.converters.aggregate
+
+import androidx.health.data.client.aggregate.DurationAggregateMetric
+import androidx.health.data.client.records.Distance
+import androidx.health.data.client.records.Steps
+import androidx.health.platform.client.proto.RequestProto
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import com.google.common.truth.Truth.assertThat
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@RunWith(AndroidJUnit4::class)
+class AggregateMetricConverterTest {
+ @Test
+ fun aggregateMetric_toProto() {
+ assertThat(Steps.STEPS_COUNT_TOTAL.toProto())
+ .isEqualTo(
+ RequestProto.AggregateMetricSpec.newBuilder()
+ .setDataTypeName("Steps")
+ .setAggregationType("total")
+ .setFieldName("count")
+ .build()
+ )
+ assertThat(Distance.DISTANCE_TOTAL.toProto())
+ .isEqualTo(
+ RequestProto.AggregateMetricSpec.newBuilder()
+ .setDataTypeName("Distance")
+ .setAggregationType("total")
+ .setFieldName("distance")
+ .build()
+ )
+ // TODO(b/227996244): Use active time when the metric is created
+ assertThat(DurationAggregateMetric("ActiveTime", "total").toProto())
+ .isEqualTo(
+ RequestProto.AggregateMetricSpec.newBuilder()
+ .setDataTypeName("ActiveTime")
+ .setAggregationType("total")
+ .build()
+ )
+ }
+}
diff --git a/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/records/AllRecordsConverterTest.kt b/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/records/AllRecordsConverterTest.kt
index 130e5ae..451f355 100644
--- a/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/records/AllRecordsConverterTest.kt
+++ b/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/records/AllRecordsConverterTest.kt
@@ -725,6 +725,7 @@
vitaminKGrams = 1.0,
zincGrams = 1.0,
mealType = null,
+ name = null,
startTime = START_TIME,
startZoneOffset = START_ZONE_OFFSET,
endTime = END_TIME,
diff --git a/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/request/AggregateRequestConverterTest.kt b/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/request/AggregateRequestConverterTest.kt
new file mode 100644
index 0000000..e909d3b
--- /dev/null
+++ b/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/request/AggregateRequestConverterTest.kt
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 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.health.data.client.impl.converters.request
+
+import androidx.health.data.client.impl.converters.time.toProto
+import androidx.health.data.client.metadata.DataOrigin
+import androidx.health.data.client.records.Steps
+import androidx.health.data.client.request.AggregateGroupByDurationRequest
+import androidx.health.data.client.request.AggregateRequest
+import androidx.health.data.client.time.TimeRangeFilter
+import androidx.health.platform.client.proto.DataProto
+import androidx.health.platform.client.proto.RequestProto
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import com.google.common.truth.Truth.assertThat
+import java.time.Duration
+import java.time.Instant
+import org.junit.Test
+import org.junit.runner.RunWith
+
+private val METRIC = Steps.STEPS_COUNT_TOTAL
+private val METRIC_PROTO =
+ RequestProto.AggregateMetricSpec.newBuilder()
+ .setDataTypeName("Steps")
+ .setAggregationType("total")
+ .setFieldName("count")
+private val TIME_RANGE_FILTER =
+ TimeRangeFilter.exact(Instant.ofEpochMilli(123), Instant.ofEpochMilli(456))
+private val DATA_ORIGIN_FILTER = listOf(DataOrigin("testAppName"))
+
+@RunWith(AndroidJUnit4::class)
+class AggregateRequestConverterTest {
+ @Test
+ fun aggregateRequestToProto() {
+ val request =
+ AggregateRequest(
+ metrics = setOf(METRIC),
+ timeRangeFilter = TIME_RANGE_FILTER,
+ dataOriginFilter = DATA_ORIGIN_FILTER
+ )
+
+ assertThat(request.toProto())
+ .isEqualTo(
+ RequestProto.AggregateDataRequest.newBuilder()
+ .addMetricSpec(METRIC_PROTO)
+ .addAllDataOrigin(DATA_ORIGIN_FILTER.toProtoList())
+ .setTimeSpec(TIME_RANGE_FILTER.toProto())
+ .build()
+ )
+ }
+
+ @Test
+ fun aggregateGroupByDurationRequestToProto() {
+ val request =
+ AggregateGroupByDurationRequest(
+ metrics = setOf(METRIC),
+ timeRangeFilter = TIME_RANGE_FILTER,
+ timeRangeSlicer = Duration.ofMillis(98765),
+ dataOriginFilter = DATA_ORIGIN_FILTER
+ )
+
+ assertThat(request.toProto())
+ .isEqualTo(
+ RequestProto.AggregateDataRequest.newBuilder()
+ .addMetricSpec(METRIC_PROTO)
+ .addAllDataOrigin(DATA_ORIGIN_FILTER.toProtoList())
+ .setTimeSpec(TIME_RANGE_FILTER.toProto())
+ .setSliceDurationMillis(98765)
+ .build()
+ )
+ }
+
+ private fun List<DataOrigin>.toProtoList() =
+ this.map { DataProto.DataOrigin.newBuilder().setApplicationId(it.packageName).build() }
+}
diff --git a/health/health-services-client/api/api_lint.ignore b/health/health-services-client/api/api_lint.ignore
index 184c6f9e..df2c4bf 100644
--- a/health/health-services-client/api/api_lint.ignore
+++ b/health/health-services-client/api/api_lint.ignore
@@ -55,3 +55,7 @@
ExecutorRegistration: androidx.health.services.client.ExerciseClient#clearUpdateListener(androidx.health.services.client.ExerciseUpdateListener):
Registration methods should have overload that accepts delivery Executor: `clearUpdateListener`
+
+
+InvalidNullability: androidx.health.services.client.data.ProtoParcelable#writeToParcel(android.os.Parcel, int) parameter #0:
+ Invalid nullability on parameter `dest` in method `writeToParcel`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
diff --git a/leanback/leanback-grid/api/api_lint.ignore b/leanback/leanback-grid/api/api_lint.ignore
new file mode 100644
index 0000000..5e17a9e
--- /dev/null
+++ b/leanback/leanback-grid/api/api_lint.ignore
@@ -0,0 +1,45 @@
+// Baseline format: 1.0
+InvalidNullability: androidx.leanback.widget.BaseGridView#dispatchGenericFocusedEvent(android.view.MotionEvent) parameter #0:
+ Invalid nullability on parameter `event` in method `dispatchGenericFocusedEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.BaseGridView#dispatchKeyEvent(android.view.KeyEvent) parameter #0:
+ Invalid nullability on parameter `event` in method `dispatchKeyEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.BaseGridView#dispatchTouchEvent(android.view.MotionEvent) parameter #0:
+ Invalid nullability on parameter `event` in method `dispatchTouchEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.BaseGridView#focusSearch(int):
+ Invalid nullability on method `focusSearch` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.leanback.widget.BaseGridView#removeView(android.view.View) parameter #0:
+ Invalid nullability on parameter `view` in method `removeView`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.GridLayoutManager#collectAdjacentPrefetchPositions(int, int, androidx.recyclerview.widget.RecyclerView.State, androidx.recyclerview.widget.RecyclerView.LayoutManager.LayoutPrefetchRegistry) parameter #2:
+ Invalid nullability on parameter `state` in method `collectAdjacentPrefetchPositions`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.GridLayoutManager#collectAdjacentPrefetchPositions(int, int, androidx.recyclerview.widget.RecyclerView.State, androidx.recyclerview.widget.RecyclerView.LayoutManager.LayoutPrefetchRegistry) parameter #3:
+ Invalid nullability on parameter `layoutPrefetchRegistry` in method `collectAdjacentPrefetchPositions`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.GridLayoutManager#collectInitialPrefetchPositions(int, androidx.recyclerview.widget.RecyclerView.LayoutManager.LayoutPrefetchRegistry) parameter #1:
+ Invalid nullability on parameter `layoutPrefetchRegistry` in method `collectInitialPrefetchPositions`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.GridLayoutManager#generateLayoutParams(android.content.Context, android.util.AttributeSet) parameter #0:
+ Invalid nullability on parameter `context` in method `generateLayoutParams`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.GridLayoutManager#generateLayoutParams(android.content.Context, android.util.AttributeSet) parameter #1:
+ Invalid nullability on parameter `attrs` in method `generateLayoutParams`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.GridLayoutManager#generateLayoutParams(android.view.ViewGroup.LayoutParams) parameter #0:
+ Invalid nullability on parameter `lp` in method `generateLayoutParams`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.GridLayoutManager#onLayoutChildren(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State) parameter #0:
+ Invalid nullability on parameter `recycler` in method `onLayoutChildren`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.GridLayoutManager#onLayoutChildren(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State) parameter #1:
+ Invalid nullability on parameter `state` in method `onLayoutChildren`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.GridLayoutManager#onLayoutCompleted(androidx.recyclerview.widget.RecyclerView.State) parameter #0:
+ Invalid nullability on parameter `state` in method `onLayoutCompleted`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.GridLayoutManager#scrollHorizontallyBy(int, androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State) parameter #1:
+ Invalid nullability on parameter `recycler` in method `scrollHorizontallyBy`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.GridLayoutManager#scrollHorizontallyBy(int, androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State) parameter #2:
+ Invalid nullability on parameter `state` in method `scrollHorizontallyBy`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.GridLayoutManager#scrollVerticallyBy(int, androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State) parameter #1:
+ Invalid nullability on parameter `recycler` in method `scrollVerticallyBy`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.GridLayoutManager#scrollVerticallyBy(int, androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State) parameter #2:
+ Invalid nullability on parameter `state` in method `scrollVerticallyBy`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.GridLayoutManager#smoothScrollToPosition(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.State, int) parameter #0:
+ Invalid nullability on parameter `recyclerView` in method `smoothScrollToPosition`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.GridLayoutManager#smoothScrollToPosition(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.State, int) parameter #1:
+ Invalid nullability on parameter `state` in method `smoothScrollToPosition`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.GridLayoutManager#startSmoothScroll(androidx.recyclerview.widget.RecyclerView.SmoothScroller) parameter #0:
+ Invalid nullability on parameter `smoothScroller` in method `startSmoothScroll`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.HorizontalGridView#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.
diff --git a/leanback/leanback-paging/api/api_lint.ignore b/leanback/leanback-paging/api/api_lint.ignore
new file mode 100644
index 0000000..dd71405
--- /dev/null
+++ b/leanback/leanback-paging/api/api_lint.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+InvalidNullability: androidx.leanback.paging.PagingDataAdapter#get(int):
+ Invalid nullability on method `get` return. Overrides of unannotated super method cannot be Nullable.
diff --git a/leanback/leanback-paging/api/current.txt b/leanback/leanback-paging/api/current.txt
index 897a34a..97a8cb98 100644
--- a/leanback/leanback-paging/api/current.txt
+++ b/leanback/leanback-paging/api/current.txt
@@ -14,13 +14,13 @@
method public void addLoadStateListener(kotlin.jvm.functions.Function1<? super androidx.paging.CombinedLoadStates,kotlin.Unit> listener);
method public T? get(int position);
method public kotlinx.coroutines.flow.Flow<androidx.paging.CombinedLoadStates> getLoadStateFlow();
- method public T? peek(@IntRange(from=0) int index);
+ method public T? peek(@IntRange(from=0L) int index);
method public void refresh();
method public void removeLoadStateListener(kotlin.jvm.functions.Function1<? super androidx.paging.CombinedLoadStates,kotlin.Unit> listener);
method public void retry();
method public int size();
method public androidx.paging.ItemSnapshotList<T> snapshot();
- method public suspend Object? submitData(androidx.paging.PagingData<T> pagingData, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? submitData(androidx.paging.PagingData<T> pagingData, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public void submitData(androidx.lifecycle.Lifecycle lifecycle, androidx.paging.PagingData<T> pagingData);
property public final kotlinx.coroutines.flow.Flow<androidx.paging.CombinedLoadStates> loadStateFlow;
}
diff --git a/leanback/leanback-paging/api/public_plus_experimental_current.txt b/leanback/leanback-paging/api/public_plus_experimental_current.txt
index 897a34a..97a8cb98 100644
--- a/leanback/leanback-paging/api/public_plus_experimental_current.txt
+++ b/leanback/leanback-paging/api/public_plus_experimental_current.txt
@@ -14,13 +14,13 @@
method public void addLoadStateListener(kotlin.jvm.functions.Function1<? super androidx.paging.CombinedLoadStates,kotlin.Unit> listener);
method public T? get(int position);
method public kotlinx.coroutines.flow.Flow<androidx.paging.CombinedLoadStates> getLoadStateFlow();
- method public T? peek(@IntRange(from=0) int index);
+ method public T? peek(@IntRange(from=0L) int index);
method public void refresh();
method public void removeLoadStateListener(kotlin.jvm.functions.Function1<? super androidx.paging.CombinedLoadStates,kotlin.Unit> listener);
method public void retry();
method public int size();
method public androidx.paging.ItemSnapshotList<T> snapshot();
- method public suspend Object? submitData(androidx.paging.PagingData<T> pagingData, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? submitData(androidx.paging.PagingData<T> pagingData, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public void submitData(androidx.lifecycle.Lifecycle lifecycle, androidx.paging.PagingData<T> pagingData);
property public final kotlinx.coroutines.flow.Flow<androidx.paging.CombinedLoadStates> loadStateFlow;
}
diff --git a/leanback/leanback-paging/api/restricted_current.txt b/leanback/leanback-paging/api/restricted_current.txt
index 897a34a..97a8cb98 100644
--- a/leanback/leanback-paging/api/restricted_current.txt
+++ b/leanback/leanback-paging/api/restricted_current.txt
@@ -14,13 +14,13 @@
method public void addLoadStateListener(kotlin.jvm.functions.Function1<? super androidx.paging.CombinedLoadStates,kotlin.Unit> listener);
method public T? get(int position);
method public kotlinx.coroutines.flow.Flow<androidx.paging.CombinedLoadStates> getLoadStateFlow();
- method public T? peek(@IntRange(from=0) int index);
+ method public T? peek(@IntRange(from=0L) int index);
method public void refresh();
method public void removeLoadStateListener(kotlin.jvm.functions.Function1<? super androidx.paging.CombinedLoadStates,kotlin.Unit> listener);
method public void retry();
method public int size();
method public androidx.paging.ItemSnapshotList<T> snapshot();
- method public suspend Object? submitData(androidx.paging.PagingData<T> pagingData, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? submitData(androidx.paging.PagingData<T> pagingData, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public void submitData(androidx.lifecycle.Lifecycle lifecycle, androidx.paging.PagingData<T> pagingData);
property public final kotlinx.coroutines.flow.Flow<androidx.paging.CombinedLoadStates> loadStateFlow;
}
diff --git a/leanback/leanback-tab/api/api_lint.ignore b/leanback/leanback-tab/api/api_lint.ignore
new file mode 100644
index 0000000..2b4b147
--- /dev/null
+++ b/leanback/leanback-tab/api/api_lint.ignore
@@ -0,0 +1,7 @@
+// Baseline format: 1.0
+InvalidNullability: androidx.leanback.tab.LeanbackTabLayout#addFocusables(java.util.ArrayList<android.view.View>, int, int) parameter #0:
+ Invalid nullability on parameter `views` in method `addFocusables`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.tab.LeanbackViewPager#onInterceptTouchEvent(android.view.MotionEvent) parameter #0:
+ Invalid nullability on parameter `event` in method `onInterceptTouchEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.tab.LeanbackViewPager#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.
diff --git a/leanback/leanback/api/api_lint.ignore b/leanback/leanback/api/api_lint.ignore
index be6f479..a4188f6 100644
--- a/leanback/leanback/api/api_lint.ignore
+++ b/leanback/leanback/api/api_lint.ignore
@@ -139,6 +139,16 @@
Internal field mColorDimmer must not be exposed
+InvalidNullability: androidx.leanback.app.BrandedFragment#onViewCreated(android.view.View, android.os.Bundle) parameter #0:
+ Invalid nullability on parameter `view` in method `onViewCreated`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.app.OnboardingFragment#onViewCreated(android.view.View, android.os.Bundle) parameter #0:
+ Invalid nullability on parameter `view` in method `onViewCreated`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.app.PlaybackFragment#onViewCreated(android.view.View, android.os.Bundle) parameter #0:
+ Invalid nullability on parameter `view` in method `onViewCreated`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.leanback.widget.GuidedActionEditText#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.
+
+
KotlinOperator: androidx.leanback.widget.ObjectAdapter#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.leanback.widget.SparseArrayObjectAdapter#set(int, Object):
diff --git a/libraryversions.toml b/libraryversions.toml
index d321fe6..3d28c95 100644
--- a/libraryversions.toml
+++ b/libraryversions.toml
@@ -38,7 +38,7 @@
CUSTOMVIEW_POOLINGCONTAINER = "1.0.0-alpha02"
DATASTORE = "1.1.0-alpha01"
DOCUMENTFILE = "1.1.0-alpha02"
-DRAGANDDROP = "1.0.0-beta02"
+DRAGANDDROP = "1.0.0-rc01"
DRAWERLAYOUT = "1.2.0-alpha01"
DYNAMICANIMATION = "1.1.0-alpha04"
DYNAMICANIMATION_KTX = "1.0.0-alpha04"
diff --git a/lifecycle/lifecycle-common/api/api_lint.ignore b/lifecycle/lifecycle-common/api/api_lint.ignore
index b22f657..c2e5e81 100644
--- a/lifecycle/lifecycle-common/api/api_lint.ignore
+++ b/lifecycle/lifecycle-common/api/api_lint.ignore
@@ -5,3 +5,17 @@
Class should be named LifecycleEventCallback
CallbackName: androidx.lifecycle.LifecycleObserver:
Class should be named LifecycleCallback
+
+
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: 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/current.ignore b/lifecycle/lifecycle-livedata-ktx/api/current.ignore
new file mode 100644
index 0000000..75be76d
--- /dev/null
+++ b/lifecycle/lifecycle-livedata-ktx/api/current.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.lifecycle.LiveDataScope#emit(T, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.lifecycle.LiveDataScope.emit
+ParameterNameChange: androidx.lifecycle.LiveDataScope#emitSource(androidx.lifecycle.LiveData<T>, kotlin.coroutines.Continuation<? super kotlinx.coroutines.DisposableHandle>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.lifecycle.LiveDataScope.emitSource
diff --git a/lifecycle/lifecycle-livedata-ktx/api/current.txt b/lifecycle/lifecycle-livedata-ktx/api/current.txt
index 784f04e..7bf189f 100644
--- a/lifecycle/lifecycle-livedata-ktx/api/current.txt
+++ b/lifecycle/lifecycle-livedata-ktx/api/current.txt
@@ -15,8 +15,8 @@
}
public interface LiveDataScope<T> {
- method public suspend Object? emit(T? value, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? emitSource(androidx.lifecycle.LiveData<T> source, kotlin.coroutines.Continuation<? super kotlinx.coroutines.DisposableHandle> p);
+ method public suspend Object? emit(T? value, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? emitSource(androidx.lifecycle.LiveData<T> source, kotlin.coroutines.Continuation<? super kotlinx.coroutines.DisposableHandle>);
method public T? getLatestValue();
property public abstract T? latestValue;
}
diff --git a/lifecycle/lifecycle-livedata-ktx/api/public_plus_experimental_current.txt b/lifecycle/lifecycle-livedata-ktx/api/public_plus_experimental_current.txt
index 7b099da..b542f27 100644
--- a/lifecycle/lifecycle-livedata-ktx/api/public_plus_experimental_current.txt
+++ b/lifecycle/lifecycle-livedata-ktx/api/public_plus_experimental_current.txt
@@ -15,8 +15,8 @@
}
public interface LiveDataScope<T> {
- method public suspend Object? emit(T? value, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? emitSource(androidx.lifecycle.LiveData<T> source, kotlin.coroutines.Continuation<? super kotlinx.coroutines.DisposableHandle> p);
+ method public suspend Object? emit(T? value, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? emitSource(androidx.lifecycle.LiveData<T> source, kotlin.coroutines.Continuation<? super kotlinx.coroutines.DisposableHandle>);
method public T? getLatestValue();
property public abstract T? latestValue;
}
diff --git a/lifecycle/lifecycle-livedata-ktx/api/restricted_current.ignore b/lifecycle/lifecycle-livedata-ktx/api/restricted_current.ignore
new file mode 100644
index 0000000..75be76d
--- /dev/null
+++ b/lifecycle/lifecycle-livedata-ktx/api/restricted_current.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.lifecycle.LiveDataScope#emit(T, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.lifecycle.LiveDataScope.emit
+ParameterNameChange: androidx.lifecycle.LiveDataScope#emitSource(androidx.lifecycle.LiveData<T>, kotlin.coroutines.Continuation<? super kotlinx.coroutines.DisposableHandle>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.lifecycle.LiveDataScope.emitSource
diff --git a/lifecycle/lifecycle-livedata-ktx/api/restricted_current.txt b/lifecycle/lifecycle-livedata-ktx/api/restricted_current.txt
index 784f04e..7bf189f 100644
--- a/lifecycle/lifecycle-livedata-ktx/api/restricted_current.txt
+++ b/lifecycle/lifecycle-livedata-ktx/api/restricted_current.txt
@@ -15,8 +15,8 @@
}
public interface LiveDataScope<T> {
- method public suspend Object? emit(T? value, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? emitSource(androidx.lifecycle.LiveData<T> source, kotlin.coroutines.Continuation<? super kotlinx.coroutines.DisposableHandle> p);
+ method public suspend Object? emit(T? value, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? emitSource(androidx.lifecycle.LiveData<T> source, kotlin.coroutines.Continuation<? super kotlinx.coroutines.DisposableHandle>);
method public T? getLatestValue();
property public abstract T? latestValue;
}
diff --git a/lifecycle/lifecycle-runtime-ktx/api/current.ignore b/lifecycle/lifecycle-runtime-ktx/api/current.ignore
new file mode 100644
index 0000000..5fdbc71
--- /dev/null
+++ b/lifecycle/lifecycle-runtime-ktx/api/current.ignore
@@ -0,0 +1,35 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.lifecycle.PausingDispatcherKt#whenCreated(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.PausingDispatcherKt.whenCreated
+ParameterNameChange: androidx.lifecycle.PausingDispatcherKt#whenCreated(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.PausingDispatcherKt.whenCreated
+ParameterNameChange: androidx.lifecycle.PausingDispatcherKt#whenResumed(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.PausingDispatcherKt.whenResumed
+ParameterNameChange: androidx.lifecycle.PausingDispatcherKt#whenResumed(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.PausingDispatcherKt.whenResumed
+ParameterNameChange: androidx.lifecycle.PausingDispatcherKt#whenStarted(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.PausingDispatcherKt.whenStarted
+ParameterNameChange: androidx.lifecycle.PausingDispatcherKt#whenStarted(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.PausingDispatcherKt.whenStarted
+ParameterNameChange: androidx.lifecycle.PausingDispatcherKt#whenStateAtLeast(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.lifecycle.PausingDispatcherKt.whenStateAtLeast
+ParameterNameChange: androidx.lifecycle.RepeatOnLifecycleKt#repeatOnLifecycle(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.lifecycle.RepeatOnLifecycleKt.repeatOnLifecycle
+ParameterNameChange: androidx.lifecycle.RepeatOnLifecycleKt#repeatOnLifecycle(androidx.lifecycle.LifecycleOwner, androidx.lifecycle.Lifecycle.State, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.lifecycle.RepeatOnLifecycleKt.repeatOnLifecycle
+ParameterNameChange: androidx.lifecycle.WithLifecycleStateKt#withCreated(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.WithLifecycleStateKt.withCreated
+ParameterNameChange: androidx.lifecycle.WithLifecycleStateKt#withCreated(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.WithLifecycleStateKt.withCreated
+ParameterNameChange: androidx.lifecycle.WithLifecycleStateKt#withResumed(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.WithLifecycleStateKt.withResumed
+ParameterNameChange: androidx.lifecycle.WithLifecycleStateKt#withResumed(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.WithLifecycleStateKt.withResumed
+ParameterNameChange: androidx.lifecycle.WithLifecycleStateKt#withStarted(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.WithLifecycleStateKt.withStarted
+ParameterNameChange: androidx.lifecycle.WithLifecycleStateKt#withStarted(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.WithLifecycleStateKt.withStarted
+ParameterNameChange: androidx.lifecycle.WithLifecycleStateKt#withStateAtLeast(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State, kotlin.jvm.functions.Function0<? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.lifecycle.WithLifecycleStateKt.withStateAtLeast
+ParameterNameChange: androidx.lifecycle.WithLifecycleStateKt#withStateAtLeast(androidx.lifecycle.LifecycleOwner, androidx.lifecycle.Lifecycle.State, kotlin.jvm.functions.Function0<? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.lifecycle.WithLifecycleStateKt.withStateAtLeast
diff --git a/lifecycle/lifecycle-runtime-ktx/api/current.txt b/lifecycle/lifecycle-runtime-ktx/api/current.txt
index 13b58cd..46720fe 100644
--- a/lifecycle/lifecycle-runtime-ktx/api/current.txt
+++ b/lifecycle/lifecycle-runtime-ktx/api/current.txt
@@ -24,18 +24,18 @@
}
public final class PausingDispatcherKt {
- method public static suspend <T> Object? whenCreated(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? whenCreated(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? whenResumed(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? whenResumed(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? whenStarted(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? whenStarted(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? whenStateAtLeast(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State minState, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
+ method public static suspend <T> Object? whenCreated(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? whenCreated(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? whenResumed(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? whenResumed(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? whenStarted(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? whenStarted(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? whenStateAtLeast(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State minState, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
}
public final class RepeatOnLifecycleKt {
- method public static suspend Object? repeatOnLifecycle(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? repeatOnLifecycle(androidx.lifecycle.LifecycleOwner, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? repeatOnLifecycle(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? repeatOnLifecycle(androidx.lifecycle.LifecycleOwner, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class ViewKt {
@@ -43,14 +43,14 @@
}
public final class WithLifecycleStateKt {
- method public static suspend inline <R> Object? withCreated(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withCreated(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withResumed(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withResumed(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withStarted(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withStarted(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withStateAtLeast(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withStateAtLeast(androidx.lifecycle.LifecycleOwner, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
+ method public static suspend inline <R> Object? withCreated(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withCreated(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withResumed(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withResumed(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withStarted(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withStarted(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withStateAtLeast(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withStateAtLeast(androidx.lifecycle.LifecycleOwner, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
}
}
diff --git a/lifecycle/lifecycle-runtime-ktx/api/public_plus_experimental_current.txt b/lifecycle/lifecycle-runtime-ktx/api/public_plus_experimental_current.txt
index 13b58cd..46720fe 100644
--- a/lifecycle/lifecycle-runtime-ktx/api/public_plus_experimental_current.txt
+++ b/lifecycle/lifecycle-runtime-ktx/api/public_plus_experimental_current.txt
@@ -24,18 +24,18 @@
}
public final class PausingDispatcherKt {
- method public static suspend <T> Object? whenCreated(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? whenCreated(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? whenResumed(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? whenResumed(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? whenStarted(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? whenStarted(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? whenStateAtLeast(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State minState, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
+ method public static suspend <T> Object? whenCreated(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? whenCreated(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? whenResumed(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? whenResumed(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? whenStarted(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? whenStarted(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? whenStateAtLeast(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State minState, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
}
public final class RepeatOnLifecycleKt {
- method public static suspend Object? repeatOnLifecycle(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? repeatOnLifecycle(androidx.lifecycle.LifecycleOwner, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? repeatOnLifecycle(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? repeatOnLifecycle(androidx.lifecycle.LifecycleOwner, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class ViewKt {
@@ -43,14 +43,14 @@
}
public final class WithLifecycleStateKt {
- method public static suspend inline <R> Object? withCreated(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withCreated(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withResumed(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withResumed(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withStarted(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withStarted(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withStateAtLeast(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withStateAtLeast(androidx.lifecycle.LifecycleOwner, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
+ method public static suspend inline <R> Object? withCreated(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withCreated(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withResumed(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withResumed(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withStarted(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withStarted(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withStateAtLeast(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withStateAtLeast(androidx.lifecycle.LifecycleOwner, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
}
}
diff --git a/lifecycle/lifecycle-runtime-ktx/api/restricted_current.ignore b/lifecycle/lifecycle-runtime-ktx/api/restricted_current.ignore
new file mode 100644
index 0000000..0e0303b
--- /dev/null
+++ b/lifecycle/lifecycle-runtime-ktx/api/restricted_current.ignore
@@ -0,0 +1,39 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.lifecycle.PausingDispatcherKt#whenCreated(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.PausingDispatcherKt.whenCreated
+ParameterNameChange: androidx.lifecycle.PausingDispatcherKt#whenCreated(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.PausingDispatcherKt.whenCreated
+ParameterNameChange: androidx.lifecycle.PausingDispatcherKt#whenResumed(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.PausingDispatcherKt.whenResumed
+ParameterNameChange: androidx.lifecycle.PausingDispatcherKt#whenResumed(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.PausingDispatcherKt.whenResumed
+ParameterNameChange: androidx.lifecycle.PausingDispatcherKt#whenStarted(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.PausingDispatcherKt.whenStarted
+ParameterNameChange: androidx.lifecycle.PausingDispatcherKt#whenStarted(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.PausingDispatcherKt.whenStarted
+ParameterNameChange: androidx.lifecycle.PausingDispatcherKt#whenStateAtLeast(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.lifecycle.PausingDispatcherKt.whenStateAtLeast
+ParameterNameChange: androidx.lifecycle.RepeatOnLifecycleKt#repeatOnLifecycle(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.lifecycle.RepeatOnLifecycleKt.repeatOnLifecycle
+ParameterNameChange: androidx.lifecycle.RepeatOnLifecycleKt#repeatOnLifecycle(androidx.lifecycle.LifecycleOwner, androidx.lifecycle.Lifecycle.State, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.lifecycle.RepeatOnLifecycleKt.repeatOnLifecycle
+ParameterNameChange: androidx.lifecycle.WithLifecycleStateKt#suspendWithStateAtLeastUnchecked(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State, boolean, kotlinx.coroutines.CoroutineDispatcher, kotlin.jvm.functions.Function0<? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #5:
+ Attempted to remove parameter name from parameter arg6 in androidx.lifecycle.WithLifecycleStateKt.suspendWithStateAtLeastUnchecked
+ParameterNameChange: androidx.lifecycle.WithLifecycleStateKt#withCreated(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.WithLifecycleStateKt.withCreated
+ParameterNameChange: androidx.lifecycle.WithLifecycleStateKt#withCreated(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.WithLifecycleStateKt.withCreated
+ParameterNameChange: androidx.lifecycle.WithLifecycleStateKt#withResumed(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.WithLifecycleStateKt.withResumed
+ParameterNameChange: androidx.lifecycle.WithLifecycleStateKt#withResumed(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.WithLifecycleStateKt.withResumed
+ParameterNameChange: androidx.lifecycle.WithLifecycleStateKt#withStarted(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.WithLifecycleStateKt.withStarted
+ParameterNameChange: androidx.lifecycle.WithLifecycleStateKt#withStarted(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.lifecycle.WithLifecycleStateKt.withStarted
+ParameterNameChange: androidx.lifecycle.WithLifecycleStateKt#withStateAtLeast(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State, kotlin.jvm.functions.Function0<? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.lifecycle.WithLifecycleStateKt.withStateAtLeast
+ParameterNameChange: androidx.lifecycle.WithLifecycleStateKt#withStateAtLeast(androidx.lifecycle.LifecycleOwner, androidx.lifecycle.Lifecycle.State, kotlin.jvm.functions.Function0<? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.lifecycle.WithLifecycleStateKt.withStateAtLeast
+ParameterNameChange: androidx.lifecycle.WithLifecycleStateKt#withStateAtLeastUnchecked(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State, kotlin.jvm.functions.Function0<? extends R>, kotlin.coroutines.Continuation<? super R>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.lifecycle.WithLifecycleStateKt.withStateAtLeastUnchecked
diff --git a/lifecycle/lifecycle-runtime-ktx/api/restricted_current.txt b/lifecycle/lifecycle-runtime-ktx/api/restricted_current.txt
index f721a9e..28a306d 100644
--- a/lifecycle/lifecycle-runtime-ktx/api/restricted_current.txt
+++ b/lifecycle/lifecycle-runtime-ktx/api/restricted_current.txt
@@ -24,18 +24,18 @@
}
public final class PausingDispatcherKt {
- method public static suspend <T> Object? whenCreated(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? whenCreated(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? whenResumed(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? whenResumed(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? whenStarted(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? whenStarted(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
- method public static suspend <T> Object? whenStateAtLeast(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State minState, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
+ method public static suspend <T> Object? whenCreated(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? whenCreated(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? whenResumed(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? whenResumed(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? whenStarted(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? whenStarted(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? whenStateAtLeast(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State minState, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
}
public final class RepeatOnLifecycleKt {
- method public static suspend Object? repeatOnLifecycle(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public static suspend Object? repeatOnLifecycle(androidx.lifecycle.LifecycleOwner, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public static suspend Object? repeatOnLifecycle(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public static suspend Object? repeatOnLifecycle(androidx.lifecycle.LifecycleOwner, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class ViewKt {
@@ -43,16 +43,16 @@
}
public final class WithLifecycleStateKt {
- method @kotlin.PublishedApi internal static suspend <R> Object? suspendWithStateAtLeastUnchecked(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State state, boolean dispatchNeeded, kotlinx.coroutines.CoroutineDispatcher lifecycleDispatcher, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withCreated(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withCreated(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withResumed(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withResumed(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withStarted(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withStarted(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withStateAtLeast(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend inline <R> Object? withStateAtLeast(androidx.lifecycle.LifecycleOwner, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
- method @kotlin.PublishedApi internal static suspend inline <R> Object? withStateAtLeastUnchecked(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R> p);
+ method @kotlin.PublishedApi internal static suspend <R> Object? suspendWithStateAtLeastUnchecked(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State state, boolean dispatchNeeded, kotlinx.coroutines.CoroutineDispatcher lifecycleDispatcher, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withCreated(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withCreated(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withResumed(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withResumed(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withStarted(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withStarted(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withStateAtLeast(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend inline <R> Object? withStateAtLeast(androidx.lifecycle.LifecycleOwner, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
+ method @kotlin.PublishedApi internal static suspend inline <R> Object? withStateAtLeastUnchecked(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State state, kotlin.jvm.functions.Function0<? extends R> block, kotlin.coroutines.Continuation<? super R>);
}
}
diff --git a/lifecycle/lifecycle-runtime-testing/api/current.ignore b/lifecycle/lifecycle-runtime-testing/api/current.ignore
new file mode 100644
index 0000000..1d9b6f0
--- /dev/null
+++ b/lifecycle/lifecycle-runtime-testing/api/current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.lifecycle.testing.TestLifecycleOwner#setCurrentState(androidx.lifecycle.Lifecycle.State) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.lifecycle.testing.TestLifecycleOwner.setCurrentState
diff --git a/lifecycle/lifecycle-runtime-testing/api/current.txt b/lifecycle/lifecycle-runtime-testing/api/current.txt
index 8209a73..dc2274c 100644
--- a/lifecycle/lifecycle-runtime-testing/api/current.txt
+++ b/lifecycle/lifecycle-runtime-testing/api/current.txt
@@ -9,7 +9,7 @@
method public androidx.lifecycle.LifecycleRegistry getLifecycle();
method public int getObserverCount();
method public void handleLifecycleEvent(androidx.lifecycle.Lifecycle.Event event);
- method public void setCurrentState(androidx.lifecycle.Lifecycle.State value);
+ method public void setCurrentState(androidx.lifecycle.Lifecycle.State);
property public final androidx.lifecycle.Lifecycle.State currentState;
property public final int observerCount;
}
diff --git a/lifecycle/lifecycle-runtime-testing/api/public_plus_experimental_current.txt b/lifecycle/lifecycle-runtime-testing/api/public_plus_experimental_current.txt
index 8209a73..dc2274c 100644
--- a/lifecycle/lifecycle-runtime-testing/api/public_plus_experimental_current.txt
+++ b/lifecycle/lifecycle-runtime-testing/api/public_plus_experimental_current.txt
@@ -9,7 +9,7 @@
method public androidx.lifecycle.LifecycleRegistry getLifecycle();
method public int getObserverCount();
method public void handleLifecycleEvent(androidx.lifecycle.Lifecycle.Event event);
- method public void setCurrentState(androidx.lifecycle.Lifecycle.State value);
+ method public void setCurrentState(androidx.lifecycle.Lifecycle.State);
property public final androidx.lifecycle.Lifecycle.State currentState;
property public final int observerCount;
}
diff --git a/lifecycle/lifecycle-runtime-testing/api/restricted_current.ignore b/lifecycle/lifecycle-runtime-testing/api/restricted_current.ignore
new file mode 100644
index 0000000..1d9b6f0
--- /dev/null
+++ b/lifecycle/lifecycle-runtime-testing/api/restricted_current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.lifecycle.testing.TestLifecycleOwner#setCurrentState(androidx.lifecycle.Lifecycle.State) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.lifecycle.testing.TestLifecycleOwner.setCurrentState
diff --git a/lifecycle/lifecycle-runtime-testing/api/restricted_current.txt b/lifecycle/lifecycle-runtime-testing/api/restricted_current.txt
index 8209a73..dc2274c 100644
--- a/lifecycle/lifecycle-runtime-testing/api/restricted_current.txt
+++ b/lifecycle/lifecycle-runtime-testing/api/restricted_current.txt
@@ -9,7 +9,7 @@
method public androidx.lifecycle.LifecycleRegistry getLifecycle();
method public int getObserverCount();
method public void handleLifecycleEvent(androidx.lifecycle.Lifecycle.Event event);
- method public void setCurrentState(androidx.lifecycle.Lifecycle.State value);
+ method public void setCurrentState(androidx.lifecycle.Lifecycle.State);
property public final androidx.lifecycle.Lifecycle.State currentState;
property public final int observerCount;
}
diff --git a/lifecycle/lifecycle-service/api/api_lint.ignore b/lifecycle/lifecycle-service/api/api_lint.ignore
new file mode 100644
index 0000000..5bf4174
--- /dev/null
+++ b/lifecycle/lifecycle-service/api/api_lint.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+InvalidNullability: androidx.lifecycle.LifecycleService#onBind(android.content.Intent):
+ Invalid nullability on method `onBind` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.lifecycle.LifecycleService#onBind(android.content.Intent) parameter #0:
+ Invalid nullability on parameter `intent` in method `onBind`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
diff --git a/lifecycle/lifecycle-viewmodel-compose/api/public_plus_experimental_current.txt b/lifecycle/lifecycle-viewmodel-compose/api/public_plus_experimental_current.txt
index 65b6666..8a4ed64 100644
--- a/lifecycle/lifecycle-viewmodel-compose/api/public_plus_experimental_current.txt
+++ b/lifecycle/lifecycle-viewmodel-compose/api/public_plus_experimental_current.txt
@@ -14,6 +14,8 @@
public final class SavedStateHandleSaverKt {
method @androidx.lifecycle.viewmodel.compose.SavedStateHandleSaveableApi public static <T> T saveable(androidx.lifecycle.SavedStateHandle, String key, optional androidx.compose.runtime.saveable.Saver<T,?> saver, kotlin.jvm.functions.Function0<? extends T> init);
method @androidx.lifecycle.viewmodel.compose.SavedStateHandleSaveableApi public static <T> androidx.compose.runtime.MutableState<T> saveable(androidx.lifecycle.SavedStateHandle, String key, androidx.compose.runtime.saveable.Saver<T,?> stateSaver, kotlin.jvm.functions.Function0<? extends androidx.compose.runtime.MutableState<T>> init);
+ method @androidx.lifecycle.viewmodel.compose.SavedStateHandleSaveableApi public static <T> kotlin.properties.PropertyDelegateProvider<java.lang.Object,kotlin.properties.ReadOnlyProperty<java.lang.Object,T>> saveable(androidx.lifecycle.SavedStateHandle, optional androidx.compose.runtime.saveable.Saver<T,?> saver, kotlin.jvm.functions.Function0<? extends T> init);
+ method @androidx.lifecycle.viewmodel.compose.SavedStateHandleSaveableApi public static <T, M extends androidx.compose.runtime.MutableState<T>> kotlin.properties.PropertyDelegateProvider<java.lang.Object,kotlin.properties.ReadWriteProperty<java.lang.Object,T>> saveableMutableState(androidx.lifecycle.SavedStateHandle, optional androidx.compose.runtime.saveable.Saver<T,?> stateSaver, kotlin.jvm.functions.Function0<? extends M> init);
}
public final class ViewModelKt {
diff --git a/lifecycle/lifecycle-viewmodel-compose/samples/src/main/java/androidx/lifecycle/viewmodel/compose/samples/LifecycleViewModelSamples.kt b/lifecycle/lifecycle-viewmodel-compose/samples/src/main/java/androidx/lifecycle/viewmodel/compose/samples/LifecycleViewModelSamples.kt
index 8218847..750d2ff 100644
--- a/lifecycle/lifecycle-viewmodel-compose/samples/src/main/java/androidx/lifecycle/viewmodel/compose/samples/LifecycleViewModelSamples.kt
+++ b/lifecycle/lifecycle-viewmodel-compose/samples/src/main/java/androidx/lifecycle/viewmodel/compose/samples/LifecycleViewModelSamples.kt
@@ -179,3 +179,89 @@
}
}
}
+
+@Sampled
+fun SnapshotStateViewModelWithDelegates() {
+
+ /**
+ * A simple item that is not inherently [Parcelable]
+ */
+ data class Item(
+ val id: UUID,
+ val value: String
+ )
+
+ @OptIn(SavedStateHandleSaveableApi::class)
+ class SnapshotStateViewModel(handle: SavedStateHandle) : ViewModel() {
+
+ /**
+ * A snapshot-backed [MutableList] of a list of items, persisted by the [SavedStateHandle].
+ * The size of this set must remain small in expectation, since the maximum size of saved
+ * instance state space is limited.
+ */
+ private val items: MutableList<Item> by handle.saveable(
+ saver = listSaver(
+ save = {
+ it.map { item ->
+ listOf(item.id.toString(), item.value)
+ }
+ },
+ restore = {
+ it.map { saved ->
+ Item(
+ id = UUID.fromString(saved[0]),
+ value = saved[1]
+ )
+ }.toMutableStateList()
+ }
+ )
+ ) {
+ mutableStateListOf()
+ }
+
+ /**
+ * A snapshot-backed [MutableMap] representing a set of selected item ids, persisted by the
+ * [SavedStateHandle]. A [MutableSet] is approximated by ignoring the keys.
+ * The size of this set must remain small in expectation, since the maximum size of saved
+ * instance state space is limited.
+ */
+ private val selectedItemIds: MutableMap<UUID, Unit> by handle.saveable(
+ saver = listSaver(
+ save = { it.keys.map(UUID::toString) },
+ restore = { it.map(UUID::fromString).map { id -> id to Unit }.toMutableStateMap() }
+ )
+ ) {
+ mutableStateMapOf()
+ }
+
+ /**
+ * A snapshot-backed flag representing where selections are enabled, persisted by the
+ * [SavedStateHandle].
+ */
+ var areSelectionsEnabled by handle.saveable { mutableStateOf(true) }
+
+ /**
+ * A list of items paired with a selection state.
+ */
+ val selectedItems: List<Pair<Item, Boolean>> get() =
+ items.map { it to (it.id in selectedItemIds) }
+
+ /**
+ * Updates the selection state for the item with [id] to [selected].
+ */
+ fun selectItem(id: UUID, selected: Boolean) {
+ if (selected) {
+ selectedItemIds[id] = Unit
+ } else {
+ selectedItemIds.remove(id)
+ }
+ }
+
+ /**
+ * Adds an item with the given [value].
+ */
+ fun addItem(value: String) {
+ items.add(Item(UUID.randomUUID(), value))
+ }
+ }
+}
diff --git a/lifecycle/lifecycle-viewmodel-compose/src/androidTest/java/androidx/lifecycle/viewmodel/compose/SavedStateHandleSaverTest.kt b/lifecycle/lifecycle-viewmodel-compose/src/androidTest/java/androidx/lifecycle/viewmodel/compose/SavedStateHandleSaverTest.kt
index fe1f757..0dc453e 100644
--- a/lifecycle/lifecycle-viewmodel-compose/src/androidTest/java/androidx/lifecycle/viewmodel/compose/SavedStateHandleSaverTest.kt
+++ b/lifecycle/lifecycle-viewmodel-compose/src/androidTest/java/androidx/lifecycle/viewmodel/compose/SavedStateHandleSaverTest.kt
@@ -166,6 +166,96 @@
assertThat((state as SnapshotMutableState).policy)
.isEqualTo(referentialEqualityPolicy<CustomState>())
}
+
+ @OptIn(SavedStateHandleSaveableApi::class)
+ @Test
+ fun delegate_simpleRestore() {
+ var savedStateHandle: SavedStateHandle? = null
+ var array: IntArray? = null
+ activityTestRuleScenario.scenario.onActivity { activity ->
+ activity.setContent {
+ val viewModel = viewModel<SavingTestViewModel>(activity)
+ savedStateHandle = viewModel.savedStateHandle
+ val arrayProperty: IntArray by viewModel.savedStateHandle.saveable<IntArray> {
+ intArrayOf(0)
+ }
+ array = arrayProperty
+ }
+ }
+
+ assertThat(array).isEqualTo(intArrayOf(0))
+ assertThat(savedStateHandle?.keys()).isEqualTo(setOf("arrayProperty"))
+
+ activityTestRuleScenario.scenario.onActivity {
+ array!![0] = 1
+ // we null both to ensure recomposition happened
+ array = null
+ savedStateHandle = null
+ }
+
+ activityTestRuleScenario.scenario.recreate()
+
+ activityTestRuleScenario.scenario.onActivity { activity ->
+ activity.setContent {
+ val viewModel = viewModel<SavingTestViewModel>(activity)
+ savedStateHandle = viewModel.savedStateHandle
+ val arrayProperty: IntArray by viewModel.savedStateHandle.saveable<IntArray> {
+ intArrayOf(0)
+ }
+ array = arrayProperty
+ }
+ }
+
+ assertThat(array).isEqualTo(intArrayOf(1))
+ assertThat(savedStateHandle?.keys()).isEqualTo(setOf("arrayProperty"))
+ }
+
+ @OptIn(SavedStateHandleSaveableApi::class)
+ @Test
+ fun mutableState_delegate_simpleRestore() {
+ var savedStateHandle: SavedStateHandle? = null
+ var getCount: (() -> Int)? = null
+ var setCount: ((Int) -> Unit)? = null
+ activityTestRuleScenario.scenario.onActivity { activity ->
+ activity.setContent {
+ val viewModel = viewModel<SavingTestViewModel>(activity)
+ savedStateHandle = viewModel.savedStateHandle
+ var count by viewModel.savedStateHandle.saveable {
+ mutableStateOf(0)
+ }
+ getCount = { count }
+ setCount = { count = it }
+ }
+ }
+
+ assertThat(getCount!!()).isEqualTo(0)
+ assertThat(savedStateHandle?.keys()).isEqualTo(setOf("count"))
+
+ activityTestRuleScenario.scenario.onActivity {
+ setCount!!(1)
+ // we null all to ensure recomposition happened
+ getCount = null
+ setCount = null
+ savedStateHandle = null
+ }
+
+ activityTestRuleScenario.scenario.recreate()
+
+ activityTestRuleScenario.scenario.onActivity { activity ->
+ activity.setContent {
+ val viewModel = viewModel<SavingTestViewModel>(activity)
+ savedStateHandle = viewModel.savedStateHandle
+ var count by viewModel.savedStateHandle.saveable {
+ mutableStateOf(0)
+ }
+ getCount = { count }
+ setCount = { count = it }
+ }
+ }
+
+ assertThat(getCount!!()).isEqualTo(1)
+ assertThat(savedStateHandle?.keys()).isEqualTo(setOf("count"))
+ }
}
class SavingTestViewModel(val savedStateHandle: SavedStateHandle) : ViewModel()
diff --git a/lifecycle/lifecycle-viewmodel-compose/src/main/java/androidx/lifecycle/viewmodel/compose/SavedStateHandleSaver.kt b/lifecycle/lifecycle-viewmodel-compose/src/main/java/androidx/lifecycle/viewmodel/compose/SavedStateHandleSaver.kt
index a545608..51e909e 100644
--- a/lifecycle/lifecycle-viewmodel-compose/src/main/java/androidx/lifecycle/viewmodel/compose/SavedStateHandleSaver.kt
+++ b/lifecycle/lifecycle-viewmodel-compose/src/main/java/androidx/lifecycle/viewmodel/compose/SavedStateHandleSaver.kt
@@ -19,14 +19,20 @@
import android.os.Bundle
import androidx.compose.runtime.MutableState
import androidx.compose.runtime.SnapshotMutationPolicy
+import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.saveable.autoSaver
import androidx.compose.runtime.saveable.Saver
import androidx.compose.runtime.saveable.SaverScope
+import androidx.compose.runtime.setValue
import androidx.compose.runtime.snapshots.SnapshotMutableState
import androidx.core.os.bundleOf
import androidx.lifecycle.SavedStateHandle
import androidx.lifecycle.SavedStateHandle.Companion.validateValue
+import kotlin.properties.PropertyDelegateProvider
+import kotlin.properties.ReadOnlyProperty
+import kotlin.properties.ReadWriteProperty
+import kotlin.reflect.KProperty
/**
* Inter-opt between [SavedStateHandle] and [Saver] so that any state holder that is
@@ -90,6 +96,82 @@
)
/**
+ * Inter-opt between [SavedStateHandle] and [Saver] so that any state holder that is
+ * being saved via [rememberSaveable] with a custom [Saver] can also be saved with
+ * [SavedStateHandle].
+ *
+ * The key is automatically retrieved as the name of the property this delegate is being used
+ * to create.
+ *
+ * The returned state [T] should be the only way that a value is saved or restored from the
+ * [SavedStateHandle] with the automatic key.
+ *
+ * Using the same key again with another [SavedStateHandle] method is not supported, as values
+ * won't cross-set or communicate updates.
+ *
+ * @sample androidx.lifecycle.viewmodel.compose.samples.SnapshotStateViewModelWithDelegates
+ */
+@SavedStateHandleSaveableApi
+fun <T : Any> SavedStateHandle.saveable(
+ saver: Saver<T, out Any> = autoSaver(),
+ init: () -> T,
+): PropertyDelegateProvider<Any?, ReadOnlyProperty<Any?, T>> =
+ PropertyDelegateProvider { _, property ->
+ val value = saveable(
+ key = property.name,
+ saver = saver,
+ init = init
+ )
+
+ ReadOnlyProperty { _, _ -> value }
+ }
+
+/**
+ * Inter-opt between [SavedStateHandle] and [Saver] so that any state holder that is
+ * being saved via [rememberSaveable] with a custom [Saver] can also be saved with
+ * [SavedStateHandle].
+ *
+ * The key is automatically retrieved as the name of the property this delegate is being used
+ * to create.
+ *
+ * The delegated [MutableState] should be the only way that a value is saved or restored from the
+ * [SavedStateHandle] with the automatic key.
+ *
+ * Using the same key again with another [SavedStateHandle] method is not supported, as values
+ * won't cross-set or communicate updates.
+ *
+ * Use this overload to allow delegating to a mutable state just like you can with
+ * `rememberSaveable`:
+ * ```
+ * var value by savedStateHandle.saveable { mutableStateOf("initialValue") }
+ * ```
+ *
+ * @sample androidx.lifecycle.viewmodel.compose.samples.SnapshotStateViewModelWithDelegates
+ */
+@SavedStateHandleSaveableApi
+@JvmName("saveableMutableState")
+fun <T : Any, M : MutableState<T>> SavedStateHandle.saveable(
+ stateSaver: Saver<T, out Any> = autoSaver(),
+ init: () -> M,
+): PropertyDelegateProvider<Any?, ReadWriteProperty<Any?, T>> =
+ PropertyDelegateProvider<Any?, ReadWriteProperty<Any?, T>> { _, property ->
+ val mutableState = saveable(
+ key = property.name,
+ stateSaver = stateSaver,
+ init = init
+ )
+
+ // Create a property that delegates to the mutableState
+ object : ReadWriteProperty<Any?, T> {
+ override fun getValue(thisRef: Any?, property: KProperty<*>): T =
+ mutableState.getValue(thisRef, property)
+
+ override fun setValue(thisRef: Any?, property: KProperty<*>, value: T) =
+ mutableState.setValue(thisRef, property, value)
+ }
+ }
+
+/**
* Copied from RememberSaveable.kt
*/
@Suppress("UNCHECKED_CAST")
diff --git a/media2/media2-session/api/api_lint.ignore b/media2/media2-session/api/api_lint.ignore
index bdca29a..a983853 100644
--- a/media2/media2-session/api/api_lint.ignore
+++ b/media2/media2-session/api/api_lint.ignore
@@ -87,6 +87,12 @@
Builder methods names should use setFoo() / addFoo() / clearFoo() style: method androidx.media2.session.SessionCommandGroup.Builder.removeCommand(androidx.media2.session.SessionCommand)
+InvalidNullability: androidx.media2.session.MediaSessionService#onBind(android.content.Intent):
+ Invalid nullability on method `onBind` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.media2.session.MediaSessionService#onBind(android.content.Intent) parameter #0:
+ Invalid nullability on parameter `intent` in method `onBind`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+
+
MissingGetterMatchingBuilder: androidx.media2.session.MediaBrowser.Builder#setConnectionHints(android.os.Bundle):
androidx.media2.session.MediaBrowser does not declare a `getConnectionHints()` method matching method androidx.media2.session.MediaBrowser.Builder.setConnectionHints(android.os.Bundle)
MissingGetterMatchingBuilder: androidx.media2.session.MediaBrowser.Builder#setControllerCallback(java.util.concurrent.Executor, androidx.media2.session.MediaBrowser.BrowserCallback):
diff --git a/media2/media2-session/version-compat-tests/current/client/src/androidTest/java/androidx/media2/test/client/tests/MediaBrowserCallbackTest.java b/media2/media2-session/version-compat-tests/current/client/src/androidTest/java/androidx/media2/test/client/tests/MediaBrowserCallbackTest.java
index 209b298..33424bc 100644
--- a/media2/media2-session/version-compat-tests/current/client/src/androidTest/java/androidx/media2/test/client/tests/MediaBrowserCallbackTest.java
+++ b/media2/media2-session/version-compat-tests/current/client/src/androidTest/java/androidx/media2/test/client/tests/MediaBrowserCallbackTest.java
@@ -61,6 +61,7 @@
import androidx.test.filters.LargeTest;
import androidx.versionedparcelable.ParcelUtils;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -117,6 +118,7 @@
return (MediaBrowser) createController(token, true, connectionHints, callback);
}
+ @Ignore("b/202942942")
@Test
public void getLibraryRoot() throws Exception {
final LibraryParams params = new LibraryParams.Builder()
@@ -178,6 +180,7 @@
}
}
+ @Ignore("b/202942942")
@Test
public void getChildren() throws Exception {
final String parentId = MediaBrowserConstants.PARENT_ID;
@@ -221,6 +224,7 @@
}
}
+ @Ignore("b/202942942")
@Test
public void getChildren_emptyResult() throws Exception {
final String parentId = MediaBrowserConstants.PARENT_ID_NO_CHILDREN;
@@ -243,6 +247,7 @@
assertNull(result.getMediaItems());
}
+ @Ignore("b/202942942")
@Test
public void searchCallbacks() throws Exception {
final String query = MediaBrowserConstants.SEARCH_QUERY;
@@ -312,6 +317,7 @@
}
}
+ @Ignore("b/202942942")
@Test
@LargeTest
public void onSearchResultChanged_searchTakesTime() throws Exception {
@@ -338,6 +344,7 @@
assertEquals(RESULT_SUCCESS, result.getResultCode());
}
+ @Ignore("b/202942942")
@Test
public void onSearchResultChanged_emptyResult() throws Exception {
final String query = MediaBrowserConstants.SEARCH_QUERY_EMPTY_RESULT;
@@ -389,6 +396,7 @@
assertTrue(latch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS));
}
+ @Ignore("b/202942942")
@Test
public void onChildrenChanged_calledWhenSubscribed2() throws Exception {
// This test uses MediaLibrarySession.notifyChildrenChanged(ControllerInfo).
diff --git a/media2/media2-session/version-compat-tests/current/client/src/androidTest/java/androidx/media2/test/client/tests/MediaControllerCompatCallbackWithMediaSessionTest.java b/media2/media2-session/version-compat-tests/current/client/src/androidTest/java/androidx/media2/test/client/tests/MediaControllerCompatCallbackWithMediaSessionTest.java
index c86c41e..2398a13 100644
--- a/media2/media2-session/version-compat-tests/current/client/src/androidTest/java/androidx/media2/test/client/tests/MediaControllerCompatCallbackWithMediaSessionTest.java
+++ b/media2/media2-session/version-compat-tests/current/client/src/androidTest/java/androidx/media2/test/client/tests/MediaControllerCompatCallbackWithMediaSessionTest.java
@@ -51,6 +51,7 @@
import org.junit.After;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -91,6 +92,7 @@
mSession.close();
}
+ @Ignore("b/202942942")
@Test
public void gettersAfterConnected() throws Exception {
int testState = SessionPlayer.PLAYER_STATE_PLAYING;
@@ -543,6 +545,7 @@
assertEquals(speed, mControllerCompat.getPlaybackState().getPlaybackSpeed(), EPSILON);
}
+ @Ignore("b/202942942")
@Test
public void bufferingStateChange() throws Exception {
List<MediaItem> testPlaylist = MediaTestUtils.createFileMediaItems(3);
@@ -593,7 +596,7 @@
assertEquals(testSeekPosition, mControllerCompat.getPlaybackState().getPosition());
}
- @FlakyTest(bugId = 187338985)
+ @Ignore("b/202942942")
@Test
public void currentMediaItemChange() throws Exception {
int testItemIndex = 3;
@@ -758,6 +761,7 @@
assertEquals(playlistTitle, queueTitleRef.get().toString());
}
+ @Ignore("b/202942942")
@Test
public void onAudioInfoChanged_isCalled_byVolumeChange() throws Exception {
Bundle playerConfig = new RemoteMediaSession.MockPlayerConfigBuilder()
diff --git a/media2/media2-session/version-compat-tests/current/client/src/androidTest/java/androidx/media2/test/client/tests/MediaControllerLegacyTest.java b/media2/media2-session/version-compat-tests/current/client/src/androidTest/java/androidx/media2/test/client/tests/MediaControllerLegacyTest.java
index 04b1df5..9152025 100644
--- a/media2/media2-session/version-compat-tests/current/client/src/androidTest/java/androidx/media2/test/client/tests/MediaControllerLegacyTest.java
+++ b/media2/media2-session/version-compat-tests/current/client/src/androidTest/java/androidx/media2/test/client/tests/MediaControllerLegacyTest.java
@@ -70,6 +70,7 @@
import org.junit.After;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import java.util.List;
@@ -219,6 +220,7 @@
* This also tests {@link ControllerCallback#onPlaylistChanged(
* MediaController, List, MediaMetadata)}.
*/
+ @Ignore("b/202942942")
@Test
public void getPlaylist() throws Exception {
final List<MediaItem> testList = MediaTestUtils.createFileMediaItems(2);
@@ -246,6 +248,7 @@
assertEquals(listFromCallback.get(), mController.getPlaylist());
}
+ @Ignore("b/202942942")
@Test
public void getPlaylistMetadata() throws Exception {
final AtomicReference<MediaMetadata> metadataFromCallback = new AtomicReference<>();
@@ -286,6 +289,7 @@
assertEquals(testMediaId, mController.getCurrentMediaItem().getMediaId());
}
+ @Ignore("b/202942942")
@Test
public void setMediaUri_resultSetAfterPrepare() throws Exception {
mController = createController(mSession.getSessionToken(), true, null);
@@ -308,6 +312,7 @@
assertEquals(RESULT_SUCCESS, result.getResultCode());
}
+ @Ignore("b/202942942")
@Test
public void setMediaUri_resultSetAfterPlay() throws Exception {
mController = createController(mSession.getSessionToken(), true, null);
@@ -349,6 +354,7 @@
assertEquals(RESULT_SUCCESS, result2.getResultCode());
}
+ @Ignore("b/202942942")
@Test
public void controllerCallback_onCurrentMediaItemChanged_byMetadataChange()
throws Exception {
@@ -430,6 +436,7 @@
assertTrue(latch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS));
}
+ @Ignore("b/202942942")
@Test
public void controllerCallback_onBufferingCompleted() throws Exception {
final List<MediaItem> testPlaylist = MediaTestUtils.createFileMediaItems(1);
@@ -466,7 +473,8 @@
.build());
assertTrue(latch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS));
}
-
+
+ @Ignore("b/202942942")
@Test
public void controllerCallback_onBufferingStarved() throws Exception {
final List<MediaItem> testPlaylist = MediaTestUtils.createFileMediaItems(1);
@@ -586,6 +594,7 @@
assertEquals(infoOut.get(), mController.getPlaybackInfo());
}
+ @Ignore("b/202942942")
@Test
public void controllerCallback_onPlaybackInfoChanged_byPlaybackTypeChangeToLocal()
throws Exception {
@@ -620,6 +629,7 @@
assertEquals(infoOut.get(), mController.getPlaybackInfo());
}
+ @Ignore("b/202942942")
@Test
public void controllerCallback_onCustomCommand() throws Exception {
final String event = "testControllerCallback_onCustomCommand";
@@ -716,6 +726,7 @@
mController = createController(mSession.getSessionToken());
}
+ @Ignore("b/202942942")
@Test
public void controllerCallback_onDisconnected() throws Exception {
mController = createController(mSession.getSessionToken());
@@ -730,6 +741,7 @@
waitForDisconnect(mController, true);
}
+ @Ignore("b/202942942")
@Test
public void close_twice() throws Exception {
mController = createController(mSession.getSessionToken());
@@ -737,6 +749,7 @@
mController.close();
}
+ @Ignore("b/202942942")
@Test
public void isConnected() throws Exception {
mController = createController(mSession.getSessionToken());
@@ -747,6 +760,7 @@
assertFalse(mController.isConnected());
}
+ @Ignore("b/202942942")
@Test
public void close_beforeConnected() throws InterruptedException {
MediaController controller = createController(mSession.getSessionToken(), false, null);
@@ -755,6 +769,7 @@
controller.close();
}
+ @Ignore("b/202942942")
@Test
public void controllerCallback_onCustomCommand_bySetCaptioningEnabled() throws Exception {
final String sessionCommandOnCaptioningEnabledChanged =
diff --git a/media2/media2-session/version-compat-tests/current/client/src/androidTest/java/androidx/media2/test/client/tests/MediaControllerTest.java b/media2/media2-session/version-compat-tests/current/client/src/androidTest/java/androidx/media2/test/client/tests/MediaControllerTest.java
index 7002170..e10e811d 100644
--- a/media2/media2-session/version-compat-tests/current/client/src/androidTest/java/androidx/media2/test/client/tests/MediaControllerTest.java
+++ b/media2/media2-session/version-compat-tests/current/client/src/androidTest/java/androidx/media2/test/client/tests/MediaControllerTest.java
@@ -65,6 +65,7 @@
import org.junit.After;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -180,6 +181,7 @@
session.cleanUp();
}
+ @Ignore("b/202942942")
@Test
public void setVolumeWithLocalVolume() throws Exception {
if (Build.VERSION.SDK_INT >= 21 && mAudioManager.isVolumeFixed()) {
@@ -368,6 +370,7 @@
controller.close();
}
+ @Ignore("b/202942942")
@Test
public void gettersAfterConnected() throws InterruptedException {
final int state = SessionPlayer.PLAYER_STATE_PLAYING;
@@ -450,6 +453,7 @@
assertEquals(testTracks, testTracksFromController);
}
+ @Ignore("b/202942942")
@Test
public void selectDeselectTrackAndGetSelectedTrack() throws Exception {
CountDownLatch selectTrackLatch = new CountDownLatch(1);
@@ -613,6 +617,7 @@
assertTrue("All futures should be completed", latch.await(10, TimeUnit.SECONDS));
}
+ @Ignore("b/202942942")
@Test
public void play_returnsSessionResultWithMediaItem() throws Exception {
RemoteMediaSession session = mRemoteSession;
@@ -624,6 +629,7 @@
assertNotNull(result.getMediaItem());
}
+ @Ignore("b/202942942")
@Test
public void getPlaylistMetadata_returnsPlaylistMetadataOfPlayerInSession() throws Exception {
MediaMetadata testMetadata = MediaTestUtils.createMetadata();
diff --git a/mediarouter/mediarouter/api/api_lint.ignore b/mediarouter/mediarouter/api/api_lint.ignore
index deee53e..dc54752 100644
--- a/mediarouter/mediarouter/api/api_lint.ignore
+++ b/mediarouter/mediarouter/api/api_lint.ignore
@@ -97,6 +97,24 @@
Inconsistent interface constant; expected 'androidx.mediarouter.media.MediaRouteProviderService'`
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: androidx.mediarouter.app.MediaRouteControllerDialog#onKeyUp(int, android.view.KeyEvent) parameter #1:
+ Invalid nullability on parameter `event` in method `onKeyUp`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.mediarouter.media.MediaRouteProviderService#attachBaseContext(android.content.Context) parameter #0:
+ Invalid nullability on parameter `context` in method `attachBaseContext`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.mediarouter.media.MediaRouteProviderService#onBind(android.content.Intent):
+ Invalid nullability on method `onBind` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.mediarouter.media.MediaRouteProviderService#onBind(android.content.Intent) parameter #0:
+ Invalid nullability on parameter `intent` in method `onBind`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.mediarouter.media.MediaTransferReceiver#onReceive(android.content.Context, android.content.Intent) parameter #0:
+ Invalid nullability on parameter `context` in method `onReceive`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.mediarouter.media.MediaTransferReceiver#onReceive(android.content.Context, android.content.Intent) parameter #1:
+ Invalid nullability on parameter `intent` in method `onReceive`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+
+
KotlinOperator: androidx.mediarouter.media.MediaRouteSelector#contains(androidx.mediarouter.media.MediaRouteSelector):
Method can be invoked as a "in" operator from Kotlin: `contains` (this is usually desirable; just make sure it makes sense for this type of object)
diff --git a/metrics/metrics-performance/api/current.txt b/metrics/metrics-performance/api/current.txt
index d95a7ee..9729d9a 100644
--- a/metrics/metrics-performance/api/current.txt
+++ b/metrics/metrics-performance/api/current.txt
@@ -29,8 +29,8 @@
method @UiThread public static androidx.metrics.performance.JankStats createAndTrack(android.view.Window window, java.util.concurrent.Executor executor, androidx.metrics.performance.JankStats.OnFrameListener frameListener);
method public float getJankHeuristicMultiplier();
method public boolean isTrackingEnabled();
- method public void setJankHeuristicMultiplier(float value);
- method @UiThread public void setTrackingEnabled(boolean value);
+ method public void setJankHeuristicMultiplier(float);
+ method @UiThread public void setTrackingEnabled(boolean);
property public final boolean isTrackingEnabled;
property public final float jankHeuristicMultiplier;
field public static final androidx.metrics.performance.JankStats.Companion Companion;
diff --git a/metrics/metrics-performance/api/public_plus_experimental_current.txt b/metrics/metrics-performance/api/public_plus_experimental_current.txt
index d95a7ee..9729d9a 100644
--- a/metrics/metrics-performance/api/public_plus_experimental_current.txt
+++ b/metrics/metrics-performance/api/public_plus_experimental_current.txt
@@ -29,8 +29,8 @@
method @UiThread public static androidx.metrics.performance.JankStats createAndTrack(android.view.Window window, java.util.concurrent.Executor executor, androidx.metrics.performance.JankStats.OnFrameListener frameListener);
method public float getJankHeuristicMultiplier();
method public boolean isTrackingEnabled();
- method public void setJankHeuristicMultiplier(float value);
- method @UiThread public void setTrackingEnabled(boolean value);
+ method public void setJankHeuristicMultiplier(float);
+ method @UiThread public void setTrackingEnabled(boolean);
property public final boolean isTrackingEnabled;
property public final float jankHeuristicMultiplier;
field public static final androidx.metrics.performance.JankStats.Companion Companion;
diff --git a/metrics/metrics-performance/api/restricted_current.txt b/metrics/metrics-performance/api/restricted_current.txt
index d95a7ee..9729d9a 100644
--- a/metrics/metrics-performance/api/restricted_current.txt
+++ b/metrics/metrics-performance/api/restricted_current.txt
@@ -29,8 +29,8 @@
method @UiThread public static androidx.metrics.performance.JankStats createAndTrack(android.view.Window window, java.util.concurrent.Executor executor, androidx.metrics.performance.JankStats.OnFrameListener frameListener);
method public float getJankHeuristicMultiplier();
method public boolean isTrackingEnabled();
- method public void setJankHeuristicMultiplier(float value);
- method @UiThread public void setTrackingEnabled(boolean value);
+ method public void setJankHeuristicMultiplier(float);
+ method @UiThread public void setTrackingEnabled(boolean);
property public final boolean isTrackingEnabled;
property public final float jankHeuristicMultiplier;
field public static final androidx.metrics.performance.JankStats.Companion Companion;
diff --git a/navigation/navigation-common/api/current.ignore b/navigation/navigation-common/api/current.ignore
new file mode 100644
index 0000000..112574f
--- /dev/null
+++ b/navigation/navigation-common/api/current.ignore
@@ -0,0 +1,45 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.navigation.AnimBuilder#setEnter(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.AnimBuilder.setEnter
+ParameterNameChange: androidx.navigation.AnimBuilder#setExit(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.AnimBuilder.setExit
+ParameterNameChange: androidx.navigation.AnimBuilder#setPopEnter(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.AnimBuilder.setPopEnter
+ParameterNameChange: androidx.navigation.AnimBuilder#setPopExit(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.AnimBuilder.setPopExit
+ParameterNameChange: androidx.navigation.NavAction#setDefaultArguments(android.os.Bundle) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavAction.setDefaultArguments
+ParameterNameChange: androidx.navigation.NavAction#setNavOptions(androidx.navigation.NavOptions) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavAction.setNavOptions
+ParameterNameChange: androidx.navigation.NavActionBuilder#setDestinationId(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavActionBuilder.setDestinationId
+ParameterNameChange: androidx.navigation.NavArgumentBuilder#setDefaultValue(Object) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavArgumentBuilder.setDefaultValue
+ParameterNameChange: androidx.navigation.NavArgumentBuilder#setNullable(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavArgumentBuilder.setNullable
+ParameterNameChange: androidx.navigation.NavArgumentBuilder#setType(androidx.navigation.NavType<?>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavArgumentBuilder.setType
+ParameterNameChange: androidx.navigation.NavDeepLinkDslBuilder#setAction(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavDeepLinkDslBuilder.setAction
+ParameterNameChange: androidx.navigation.NavDeepLinkDslBuilder#setMimeType(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavDeepLinkDslBuilder.setMimeType
+ParameterNameChange: androidx.navigation.NavDeepLinkDslBuilder#setUriPattern(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavDeepLinkDslBuilder.setUriPattern
+ParameterNameChange: androidx.navigation.NavDestination#setId(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavDestination.setId
+ParameterNameChange: androidx.navigation.NavDestination#setLabel(CharSequence) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavDestination.setLabel
+ParameterNameChange: androidx.navigation.NavDestination#setRoute(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavDestination.setRoute
+ParameterNameChange: androidx.navigation.NavDestinationBuilder#setLabel(CharSequence) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavDestinationBuilder.setLabel
+ParameterNameChange: androidx.navigation.NavOptionsBuilder#setLaunchSingleTop(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavOptionsBuilder.setLaunchSingleTop
+ParameterNameChange: androidx.navigation.NavOptionsBuilder#setPopUpTo(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavOptionsBuilder.setPopUpTo
+ParameterNameChange: androidx.navigation.NavOptionsBuilder#setRestoreState(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavOptionsBuilder.setRestoreState
+ParameterNameChange: androidx.navigation.PopUpToBuilder#setInclusive(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.PopUpToBuilder.setInclusive
+ParameterNameChange: androidx.navigation.PopUpToBuilder#setSaveState(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.PopUpToBuilder.setSaveState
diff --git a/navigation/navigation-common/api/current.txt b/navigation/navigation-common/api/current.txt
index c5d6245..fe9681f 100644
--- a/navigation/navigation-common/api/current.txt
+++ b/navigation/navigation-common/api/current.txt
@@ -17,10 +17,10 @@
method public int getExit();
method public int getPopEnter();
method public int getPopExit();
- method public void setEnter(int enter);
- method public void setExit(int exit);
- method public void setPopEnter(int popEnter);
- method public void setPopExit(int popExit);
+ method public void setEnter(int);
+ method public void setExit(int);
+ method public void setPopEnter(int);
+ method public void setPopExit(int);
property public final int enter;
property public final int exit;
property public final int popEnter;
@@ -50,8 +50,8 @@
method public android.os.Bundle? getDefaultArguments();
method public int getDestinationId();
method public androidx.navigation.NavOptions? getNavOptions();
- method public void setDefaultArguments(android.os.Bundle? defaultArguments);
- method public void setNavOptions(androidx.navigation.NavOptions? navOptions);
+ method public void setDefaultArguments(android.os.Bundle?);
+ method public void setNavOptions(androidx.navigation.NavOptions?);
property public final android.os.Bundle? defaultArguments;
property public final int destinationId;
property public final androidx.navigation.NavOptions? navOptions;
@@ -62,7 +62,7 @@
method public java.util.Map<java.lang.String,java.lang.Object> getDefaultArguments();
method public int getDestinationId();
method public void navOptions(kotlin.jvm.functions.Function1<? super androidx.navigation.NavOptionsBuilder,kotlin.Unit> optionsBuilder);
- method public void setDestinationId(int destinationId);
+ method public void setDestinationId(int);
property public final java.util.Map<java.lang.String,java.lang.Object> defaultArguments;
property public final int destinationId;
}
@@ -105,9 +105,9 @@
method public Object? getDefaultValue();
method public boolean getNullable();
method public androidx.navigation.NavType<?> getType();
- method public void setDefaultValue(Object? value);
- method public void setNullable(boolean value);
- method public void setType(androidx.navigation.NavType<?> value);
+ method public void setDefaultValue(Object?);
+ method public void setNullable(boolean);
+ method public void setType(androidx.navigation.NavType<?>);
property public final Object? defaultValue;
property public final boolean nullable;
property public final androidx.navigation.NavType<?> type;
@@ -156,9 +156,9 @@
method public String? getAction();
method public String? getMimeType();
method public String? getUriPattern();
- method public void setAction(String? p);
- method public void setMimeType(String? mimeType);
- method public void setUriPattern(String? uriPattern);
+ method public void setAction(String?);
+ method public void setMimeType(String?);
+ method public void setUriPattern(String?);
property public final String? action;
property public final String? mimeType;
property public final String? uriPattern;
@@ -216,9 +216,9 @@
method public final void putAction(@IdRes int actionId, androidx.navigation.NavAction action);
method public final void removeAction(@IdRes int actionId);
method public final void removeArgument(String argumentName);
- method public final void setId(@IdRes int id);
- method public final void setLabel(CharSequence? label);
- method public final void setRoute(String? route);
+ method public final void setId(@IdRes int);
+ method public final void setLabel(CharSequence?);
+ method public final void setRoute(String?);
property public final java.util.Map<java.lang.String,androidx.navigation.NavArgument> arguments;
property @IdRes public final int id;
property public final CharSequence? label;
@@ -250,7 +250,7 @@
method public final CharSequence? getLabel();
method protected final androidx.navigation.Navigator<? extends D> getNavigator();
method public final String? getRoute();
- method public final void setLabel(CharSequence? label);
+ method public final void setLabel(CharSequence?);
property public final int id;
property public final CharSequence? label;
property protected final androidx.navigation.Navigator<? extends D> navigator;
@@ -371,9 +371,9 @@
method public boolean getRestoreState();
method public void popUpTo(@IdRes int id, optional kotlin.jvm.functions.Function1<? super androidx.navigation.PopUpToBuilder,kotlin.Unit> popUpToBuilder);
method public void popUpTo(String route, optional kotlin.jvm.functions.Function1<? super androidx.navigation.PopUpToBuilder,kotlin.Unit> popUpToBuilder);
- method public void setLaunchSingleTop(boolean launchSingleTop);
- method @Deprecated public void setPopUpTo(int value);
- method public void setRestoreState(boolean restoreState);
+ method public void setLaunchSingleTop(boolean);
+ method @Deprecated public void setPopUpTo(int);
+ method public void setRestoreState(boolean);
property public final boolean launchSingleTop;
property @Deprecated public final int popUpTo;
property public final int popUpToId;
@@ -512,8 +512,8 @@
ctor public PopUpToBuilder();
method public boolean getInclusive();
method public boolean getSaveState();
- method public void setInclusive(boolean inclusive);
- method public void setSaveState(boolean saveState);
+ method public void setInclusive(boolean);
+ method public void setSaveState(boolean);
property public final boolean inclusive;
property public final boolean saveState;
}
diff --git a/navigation/navigation-common/api/public_plus_experimental_current.txt b/navigation/navigation-common/api/public_plus_experimental_current.txt
index c5d6245..fe9681f 100644
--- a/navigation/navigation-common/api/public_plus_experimental_current.txt
+++ b/navigation/navigation-common/api/public_plus_experimental_current.txt
@@ -17,10 +17,10 @@
method public int getExit();
method public int getPopEnter();
method public int getPopExit();
- method public void setEnter(int enter);
- method public void setExit(int exit);
- method public void setPopEnter(int popEnter);
- method public void setPopExit(int popExit);
+ method public void setEnter(int);
+ method public void setExit(int);
+ method public void setPopEnter(int);
+ method public void setPopExit(int);
property public final int enter;
property public final int exit;
property public final int popEnter;
@@ -50,8 +50,8 @@
method public android.os.Bundle? getDefaultArguments();
method public int getDestinationId();
method public androidx.navigation.NavOptions? getNavOptions();
- method public void setDefaultArguments(android.os.Bundle? defaultArguments);
- method public void setNavOptions(androidx.navigation.NavOptions? navOptions);
+ method public void setDefaultArguments(android.os.Bundle?);
+ method public void setNavOptions(androidx.navigation.NavOptions?);
property public final android.os.Bundle? defaultArguments;
property public final int destinationId;
property public final androidx.navigation.NavOptions? navOptions;
@@ -62,7 +62,7 @@
method public java.util.Map<java.lang.String,java.lang.Object> getDefaultArguments();
method public int getDestinationId();
method public void navOptions(kotlin.jvm.functions.Function1<? super androidx.navigation.NavOptionsBuilder,kotlin.Unit> optionsBuilder);
- method public void setDestinationId(int destinationId);
+ method public void setDestinationId(int);
property public final java.util.Map<java.lang.String,java.lang.Object> defaultArguments;
property public final int destinationId;
}
@@ -105,9 +105,9 @@
method public Object? getDefaultValue();
method public boolean getNullable();
method public androidx.navigation.NavType<?> getType();
- method public void setDefaultValue(Object? value);
- method public void setNullable(boolean value);
- method public void setType(androidx.navigation.NavType<?> value);
+ method public void setDefaultValue(Object?);
+ method public void setNullable(boolean);
+ method public void setType(androidx.navigation.NavType<?>);
property public final Object? defaultValue;
property public final boolean nullable;
property public final androidx.navigation.NavType<?> type;
@@ -156,9 +156,9 @@
method public String? getAction();
method public String? getMimeType();
method public String? getUriPattern();
- method public void setAction(String? p);
- method public void setMimeType(String? mimeType);
- method public void setUriPattern(String? uriPattern);
+ method public void setAction(String?);
+ method public void setMimeType(String?);
+ method public void setUriPattern(String?);
property public final String? action;
property public final String? mimeType;
property public final String? uriPattern;
@@ -216,9 +216,9 @@
method public final void putAction(@IdRes int actionId, androidx.navigation.NavAction action);
method public final void removeAction(@IdRes int actionId);
method public final void removeArgument(String argumentName);
- method public final void setId(@IdRes int id);
- method public final void setLabel(CharSequence? label);
- method public final void setRoute(String? route);
+ method public final void setId(@IdRes int);
+ method public final void setLabel(CharSequence?);
+ method public final void setRoute(String?);
property public final java.util.Map<java.lang.String,androidx.navigation.NavArgument> arguments;
property @IdRes public final int id;
property public final CharSequence? label;
@@ -250,7 +250,7 @@
method public final CharSequence? getLabel();
method protected final androidx.navigation.Navigator<? extends D> getNavigator();
method public final String? getRoute();
- method public final void setLabel(CharSequence? label);
+ method public final void setLabel(CharSequence?);
property public final int id;
property public final CharSequence? label;
property protected final androidx.navigation.Navigator<? extends D> navigator;
@@ -371,9 +371,9 @@
method public boolean getRestoreState();
method public void popUpTo(@IdRes int id, optional kotlin.jvm.functions.Function1<? super androidx.navigation.PopUpToBuilder,kotlin.Unit> popUpToBuilder);
method public void popUpTo(String route, optional kotlin.jvm.functions.Function1<? super androidx.navigation.PopUpToBuilder,kotlin.Unit> popUpToBuilder);
- method public void setLaunchSingleTop(boolean launchSingleTop);
- method @Deprecated public void setPopUpTo(int value);
- method public void setRestoreState(boolean restoreState);
+ method public void setLaunchSingleTop(boolean);
+ method @Deprecated public void setPopUpTo(int);
+ method public void setRestoreState(boolean);
property public final boolean launchSingleTop;
property @Deprecated public final int popUpTo;
property public final int popUpToId;
@@ -512,8 +512,8 @@
ctor public PopUpToBuilder();
method public boolean getInclusive();
method public boolean getSaveState();
- method public void setInclusive(boolean inclusive);
- method public void setSaveState(boolean saveState);
+ method public void setInclusive(boolean);
+ method public void setSaveState(boolean);
property public final boolean inclusive;
property public final boolean saveState;
}
diff --git a/navigation/navigation-common/api/restricted_current.ignore b/navigation/navigation-common/api/restricted_current.ignore
new file mode 100644
index 0000000..112574f
--- /dev/null
+++ b/navigation/navigation-common/api/restricted_current.ignore
@@ -0,0 +1,45 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.navigation.AnimBuilder#setEnter(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.AnimBuilder.setEnter
+ParameterNameChange: androidx.navigation.AnimBuilder#setExit(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.AnimBuilder.setExit
+ParameterNameChange: androidx.navigation.AnimBuilder#setPopEnter(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.AnimBuilder.setPopEnter
+ParameterNameChange: androidx.navigation.AnimBuilder#setPopExit(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.AnimBuilder.setPopExit
+ParameterNameChange: androidx.navigation.NavAction#setDefaultArguments(android.os.Bundle) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavAction.setDefaultArguments
+ParameterNameChange: androidx.navigation.NavAction#setNavOptions(androidx.navigation.NavOptions) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavAction.setNavOptions
+ParameterNameChange: androidx.navigation.NavActionBuilder#setDestinationId(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavActionBuilder.setDestinationId
+ParameterNameChange: androidx.navigation.NavArgumentBuilder#setDefaultValue(Object) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavArgumentBuilder.setDefaultValue
+ParameterNameChange: androidx.navigation.NavArgumentBuilder#setNullable(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavArgumentBuilder.setNullable
+ParameterNameChange: androidx.navigation.NavArgumentBuilder#setType(androidx.navigation.NavType<?>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavArgumentBuilder.setType
+ParameterNameChange: androidx.navigation.NavDeepLinkDslBuilder#setAction(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavDeepLinkDslBuilder.setAction
+ParameterNameChange: androidx.navigation.NavDeepLinkDslBuilder#setMimeType(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavDeepLinkDslBuilder.setMimeType
+ParameterNameChange: androidx.navigation.NavDeepLinkDslBuilder#setUriPattern(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavDeepLinkDslBuilder.setUriPattern
+ParameterNameChange: androidx.navigation.NavDestination#setId(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavDestination.setId
+ParameterNameChange: androidx.navigation.NavDestination#setLabel(CharSequence) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavDestination.setLabel
+ParameterNameChange: androidx.navigation.NavDestination#setRoute(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavDestination.setRoute
+ParameterNameChange: androidx.navigation.NavDestinationBuilder#setLabel(CharSequence) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavDestinationBuilder.setLabel
+ParameterNameChange: androidx.navigation.NavOptionsBuilder#setLaunchSingleTop(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavOptionsBuilder.setLaunchSingleTop
+ParameterNameChange: androidx.navigation.NavOptionsBuilder#setPopUpTo(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavOptionsBuilder.setPopUpTo
+ParameterNameChange: androidx.navigation.NavOptionsBuilder#setRestoreState(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavOptionsBuilder.setRestoreState
+ParameterNameChange: androidx.navigation.PopUpToBuilder#setInclusive(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.PopUpToBuilder.setInclusive
+ParameterNameChange: androidx.navigation.PopUpToBuilder#setSaveState(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.PopUpToBuilder.setSaveState
diff --git a/navigation/navigation-common/api/restricted_current.txt b/navigation/navigation-common/api/restricted_current.txt
index c5d6245..fe9681f 100644
--- a/navigation/navigation-common/api/restricted_current.txt
+++ b/navigation/navigation-common/api/restricted_current.txt
@@ -17,10 +17,10 @@
method public int getExit();
method public int getPopEnter();
method public int getPopExit();
- method public void setEnter(int enter);
- method public void setExit(int exit);
- method public void setPopEnter(int popEnter);
- method public void setPopExit(int popExit);
+ method public void setEnter(int);
+ method public void setExit(int);
+ method public void setPopEnter(int);
+ method public void setPopExit(int);
property public final int enter;
property public final int exit;
property public final int popEnter;
@@ -50,8 +50,8 @@
method public android.os.Bundle? getDefaultArguments();
method public int getDestinationId();
method public androidx.navigation.NavOptions? getNavOptions();
- method public void setDefaultArguments(android.os.Bundle? defaultArguments);
- method public void setNavOptions(androidx.navigation.NavOptions? navOptions);
+ method public void setDefaultArguments(android.os.Bundle?);
+ method public void setNavOptions(androidx.navigation.NavOptions?);
property public final android.os.Bundle? defaultArguments;
property public final int destinationId;
property public final androidx.navigation.NavOptions? navOptions;
@@ -62,7 +62,7 @@
method public java.util.Map<java.lang.String,java.lang.Object> getDefaultArguments();
method public int getDestinationId();
method public void navOptions(kotlin.jvm.functions.Function1<? super androidx.navigation.NavOptionsBuilder,kotlin.Unit> optionsBuilder);
- method public void setDestinationId(int destinationId);
+ method public void setDestinationId(int);
property public final java.util.Map<java.lang.String,java.lang.Object> defaultArguments;
property public final int destinationId;
}
@@ -105,9 +105,9 @@
method public Object? getDefaultValue();
method public boolean getNullable();
method public androidx.navigation.NavType<?> getType();
- method public void setDefaultValue(Object? value);
- method public void setNullable(boolean value);
- method public void setType(androidx.navigation.NavType<?> value);
+ method public void setDefaultValue(Object?);
+ method public void setNullable(boolean);
+ method public void setType(androidx.navigation.NavType<?>);
property public final Object? defaultValue;
property public final boolean nullable;
property public final androidx.navigation.NavType<?> type;
@@ -156,9 +156,9 @@
method public String? getAction();
method public String? getMimeType();
method public String? getUriPattern();
- method public void setAction(String? p);
- method public void setMimeType(String? mimeType);
- method public void setUriPattern(String? uriPattern);
+ method public void setAction(String?);
+ method public void setMimeType(String?);
+ method public void setUriPattern(String?);
property public final String? action;
property public final String? mimeType;
property public final String? uriPattern;
@@ -216,9 +216,9 @@
method public final void putAction(@IdRes int actionId, androidx.navigation.NavAction action);
method public final void removeAction(@IdRes int actionId);
method public final void removeArgument(String argumentName);
- method public final void setId(@IdRes int id);
- method public final void setLabel(CharSequence? label);
- method public final void setRoute(String? route);
+ method public final void setId(@IdRes int);
+ method public final void setLabel(CharSequence?);
+ method public final void setRoute(String?);
property public final java.util.Map<java.lang.String,androidx.navigation.NavArgument> arguments;
property @IdRes public final int id;
property public final CharSequence? label;
@@ -250,7 +250,7 @@
method public final CharSequence? getLabel();
method protected final androidx.navigation.Navigator<? extends D> getNavigator();
method public final String? getRoute();
- method public final void setLabel(CharSequence? label);
+ method public final void setLabel(CharSequence?);
property public final int id;
property public final CharSequence? label;
property protected final androidx.navigation.Navigator<? extends D> navigator;
@@ -371,9 +371,9 @@
method public boolean getRestoreState();
method public void popUpTo(@IdRes int id, optional kotlin.jvm.functions.Function1<? super androidx.navigation.PopUpToBuilder,kotlin.Unit> popUpToBuilder);
method public void popUpTo(String route, optional kotlin.jvm.functions.Function1<? super androidx.navigation.PopUpToBuilder,kotlin.Unit> popUpToBuilder);
- method public void setLaunchSingleTop(boolean launchSingleTop);
- method @Deprecated public void setPopUpTo(int value);
- method public void setRestoreState(boolean restoreState);
+ method public void setLaunchSingleTop(boolean);
+ method @Deprecated public void setPopUpTo(int);
+ method public void setRestoreState(boolean);
property public final boolean launchSingleTop;
property @Deprecated public final int popUpTo;
property public final int popUpToId;
@@ -512,8 +512,8 @@
ctor public PopUpToBuilder();
method public boolean getInclusive();
method public boolean getSaveState();
- method public void setInclusive(boolean inclusive);
- method public void setSaveState(boolean saveState);
+ method public void setInclusive(boolean);
+ method public void setSaveState(boolean);
property public final boolean inclusive;
property public final boolean saveState;
}
diff --git a/navigation/navigation-dynamic-features-fragment/api/current.ignore b/navigation/navigation-dynamic-features-fragment/api/current.ignore
new file mode 100644
index 0000000..22bc6c9
--- /dev/null
+++ b/navigation/navigation-dynamic-features-fragment/api/current.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.navigation.dynamicfeatures.fragment.DynamicFragmentNavigator.Destination#setModuleName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.fragment.DynamicFragmentNavigator.Destination.setModuleName
+ParameterNameChange: androidx.navigation.dynamicfeatures.fragment.DynamicFragmentNavigatorDestinationBuilder#setModuleName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.fragment.DynamicFragmentNavigatorDestinationBuilder.setModuleName
diff --git a/navigation/navigation-dynamic-features-fragment/api/current.txt b/navigation/navigation-dynamic-features-fragment/api/current.txt
index d481c6e6..fe32d9b 100644
--- a/navigation/navigation-dynamic-features-fragment/api/current.txt
+++ b/navigation/navigation-dynamic-features-fragment/api/current.txt
@@ -10,7 +10,7 @@
ctor public DynamicFragmentNavigator.Destination(androidx.navigation.NavigatorProvider navigatorProvider);
ctor public DynamicFragmentNavigator.Destination(androidx.navigation.Navigator<? extends androidx.navigation.fragment.FragmentNavigator.Destination> fragmentNavigator);
method public String? getModuleName();
- method public void setModuleName(String? moduleName);
+ method public void setModuleName(String?);
property public final String? moduleName;
}
@@ -19,7 +19,7 @@
ctor public DynamicFragmentNavigatorDestinationBuilder(androidx.navigation.dynamicfeatures.fragment.DynamicFragmentNavigator navigator, String route, String fragmentClassName);
method public androidx.navigation.dynamicfeatures.fragment.DynamicFragmentNavigator.Destination build();
method public String? getModuleName();
- method public void setModuleName(String? moduleName);
+ method public void setModuleName(String?);
property public final String? moduleName;
}
diff --git a/navigation/navigation-dynamic-features-fragment/api/public_plus_experimental_current.txt b/navigation/navigation-dynamic-features-fragment/api/public_plus_experimental_current.txt
index d481c6e6..fe32d9b 100644
--- a/navigation/navigation-dynamic-features-fragment/api/public_plus_experimental_current.txt
+++ b/navigation/navigation-dynamic-features-fragment/api/public_plus_experimental_current.txt
@@ -10,7 +10,7 @@
ctor public DynamicFragmentNavigator.Destination(androidx.navigation.NavigatorProvider navigatorProvider);
ctor public DynamicFragmentNavigator.Destination(androidx.navigation.Navigator<? extends androidx.navigation.fragment.FragmentNavigator.Destination> fragmentNavigator);
method public String? getModuleName();
- method public void setModuleName(String? moduleName);
+ method public void setModuleName(String?);
property public final String? moduleName;
}
@@ -19,7 +19,7 @@
ctor public DynamicFragmentNavigatorDestinationBuilder(androidx.navigation.dynamicfeatures.fragment.DynamicFragmentNavigator navigator, String route, String fragmentClassName);
method public androidx.navigation.dynamicfeatures.fragment.DynamicFragmentNavigator.Destination build();
method public String? getModuleName();
- method public void setModuleName(String? moduleName);
+ method public void setModuleName(String?);
property public final String? moduleName;
}
diff --git a/navigation/navigation-dynamic-features-fragment/api/restricted_current.ignore b/navigation/navigation-dynamic-features-fragment/api/restricted_current.ignore
new file mode 100644
index 0000000..22bc6c9
--- /dev/null
+++ b/navigation/navigation-dynamic-features-fragment/api/restricted_current.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.navigation.dynamicfeatures.fragment.DynamicFragmentNavigator.Destination#setModuleName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.fragment.DynamicFragmentNavigator.Destination.setModuleName
+ParameterNameChange: androidx.navigation.dynamicfeatures.fragment.DynamicFragmentNavigatorDestinationBuilder#setModuleName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.fragment.DynamicFragmentNavigatorDestinationBuilder.setModuleName
diff --git a/navigation/navigation-dynamic-features-fragment/api/restricted_current.txt b/navigation/navigation-dynamic-features-fragment/api/restricted_current.txt
index d481c6e6..fe32d9b 100644
--- a/navigation/navigation-dynamic-features-fragment/api/restricted_current.txt
+++ b/navigation/navigation-dynamic-features-fragment/api/restricted_current.txt
@@ -10,7 +10,7 @@
ctor public DynamicFragmentNavigator.Destination(androidx.navigation.NavigatorProvider navigatorProvider);
ctor public DynamicFragmentNavigator.Destination(androidx.navigation.Navigator<? extends androidx.navigation.fragment.FragmentNavigator.Destination> fragmentNavigator);
method public String? getModuleName();
- method public void setModuleName(String? moduleName);
+ method public void setModuleName(String?);
property public final String? moduleName;
}
@@ -19,7 +19,7 @@
ctor public DynamicFragmentNavigatorDestinationBuilder(androidx.navigation.dynamicfeatures.fragment.DynamicFragmentNavigator navigator, String route, String fragmentClassName);
method public androidx.navigation.dynamicfeatures.fragment.DynamicFragmentNavigator.Destination build();
method public String? getModuleName();
- method public void setModuleName(String? moduleName);
+ method public void setModuleName(String?);
property public final String? moduleName;
}
diff --git a/navigation/navigation-dynamic-features-runtime/api/current.ignore b/navigation/navigation-dynamic-features-runtime/api/current.ignore
new file mode 100644
index 0000000..ae02ffb
--- /dev/null
+++ b/navigation/navigation-dynamic-features-runtime/api/current.ignore
@@ -0,0 +1,33 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicActivityNavigator.Destination#setModuleName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicActivityNavigator.Destination.setModuleName
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder#setAction(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder.setAction
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder#setActivityClassName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder.setActivityClassName
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder#setData(android.net.Uri) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder.setData
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder#setDataPattern(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder.setDataPattern
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder#setModuleName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder.setModuleName
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder#setTargetPackage(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder.setTargetPackage
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicGraphNavigator.DynamicNavGraph#setModuleName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicGraphNavigator.DynamicNavGraph.setModuleName
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicGraphNavigator.DynamicNavGraph#setProgressDestination(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicGraphNavigator.DynamicNavGraph.setProgressDestination
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicIncludeGraphNavigator.DynamicIncludeNavGraph#setGraphPackage(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.setGraphPackage
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicIncludeGraphNavigator.DynamicIncludeNavGraph#setGraphResourceName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.setGraphResourceName
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicIncludeGraphNavigator.DynamicIncludeNavGraph#setModuleName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.setModuleName
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicIncludeNavGraphBuilder#setGraphPackage(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicIncludeNavGraphBuilder.setGraphPackage
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicNavGraphBuilder#setModuleName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicNavGraphBuilder.setModuleName
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicNavGraphBuilder#setProgressDestination(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicNavGraphBuilder.setProgressDestination
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicNavGraphBuilder#setProgressDestinationRoute(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicNavGraphBuilder.setProgressDestinationRoute
diff --git a/navigation/navigation-dynamic-features-runtime/api/current.txt b/navigation/navigation-dynamic-features-runtime/api/current.txt
index a79e3b7..e4c37db 100644
--- a/navigation/navigation-dynamic-features-runtime/api/current.txt
+++ b/navigation/navigation-dynamic-features-runtime/api/current.txt
@@ -10,7 +10,7 @@
ctor public DynamicActivityNavigator.Destination(androidx.navigation.NavigatorProvider navigatorProvider);
ctor public DynamicActivityNavigator.Destination(androidx.navigation.Navigator<? extends androidx.navigation.ActivityNavigator.Destination> activityNavigator);
method public String? getModuleName();
- method public void setModuleName(String? moduleName);
+ method public void setModuleName(String?);
property public final String? moduleName;
}
@@ -24,12 +24,12 @@
method public String? getDataPattern();
method public String? getModuleName();
method public String? getTargetPackage();
- method public void setAction(String? action);
- method public void setActivityClassName(String? activityClassName);
- method public void setData(android.net.Uri? data);
- method public void setDataPattern(String? dataPattern);
- method public void setModuleName(String? moduleName);
- method public void setTargetPackage(String? targetPackage);
+ method public void setAction(String?);
+ method public void setActivityClassName(String?);
+ method public void setData(android.net.Uri?);
+ method public void setDataPattern(String?);
+ method public void setModuleName(String?);
+ method public void setTargetPackage(String?);
property public final String? action;
property public final String? activityClassName;
property public final android.net.Uri? data;
@@ -63,8 +63,8 @@
ctor public DynamicGraphNavigator.DynamicNavGraph(androidx.navigation.dynamicfeatures.DynamicGraphNavigator navGraphNavigator, androidx.navigation.NavigatorProvider navigatorProvider);
method public String? getModuleName();
method public int getProgressDestination();
- method public void setModuleName(String? moduleName);
- method public void setProgressDestination(int progressDestination);
+ method public void setModuleName(String?);
+ method public void setProgressDestination(int);
property public final String? moduleName;
property public final int progressDestination;
}
@@ -78,9 +78,9 @@
method public String? getGraphPackage();
method public String? getGraphResourceName();
method public String? getModuleName();
- method public void setGraphPackage(String? graphPackage);
- method public void setGraphResourceName(String? graphResourceName);
- method public void setModuleName(String? moduleName);
+ method public void setGraphPackage(String?);
+ method public void setGraphResourceName(String?);
+ method public void setModuleName(String?);
property public final String? graphPackage;
property public final String? graphResourceName;
property public final String? moduleName;
@@ -91,7 +91,7 @@
ctor public DynamicIncludeNavGraphBuilder(androidx.navigation.dynamicfeatures.DynamicIncludeGraphNavigator dynamicIncludeGraphNavigator, String route, String moduleName, String graphResourceName);
method public androidx.navigation.dynamicfeatures.DynamicIncludeGraphNavigator.DynamicIncludeNavGraph build();
method public String? getGraphPackage();
- method public void setGraphPackage(String? graphPackage);
+ method public void setGraphPackage(String?);
property public final String? graphPackage;
}
@@ -125,9 +125,9 @@
method public String? getModuleName();
method public int getProgressDestination();
method public String? getProgressDestinationRoute();
- method public void setModuleName(String? moduleName);
- method public void setProgressDestination(int p);
- method public void setProgressDestinationRoute(String? progDestRoute);
+ method public void setModuleName(String?);
+ method public void setProgressDestination(int);
+ method public void setProgressDestinationRoute(String?);
property public final String? moduleName;
property public final int progressDestination;
property public final String? progressDestinationRoute;
diff --git a/navigation/navigation-dynamic-features-runtime/api/public_plus_experimental_current.txt b/navigation/navigation-dynamic-features-runtime/api/public_plus_experimental_current.txt
index a79e3b7..e4c37db 100644
--- a/navigation/navigation-dynamic-features-runtime/api/public_plus_experimental_current.txt
+++ b/navigation/navigation-dynamic-features-runtime/api/public_plus_experimental_current.txt
@@ -10,7 +10,7 @@
ctor public DynamicActivityNavigator.Destination(androidx.navigation.NavigatorProvider navigatorProvider);
ctor public DynamicActivityNavigator.Destination(androidx.navigation.Navigator<? extends androidx.navigation.ActivityNavigator.Destination> activityNavigator);
method public String? getModuleName();
- method public void setModuleName(String? moduleName);
+ method public void setModuleName(String?);
property public final String? moduleName;
}
@@ -24,12 +24,12 @@
method public String? getDataPattern();
method public String? getModuleName();
method public String? getTargetPackage();
- method public void setAction(String? action);
- method public void setActivityClassName(String? activityClassName);
- method public void setData(android.net.Uri? data);
- method public void setDataPattern(String? dataPattern);
- method public void setModuleName(String? moduleName);
- method public void setTargetPackage(String? targetPackage);
+ method public void setAction(String?);
+ method public void setActivityClassName(String?);
+ method public void setData(android.net.Uri?);
+ method public void setDataPattern(String?);
+ method public void setModuleName(String?);
+ method public void setTargetPackage(String?);
property public final String? action;
property public final String? activityClassName;
property public final android.net.Uri? data;
@@ -63,8 +63,8 @@
ctor public DynamicGraphNavigator.DynamicNavGraph(androidx.navigation.dynamicfeatures.DynamicGraphNavigator navGraphNavigator, androidx.navigation.NavigatorProvider navigatorProvider);
method public String? getModuleName();
method public int getProgressDestination();
- method public void setModuleName(String? moduleName);
- method public void setProgressDestination(int progressDestination);
+ method public void setModuleName(String?);
+ method public void setProgressDestination(int);
property public final String? moduleName;
property public final int progressDestination;
}
@@ -78,9 +78,9 @@
method public String? getGraphPackage();
method public String? getGraphResourceName();
method public String? getModuleName();
- method public void setGraphPackage(String? graphPackage);
- method public void setGraphResourceName(String? graphResourceName);
- method public void setModuleName(String? moduleName);
+ method public void setGraphPackage(String?);
+ method public void setGraphResourceName(String?);
+ method public void setModuleName(String?);
property public final String? graphPackage;
property public final String? graphResourceName;
property public final String? moduleName;
@@ -91,7 +91,7 @@
ctor public DynamicIncludeNavGraphBuilder(androidx.navigation.dynamicfeatures.DynamicIncludeGraphNavigator dynamicIncludeGraphNavigator, String route, String moduleName, String graphResourceName);
method public androidx.navigation.dynamicfeatures.DynamicIncludeGraphNavigator.DynamicIncludeNavGraph build();
method public String? getGraphPackage();
- method public void setGraphPackage(String? graphPackage);
+ method public void setGraphPackage(String?);
property public final String? graphPackage;
}
@@ -125,9 +125,9 @@
method public String? getModuleName();
method public int getProgressDestination();
method public String? getProgressDestinationRoute();
- method public void setModuleName(String? moduleName);
- method public void setProgressDestination(int p);
- method public void setProgressDestinationRoute(String? progDestRoute);
+ method public void setModuleName(String?);
+ method public void setProgressDestination(int);
+ method public void setProgressDestinationRoute(String?);
property public final String? moduleName;
property public final int progressDestination;
property public final String? progressDestinationRoute;
diff --git a/navigation/navigation-dynamic-features-runtime/api/restricted_current.ignore b/navigation/navigation-dynamic-features-runtime/api/restricted_current.ignore
new file mode 100644
index 0000000..ae02ffb
--- /dev/null
+++ b/navigation/navigation-dynamic-features-runtime/api/restricted_current.ignore
@@ -0,0 +1,33 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicActivityNavigator.Destination#setModuleName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicActivityNavigator.Destination.setModuleName
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder#setAction(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder.setAction
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder#setActivityClassName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder.setActivityClassName
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder#setData(android.net.Uri) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder.setData
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder#setDataPattern(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder.setDataPattern
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder#setModuleName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder.setModuleName
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder#setTargetPackage(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicActivityNavigatorDestinationBuilder.setTargetPackage
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicGraphNavigator.DynamicNavGraph#setModuleName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicGraphNavigator.DynamicNavGraph.setModuleName
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicGraphNavigator.DynamicNavGraph#setProgressDestination(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicGraphNavigator.DynamicNavGraph.setProgressDestination
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicIncludeGraphNavigator.DynamicIncludeNavGraph#setGraphPackage(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.setGraphPackage
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicIncludeGraphNavigator.DynamicIncludeNavGraph#setGraphResourceName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.setGraphResourceName
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicIncludeGraphNavigator.DynamicIncludeNavGraph#setModuleName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.setModuleName
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicIncludeNavGraphBuilder#setGraphPackage(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicIncludeNavGraphBuilder.setGraphPackage
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicNavGraphBuilder#setModuleName(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicNavGraphBuilder.setModuleName
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicNavGraphBuilder#setProgressDestination(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicNavGraphBuilder.setProgressDestination
+ParameterNameChange: androidx.navigation.dynamicfeatures.DynamicNavGraphBuilder#setProgressDestinationRoute(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.dynamicfeatures.DynamicNavGraphBuilder.setProgressDestinationRoute
diff --git a/navigation/navigation-dynamic-features-runtime/api/restricted_current.txt b/navigation/navigation-dynamic-features-runtime/api/restricted_current.txt
index a79e3b7..e4c37db 100644
--- a/navigation/navigation-dynamic-features-runtime/api/restricted_current.txt
+++ b/navigation/navigation-dynamic-features-runtime/api/restricted_current.txt
@@ -10,7 +10,7 @@
ctor public DynamicActivityNavigator.Destination(androidx.navigation.NavigatorProvider navigatorProvider);
ctor public DynamicActivityNavigator.Destination(androidx.navigation.Navigator<? extends androidx.navigation.ActivityNavigator.Destination> activityNavigator);
method public String? getModuleName();
- method public void setModuleName(String? moduleName);
+ method public void setModuleName(String?);
property public final String? moduleName;
}
@@ -24,12 +24,12 @@
method public String? getDataPattern();
method public String? getModuleName();
method public String? getTargetPackage();
- method public void setAction(String? action);
- method public void setActivityClassName(String? activityClassName);
- method public void setData(android.net.Uri? data);
- method public void setDataPattern(String? dataPattern);
- method public void setModuleName(String? moduleName);
- method public void setTargetPackage(String? targetPackage);
+ method public void setAction(String?);
+ method public void setActivityClassName(String?);
+ method public void setData(android.net.Uri?);
+ method public void setDataPattern(String?);
+ method public void setModuleName(String?);
+ method public void setTargetPackage(String?);
property public final String? action;
property public final String? activityClassName;
property public final android.net.Uri? data;
@@ -63,8 +63,8 @@
ctor public DynamicGraphNavigator.DynamicNavGraph(androidx.navigation.dynamicfeatures.DynamicGraphNavigator navGraphNavigator, androidx.navigation.NavigatorProvider navigatorProvider);
method public String? getModuleName();
method public int getProgressDestination();
- method public void setModuleName(String? moduleName);
- method public void setProgressDestination(int progressDestination);
+ method public void setModuleName(String?);
+ method public void setProgressDestination(int);
property public final String? moduleName;
property public final int progressDestination;
}
@@ -78,9 +78,9 @@
method public String? getGraphPackage();
method public String? getGraphResourceName();
method public String? getModuleName();
- method public void setGraphPackage(String? graphPackage);
- method public void setGraphResourceName(String? graphResourceName);
- method public void setModuleName(String? moduleName);
+ method public void setGraphPackage(String?);
+ method public void setGraphResourceName(String?);
+ method public void setModuleName(String?);
property public final String? graphPackage;
property public final String? graphResourceName;
property public final String? moduleName;
@@ -91,7 +91,7 @@
ctor public DynamicIncludeNavGraphBuilder(androidx.navigation.dynamicfeatures.DynamicIncludeGraphNavigator dynamicIncludeGraphNavigator, String route, String moduleName, String graphResourceName);
method public androidx.navigation.dynamicfeatures.DynamicIncludeGraphNavigator.DynamicIncludeNavGraph build();
method public String? getGraphPackage();
- method public void setGraphPackage(String? graphPackage);
+ method public void setGraphPackage(String?);
property public final String? graphPackage;
}
@@ -125,9 +125,9 @@
method public String? getModuleName();
method public int getProgressDestination();
method public String? getProgressDestinationRoute();
- method public void setModuleName(String? moduleName);
- method public void setProgressDestination(int p);
- method public void setProgressDestinationRoute(String? progDestRoute);
+ method public void setModuleName(String?);
+ method public void setProgressDestination(int);
+ method public void setProgressDestinationRoute(String?);
property public final String? moduleName;
property public final int progressDestination;
property public final String? progressDestinationRoute;
diff --git a/navigation/navigation-runtime/api/current.ignore b/navigation/navigation-runtime/api/current.ignore
new file mode 100644
index 0000000..881cddb
--- /dev/null
+++ b/navigation/navigation-runtime/api/current.ignore
@@ -0,0 +1,13 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.navigation.ActivityNavigatorDestinationBuilder#setAction(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.ActivityNavigatorDestinationBuilder.setAction
+ParameterNameChange: androidx.navigation.ActivityNavigatorDestinationBuilder#setActivityClass(kotlin.reflect.KClass<? extends android.app.Activity>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.ActivityNavigatorDestinationBuilder.setActivityClass
+ParameterNameChange: androidx.navigation.ActivityNavigatorDestinationBuilder#setData(android.net.Uri) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.ActivityNavigatorDestinationBuilder.setData
+ParameterNameChange: androidx.navigation.ActivityNavigatorDestinationBuilder#setDataPattern(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.ActivityNavigatorDestinationBuilder.setDataPattern
+ParameterNameChange: androidx.navigation.ActivityNavigatorDestinationBuilder#setTargetPackage(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.ActivityNavigatorDestinationBuilder.setTargetPackage
+ParameterNameChange: androidx.navigation.NavController#setGraph(androidx.navigation.NavGraph) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavController.setGraph
diff --git a/navigation/navigation-runtime/api/current.txt b/navigation/navigation-runtime/api/current.txt
index 1b18046..7f117bb 100644
--- a/navigation/navigation-runtime/api/current.txt
+++ b/navigation/navigation-runtime/api/current.txt
@@ -67,11 +67,11 @@
method public android.net.Uri? getData();
method public String? getDataPattern();
method public String? getTargetPackage();
- method public void setAction(String? action);
- method public void setActivityClass(kotlin.reflect.KClass<? extends android.app.Activity>? activityClass);
- method public void setData(android.net.Uri? data);
- method public void setDataPattern(String? dataPattern);
- method public void setTargetPackage(String? targetPackage);
+ method public void setAction(String?);
+ method public void setActivityClass(kotlin.reflect.KClass<? extends android.app.Activity>?);
+ method public void setData(android.net.Uri?);
+ method public void setDataPattern(String?);
+ method public void setTargetPackage(String?);
property public final String? action;
property public final kotlin.reflect.KClass<? extends android.app.Activity>? activityClass;
property public final android.net.Uri? data;
@@ -132,7 +132,7 @@
method public void removeOnDestinationChangedListener(androidx.navigation.NavController.OnDestinationChangedListener listener);
method @CallSuper public void restoreState(android.os.Bundle? navState);
method @CallSuper public android.os.Bundle? saveState();
- method @CallSuper @MainThread public void setGraph(androidx.navigation.NavGraph graph);
+ method @CallSuper @MainThread public void setGraph(androidx.navigation.NavGraph);
method @CallSuper @MainThread public void setGraph(@NavigationRes int graphResId);
method @CallSuper @MainThread public void setGraph(@NavigationRes int graphResId, android.os.Bundle? startDestinationArgs);
method @CallSuper @MainThread public void setGraph(androidx.navigation.NavGraph graph, android.os.Bundle? startDestinationArgs);
diff --git a/navigation/navigation-runtime/api/public_plus_experimental_current.txt b/navigation/navigation-runtime/api/public_plus_experimental_current.txt
index 37ed933..70ea8db 100644
--- a/navigation/navigation-runtime/api/public_plus_experimental_current.txt
+++ b/navigation/navigation-runtime/api/public_plus_experimental_current.txt
@@ -67,11 +67,11 @@
method public android.net.Uri? getData();
method public String? getDataPattern();
method public String? getTargetPackage();
- method public void setAction(String? action);
- method public void setActivityClass(kotlin.reflect.KClass<? extends android.app.Activity>? activityClass);
- method public void setData(android.net.Uri? data);
- method public void setDataPattern(String? dataPattern);
- method public void setTargetPackage(String? targetPackage);
+ method public void setAction(String?);
+ method public void setActivityClass(kotlin.reflect.KClass<? extends android.app.Activity>?);
+ method public void setData(android.net.Uri?);
+ method public void setDataPattern(String?);
+ method public void setTargetPackage(String?);
property public final String? action;
property public final kotlin.reflect.KClass<? extends android.app.Activity>? activityClass;
property public final android.net.Uri? data;
@@ -133,7 +133,7 @@
method public void removeOnDestinationChangedListener(androidx.navigation.NavController.OnDestinationChangedListener listener);
method @CallSuper public void restoreState(android.os.Bundle? navState);
method @CallSuper public android.os.Bundle? saveState();
- method @CallSuper @MainThread public void setGraph(androidx.navigation.NavGraph graph);
+ method @CallSuper @MainThread public void setGraph(androidx.navigation.NavGraph);
method @CallSuper @MainThread public void setGraph(@NavigationRes int graphResId);
method @CallSuper @MainThread public void setGraph(@NavigationRes int graphResId, android.os.Bundle? startDestinationArgs);
method @CallSuper @MainThread public void setGraph(androidx.navigation.NavGraph graph, android.os.Bundle? startDestinationArgs);
diff --git a/navigation/navigation-runtime/api/restricted_current.ignore b/navigation/navigation-runtime/api/restricted_current.ignore
new file mode 100644
index 0000000..881cddb
--- /dev/null
+++ b/navigation/navigation-runtime/api/restricted_current.ignore
@@ -0,0 +1,13 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.navigation.ActivityNavigatorDestinationBuilder#setAction(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.ActivityNavigatorDestinationBuilder.setAction
+ParameterNameChange: androidx.navigation.ActivityNavigatorDestinationBuilder#setActivityClass(kotlin.reflect.KClass<? extends android.app.Activity>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.ActivityNavigatorDestinationBuilder.setActivityClass
+ParameterNameChange: androidx.navigation.ActivityNavigatorDestinationBuilder#setData(android.net.Uri) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.ActivityNavigatorDestinationBuilder.setData
+ParameterNameChange: androidx.navigation.ActivityNavigatorDestinationBuilder#setDataPattern(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.ActivityNavigatorDestinationBuilder.setDataPattern
+ParameterNameChange: androidx.navigation.ActivityNavigatorDestinationBuilder#setTargetPackage(String) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.ActivityNavigatorDestinationBuilder.setTargetPackage
+ParameterNameChange: androidx.navigation.NavController#setGraph(androidx.navigation.NavGraph) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.navigation.NavController.setGraph
diff --git a/navigation/navigation-runtime/api/restricted_current.txt b/navigation/navigation-runtime/api/restricted_current.txt
index 1b18046..7f117bb 100644
--- a/navigation/navigation-runtime/api/restricted_current.txt
+++ b/navigation/navigation-runtime/api/restricted_current.txt
@@ -67,11 +67,11 @@
method public android.net.Uri? getData();
method public String? getDataPattern();
method public String? getTargetPackage();
- method public void setAction(String? action);
- method public void setActivityClass(kotlin.reflect.KClass<? extends android.app.Activity>? activityClass);
- method public void setData(android.net.Uri? data);
- method public void setDataPattern(String? dataPattern);
- method public void setTargetPackage(String? targetPackage);
+ method public void setAction(String?);
+ method public void setActivityClass(kotlin.reflect.KClass<? extends android.app.Activity>?);
+ method public void setData(android.net.Uri?);
+ method public void setDataPattern(String?);
+ method public void setTargetPackage(String?);
property public final String? action;
property public final kotlin.reflect.KClass<? extends android.app.Activity>? activityClass;
property public final android.net.Uri? data;
@@ -132,7 +132,7 @@
method public void removeOnDestinationChangedListener(androidx.navigation.NavController.OnDestinationChangedListener listener);
method @CallSuper public void restoreState(android.os.Bundle? navState);
method @CallSuper public android.os.Bundle? saveState();
- method @CallSuper @MainThread public void setGraph(androidx.navigation.NavGraph graph);
+ method @CallSuper @MainThread public void setGraph(androidx.navigation.NavGraph);
method @CallSuper @MainThread public void setGraph(@NavigationRes int graphResId);
method @CallSuper @MainThread public void setGraph(@NavigationRes int graphResId, android.os.Bundle? startDestinationArgs);
method @CallSuper @MainThread public void setGraph(androidx.navigation.NavGraph graph, android.os.Bundle? startDestinationArgs);
diff --git a/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/room/CustomerViewModel.java b/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/room/CustomerViewModel.java
index 5443931..1fe8c8a 100644
--- a/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/room/CustomerViewModel.java
+++ b/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/room/CustomerViewModel.java
@@ -48,8 +48,10 @@
@SuppressLint("RestrictedApi")
private void createDb() {
- mDatabase = Room.databaseBuilder(this.getApplication(),
- SampleDatabase.class, "customerDatabase").build();
+ mDatabase = Room.databaseBuilder(this.getApplication(), SampleDatabase.class,
+ "customerDatabase")
+ .fallbackToDestructiveMigration()
+ .build();
ArchTaskExecutor.getInstance().executeOnDiskIO(() -> {
// fill with some simple data
diff --git a/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/room/RemoteKey.kt b/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/room/RemoteKey.kt
new file mode 100644
index 0000000..e593fab
--- /dev/null
+++ b/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/room/RemoteKey.kt
@@ -0,0 +1,28 @@
+/*
+ * 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.paging.integration.testapp.room
+
+import androidx.room.Entity
+import androidx.room.PrimaryKey
+
+/**
+ * Sample entity to persist remote key for use in RemoteMediator.
+ */
+@Entity(tableName = "remote_key")
+class RemoteKey(val prevKey: Int, val nextKey: Int) {
+ @PrimaryKey
+ var id = 0
+}
diff --git a/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/room/RemoteKeyDao.kt b/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/room/RemoteKeyDao.kt
new file mode 100644
index 0000000..1b46925
--- /dev/null
+++ b/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/room/RemoteKeyDao.kt
@@ -0,0 +1,47 @@
+/*
+ * 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.paging.integration.testapp.room
+
+import androidx.room.Dao
+import androidx.room.Insert
+import androidx.room.OnConflictStrategy.Companion.REPLACE
+import androidx.room.Query
+
+/**
+ * Simple Customer DAO for Room Customer list sample.
+ */
+@Dao
+interface RemoteKeyDao {
+ /**
+ * Insert a RemoteKey
+ *
+ * @param remoteKey
+ */
+ @Insert(onConflict = REPLACE)
+ suspend fun insert(remoteKey: RemoteKey)
+
+ /**
+ * Clears the RemoteKey
+ */
+ @Query("DELETE FROM remote_key")
+ fun delete()
+
+ /**
+ * @return Latest persisted RemoteKey
+ */
+ @Query("SELECT * FROM remote_key LIMIT 1")
+ suspend fun queryRemoteKey(): RemoteKey?
+}
diff --git a/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/room/SampleDatabase.java b/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/room/SampleDatabase.java
index 7dac100..1686443 100644
--- a/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/room/SampleDatabase.java
+++ b/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/room/SampleDatabase.java
@@ -16,16 +16,24 @@
package androidx.paging.integration.testapp.room;
+import androidx.annotation.NonNull;
import androidx.room.Database;
import androidx.room.RoomDatabase;
/**
* Sample database of customers.
*/
-@Database(entities = {Customer.class}, version = 1, exportSchema = false)
+@Database(entities = {Customer.class, RemoteKey.class}, version = 1, exportSchema = false)
public abstract class SampleDatabase extends RoomDatabase {
/**
* @return customer dao.
*/
+ @NonNull
public abstract CustomerDao getCustomerDao();
+
+ /**
+ * @return RemoteKeyDao
+ */
+ @NonNull
+ public abstract RemoteKeyDao getRemoteKeyDao();
}
diff --git a/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/v3room/V3RemoteMediator.kt b/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/v3room/V3RemoteMediator.kt
index fa3204e..490e234 100644
--- a/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/v3room/V3RemoteMediator.kt
+++ b/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/v3room/V3RemoteMediator.kt
@@ -22,6 +22,7 @@
import androidx.paging.PagingState
import androidx.paging.RemoteMediator
import androidx.paging.integration.testapp.room.Customer
+import androidx.paging.integration.testapp.room.RemoteKey
import androidx.paging.integration.testapp.room.SampleDatabase
import androidx.room.withTransaction
import kotlinx.coroutines.Dispatchers
@@ -49,6 +50,13 @@
return MediatorResult.Success(endOfPaginationReached = true)
}
+ // Fetch latest remote key from db. We cannot rely on PagingState because the
+ // invalidate + load loop in paging may race with the actual load + insert happening in
+ // RemoteMediator.
+ val remoteKey = withContext(Dispatchers.IO) {
+ database.remoteKeyDao.queryRemoteKey() ?: RemoteKey(-1, 0)
+ }
+
// TODO: Move this to be a more fully featured sample which demonstrated key translation
// between two types of PagingSources where the keys do not map 1:1.
val loadParams = when (loadType) {
@@ -59,7 +67,7 @@
)
LoadType.PREPEND -> throw IllegalStateException()
LoadType.APPEND -> PagingSource.LoadParams.Append(
- key = state.pages.lastOrNull()?.nextKey ?: 0,
+ key = remoteKey.nextKey,
loadSize = 10,
placeholdersEnabled = false
)
@@ -70,9 +78,13 @@
withContext(Dispatchers.IO) {
database.withTransaction {
if (loadType == LoadType.REFRESH) {
+ database.remoteKeyDao.delete()
database.customerDao.removeAll()
}
+ database.remoteKeyDao.insert(
+ RemoteKey(remoteKey.prevKey, remoteKey.nextKey + result.data.size)
+ )
database.customerDao.insertAll(result.data.toTypedArray())
}
}
diff --git a/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/v3room/V3RoomViewModel.kt b/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/v3room/V3RoomViewModel.kt
index 9a3718d..5c202ee 100644
--- a/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/v3room/V3RoomViewModel.kt
+++ b/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/v3room/V3RoomViewModel.kt
@@ -31,8 +31,8 @@
import androidx.paging.integration.testapp.room.Customer
import androidx.paging.integration.testapp.room.SampleDatabase
import androidx.room.Room
-import kotlinx.coroutines.flow.map
import java.util.UUID
+import kotlinx.coroutines.flow.map
class V3RoomViewModel(application: Application) : AndroidViewModel(application) {
val database = Room.databaseBuilder(
@@ -56,8 +56,12 @@
@SuppressLint("RestrictedApi")
internal fun clearAllCustomers() {
- ArchTaskExecutor.getInstance()
- .executeOnDiskIO { database.customerDao.removeAll() }
+ ArchTaskExecutor.getInstance().executeOnDiskIO {
+ database.runInTransaction {
+ database.remoteKeyDao.delete()
+ database.customerDao.removeAll()
+ }
+ }
}
@OptIn(ExperimentalPagingApi::class)
diff --git a/paging/paging-common/api/current.ignore b/paging/paging-common/api/current.ignore
index 8598937..1a78963 100644
--- a/paging/paging-common/api/current.ignore
+++ b/paging/paging-common/api/current.ignore
@@ -1,4 +1,8 @@
// Baseline format: 1.0
+ParameterNameChange: androidx.paging.PagingSource#load(androidx.paging.PagingSource.LoadParams<Key>, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.paging.PagingSource.load
+
+
RemovedClass: androidx.paging.CancelableChannelFlowKt:
Removed class androidx.paging.CancelableChannelFlowKt
RemovedClass: androidx.paging.FlowExtKt:
diff --git a/paging/paging-common/api/current.txt b/paging/paging-common/api/current.txt
index fb4ec53..59a0774 100644
--- a/paging/paging-common/api/current.txt
+++ b/paging/paging-common/api/current.txt
@@ -88,7 +88,7 @@
}
public final class ItemSnapshotList<T> extends kotlin.collections.AbstractList<T> {
- ctor public ItemSnapshotList(@IntRange(from=0) int placeholdersBefore, @IntRange(from=0) int placeholdersAfter, java.util.List<? extends T> items);
+ ctor public ItemSnapshotList(@IntRange(from=0L) int placeholdersBefore, @IntRange(from=0L) int placeholdersAfter, java.util.List<? extends T> items);
method public T? get(int index);
method public java.util.List<T> getItems();
method public int getPlaceholdersAfter();
@@ -244,10 +244,10 @@
ctor @Deprecated public PagedList.Config.Builder();
method @Deprecated public androidx.paging.PagedList.Config build();
method @Deprecated public androidx.paging.PagedList.Config.Builder setEnablePlaceholders(boolean enablePlaceholders);
- method @Deprecated public androidx.paging.PagedList.Config.Builder setInitialLoadSizeHint(@IntRange(from=1) int initialLoadSizeHint);
- method @Deprecated public androidx.paging.PagedList.Config.Builder setMaxSize(@IntRange(from=2) int maxSize);
- method @Deprecated public androidx.paging.PagedList.Config.Builder setPageSize(@IntRange(from=1) int pageSize);
- method @Deprecated public androidx.paging.PagedList.Config.Builder setPrefetchDistance(@IntRange(from=0) int prefetchDistance);
+ method @Deprecated public androidx.paging.PagedList.Config.Builder setInitialLoadSizeHint(@IntRange(from=1L) int initialLoadSizeHint);
+ method @Deprecated public androidx.paging.PagedList.Config.Builder setMaxSize(@IntRange(from=2L) int maxSize);
+ method @Deprecated public androidx.paging.PagedList.Config.Builder setPageSize(@IntRange(from=1L) int pageSize);
+ method @Deprecated public androidx.paging.PagedList.Config.Builder setPrefetchDistance(@IntRange(from=0L) int prefetchDistance);
}
public final class PagedListConfigKt {
@@ -266,11 +266,11 @@
}
public final class PagingConfig {
- ctor public PagingConfig(int pageSize, optional @IntRange(from=0) int prefetchDistance, optional boolean enablePlaceholders, optional @IntRange(from=1) int initialLoadSize, optional @IntRange(from=2) int maxSize, optional int jumpThreshold);
- ctor public PagingConfig(int pageSize, optional @IntRange(from=0) int prefetchDistance, optional boolean enablePlaceholders, optional @IntRange(from=1) int initialLoadSize, optional @IntRange(from=2) int maxSize);
- ctor public PagingConfig(int pageSize, optional @IntRange(from=0) int prefetchDistance, optional boolean enablePlaceholders, optional @IntRange(from=1) int initialLoadSize);
- ctor public PagingConfig(int pageSize, optional @IntRange(from=0) int prefetchDistance, optional boolean enablePlaceholders);
- ctor public PagingConfig(int pageSize, optional @IntRange(from=0) int prefetchDistance);
+ ctor public PagingConfig(int pageSize, optional @IntRange(from=0L) int prefetchDistance, optional boolean enablePlaceholders, optional @IntRange(from=1L) int initialLoadSize, optional @IntRange(from=2L) int maxSize, optional int jumpThreshold);
+ ctor public PagingConfig(int pageSize, optional @IntRange(from=0L) int prefetchDistance, optional boolean enablePlaceholders, optional @IntRange(from=1L) int initialLoadSize, optional @IntRange(from=2L) int maxSize);
+ ctor public PagingConfig(int pageSize, optional @IntRange(from=0L) int prefetchDistance, optional boolean enablePlaceholders, optional @IntRange(from=1L) int initialLoadSize);
+ ctor public PagingConfig(int pageSize, optional @IntRange(from=0L) int prefetchDistance, optional boolean enablePlaceholders);
+ ctor public PagingConfig(int pageSize, optional @IntRange(from=0L) int prefetchDistance);
ctor public PagingConfig(int pageSize);
field public static final androidx.paging.PagingConfig.Companion Companion;
field public static final int MAX_SIZE_UNBOUNDED = 2147483647; // 0x7fffffff
@@ -327,7 +327,7 @@
method public boolean getKeyReuseSupported();
method public abstract Key? getRefreshKey(androidx.paging.PagingState<Key,Value> state);
method public final void invalidate();
- method public abstract suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>> p);
+ method public abstract suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>);
method public final void registerInvalidatedCallback(kotlin.jvm.functions.Function0<kotlin.Unit> onInvalidatedCallback);
method public final void unregisterInvalidatedCallback(kotlin.jvm.functions.Function0<kotlin.Unit> onInvalidatedCallback);
property public final boolean invalid;
@@ -407,7 +407,7 @@
}
public final class PagingState<Key, Value> {
- ctor public PagingState(java.util.List<androidx.paging.PagingSource.LoadResult.Page<Key,Value>> pages, Integer? anchorPosition, androidx.paging.PagingConfig config, @IntRange(from=0) int leadingPlaceholderCount);
+ ctor public PagingState(java.util.List<androidx.paging.PagingSource.LoadResult.Page<Key,Value>> pages, Integer? anchorPosition, androidx.paging.PagingConfig config, @IntRange(from=0L) int leadingPlaceholderCount);
method public Value? closestItemToPosition(int anchorPosition);
method public androidx.paging.PagingSource.LoadResult.Page<Key,Value>? closestPageToPosition(int anchorPosition);
method public Value? firstItemOrNull();
diff --git a/paging/paging-common/api/public_plus_experimental_current.txt b/paging/paging-common/api/public_plus_experimental_current.txt
index d95a8a5..81f4cd84 100644
--- a/paging/paging-common/api/public_plus_experimental_current.txt
+++ b/paging/paging-common/api/public_plus_experimental_current.txt
@@ -91,7 +91,7 @@
}
public final class ItemSnapshotList<T> extends kotlin.collections.AbstractList<T> {
- ctor public ItemSnapshotList(@IntRange(from=0) int placeholdersBefore, @IntRange(from=0) int placeholdersAfter, java.util.List<? extends T> items);
+ ctor public ItemSnapshotList(@IntRange(from=0L) int placeholdersBefore, @IntRange(from=0L) int placeholdersAfter, java.util.List<? extends T> items);
method public T? get(int index);
method public java.util.List<T> getItems();
method public int getPlaceholdersAfter();
@@ -247,10 +247,10 @@
ctor @Deprecated public PagedList.Config.Builder();
method @Deprecated public androidx.paging.PagedList.Config build();
method @Deprecated public androidx.paging.PagedList.Config.Builder setEnablePlaceholders(boolean enablePlaceholders);
- method @Deprecated public androidx.paging.PagedList.Config.Builder setInitialLoadSizeHint(@IntRange(from=1) int initialLoadSizeHint);
- method @Deprecated public androidx.paging.PagedList.Config.Builder setMaxSize(@IntRange(from=2) int maxSize);
- method @Deprecated public androidx.paging.PagedList.Config.Builder setPageSize(@IntRange(from=1) int pageSize);
- method @Deprecated public androidx.paging.PagedList.Config.Builder setPrefetchDistance(@IntRange(from=0) int prefetchDistance);
+ method @Deprecated public androidx.paging.PagedList.Config.Builder setInitialLoadSizeHint(@IntRange(from=1L) int initialLoadSizeHint);
+ method @Deprecated public androidx.paging.PagedList.Config.Builder setMaxSize(@IntRange(from=2L) int maxSize);
+ method @Deprecated public androidx.paging.PagedList.Config.Builder setPageSize(@IntRange(from=1L) int pageSize);
+ method @Deprecated public androidx.paging.PagedList.Config.Builder setPrefetchDistance(@IntRange(from=0L) int prefetchDistance);
}
public final class PagedListConfigKt {
@@ -270,11 +270,11 @@
}
public final class PagingConfig {
- ctor public PagingConfig(int pageSize, optional @IntRange(from=0) int prefetchDistance, optional boolean enablePlaceholders, optional @IntRange(from=1) int initialLoadSize, optional @IntRange(from=2) int maxSize, optional int jumpThreshold);
- ctor public PagingConfig(int pageSize, optional @IntRange(from=0) int prefetchDistance, optional boolean enablePlaceholders, optional @IntRange(from=1) int initialLoadSize, optional @IntRange(from=2) int maxSize);
- ctor public PagingConfig(int pageSize, optional @IntRange(from=0) int prefetchDistance, optional boolean enablePlaceholders, optional @IntRange(from=1) int initialLoadSize);
- ctor public PagingConfig(int pageSize, optional @IntRange(from=0) int prefetchDistance, optional boolean enablePlaceholders);
- ctor public PagingConfig(int pageSize, optional @IntRange(from=0) int prefetchDistance);
+ ctor public PagingConfig(int pageSize, optional @IntRange(from=0L) int prefetchDistance, optional boolean enablePlaceholders, optional @IntRange(from=1L) int initialLoadSize, optional @IntRange(from=2L) int maxSize, optional int jumpThreshold);
+ ctor public PagingConfig(int pageSize, optional @IntRange(from=0L) int prefetchDistance, optional boolean enablePlaceholders, optional @IntRange(from=1L) int initialLoadSize, optional @IntRange(from=2L) int maxSize);
+ ctor public PagingConfig(int pageSize, optional @IntRange(from=0L) int prefetchDistance, optional boolean enablePlaceholders, optional @IntRange(from=1L) int initialLoadSize);
+ ctor public PagingConfig(int pageSize, optional @IntRange(from=0L) int prefetchDistance, optional boolean enablePlaceholders);
+ ctor public PagingConfig(int pageSize, optional @IntRange(from=0L) int prefetchDistance);
ctor public PagingConfig(int pageSize);
field public static final androidx.paging.PagingConfig.Companion Companion;
field public static final int MAX_SIZE_UNBOUNDED = 2147483647; // 0x7fffffff
@@ -331,7 +331,7 @@
method public boolean getKeyReuseSupported();
method public abstract Key? getRefreshKey(androidx.paging.PagingState<Key,Value> state);
method public final void invalidate();
- method public abstract suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>> p);
+ method public abstract suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>);
method public final void registerInvalidatedCallback(kotlin.jvm.functions.Function0<kotlin.Unit> onInvalidatedCallback);
method public final void unregisterInvalidatedCallback(kotlin.jvm.functions.Function0<kotlin.Unit> onInvalidatedCallback);
property public final boolean invalid;
@@ -411,7 +411,7 @@
}
public final class PagingState<Key, Value> {
- ctor public PagingState(java.util.List<androidx.paging.PagingSource.LoadResult.Page<Key,Value>> pages, Integer? anchorPosition, androidx.paging.PagingConfig config, @IntRange(from=0) int leadingPlaceholderCount);
+ ctor public PagingState(java.util.List<androidx.paging.PagingSource.LoadResult.Page<Key,Value>> pages, Integer? anchorPosition, androidx.paging.PagingConfig config, @IntRange(from=0L) int leadingPlaceholderCount);
method public Value? closestItemToPosition(int anchorPosition);
method public androidx.paging.PagingSource.LoadResult.Page<Key,Value>? closestPageToPosition(int anchorPosition);
method public Value? firstItemOrNull();
@@ -464,8 +464,8 @@
@androidx.paging.ExperimentalPagingApi public abstract class RemoteMediator<Key, Value> {
ctor public RemoteMediator();
- method public suspend Object? initialize(kotlin.coroutines.Continuation<? super androidx.paging.RemoteMediator.InitializeAction> p);
- method public abstract suspend Object? load(androidx.paging.LoadType loadType, androidx.paging.PagingState<Key,Value> state, kotlin.coroutines.Continuation<? super androidx.paging.RemoteMediator.MediatorResult> p);
+ method public suspend Object? initialize(kotlin.coroutines.Continuation<? super androidx.paging.RemoteMediator.InitializeAction>);
+ method public abstract suspend Object? load(androidx.paging.LoadType loadType, androidx.paging.PagingState<Key,Value> state, kotlin.coroutines.Continuation<? super androidx.paging.RemoteMediator.MediatorResult>);
}
public enum RemoteMediator.InitializeAction {
diff --git a/paging/paging-common/api/restricted_current.ignore b/paging/paging-common/api/restricted_current.ignore
index 8598937..1a78963 100644
--- a/paging/paging-common/api/restricted_current.ignore
+++ b/paging/paging-common/api/restricted_current.ignore
@@ -1,4 +1,8 @@
// Baseline format: 1.0
+ParameterNameChange: androidx.paging.PagingSource#load(androidx.paging.PagingSource.LoadParams<Key>, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.paging.PagingSource.load
+
+
RemovedClass: androidx.paging.CancelableChannelFlowKt:
Removed class androidx.paging.CancelableChannelFlowKt
RemovedClass: androidx.paging.FlowExtKt:
diff --git a/paging/paging-common/api/restricted_current.txt b/paging/paging-common/api/restricted_current.txt
index fb4ec53..59a0774 100644
--- a/paging/paging-common/api/restricted_current.txt
+++ b/paging/paging-common/api/restricted_current.txt
@@ -88,7 +88,7 @@
}
public final class ItemSnapshotList<T> extends kotlin.collections.AbstractList<T> {
- ctor public ItemSnapshotList(@IntRange(from=0) int placeholdersBefore, @IntRange(from=0) int placeholdersAfter, java.util.List<? extends T> items);
+ ctor public ItemSnapshotList(@IntRange(from=0L) int placeholdersBefore, @IntRange(from=0L) int placeholdersAfter, java.util.List<? extends T> items);
method public T? get(int index);
method public java.util.List<T> getItems();
method public int getPlaceholdersAfter();
@@ -244,10 +244,10 @@
ctor @Deprecated public PagedList.Config.Builder();
method @Deprecated public androidx.paging.PagedList.Config build();
method @Deprecated public androidx.paging.PagedList.Config.Builder setEnablePlaceholders(boolean enablePlaceholders);
- method @Deprecated public androidx.paging.PagedList.Config.Builder setInitialLoadSizeHint(@IntRange(from=1) int initialLoadSizeHint);
- method @Deprecated public androidx.paging.PagedList.Config.Builder setMaxSize(@IntRange(from=2) int maxSize);
- method @Deprecated public androidx.paging.PagedList.Config.Builder setPageSize(@IntRange(from=1) int pageSize);
- method @Deprecated public androidx.paging.PagedList.Config.Builder setPrefetchDistance(@IntRange(from=0) int prefetchDistance);
+ method @Deprecated public androidx.paging.PagedList.Config.Builder setInitialLoadSizeHint(@IntRange(from=1L) int initialLoadSizeHint);
+ method @Deprecated public androidx.paging.PagedList.Config.Builder setMaxSize(@IntRange(from=2L) int maxSize);
+ method @Deprecated public androidx.paging.PagedList.Config.Builder setPageSize(@IntRange(from=1L) int pageSize);
+ method @Deprecated public androidx.paging.PagedList.Config.Builder setPrefetchDistance(@IntRange(from=0L) int prefetchDistance);
}
public final class PagedListConfigKt {
@@ -266,11 +266,11 @@
}
public final class PagingConfig {
- ctor public PagingConfig(int pageSize, optional @IntRange(from=0) int prefetchDistance, optional boolean enablePlaceholders, optional @IntRange(from=1) int initialLoadSize, optional @IntRange(from=2) int maxSize, optional int jumpThreshold);
- ctor public PagingConfig(int pageSize, optional @IntRange(from=0) int prefetchDistance, optional boolean enablePlaceholders, optional @IntRange(from=1) int initialLoadSize, optional @IntRange(from=2) int maxSize);
- ctor public PagingConfig(int pageSize, optional @IntRange(from=0) int prefetchDistance, optional boolean enablePlaceholders, optional @IntRange(from=1) int initialLoadSize);
- ctor public PagingConfig(int pageSize, optional @IntRange(from=0) int prefetchDistance, optional boolean enablePlaceholders);
- ctor public PagingConfig(int pageSize, optional @IntRange(from=0) int prefetchDistance);
+ ctor public PagingConfig(int pageSize, optional @IntRange(from=0L) int prefetchDistance, optional boolean enablePlaceholders, optional @IntRange(from=1L) int initialLoadSize, optional @IntRange(from=2L) int maxSize, optional int jumpThreshold);
+ ctor public PagingConfig(int pageSize, optional @IntRange(from=0L) int prefetchDistance, optional boolean enablePlaceholders, optional @IntRange(from=1L) int initialLoadSize, optional @IntRange(from=2L) int maxSize);
+ ctor public PagingConfig(int pageSize, optional @IntRange(from=0L) int prefetchDistance, optional boolean enablePlaceholders, optional @IntRange(from=1L) int initialLoadSize);
+ ctor public PagingConfig(int pageSize, optional @IntRange(from=0L) int prefetchDistance, optional boolean enablePlaceholders);
+ ctor public PagingConfig(int pageSize, optional @IntRange(from=0L) int prefetchDistance);
ctor public PagingConfig(int pageSize);
field public static final androidx.paging.PagingConfig.Companion Companion;
field public static final int MAX_SIZE_UNBOUNDED = 2147483647; // 0x7fffffff
@@ -327,7 +327,7 @@
method public boolean getKeyReuseSupported();
method public abstract Key? getRefreshKey(androidx.paging.PagingState<Key,Value> state);
method public final void invalidate();
- method public abstract suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>> p);
+ method public abstract suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>);
method public final void registerInvalidatedCallback(kotlin.jvm.functions.Function0<kotlin.Unit> onInvalidatedCallback);
method public final void unregisterInvalidatedCallback(kotlin.jvm.functions.Function0<kotlin.Unit> onInvalidatedCallback);
property public final boolean invalid;
@@ -407,7 +407,7 @@
}
public final class PagingState<Key, Value> {
- ctor public PagingState(java.util.List<androidx.paging.PagingSource.LoadResult.Page<Key,Value>> pages, Integer? anchorPosition, androidx.paging.PagingConfig config, @IntRange(from=0) int leadingPlaceholderCount);
+ ctor public PagingState(java.util.List<androidx.paging.PagingSource.LoadResult.Page<Key,Value>> pages, Integer? anchorPosition, androidx.paging.PagingConfig config, @IntRange(from=0L) int leadingPlaceholderCount);
method public Value? closestItemToPosition(int anchorPosition);
method public androidx.paging.PagingSource.LoadResult.Page<Key,Value>? closestPageToPosition(int anchorPosition);
method public Value? firstItemOrNull();
diff --git a/paging/paging-guava/api/current.ignore b/paging/paging-guava/api/current.ignore
new file mode 100644
index 0000000..676a5c9
--- /dev/null
+++ b/paging/paging-guava/api/current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.paging.ListenableFuturePagingSource#load(androidx.paging.PagingSource.LoadParams<Key>, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.paging.ListenableFuturePagingSource.load
diff --git a/paging/paging-guava/api/current.txt b/paging/paging-guava/api/current.txt
index 0bb9b7a..f5fb08d 100644
--- a/paging/paging-guava/api/current.txt
+++ b/paging/paging-guava/api/current.txt
@@ -14,7 +14,7 @@
public abstract class ListenableFuturePagingSource<Key, Value> extends androidx.paging.PagingSource<Key,Value> {
ctor public ListenableFuturePagingSource();
- method public suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>> p);
+ method public suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>);
method public abstract com.google.common.util.concurrent.ListenableFuture<androidx.paging.PagingSource.LoadResult<Key,Value>> loadFuture(androidx.paging.PagingSource.LoadParams<Key> params);
}
diff --git a/paging/paging-guava/api/public_plus_experimental_current.txt b/paging/paging-guava/api/public_plus_experimental_current.txt
index 381ebbb4..7a925fd 100644
--- a/paging/paging-guava/api/public_plus_experimental_current.txt
+++ b/paging/paging-guava/api/public_plus_experimental_current.txt
@@ -14,15 +14,15 @@
public abstract class ListenableFuturePagingSource<Key, Value> extends androidx.paging.PagingSource<Key,Value> {
ctor public ListenableFuturePagingSource();
- method public suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>> p);
+ method public suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>);
method public abstract com.google.common.util.concurrent.ListenableFuture<androidx.paging.PagingSource.LoadResult<Key,Value>> loadFuture(androidx.paging.PagingSource.LoadParams<Key> params);
}
@androidx.paging.ExperimentalPagingApi public abstract class ListenableFutureRemoteMediator<Key, Value> extends androidx.paging.RemoteMediator<Key,Value> {
ctor public ListenableFutureRemoteMediator();
- method public final suspend Object? initialize(kotlin.coroutines.Continuation<? super androidx.paging.RemoteMediator.InitializeAction> p);
+ method public final suspend Object? initialize(kotlin.coroutines.Continuation<? super androidx.paging.RemoteMediator.InitializeAction>);
method public com.google.common.util.concurrent.ListenableFuture<androidx.paging.RemoteMediator.InitializeAction> initializeFuture();
- method public final suspend Object? load(androidx.paging.LoadType loadType, androidx.paging.PagingState<Key,Value> state, kotlin.coroutines.Continuation<? super androidx.paging.RemoteMediator.MediatorResult> p);
+ method public final suspend Object? load(androidx.paging.LoadType loadType, androidx.paging.PagingState<Key,Value> state, kotlin.coroutines.Continuation<? super androidx.paging.RemoteMediator.MediatorResult>);
method public abstract com.google.common.util.concurrent.ListenableFuture<androidx.paging.RemoteMediator.MediatorResult> loadFuture(androidx.paging.LoadType loadType, androidx.paging.PagingState<Key,Value> state);
}
diff --git a/paging/paging-guava/api/restricted_current.ignore b/paging/paging-guava/api/restricted_current.ignore
new file mode 100644
index 0000000..676a5c9
--- /dev/null
+++ b/paging/paging-guava/api/restricted_current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.paging.ListenableFuturePagingSource#load(androidx.paging.PagingSource.LoadParams<Key>, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.paging.ListenableFuturePagingSource.load
diff --git a/paging/paging-guava/api/restricted_current.txt b/paging/paging-guava/api/restricted_current.txt
index 0bb9b7a..f5fb08d 100644
--- a/paging/paging-guava/api/restricted_current.txt
+++ b/paging/paging-guava/api/restricted_current.txt
@@ -14,7 +14,7 @@
public abstract class ListenableFuturePagingSource<Key, Value> extends androidx.paging.PagingSource<Key,Value> {
ctor public ListenableFuturePagingSource();
- method public suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>> p);
+ method public suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>);
method public abstract com.google.common.util.concurrent.ListenableFuture<androidx.paging.PagingSource.LoadResult<Key,Value>> loadFuture(androidx.paging.PagingSource.LoadParams<Key> params);
}
diff --git a/paging/paging-runtime/api/current.ignore b/paging/paging-runtime/api/current.ignore
new file mode 100644
index 0000000..41c88d3
--- /dev/null
+++ b/paging/paging-runtime/api/current.ignore
@@ -0,0 +1,7 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.paging.AsyncPagingDataDiffer#submitData(androidx.paging.PagingData<T>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.paging.AsyncPagingDataDiffer.submitData
+ParameterNameChange: androidx.paging.LoadStateAdapter#setLoadState(androidx.paging.LoadState) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.paging.LoadStateAdapter.setLoadState
+ParameterNameChange: androidx.paging.PagingDataAdapter#submitData(androidx.paging.PagingData<T>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.paging.PagingDataAdapter.submitData
diff --git a/paging/paging-runtime/api/current.txt b/paging/paging-runtime/api/current.txt
index 4fcb026..9d1b058 100644
--- a/paging/paging-runtime/api/current.txt
+++ b/paging/paging-runtime/api/current.txt
@@ -29,17 +29,17 @@
ctor public AsyncPagingDataDiffer(androidx.recyclerview.widget.DiffUtil.ItemCallback<T> diffCallback, androidx.recyclerview.widget.ListUpdateCallback updateCallback);
method public void addLoadStateListener(kotlin.jvm.functions.Function1<? super androidx.paging.CombinedLoadStates,kotlin.Unit> listener);
method public void addOnPagesUpdatedListener(kotlin.jvm.functions.Function0<kotlin.Unit> listener);
- method public T? getItem(@IntRange(from=0) int index);
+ method public T? getItem(@IntRange(from=0L) int index);
method public int getItemCount();
method public kotlinx.coroutines.flow.Flow<androidx.paging.CombinedLoadStates> getLoadStateFlow();
method public kotlinx.coroutines.flow.Flow<kotlin.Unit> getOnPagesUpdatedFlow();
- method public T? peek(@IntRange(from=0) int index);
+ method public T? peek(@IntRange(from=0L) int index);
method public void refresh();
method public void removeLoadStateListener(kotlin.jvm.functions.Function1<? super androidx.paging.CombinedLoadStates,kotlin.Unit> listener);
method public void removeOnPagesUpdatedListener(kotlin.jvm.functions.Function0<kotlin.Unit> listener);
method public void retry();
method public androidx.paging.ItemSnapshotList<T> snapshot();
- method public suspend Object? submitData(androidx.paging.PagingData<T> pagingData, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? submitData(androidx.paging.PagingData<T> pagingData, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public void submitData(androidx.lifecycle.Lifecycle lifecycle, androidx.paging.PagingData<T> pagingData);
property public final int itemCount;
property public final kotlinx.coroutines.flow.Flow<androidx.paging.CombinedLoadStates> loadStateFlow;
@@ -76,7 +76,7 @@
method public abstract void onBindViewHolder(VH holder, androidx.paging.LoadState loadState);
method public final VH onCreateViewHolder(android.view.ViewGroup parent, int viewType);
method public abstract VH onCreateViewHolder(android.view.ViewGroup parent, androidx.paging.LoadState loadState);
- method public final void setLoadState(androidx.paging.LoadState loadState);
+ method public final void setLoadState(androidx.paging.LoadState);
property public final androidx.paging.LoadState loadState;
}
@@ -107,19 +107,19 @@
ctor public PagingDataAdapter(androidx.recyclerview.widget.DiffUtil.ItemCallback<T> diffCallback);
method public final void addLoadStateListener(kotlin.jvm.functions.Function1<? super androidx.paging.CombinedLoadStates,kotlin.Unit> listener);
method public final void addOnPagesUpdatedListener(kotlin.jvm.functions.Function0<kotlin.Unit> listener);
- method protected final T? getItem(@IntRange(from=0) int position);
+ method protected final T? getItem(@IntRange(from=0L) int position);
method public int getItemCount();
method public final long getItemId(int position);
method public final kotlinx.coroutines.flow.Flow<androidx.paging.CombinedLoadStates> getLoadStateFlow();
method public final kotlinx.coroutines.flow.Flow<kotlin.Unit> getOnPagesUpdatedFlow();
- method public final T? peek(@IntRange(from=0) int index);
+ method public final T? peek(@IntRange(from=0L) int index);
method public final void refresh();
method public final void removeLoadStateListener(kotlin.jvm.functions.Function1<? super androidx.paging.CombinedLoadStates,kotlin.Unit> listener);
method public final void removeOnPagesUpdatedListener(kotlin.jvm.functions.Function0<kotlin.Unit> listener);
method public final void retry();
method public final void setHasStableIds(boolean hasStableIds);
method public final androidx.paging.ItemSnapshotList<T> snapshot();
- method public final suspend Object? submitData(androidx.paging.PagingData<T> pagingData, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public final suspend Object? submitData(androidx.paging.PagingData<T> pagingData, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public final void submitData(androidx.lifecycle.Lifecycle lifecycle, androidx.paging.PagingData<T> pagingData);
method public final androidx.recyclerview.widget.ConcatAdapter withLoadStateFooter(androidx.paging.LoadStateAdapter<?> footer);
method public final androidx.recyclerview.widget.ConcatAdapter withLoadStateHeader(androidx.paging.LoadStateAdapter<?> header);
diff --git a/paging/paging-runtime/api/public_plus_experimental_current.txt b/paging/paging-runtime/api/public_plus_experimental_current.txt
index 4fcb026..9d1b058 100644
--- a/paging/paging-runtime/api/public_plus_experimental_current.txt
+++ b/paging/paging-runtime/api/public_plus_experimental_current.txt
@@ -29,17 +29,17 @@
ctor public AsyncPagingDataDiffer(androidx.recyclerview.widget.DiffUtil.ItemCallback<T> diffCallback, androidx.recyclerview.widget.ListUpdateCallback updateCallback);
method public void addLoadStateListener(kotlin.jvm.functions.Function1<? super androidx.paging.CombinedLoadStates,kotlin.Unit> listener);
method public void addOnPagesUpdatedListener(kotlin.jvm.functions.Function0<kotlin.Unit> listener);
- method public T? getItem(@IntRange(from=0) int index);
+ method public T? getItem(@IntRange(from=0L) int index);
method public int getItemCount();
method public kotlinx.coroutines.flow.Flow<androidx.paging.CombinedLoadStates> getLoadStateFlow();
method public kotlinx.coroutines.flow.Flow<kotlin.Unit> getOnPagesUpdatedFlow();
- method public T? peek(@IntRange(from=0) int index);
+ method public T? peek(@IntRange(from=0L) int index);
method public void refresh();
method public void removeLoadStateListener(kotlin.jvm.functions.Function1<? super androidx.paging.CombinedLoadStates,kotlin.Unit> listener);
method public void removeOnPagesUpdatedListener(kotlin.jvm.functions.Function0<kotlin.Unit> listener);
method public void retry();
method public androidx.paging.ItemSnapshotList<T> snapshot();
- method public suspend Object? submitData(androidx.paging.PagingData<T> pagingData, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? submitData(androidx.paging.PagingData<T> pagingData, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public void submitData(androidx.lifecycle.Lifecycle lifecycle, androidx.paging.PagingData<T> pagingData);
property public final int itemCount;
property public final kotlinx.coroutines.flow.Flow<androidx.paging.CombinedLoadStates> loadStateFlow;
@@ -76,7 +76,7 @@
method public abstract void onBindViewHolder(VH holder, androidx.paging.LoadState loadState);
method public final VH onCreateViewHolder(android.view.ViewGroup parent, int viewType);
method public abstract VH onCreateViewHolder(android.view.ViewGroup parent, androidx.paging.LoadState loadState);
- method public final void setLoadState(androidx.paging.LoadState loadState);
+ method public final void setLoadState(androidx.paging.LoadState);
property public final androidx.paging.LoadState loadState;
}
@@ -107,19 +107,19 @@
ctor public PagingDataAdapter(androidx.recyclerview.widget.DiffUtil.ItemCallback<T> diffCallback);
method public final void addLoadStateListener(kotlin.jvm.functions.Function1<? super androidx.paging.CombinedLoadStates,kotlin.Unit> listener);
method public final void addOnPagesUpdatedListener(kotlin.jvm.functions.Function0<kotlin.Unit> listener);
- method protected final T? getItem(@IntRange(from=0) int position);
+ method protected final T? getItem(@IntRange(from=0L) int position);
method public int getItemCount();
method public final long getItemId(int position);
method public final kotlinx.coroutines.flow.Flow<androidx.paging.CombinedLoadStates> getLoadStateFlow();
method public final kotlinx.coroutines.flow.Flow<kotlin.Unit> getOnPagesUpdatedFlow();
- method public final T? peek(@IntRange(from=0) int index);
+ method public final T? peek(@IntRange(from=0L) int index);
method public final void refresh();
method public final void removeLoadStateListener(kotlin.jvm.functions.Function1<? super androidx.paging.CombinedLoadStates,kotlin.Unit> listener);
method public final void removeOnPagesUpdatedListener(kotlin.jvm.functions.Function0<kotlin.Unit> listener);
method public final void retry();
method public final void setHasStableIds(boolean hasStableIds);
method public final androidx.paging.ItemSnapshotList<T> snapshot();
- method public final suspend Object? submitData(androidx.paging.PagingData<T> pagingData, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public final suspend Object? submitData(androidx.paging.PagingData<T> pagingData, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public final void submitData(androidx.lifecycle.Lifecycle lifecycle, androidx.paging.PagingData<T> pagingData);
method public final androidx.recyclerview.widget.ConcatAdapter withLoadStateFooter(androidx.paging.LoadStateAdapter<?> footer);
method public final androidx.recyclerview.widget.ConcatAdapter withLoadStateHeader(androidx.paging.LoadStateAdapter<?> header);
diff --git a/paging/paging-runtime/api/restricted_current.ignore b/paging/paging-runtime/api/restricted_current.ignore
new file mode 100644
index 0000000..41c88d3
--- /dev/null
+++ b/paging/paging-runtime/api/restricted_current.ignore
@@ -0,0 +1,7 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.paging.AsyncPagingDataDiffer#submitData(androidx.paging.PagingData<T>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.paging.AsyncPagingDataDiffer.submitData
+ParameterNameChange: androidx.paging.LoadStateAdapter#setLoadState(androidx.paging.LoadState) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.paging.LoadStateAdapter.setLoadState
+ParameterNameChange: androidx.paging.PagingDataAdapter#submitData(androidx.paging.PagingData<T>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.paging.PagingDataAdapter.submitData
diff --git a/paging/paging-runtime/api/restricted_current.txt b/paging/paging-runtime/api/restricted_current.txt
index 4fcb026..9d1b058 100644
--- a/paging/paging-runtime/api/restricted_current.txt
+++ b/paging/paging-runtime/api/restricted_current.txt
@@ -29,17 +29,17 @@
ctor public AsyncPagingDataDiffer(androidx.recyclerview.widget.DiffUtil.ItemCallback<T> diffCallback, androidx.recyclerview.widget.ListUpdateCallback updateCallback);
method public void addLoadStateListener(kotlin.jvm.functions.Function1<? super androidx.paging.CombinedLoadStates,kotlin.Unit> listener);
method public void addOnPagesUpdatedListener(kotlin.jvm.functions.Function0<kotlin.Unit> listener);
- method public T? getItem(@IntRange(from=0) int index);
+ method public T? getItem(@IntRange(from=0L) int index);
method public int getItemCount();
method public kotlinx.coroutines.flow.Flow<androidx.paging.CombinedLoadStates> getLoadStateFlow();
method public kotlinx.coroutines.flow.Flow<kotlin.Unit> getOnPagesUpdatedFlow();
- method public T? peek(@IntRange(from=0) int index);
+ method public T? peek(@IntRange(from=0L) int index);
method public void refresh();
method public void removeLoadStateListener(kotlin.jvm.functions.Function1<? super androidx.paging.CombinedLoadStates,kotlin.Unit> listener);
method public void removeOnPagesUpdatedListener(kotlin.jvm.functions.Function0<kotlin.Unit> listener);
method public void retry();
method public androidx.paging.ItemSnapshotList<T> snapshot();
- method public suspend Object? submitData(androidx.paging.PagingData<T> pagingData, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? submitData(androidx.paging.PagingData<T> pagingData, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public void submitData(androidx.lifecycle.Lifecycle lifecycle, androidx.paging.PagingData<T> pagingData);
property public final int itemCount;
property public final kotlinx.coroutines.flow.Flow<androidx.paging.CombinedLoadStates> loadStateFlow;
@@ -76,7 +76,7 @@
method public abstract void onBindViewHolder(VH holder, androidx.paging.LoadState loadState);
method public final VH onCreateViewHolder(android.view.ViewGroup parent, int viewType);
method public abstract VH onCreateViewHolder(android.view.ViewGroup parent, androidx.paging.LoadState loadState);
- method public final void setLoadState(androidx.paging.LoadState loadState);
+ method public final void setLoadState(androidx.paging.LoadState);
property public final androidx.paging.LoadState loadState;
}
@@ -107,19 +107,19 @@
ctor public PagingDataAdapter(androidx.recyclerview.widget.DiffUtil.ItemCallback<T> diffCallback);
method public final void addLoadStateListener(kotlin.jvm.functions.Function1<? super androidx.paging.CombinedLoadStates,kotlin.Unit> listener);
method public final void addOnPagesUpdatedListener(kotlin.jvm.functions.Function0<kotlin.Unit> listener);
- method protected final T? getItem(@IntRange(from=0) int position);
+ method protected final T? getItem(@IntRange(from=0L) int position);
method public int getItemCount();
method public final long getItemId(int position);
method public final kotlinx.coroutines.flow.Flow<androidx.paging.CombinedLoadStates> getLoadStateFlow();
method public final kotlinx.coroutines.flow.Flow<kotlin.Unit> getOnPagesUpdatedFlow();
- method public final T? peek(@IntRange(from=0) int index);
+ method public final T? peek(@IntRange(from=0L) int index);
method public final void refresh();
method public final void removeLoadStateListener(kotlin.jvm.functions.Function1<? super androidx.paging.CombinedLoadStates,kotlin.Unit> listener);
method public final void removeOnPagesUpdatedListener(kotlin.jvm.functions.Function0<kotlin.Unit> listener);
method public final void retry();
method public final void setHasStableIds(boolean hasStableIds);
method public final androidx.paging.ItemSnapshotList<T> snapshot();
- method public final suspend Object? submitData(androidx.paging.PagingData<T> pagingData, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public final suspend Object? submitData(androidx.paging.PagingData<T> pagingData, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public final void submitData(androidx.lifecycle.Lifecycle lifecycle, androidx.paging.PagingData<T> pagingData);
method public final androidx.recyclerview.widget.ConcatAdapter withLoadStateFooter(androidx.paging.LoadStateAdapter<?> footer);
method public final androidx.recyclerview.widget.ConcatAdapter withLoadStateHeader(androidx.paging.LoadStateAdapter<?> header);
diff --git a/paging/paging-rxjava2/api/current.ignore b/paging/paging-rxjava2/api/current.ignore
new file mode 100644
index 0000000..4c496cc
--- /dev/null
+++ b/paging/paging-rxjava2/api/current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.paging.rxjava2.RxPagingSource#load(androidx.paging.PagingSource.LoadParams<Key>, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.paging.rxjava2.RxPagingSource.load
diff --git a/paging/paging-rxjava2/api/current.txt b/paging/paging-rxjava2/api/current.txt
index afe197e..0b95aeb 100644
--- a/paging/paging-rxjava2/api/current.txt
+++ b/paging/paging-rxjava2/api/current.txt
@@ -49,7 +49,7 @@
public abstract class RxPagingSource<Key, Value> extends androidx.paging.PagingSource<Key,Value> {
ctor public RxPagingSource();
- method public final suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>> p);
+ method public final suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>);
method public abstract io.reactivex.Single<androidx.paging.PagingSource.LoadResult<Key,Value>> loadSingle(androidx.paging.PagingSource.LoadParams<Key> params);
}
diff --git a/paging/paging-rxjava2/api/public_plus_experimental_current.txt b/paging/paging-rxjava2/api/public_plus_experimental_current.txt
index 89bd6c6..7179ce2 100644
--- a/paging/paging-rxjava2/api/public_plus_experimental_current.txt
+++ b/paging/paging-rxjava2/api/public_plus_experimental_current.txt
@@ -53,15 +53,15 @@
public abstract class RxPagingSource<Key, Value> extends androidx.paging.PagingSource<Key,Value> {
ctor public RxPagingSource();
- method public final suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>> p);
+ method public final suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>);
method public abstract io.reactivex.Single<androidx.paging.PagingSource.LoadResult<Key,Value>> loadSingle(androidx.paging.PagingSource.LoadParams<Key> params);
}
@androidx.paging.ExperimentalPagingApi public abstract class RxRemoteMediator<Key, Value> extends androidx.paging.RemoteMediator<Key,Value> {
ctor public RxRemoteMediator();
- method public final suspend Object? initialize(kotlin.coroutines.Continuation<? super androidx.paging.RemoteMediator.InitializeAction> p);
+ method public final suspend Object? initialize(kotlin.coroutines.Continuation<? super androidx.paging.RemoteMediator.InitializeAction>);
method public io.reactivex.Single<androidx.paging.RemoteMediator.InitializeAction> initializeSingle();
- method public final suspend Object? load(androidx.paging.LoadType loadType, androidx.paging.PagingState<Key,Value> state, kotlin.coroutines.Continuation<? super androidx.paging.RemoteMediator.MediatorResult> p);
+ method public final suspend Object? load(androidx.paging.LoadType loadType, androidx.paging.PagingState<Key,Value> state, kotlin.coroutines.Continuation<? super androidx.paging.RemoteMediator.MediatorResult>);
method public abstract io.reactivex.Single<androidx.paging.RemoteMediator.MediatorResult> loadSingle(androidx.paging.LoadType loadType, androidx.paging.PagingState<Key,Value> state);
}
diff --git a/paging/paging-rxjava2/api/restricted_current.ignore b/paging/paging-rxjava2/api/restricted_current.ignore
new file mode 100644
index 0000000..4c496cc
--- /dev/null
+++ b/paging/paging-rxjava2/api/restricted_current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.paging.rxjava2.RxPagingSource#load(androidx.paging.PagingSource.LoadParams<Key>, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.paging.rxjava2.RxPagingSource.load
diff --git a/paging/paging-rxjava2/api/restricted_current.txt b/paging/paging-rxjava2/api/restricted_current.txt
index afe197e..0b95aeb 100644
--- a/paging/paging-rxjava2/api/restricted_current.txt
+++ b/paging/paging-rxjava2/api/restricted_current.txt
@@ -49,7 +49,7 @@
public abstract class RxPagingSource<Key, Value> extends androidx.paging.PagingSource<Key,Value> {
ctor public RxPagingSource();
- method public final suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>> p);
+ method public final suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>);
method public abstract io.reactivex.Single<androidx.paging.PagingSource.LoadResult<Key,Value>> loadSingle(androidx.paging.PagingSource.LoadParams<Key> params);
}
diff --git a/paging/paging-rxjava3/api/current.ignore b/paging/paging-rxjava3/api/current.ignore
new file mode 100644
index 0000000..6159e34
--- /dev/null
+++ b/paging/paging-rxjava3/api/current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.paging.rxjava3.RxPagingSource#load(androidx.paging.PagingSource.LoadParams<Key>, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.paging.rxjava3.RxPagingSource.load
diff --git a/paging/paging-rxjava3/api/current.txt b/paging/paging-rxjava3/api/current.txt
index 304fe98..7af17b8 100644
--- a/paging/paging-rxjava3/api/current.txt
+++ b/paging/paging-rxjava3/api/current.txt
@@ -45,7 +45,7 @@
public abstract class RxPagingSource<Key, Value> extends androidx.paging.PagingSource<Key,Value> {
ctor public RxPagingSource();
- method public final suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>> p);
+ method public final suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>);
method public abstract io.reactivex.rxjava3.core.Single<androidx.paging.PagingSource.LoadResult<Key,Value>> loadSingle(androidx.paging.PagingSource.LoadParams<Key> params);
}
diff --git a/paging/paging-rxjava3/api/public_plus_experimental_current.txt b/paging/paging-rxjava3/api/public_plus_experimental_current.txt
index f847113..6ed617d 100644
--- a/paging/paging-rxjava3/api/public_plus_experimental_current.txt
+++ b/paging/paging-rxjava3/api/public_plus_experimental_current.txt
@@ -49,15 +49,15 @@
public abstract class RxPagingSource<Key, Value> extends androidx.paging.PagingSource<Key,Value> {
ctor public RxPagingSource();
- method public final suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>> p);
+ method public final suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>);
method public abstract io.reactivex.rxjava3.core.Single<androidx.paging.PagingSource.LoadResult<Key,Value>> loadSingle(androidx.paging.PagingSource.LoadParams<Key> params);
}
@androidx.paging.ExperimentalPagingApi public abstract class RxRemoteMediator<Key, Value> extends androidx.paging.RemoteMediator<Key,Value> {
ctor public RxRemoteMediator();
- method public final suspend Object? initialize(kotlin.coroutines.Continuation<? super androidx.paging.RemoteMediator.InitializeAction> p);
+ method public final suspend Object? initialize(kotlin.coroutines.Continuation<? super androidx.paging.RemoteMediator.InitializeAction>);
method public io.reactivex.rxjava3.core.Single<androidx.paging.RemoteMediator.InitializeAction> initializeSingle();
- method public final suspend Object? load(androidx.paging.LoadType loadType, androidx.paging.PagingState<Key,Value> state, kotlin.coroutines.Continuation<? super androidx.paging.RemoteMediator.MediatorResult> p);
+ method public final suspend Object? load(androidx.paging.LoadType loadType, androidx.paging.PagingState<Key,Value> state, kotlin.coroutines.Continuation<? super androidx.paging.RemoteMediator.MediatorResult>);
method public abstract io.reactivex.rxjava3.core.Single<androidx.paging.RemoteMediator.MediatorResult> loadSingle(androidx.paging.LoadType loadType, androidx.paging.PagingState<Key,Value> state);
}
diff --git a/paging/paging-rxjava3/api/restricted_current.ignore b/paging/paging-rxjava3/api/restricted_current.ignore
new file mode 100644
index 0000000..6159e34
--- /dev/null
+++ b/paging/paging-rxjava3/api/restricted_current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.paging.rxjava3.RxPagingSource#load(androidx.paging.PagingSource.LoadParams<Key>, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.paging.rxjava3.RxPagingSource.load
diff --git a/paging/paging-rxjava3/api/restricted_current.txt b/paging/paging-rxjava3/api/restricted_current.txt
index 304fe98..7af17b8 100644
--- a/paging/paging-rxjava3/api/restricted_current.txt
+++ b/paging/paging-rxjava3/api/restricted_current.txt
@@ -45,7 +45,7 @@
public abstract class RxPagingSource<Key, Value> extends androidx.paging.PagingSource<Key,Value> {
ctor public RxPagingSource();
- method public final suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>> p);
+ method public final suspend Object? load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>>);
method public abstract io.reactivex.rxjava3.core.Single<androidx.paging.PagingSource.LoadResult<Key,Value>> loadSingle(androidx.paging.PagingSource.LoadParams<Key> params);
}
diff --git a/playground-common/gradle/wrapper/gradle-wrapper.properties b/playground-common/gradle/wrapper/gradle-wrapper.properties
index 41dfb87..aa991fc 100644
--- a/playground-common/gradle/wrapper/gradle-wrapper.properties
+++ b/playground-common/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/playground-common/playground-plugin/build.gradle b/playground-common/playground-plugin/build.gradle
index b93b637..8a0d4a50 100644
--- a/playground-common/playground-plugin/build.gradle
+++ b/playground-common/playground-plugin/build.gradle
@@ -24,7 +24,7 @@
}
dependencies {
- implementation "com.gradle:gradle-enterprise-gradle-plugin:3.8.1"
+ implementation "com.gradle:gradle-enterprise-gradle-plugin:3.9"
implementation "com.gradle:common-custom-user-data-gradle-plugin:1.6.5"
testImplementation "junit:junit:4.13"
testImplementation "com.google.truth:truth:1.1.3"
diff --git a/playground-common/playground.properties b/playground-common/playground.properties
index e9ee824..1b10ab3 100644
--- a/playground-common/playground.properties
+++ b/playground-common/playground.properties
@@ -25,7 +25,7 @@
kotlin.code.style=official
# Disable docs
androidx.enableDocumentation=false
-androidx.playground.snapshotBuildId=8382462
-androidx.playground.metalavaBuildId=8210943
+androidx.playground.snapshotBuildId=8403616
+androidx.playground.metalavaBuildId=8385786
androidx.playground.dokkaBuildId=7472101
androidx.studio.type=playground
diff --git a/preference/preference/api/api_lint.ignore b/preference/preference/api/api_lint.ignore
index 48e46d1..2cc2d20 100644
--- a/preference/preference/api/api_lint.ignore
+++ b/preference/preference/api/api_lint.ignore
@@ -63,6 +63,22 @@
Internal field mChecked must not be exposed
+InvalidNullability: androidx.preference.DropDownPreference#setEntries(CharSequence[]) parameter #0:
+ Invalid nullability on parameter `entries` in method `setEntries`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.preference.PreferenceDialogFragment#onDismiss(android.content.DialogInterface) parameter #0:
+ Invalid nullability on parameter `dialog` in method `onDismiss`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.preference.PreferenceDialogFragment#onSaveInstanceState(android.os.Bundle) parameter #0:
+ Invalid nullability on parameter `outState` in method `onSaveInstanceState`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.preference.PreferenceDialogFragmentCompat#onClick(android.content.DialogInterface, int) parameter #0:
+ Invalid nullability on parameter `dialog` in method `onClick`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.preference.PreferenceFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) parameter #0:
+ Invalid nullability on parameter `inflater` in method `onCreateView`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.preference.PreferenceFragment#onSaveInstanceState(android.os.Bundle) parameter #0:
+ Invalid nullability on parameter `outState` in method `onSaveInstanceState`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.preference.PreferenceFragment#onViewCreated(android.view.View, android.os.Bundle) parameter #0:
+ Invalid nullability on parameter `view` in method `onViewCreated`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+
+
MissingNullability: androidx.preference.EditTextPreference#onGetDefaultValue(android.content.res.TypedArray, int):
Missing nullability on method `onGetDefaultValue` return
MissingNullability: androidx.preference.EditTextPreference#onSetInitialValue(Object) parameter #0:
diff --git a/profileinstaller/profileinstaller/api/api_lint.ignore b/profileinstaller/profileinstaller/api/api_lint.ignore
new file mode 100644
index 0000000..a4b3f288
--- /dev/null
+++ b/profileinstaller/profileinstaller/api/api_lint.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+InvalidNullability: androidx.profileinstaller.ProfileInstallReceiver#onReceive(android.content.Context, android.content.Intent) parameter #0:
+ Invalid nullability on parameter `context` in method `onReceive`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
diff --git a/recyclerview/recyclerview/api/api_lint.ignore b/recyclerview/recyclerview/api/api_lint.ignore
index 61d7551..85a06f1 100644
--- a/recyclerview/recyclerview/api/api_lint.ignore
+++ b/recyclerview/recyclerview/api/api_lint.ignore
@@ -18,9 +18,9 @@
BannedThrow: androidx.recyclerview.widget.SnapHelper#attachToRecyclerView(androidx.recyclerview.widget.RecyclerView):
- Methods must not mention RuntimeException subclasses in throws clauses (was `java.lang.IllegalStateException`)
+ Methods must not throw unchecked exceptions
BannedThrow: androidx.recyclerview.widget.SortedList#get(int):
- Methods must not mention RuntimeException subclasses in throws clauses (was `java.lang.IndexOutOfBoundsException`)
+ Methods must not throw unchecked exceptions
CallbackMethodName: androidx.recyclerview.widget.AsyncListUtil.DataCallback#fillData(T[], int, int):
@@ -161,6 +161,36 @@
Internal field mLayoutManager must not be exposed
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate.ItemDelegate#getAccessibilityNodeProvider(android.view.View):
+ Invalid nullability on method `getAccessibilityNodeProvider` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: 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):
diff --git a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/ElementExt.kt b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/ElementExt.kt
index aed0202..943644b 100644
--- a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/ElementExt.kt
+++ b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/ElementExt.kt
@@ -18,7 +18,15 @@
import androidx.room.compiler.processing.XNullability
import com.google.auto.common.MoreElements
+import com.google.auto.common.MoreTypes
+import com.squareup.javapoet.ParameterizedTypeName
+import com.squareup.javapoet.TypeName
import javax.lang.model.element.Element
+import javax.lang.model.element.ExecutableElement
+import javax.lang.model.element.Modifier
+import javax.lang.model.element.TypeElement
+import javax.lang.model.util.Types
+import kotlin.coroutines.Continuation
private val NONNULL_ANNOTATIONS = arrayOf(
"androidx.annotation.NonNull",
@@ -59,4 +67,85 @@
} else {
null
}
+}
+
+/**
+ * Tests whether one suspend function, as a member of a given types, overrides another suspend
+ * function.
+ *
+ * This method assumes function one and two are suspend methods, i.e. they both return Object,
+ * have at least one parameter and the last parameter is of type Continuation. This method is
+ * similar to MoreElements.overrides() but doesn't check isSubsignature() due to Continuation's
+ * type arg being covariant, instead the equivalent is done by checking each parameter explicitly.
+ */
+internal fun suspendOverrides(
+ overrider: ExecutableElement,
+ overridden: ExecutableElement,
+ owner: TypeElement,
+ typeUtils: Types
+): Boolean {
+ if (overrider.simpleName != overridden.simpleName) {
+ return false
+ }
+ if (overrider.enclosingElement == overridden.enclosingElement) {
+ return false
+ }
+ if (overridden.modifiers.contains(Modifier.STATIC)) {
+ return false
+ }
+ if (overridden.modifiers.contains(Modifier.PRIVATE)) {
+ return false
+ }
+ val overriddenType = overridden.enclosingElement as? TypeElement ?: return false
+ if (!typeUtils.isSubtype(
+ typeUtils.erasure(owner.asType()),
+ typeUtils.erasure(overriddenType.asType()))
+ ) {
+ return false
+ }
+ val ownerType = MoreTypes.asDeclared(owner.asType())
+ val overriderExecutable = MoreTypes.asExecutable(typeUtils.asMemberOf(ownerType, overrider))
+ val overriddenExecutable = MoreTypes.asExecutable(typeUtils.asMemberOf(ownerType, overrider))
+ if (overriderExecutable.parameterTypes.size != overriddenExecutable.parameterTypes.size) {
+ return false
+ }
+ val continuationTypeName = TypeName.get(Continuation::class.java)
+ val overriderLastParamTypeName =
+ (TypeName.get(overriderExecutable.parameterTypes.last()) as? ParameterizedTypeName)
+ ?.rawType
+ check(overriderLastParamTypeName == continuationTypeName) {
+ "Expected $overriderLastParamTypeName to be $continuationTypeName"
+ }
+ val overriddenLastParamTypeName =
+ (TypeName.get(overriddenExecutable.parameterTypes.last()) as? ParameterizedTypeName)
+ ?.rawType
+ check(overriddenLastParamTypeName == continuationTypeName) {
+ "Expected $overriddenLastParamTypeName to be $continuationTypeName"
+ }
+ val overriderContinuationTypeArg =
+ MoreTypes.asDeclared(overriderExecutable.parameterTypes.last())
+ .typeArguments.single().extendsBound()
+ val overriddenContinuationTypeArg =
+ MoreTypes.asDeclared(overriderExecutable.parameterTypes.last())
+ .typeArguments.single().extendsBound()
+ if (!typeUtils.isSameType(
+ typeUtils.erasure(overriderContinuationTypeArg),
+ typeUtils.erasure(overriddenContinuationTypeArg))
+ ) {
+ return false
+ }
+ if (overriddenExecutable.parameterTypes.size >= 2) {
+ overriderExecutable.parameterTypes.zip(overriddenExecutable.parameterTypes)
+ .dropLast(1)
+ .forEach { (overriderParam, overriddenParam) ->
+ if (!typeUtils.isSameType(
+ typeUtils.erasure(overriderParam),
+ typeUtils.erasure(overriddenParam)
+ )
+ ) {
+ return false
+ }
+ }
+ }
+ return true
}
\ No newline at end of file
diff --git a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacMethodElement.kt b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacMethodElement.kt
index baa51d1..167315a 100644
--- a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacMethodElement.kt
+++ b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacMethodElement.kt
@@ -18,6 +18,7 @@
import androidx.room.compiler.processing.XMethodElement
import androidx.room.compiler.processing.XMethodType
+import androidx.room.compiler.processing.XProcessingEnv
import androidx.room.compiler.processing.XType
import androidx.room.compiler.processing.XTypeElement
import androidx.room.compiler.processing.javac.kotlin.KmFunction
@@ -121,6 +122,14 @@
override fun overrides(other: XMethodElement, owner: XTypeElement): Boolean {
check(other is JavacMethodElement)
check(owner is JavacTypeElement)
+ if (
+ env.backend == XProcessingEnv.Backend.JAVAC &&
+ this.isSuspendFunction() &&
+ other.isSuspendFunction()
+ ) {
+ // b/222240938 - Special case suspend functions in KAPT
+ return suspendOverrides(element, other.element, owner.element, env.typeUtils)
+ }
// Use auto-common's overrides, which provides consistency across javac and ejc (Eclipse).
return MoreElements.overrides(element, other.element, owner.element, env.typeUtils)
}
diff --git a/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeElementTest.kt b/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeElementTest.kt
index 5970140..cf909f8 100644
--- a/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeElementTest.kt
+++ b/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeElementTest.kt
@@ -804,6 +804,64 @@
}
@Test
+ fun suspendOverride() {
+ val src = Source.kotlin(
+ "Foo.kt",
+ """
+ interface Base<T> {
+ suspend fun get(): T
+ suspend fun getAll(): List<T>
+ suspend fun putAll(input: List<T>)
+ suspend fun getAllWithDefault(): List<T>
+ }
+
+ interface DerivedInterface : Base<String> {
+ override suspend fun get(): String
+ override suspend fun getAll(): List<String>
+ override suspend fun putAll(input: List<String>)
+ override suspend fun getAllWithDefault(): List<String> {
+ return emptyList()
+ }
+ }
+ """.trimIndent()
+ )
+ runProcessorTest(sources = listOf(src)) { invocation ->
+ val base = invocation.processingEnv.requireTypeElement("DerivedInterface")
+ val methodNames = base.getAllMethods().toList().jvmNames()
+ assertThat(methodNames).containsExactly("get", "getAll", "putAll", "getAllWithDefault")
+ }
+ }
+
+ @Test
+ fun suspendOverride_abstractClass() {
+ val src = Source.kotlin(
+ "Foo.kt",
+ """
+ abstract class Base<T> {
+ abstract suspend fun get(): T
+ abstract suspend fun getAll(): List<T>
+ abstract suspend fun putAll(input: List<T>)
+ }
+
+ abstract class DerivedClass : Base<Int>() {
+ abstract override suspend fun get(): Int
+ abstract override suspend fun getAll(): List<Int>
+ override suspend fun putAll(input: List<Int>) {
+ }
+ }
+ """.trimIndent()
+ )
+ runProcessorTest(sources = listOf(src)) { invocation ->
+ val base = invocation.processingEnv.requireTypeElement("DerivedClass")
+ val methodNamesCount =
+ base.getAllMethods().toList().jvmNames().groupingBy { it }.eachCount()
+ assertThat(methodNamesCount["get"]).isEqualTo(1)
+ assertThat(methodNamesCount["getAll"]).isEqualTo(1)
+ assertThat(methodNamesCount["putAll"]).isEqualTo(1)
+ }
+ }
+
+ @Test
fun overrideMethodWithCovariantReturnType() {
val src = Source.kotlin(
"ParentWithExplicitOverride.kt",
diff --git a/room/room-ktx/api/current.ignore b/room/room-ktx/api/current.ignore
new file mode 100644
index 0000000..cb9da40
--- /dev/null
+++ b/room/room-ktx/api/current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.room.RoomDatabaseKt#withTransaction(androidx.room.RoomDatabase, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.room.RoomDatabaseKt.withTransaction
diff --git a/room/room-ktx/api/current.txt b/room/room-ktx/api/current.txt
index 418c567..c9649d4 100644
--- a/room/room-ktx/api/current.txt
+++ b/room/room-ktx/api/current.txt
@@ -5,7 +5,7 @@
}
public final class RoomDatabaseKt {
- method public static suspend <R> Object? withTransaction(androidx.room.RoomDatabase, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R> p);
+ method public static suspend <R> Object? withTransaction(androidx.room.RoomDatabase, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
}
}
diff --git a/room/room-ktx/api/public_plus_experimental_current.txt b/room/room-ktx/api/public_plus_experimental_current.txt
index 418c567..c9649d4 100644
--- a/room/room-ktx/api/public_plus_experimental_current.txt
+++ b/room/room-ktx/api/public_plus_experimental_current.txt
@@ -5,7 +5,7 @@
}
public final class RoomDatabaseKt {
- method public static suspend <R> Object? withTransaction(androidx.room.RoomDatabase, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R> p);
+ method public static suspend <R> Object? withTransaction(androidx.room.RoomDatabase, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
}
}
diff --git a/room/room-ktx/api/restricted_current.ignore b/room/room-ktx/api/restricted_current.ignore
new file mode 100644
index 0000000..6ef7c71
--- /dev/null
+++ b/room/room-ktx/api/restricted_current.ignore
@@ -0,0 +1,11 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.room.CoroutinesRoom#execute(androidx.room.RoomDatabase, boolean, android.os.CancellationSignal, java.util.concurrent.Callable<R>, kotlin.coroutines.Continuation<? super R>) parameter #4:
+ Attempted to remove parameter name from parameter arg5 in androidx.room.CoroutinesRoom.execute
+ParameterNameChange: androidx.room.CoroutinesRoom#execute(androidx.room.RoomDatabase, boolean, java.util.concurrent.Callable<R>, kotlin.coroutines.Continuation<? super R>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.room.CoroutinesRoom.execute
+ParameterNameChange: androidx.room.CoroutinesRoom.Companion#execute(androidx.room.RoomDatabase, boolean, android.os.CancellationSignal, java.util.concurrent.Callable<R>, kotlin.coroutines.Continuation<? super R>) parameter #4:
+ Attempted to remove parameter name from parameter arg5 in androidx.room.CoroutinesRoom.Companion.execute
+ParameterNameChange: androidx.room.CoroutinesRoom.Companion#execute(androidx.room.RoomDatabase, boolean, java.util.concurrent.Callable<R>, kotlin.coroutines.Continuation<? super R>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.room.CoroutinesRoom.Companion.execute
+ParameterNameChange: androidx.room.RoomDatabaseKt#withTransaction(androidx.room.RoomDatabase, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?>, kotlin.coroutines.Continuation<? super R>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.room.RoomDatabaseKt.withTransaction
diff --git a/room/room-ktx/api/restricted_current.txt b/room/room-ktx/api/restricted_current.txt
index 30647b2..b4d63f6 100644
--- a/room/room-ktx/api/restricted_current.txt
+++ b/room/room-ktx/api/restricted_current.txt
@@ -3,22 +3,22 @@
@RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public final class CoroutinesRoom {
method public static <R> kotlinx.coroutines.flow.Flow<R> createFlow(androidx.room.RoomDatabase db, boolean inTransaction, String![] tableNames, java.util.concurrent.Callable<R> callable);
- method public static suspend <R> Object? execute(androidx.room.RoomDatabase db, boolean inTransaction, java.util.concurrent.Callable<R> callable, kotlin.coroutines.Continuation<? super R> p);
- method public static suspend <R> Object? execute(androidx.room.RoomDatabase db, boolean inTransaction, android.os.CancellationSignal cancellationSignal, java.util.concurrent.Callable<R> callable, kotlin.coroutines.Continuation<? super R> p);
+ method public static suspend <R> Object? execute(androidx.room.RoomDatabase db, boolean inTransaction, java.util.concurrent.Callable<R> callable, kotlin.coroutines.Continuation<? super R>);
+ method public static suspend <R> Object? execute(androidx.room.RoomDatabase db, boolean inTransaction, android.os.CancellationSignal cancellationSignal, java.util.concurrent.Callable<R> callable, kotlin.coroutines.Continuation<? super R>);
field public static final androidx.room.CoroutinesRoom.Companion Companion;
}
public static final class CoroutinesRoom.Companion {
method public <R> kotlinx.coroutines.flow.Flow<R> createFlow(androidx.room.RoomDatabase db, boolean inTransaction, String![] tableNames, java.util.concurrent.Callable<R> callable);
- method public suspend <R> Object? execute(androidx.room.RoomDatabase db, boolean inTransaction, java.util.concurrent.Callable<R> callable, kotlin.coroutines.Continuation<? super R> p);
- method public suspend <R> Object? execute(androidx.room.RoomDatabase db, boolean inTransaction, android.os.CancellationSignal cancellationSignal, java.util.concurrent.Callable<R> callable, kotlin.coroutines.Continuation<? super R> p);
+ method public suspend <R> Object? execute(androidx.room.RoomDatabase db, boolean inTransaction, java.util.concurrent.Callable<R> callable, kotlin.coroutines.Continuation<? super R>);
+ method public suspend <R> Object? execute(androidx.room.RoomDatabase db, boolean inTransaction, android.os.CancellationSignal cancellationSignal, java.util.concurrent.Callable<R> callable, kotlin.coroutines.Continuation<? super R>);
}
public final class CoroutinesRoomKt {
}
public final class RoomDatabaseKt {
- method public static suspend <R> Object? withTransaction(androidx.room.RoomDatabase, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R> p);
+ method public static suspend <R> Object? withTransaction(androidx.room.RoomDatabase, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
}
}
diff --git a/room/room-paging/src/main/kotlin/androidx/room/paging/LimitOffsetPagingSource.kt b/room/room-paging/src/main/kotlin/androidx/room/paging/LimitOffsetPagingSource.kt
index 30dab5b..e5935d6 100644
--- a/room/room-paging/src/main/kotlin/androidx/room/paging/LimitOffsetPagingSource.kt
+++ b/room/room-paging/src/main/kotlin/androidx/room/paging/LimitOffsetPagingSource.kt
@@ -21,14 +21,16 @@
import androidx.annotation.RestrictTo
import androidx.paging.PagingSource
import androidx.paging.PagingState
-import androidx.room.InvalidationTracker
import androidx.room.RoomDatabase
import androidx.room.RoomSQLiteQuery
import androidx.room.getQueryDispatcher
+import androidx.room.paging.util.ThreadSafeInvalidationObserver
+import androidx.room.paging.util.getLimit
+import androidx.room.paging.util.getOffset
+import androidx.room.paging.util.getClippedRefreshKey
import androidx.room.withTransaction
import androidx.sqlite.db.SupportSQLiteQuery
import kotlinx.coroutines.withContext
-import java.util.concurrent.atomic.AtomicBoolean
import java.util.concurrent.atomic.AtomicInteger
/**
@@ -60,16 +62,14 @@
internal val itemCount: AtomicInteger = AtomicInteger(-1)
- private val observer = object : InvalidationTracker.Observer(tables) {
- override fun onInvalidated(tables: MutableSet<String>) {
- invalidate()
- }
- }
- private val registeredObserver: AtomicBoolean = AtomicBoolean(false)
+ private val observer = ThreadSafeInvalidationObserver(
+ tables = tables,
+ onInvalidated = ::invalidate
+ )
override suspend fun load(params: LoadParams<Int>): LoadResult<Int, Value> {
return withContext(db.getQueryDispatcher()) {
- registerObserverIfNecessary()
+ observer.registerIfNecessary(db)
val tempCount = itemCount.get()
// if itemCount is < 0, then it is initial load
if (tempCount < 0) {
@@ -115,55 +115,6 @@
}
/**
- * Calculates query limit based on LoadType.
- *
- * Prepend: If requested loadSize is larger than available number of items to prepend, it will
- * query with OFFSET = 0, LIMIT = prevKey
- */
- private fun getLimit(params: LoadParams<Int>, key: Int): Int {
- return when (params) {
- is LoadParams.Prepend ->
- if (key < params.loadSize) key else params.loadSize
- else -> params.loadSize
- }
- }
-
- /**
- * calculates query offset amount based on loadtype
- *
- * Prepend: OFFSET is calculated by counting backwards the number of items that needs to be
- * loaded before [key]. For example, if key = 30 and loadSize = 5, then offset = 25 and items
- * in db position 26-30 are loaded.
- * If requested loadSize is larger than the number of available items to
- * prepend, OFFSET clips to 0 to prevent negative OFFSET.
- *
- * Refresh:
- * If initialKey is supplied through Pager, Paging 3 will now start loading from
- * initialKey with initialKey being the first item.
- * If key is supplied by [getRefreshKey],OFFSET will attempt to load around the anchorPosition
- * with anchorPosition being the middle item. See comments on [getRefreshKey] for more details.
- * If key (regardless if from initialKey or [getRefreshKey]) is larger than available items,
- * the last page will be loaded by counting backwards the loadSize before last item in
- * database. For example, this can happen if invalidation came from a large number of items
- * dropped. i.e. in items 0 - 100, items 41-80 are dropped. Depending on last
- * viewed item, hypothetically [getRefreshKey] may return key = 60. If loadSize = 10, then items
- * 31-40 will be loaded.
- */
- private fun getOffset(params: LoadParams<Int>, key: Int, itemCount: Int): Int {
- return when (params) {
- is LoadParams.Prepend ->
- if (key < params.loadSize) 0 else (key - params.loadSize)
- is LoadParams.Append -> key
- is LoadParams.Refresh ->
- if (key >= itemCount) {
- maxOf(0, itemCount - params.loadSize)
- } else {
- key
- }
- }
- }
-
- /**
* calls RoomDatabase.query() to return a cursor and then calls convertRows() to extract and
* return list of data
*
@@ -241,27 +192,8 @@
@NonNull
protected abstract fun convertRows(cursor: Cursor): List<Value>
- private fun registerObserverIfNecessary() {
- if (registeredObserver.compareAndSet(false, true)) {
- db.invalidationTracker.addWeakObserver(observer)
- }
- }
-
- /**
- * It is unknown whether anchorPosition represents the item at the top of the screen or item at
- * the bottom of the screen. To ensure the number of items loaded is enough to fill up the
- * screen, half of loadSize is loaded before the anchorPosition and the other half is
- * loaded after the anchorPosition -- anchorPosition becomes the middle item.
- *
- * To prevent a negative key, key = 0 when the number of items available before anchorPosition
- * is less than the requested amount of initialLoadSize / 2.
- */
override fun getRefreshKey(state: PagingState<Int, Value>): Int? {
- val initialLoadSize = state.config.initialLoadSize
- return when {
- state.anchorPosition == null -> null
- else -> maxOf(0, state.anchorPosition!! - (initialLoadSize / 2))
- }
+ return state.getClippedRefreshKey()
}
override val jumpingSupported: Boolean
diff --git a/room/room-paging/src/main/kotlin/androidx/room/paging/util/RoomPagingUtil.kt b/room/room-paging/src/main/kotlin/androidx/room/paging/util/RoomPagingUtil.kt
new file mode 100644
index 0000000..3cff53b
--- /dev/null
+++ b/room/room-paging/src/main/kotlin/androidx/room/paging/util/RoomPagingUtil.kt
@@ -0,0 +1,99 @@
+/*
+ * 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.
+ */
+@file:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+
+package androidx.room.paging.util
+
+import androidx.annotation.RestrictTo
+import androidx.paging.PagingSource
+import androidx.paging.PagingState
+
+/**
+ * Calculates query limit based on LoadType.
+ *
+ * Prepend: If requested loadSize is larger than available number of items to prepend, it will
+ * query with OFFSET = 0, LIMIT = prevKey
+ */
+fun getLimit(params: PagingSource.LoadParams<Int>, key: Int): Int {
+ return when (params) {
+ is PagingSource.LoadParams.Prepend ->
+ if (key < params.loadSize) {
+ key
+ } else {
+ params.loadSize
+ }
+ else -> params.loadSize
+ }
+}
+
+/**
+ * calculates query offset amount based on loadtype
+ *
+ * Prepend: OFFSET is calculated by counting backwards the number of items that needs to be
+ * loaded before [key]. For example, if key = 30 and loadSize = 5, then offset = 25 and items
+ * in db position 26-30 are loaded.
+ * If requested loadSize is larger than the number of available items to
+ * prepend, OFFSET clips to 0 to prevent negative OFFSET.
+ *
+ * Refresh:
+ * If initialKey is supplied through Pager, Paging 3 will now start loading from
+ * initialKey with initialKey being the first item.
+ * If key is supplied by [getClippedRefreshKey], the key has already been adjusted to load half
+ * of the requested items before anchorPosition and the other half after anchorPosition. See
+ * comments on [getClippedRefreshKey] for more details.
+ * If key (regardless if from initialKey or [getClippedRefreshKey]) is larger than available items,
+ * the last page will be loaded by counting backwards the loadSize before last item in
+ * database. For example, this can happen if invalidation came from a large number of items
+ * dropped. i.e. in items 0 - 100, items 41-80 are dropped. Depending on last
+ * viewed item, hypothetically [getClippedRefreshKey] may return key = 60. If loadSize = 10, then items
+ * 31-40 will be loaded.
+ */
+fun getOffset(params: PagingSource.LoadParams<Int>, key: Int, itemCount: Int): Int {
+ return when (params) {
+ is PagingSource.LoadParams.Prepend ->
+ if (key < params.loadSize) {
+ 0
+ } else {
+ key - params.loadSize
+ }
+ is PagingSource.LoadParams.Append -> key
+ is PagingSource.LoadParams.Refresh ->
+ if (key >= itemCount) {
+ maxOf(0, itemCount - params.loadSize)
+ } else {
+ key
+ }
+ }
+}
+
+/**
+ * Returns the key for [PagingSource] for a non-initial REFRESH load.
+ *
+ * To prevent a negative key, key is clipped to 0 when the number of items available before
+ * anchorPosition is less than the requested amount of initialLoadSize / 2.
+ */
+fun <Value : Any> PagingState<Int, Value>.getClippedRefreshKey(): Int? {
+ return when (val anchorPosition = anchorPosition) {
+ null -> null
+ /**
+ * It is unknown whether anchorPosition represents the item at the top of the screen or item at
+ * the bottom of the screen. To ensure the number of items loaded is enough to fill up the
+ * screen, half of loadSize is loaded before the anchorPosition and the other half is
+ * loaded after the anchorPosition -- anchorPosition becomes the middle item.
+ */
+ else -> maxOf(0, anchorPosition - (config.initialLoadSize / 2))
+ }
+}
diff --git a/room/room-paging/src/main/kotlin/androidx/room/paging/util/ThreadSafeInvalidationObserver.kt b/room/room-paging/src/main/kotlin/androidx/room/paging/util/ThreadSafeInvalidationObserver.kt
new file mode 100644
index 0000000..90b9fb7
--- /dev/null
+++ b/room/room-paging/src/main/kotlin/androidx/room/paging/util/ThreadSafeInvalidationObserver.kt
@@ -0,0 +1,39 @@
+/*
+ * 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.room.paging.util
+
+import androidx.annotation.RestrictTo
+import androidx.room.InvalidationTracker
+import androidx.room.RoomDatabase
+import java.util.concurrent.atomic.AtomicBoolean
+
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+class ThreadSafeInvalidationObserver(
+ tables: Array<out String>,
+ val onInvalidated: () -> Unit,
+) : InvalidationTracker.Observer(tables) {
+ private val registered: AtomicBoolean = AtomicBoolean(false)
+
+ override fun onInvalidated(tables: MutableSet<String>) {
+ onInvalidated()
+ }
+
+ fun registerIfNecessary(db: RoomDatabase) {
+ if (registered.compareAndSet(false, true)) {
+ db.invalidationTracker.addWeakObserver(this)
+ }
+ }
+}
\ No newline at end of file
diff --git a/room/room-runtime/api/api_lint.ignore b/room/room-runtime/api/api_lint.ignore
index 1bad234..5e5a8aa 100644
--- a/room/room-runtime/api/api_lint.ignore
+++ b/room/room-runtime/api/api_lint.ignore
@@ -35,6 +35,12 @@
Registration methods should have overload that accepts delivery Executor: `createFromInputStream`
+InvalidNullability: androidx.room.MultiInstanceInvalidationService#onBind(android.content.Intent):
+ Invalid nullability on method `onBind` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.room.MultiInstanceInvalidationService#onBind(android.content.Intent) parameter #0:
+ Invalid nullability on parameter `intent` in method `onBind`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+
+
MissingGetterMatchingBuilder: androidx.room.RoomDatabase.Builder#addCallback(androidx.room.RoomDatabase.Callback):
T does not declare a `getCallbacks()` method matching method androidx.room.RoomDatabase.Builder.addCallback(androidx.room.RoomDatabase.Callback)
MissingGetterMatchingBuilder: androidx.room.RoomDatabase.Builder#addMigrations(androidx.room.migration.Migration...):
diff --git a/security/security-crypto/api/api_lint.ignore b/security/security-crypto/api/api_lint.ignore
index dd57353..7ca3054 100644
--- a/security/security-crypto/api/api_lint.ignore
+++ b/security/security-crypto/api/api_lint.ignore
@@ -3,6 +3,16 @@
Registration methods should have overload that accepts delivery Executor: `registerOnSharedPreferenceChangeListener`
+InvalidNullability: androidx.security.crypto.EncryptedSharedPreferences#getString(String, String):
+ Invalid nullability on method `getString` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.security.crypto.EncryptedSharedPreferences#getStringSet(String, java.util.Set<java.lang.String>):
+ Invalid nullability on method `getStringSet` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.security.crypto.EncryptedSharedPreferences#registerOnSharedPreferenceChangeListener(android.content.SharedPreferences.OnSharedPreferenceChangeListener) parameter #0:
+ Invalid nullability on parameter `listener` in method `registerOnSharedPreferenceChangeListener`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.security.crypto.EncryptedSharedPreferences#unregisterOnSharedPreferenceChangeListener(android.content.SharedPreferences.OnSharedPreferenceChangeListener) parameter #0:
+ Invalid nullability on parameter `listener` in method `unregisterOnSharedPreferenceChangeListener`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+
+
MissingGetterMatchingBuilder: androidx.security.crypto.EncryptedFile.Builder#setKeysetAlias(String):
androidx.security.crypto.EncryptedFile does not declare a `getKeysetAlias()` method matching method androidx.security.crypto.EncryptedFile.Builder.setKeysetAlias(String)
MissingGetterMatchingBuilder: androidx.security.crypto.EncryptedFile.Builder#setKeysetPrefName(String):
diff --git a/settings.gradle b/settings.gradle
index aaf46ca..19b0107 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -27,7 +27,7 @@
}
dependencies {
- classpath("com.gradle:gradle-enterprise-gradle-plugin:3.8.1")
+ classpath("com.gradle:gradle-enterprise-gradle-plugin:3.9")
classpath("com.gradle:common-custom-user-data-gradle-plugin:1.6.5")
}
}
@@ -412,6 +412,7 @@
includeProject(":compose:material:material-icons-extended-twotone", [BuildType.COMPOSE])
includeProject(":compose:material:material-ripple", [BuildType.COMPOSE])
includeProject(":compose:material:material-window", [BuildType.COMPOSE])
+includeProject(":compose:material:material-window:material-window-samples", "compose/material/material-window/samples", [BuildType.COMPOSE])
includeProject(":compose:material:material:icons:generator", [BuildType.COMPOSE])
includeProject(":compose:material:material:integration-tests:material-demos", [BuildType.COMPOSE])
includeProject(":compose:material:material:integration-tests:material-catalog", [BuildType.COMPOSE])
@@ -729,8 +730,8 @@
includeProject(":textclassifier:textclassifier", [BuildType.MAIN])
includeProject(":tracing:tracing")
includeProject(":tracing:tracing-ktx")
-includeProject(":tracing:tracing-perfetto", [BuildType.MAIN, BuildType.COMPOSE])
-includeProject(":tracing:tracing-perfetto-binary", [BuildType.MAIN, BuildType.COMPOSE])
+includeProject(":tracing:tracing-perfetto")
+includeProject(":tracing:tracing-perfetto-binary")
includeProject(":transition:transition", [BuildType.MAIN, BuildType.FLAN])
includeProject(":transition:transition-ktx", [BuildType.MAIN, BuildType.FLAN])
includeProject(":tvprovider:tvprovider", [BuildType.MAIN])
diff --git a/slice/slice-remotecallback/api/api_lint.ignore b/slice/slice-remotecallback/api/api_lint.ignore
new file mode 100644
index 0000000..6f9258d
--- /dev/null
+++ b/slice/slice-remotecallback/api/api_lint.ignore
@@ -0,0 +1,7 @@
+// Baseline format: 1.0
+InvalidNullability: androidx.slice.remotecallback.RemoteSliceProvider#attachInfo(android.content.Context, android.content.pm.ProviderInfo) parameter #0:
+ Invalid nullability on parameter `context` in method `attachInfo`. Parameters of overrides cannot be NonNull if super parameter is Nullable.
+InvalidNullability: androidx.slice.remotecallback.RemoteSliceProvider#attachInfo(android.content.Context, android.content.pm.ProviderInfo) parameter #1:
+ Invalid nullability on parameter `info` in method `attachInfo`. Parameters of overrides cannot be NonNull if super parameter is Nullable.
+InvalidNullability: androidx.slice.remotecallback.RemoteSliceProvider#createRemoteCallback(android.content.Context) parameter #0:
+ Invalid nullability on parameter `context` in method `createRemoteCallback`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
diff --git a/slice/slice-view/api/api_lint.ignore b/slice/slice-view/api/api_lint.ignore
index 78fbd80..453a582 100644
--- a/slice/slice-view/api/api_lint.ignore
+++ b/slice/slice-view/api/api_lint.ignore
@@ -1,6 +1,6 @@
// Baseline format: 1.0
BannedThrow: androidx.slice.SliceUtils#serializeSlice(androidx.slice.Slice, android.content.Context, java.io.OutputStream, androidx.slice.SliceUtils.SerializeOptions):
- Methods must not mention RuntimeException subclasses in throws clauses (was `java.lang.IllegalArgumentException`)
+ Methods must not throw unchecked exceptions
ContextFirst: androidx.slice.SliceUtils#serializeSlice(androidx.slice.Slice, android.content.Context, java.io.OutputStream, androidx.slice.SliceUtils.SerializeOptions) parameter #1:
@@ -13,6 +13,18 @@
Registration methods should have overload that accepts delivery Executor: `parseSlice`
+InvalidNullability: androidx.slice.widget.GridRowView#setSliceItem(androidx.slice.widget.SliceContent, boolean, int, int, androidx.slice.widget.SliceView.OnSliceActionListener) parameter #0:
+ Invalid nullability on parameter `slice` in method `setSliceItem`. Parameters of overrides cannot be NonNull if super parameter is Nullable.
+InvalidNullability: androidx.slice.widget.RowView#onClick(android.view.View) parameter #0:
+ Invalid nullability on parameter `view` in method `onClick`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.slice.widget.RowView#onItemSelected(android.widget.AdapterView<?>, android.view.View, int, long) parameter #0:
+ Invalid nullability on parameter `parent` in method `onItemSelected`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.slice.widget.RowView#onItemSelected(android.widget.AdapterView<?>, android.view.View, int, long) parameter #1:
+ Invalid nullability on parameter `view` in method `onItemSelected`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.slice.widget.RowView#onNothingSelected(android.widget.AdapterView<?>) parameter #0:
+ Invalid nullability on parameter `parent` in method `onNothingSelected`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+
+
MissingNullability: androidx.slice.SliceMetadata#getToggles():
Missing nullability on method `getToggles` return
MissingNullability: androidx.slice.SliceMetadata#sendToggleAction(androidx.slice.core.SliceAction, boolean) parameter #0:
diff --git a/slidingpanelayout/slidingpanelayout/api/api_lint.ignore b/slidingpanelayout/slidingpanelayout/api/api_lint.ignore
index 9545fc1..a178016 100644
--- a/slidingpanelayout/slidingpanelayout/api/api_lint.ignore
+++ b/slidingpanelayout/slidingpanelayout/api/api_lint.ignore
@@ -1,4 +1,10 @@
// Baseline format: 1.0
+InvalidNullability: androidx.slidingpanelayout.widget.SlidingPaneLayout#addView(android.view.View, int, android.view.ViewGroup.LayoutParams) parameter #0:
+ Invalid nullability on parameter `child` in method `addView`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.slidingpanelayout.widget.SlidingPaneLayout#removeView(android.view.View) parameter #0:
+ Invalid nullability on parameter `view` in method `removeView`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+
+
ListenerInterface: androidx.slidingpanelayout.widget.SlidingPaneLayout.SimplePanelSlideListener:
Listeners should be an interface, or otherwise renamed Callback: SimplePanelSlideListener
diff --git a/sqlite/sqlite/api/api_lint.ignore b/sqlite/sqlite/api/api_lint.ignore
index a064eb7..6f3202cd 100644
--- a/sqlite/sqlite/api/api_lint.ignore
+++ b/sqlite/sqlite/api/api_lint.ignore
@@ -35,6 +35,14 @@
Method parameter should be Collection<Object> (or subclass) instead of raw array; was `java.lang.Object[]`
+BannedThrow: androidx.sqlite.db.SupportSQLiteDatabase#execSQL(String):
+ Methods must not throw unchecked exceptions
+BannedThrow: androidx.sqlite.db.SupportSQLiteDatabase#execSQL(String, Object[]):
+ Methods must not throw unchecked exceptions
+BannedThrow: androidx.sqlite.db.SupportSQLiteDatabase#insert(String, int, android.content.ContentValues):
+ Methods must not throw unchecked exceptions
+
+
BuilderSetStyle: androidx.sqlite.db.SupportSQLiteOpenHelper.Configuration.Builder#allowDataLossOnRecovery(boolean):
Builder methods names should use setFoo() / addFoo() / clearFoo() style: method androidx.sqlite.db.SupportSQLiteOpenHelper.Configuration.Builder.allowDataLossOnRecovery(boolean)
BuilderSetStyle: androidx.sqlite.db.SupportSQLiteOpenHelper.Configuration.Builder#callback(androidx.sqlite.db.SupportSQLiteOpenHelper.Callback):
diff --git a/test/ext/junit-gtest/api/api_lint.ignore b/test/ext/junit-gtest/api/api_lint.ignore
new file mode 100644
index 0000000..d757107
--- /dev/null
+++ b/test/ext/junit-gtest/api/api_lint.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+InvalidNullability: androidx.test.ext.junitgtest.GtestRunner#filter(org.junit.runner.manipulation.Filter) parameter #0:
+ Invalid nullability on parameter `filter` in method `filter`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.test.ext.junitgtest.GtestRunner#run(org.junit.runner.notification.RunNotifier) parameter #0:
+ Invalid nullability on parameter `notifier` in method `run`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
diff --git a/testutils/testutils-macrobenchmark/src/main/java/androidx/testutils/MacrobenchUtils.kt b/testutils/testutils-macrobenchmark/src/main/java/androidx/testutils/MacrobenchUtils.kt
index c1f6cd0..9d1d8b7 100644
--- a/testutils/testutils-macrobenchmark/src/main/java/androidx/testutils/MacrobenchUtils.kt
+++ b/testutils/testutils-macrobenchmark/src/main/java/androidx/testutils/MacrobenchUtils.kt
@@ -51,10 +51,10 @@
* Default compilation modes to test for all AndroidX macrobenchmarks.
*
* Baseline profiles are only supported from Nougat (API 24),
- * currently through Android 11 (API 30)
+ * currently through Android 12 (API 31)
*/
@Suppress("ConvertTwoComparisonsToRangeCheck") // lint doesn't understand range checks
-val COMPILATION_MODES = if (Build.VERSION.SDK_INT >= 24 && Build.VERSION.SDK_INT <= 30) {
+val COMPILATION_MODES = if (Build.VERSION.SDK_INT >= 24 && Build.VERSION.SDK_INT <= 31) {
listOf(CompilationMode.Partial())
} else {
emptyList()
diff --git a/tracing/tracing-ktx/api/1.1.0-beta03.txt b/tracing/tracing-ktx/api/1.1.0-beta03.txt
index e77d248..0cb3ea1 100644
--- a/tracing/tracing-ktx/api/1.1.0-beta03.txt
+++ b/tracing/tracing-ktx/api/1.1.0-beta03.txt
@@ -3,7 +3,7 @@
public final class TraceKt {
method public static inline <T> T! trace(String label, kotlin.jvm.functions.Function0<? extends T> block);
- method public static suspend inline <T> Object? traceAsync(String methodName, int cookie, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
+ method public static suspend inline <T> Object? traceAsync(String methodName, int cookie, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
}
}
diff --git a/tracing/tracing-ktx/api/current.ignore b/tracing/tracing-ktx/api/current.ignore
new file mode 100644
index 0000000..12e4a8a
--- /dev/null
+++ b/tracing/tracing-ktx/api/current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.tracing.TraceKt#traceAsync(String, int, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.tracing.TraceKt.traceAsync
diff --git a/tracing/tracing-ktx/api/current.txt b/tracing/tracing-ktx/api/current.txt
index e77d248..0cb3ea1 100644
--- a/tracing/tracing-ktx/api/current.txt
+++ b/tracing/tracing-ktx/api/current.txt
@@ -3,7 +3,7 @@
public final class TraceKt {
method public static inline <T> T! trace(String label, kotlin.jvm.functions.Function0<? extends T> block);
- method public static suspend inline <T> Object? traceAsync(String methodName, int cookie, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
+ method public static suspend inline <T> Object? traceAsync(String methodName, int cookie, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
}
}
diff --git a/tracing/tracing-ktx/api/public_plus_experimental_1.1.0-beta03.txt b/tracing/tracing-ktx/api/public_plus_experimental_1.1.0-beta03.txt
index e77d248..0cb3ea1 100644
--- a/tracing/tracing-ktx/api/public_plus_experimental_1.1.0-beta03.txt
+++ b/tracing/tracing-ktx/api/public_plus_experimental_1.1.0-beta03.txt
@@ -3,7 +3,7 @@
public final class TraceKt {
method public static inline <T> T! trace(String label, kotlin.jvm.functions.Function0<? extends T> block);
- method public static suspend inline <T> Object? traceAsync(String methodName, int cookie, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
+ method public static suspend inline <T> Object? traceAsync(String methodName, int cookie, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
}
}
diff --git a/tracing/tracing-ktx/api/public_plus_experimental_current.txt b/tracing/tracing-ktx/api/public_plus_experimental_current.txt
index e77d248..0cb3ea1 100644
--- a/tracing/tracing-ktx/api/public_plus_experimental_current.txt
+++ b/tracing/tracing-ktx/api/public_plus_experimental_current.txt
@@ -3,7 +3,7 @@
public final class TraceKt {
method public static inline <T> T! trace(String label, kotlin.jvm.functions.Function0<? extends T> block);
- method public static suspend inline <T> Object? traceAsync(String methodName, int cookie, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
+ method public static suspend inline <T> Object? traceAsync(String methodName, int cookie, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
}
}
diff --git a/tracing/tracing-ktx/api/restricted_1.1.0-beta03.txt b/tracing/tracing-ktx/api/restricted_1.1.0-beta03.txt
index e77d248..0cb3ea1 100644
--- a/tracing/tracing-ktx/api/restricted_1.1.0-beta03.txt
+++ b/tracing/tracing-ktx/api/restricted_1.1.0-beta03.txt
@@ -3,7 +3,7 @@
public final class TraceKt {
method public static inline <T> T! trace(String label, kotlin.jvm.functions.Function0<? extends T> block);
- method public static suspend inline <T> Object? traceAsync(String methodName, int cookie, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
+ method public static suspend inline <T> Object? traceAsync(String methodName, int cookie, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
}
}
diff --git a/tracing/tracing-ktx/api/restricted_current.ignore b/tracing/tracing-ktx/api/restricted_current.ignore
new file mode 100644
index 0000000..12e4a8a
--- /dev/null
+++ b/tracing/tracing-ktx/api/restricted_current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.tracing.TraceKt#traceAsync(String, int, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super T>,?>, kotlin.coroutines.Continuation<? super T>) parameter #3:
+ Attempted to remove parameter name from parameter arg4 in androidx.tracing.TraceKt.traceAsync
diff --git a/tracing/tracing-ktx/api/restricted_current.txt b/tracing/tracing-ktx/api/restricted_current.txt
index e77d248..0cb3ea1 100644
--- a/tracing/tracing-ktx/api/restricted_current.txt
+++ b/tracing/tracing-ktx/api/restricted_current.txt
@@ -3,7 +3,7 @@
public final class TraceKt {
method public static inline <T> T! trace(String label, kotlin.jvm.functions.Function0<? extends T> block);
- method public static suspend inline <T> Object? traceAsync(String methodName, int cookie, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T> p);
+ method public static suspend inline <T> Object? traceAsync(String methodName, int cookie, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
}
}
diff --git a/tracing/tracing-perfetto-binary/src/main/cpp/jni/androidx_tracing_perfetto_jni_PerfettoNative.cc b/tracing/tracing-perfetto-binary/src/main/cpp/jni/androidx_tracing_perfetto_jni_PerfettoNative.cc
index 8fa849a..73b7aa1 100644
--- a/tracing/tracing-perfetto-binary/src/main/cpp/jni/androidx_tracing_perfetto_jni_PerfettoNative.cc
+++ b/tracing/tracing-perfetto-binary/src/main/cpp/jni/androidx_tracing_perfetto_jni_PerfettoNative.cc
@@ -49,4 +49,10 @@
tracing_perfetto::Flush();
PERFETTO_LOG("Perfetto: Flush()");
}
+JNIEXPORT jstring JNICALL
+Java_androidx_tracing_perfetto_jni_PerfettoNative_nativeVersion(
+ JNIEnv *env, __unused jclass clazz) {
+ PERFETTO_LOG("Perfetto: Version()");
+ return env->NewStringUTF(tracing_perfetto::Version());
+}
} // extern "C"
diff --git a/tracing/tracing-perfetto-binary/src/main/cpp/tracing_perfetto.cc b/tracing/tracing-perfetto-binary/src/main/cpp/tracing_perfetto.cc
index fa0b43a..4d9321a 100644
--- a/tracing/tracing-perfetto-binary/src/main/cpp/tracing_perfetto.cc
+++ b/tracing/tracing-perfetto-binary/src/main/cpp/tracing_perfetto.cc
@@ -22,6 +22,11 @@
// TODO: define API for categories
#define CATEGORY_RENDERING "rendering"
+// Concept of version useful e.g. for human-readable error messages, and stable once released.
+// Does not replace the need for a binary verification mechanism (e.g. checksum check).
+// TODO: populate using CMake
+#define VERSION "1.0.0-alpha01"
+
namespace tracing_perfetto {
void RegisterWithPerfetto() {
perfetto::TracingInitArgs args;
@@ -47,4 +52,8 @@
void Flush() {
perfetto::TrackEvent::Flush();
}
+
+ const char* Version() {
+ return VERSION;
+ }
} // tracing_perfetto
diff --git a/tracing/tracing-perfetto-binary/src/main/cpp/tracing_perfetto.h b/tracing/tracing-perfetto-binary/src/main/cpp/tracing_perfetto.h
index 11a2dae..b24f1c1 100644
--- a/tracing/tracing-perfetto-binary/src/main/cpp/tracing_perfetto.h
+++ b/tracing/tracing-perfetto-binary/src/main/cpp/tracing_perfetto.h
@@ -24,6 +24,7 @@
void TraceEventBegin(int key, const char *traceInfo);
void TraceEventEnd();
void Flush();
+ const char* Version();
}
#endif // TRACING_PERFETTO_H
diff --git a/tracing/tracing-perfetto/build.gradle b/tracing/tracing-perfetto/build.gradle
index 9fe5e0a..785940a 100644
--- a/tracing/tracing-perfetto/build.gradle
+++ b/tracing/tracing-perfetto/build.gradle
@@ -24,6 +24,7 @@
}
dependencies {
+ api("androidx.annotation:annotation:1.3.0")
implementation(libs.kotlinStdlib)
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testRunner)
diff --git a/tracing/tracing-perfetto/src/androidTest/java/androidx/tracing/perfetto/jni/test/PerfettoNativeTest.kt b/tracing/tracing-perfetto/src/androidTest/java/androidx/tracing/perfetto/jni/test/PerfettoNativeTest.kt
index 56a3078..0dc4bf3 100644
--- a/tracing/tracing-perfetto/src/androidTest/java/androidx/tracing/perfetto/jni/test/PerfettoNativeTest.kt
+++ b/tracing/tracing-perfetto/src/androidTest/java/androidx/tracing/perfetto/jni/test/PerfettoNativeTest.kt
@@ -19,22 +19,25 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import androidx.tracing.perfetto.jni.PerfettoNative
+import com.google.common.truth.Truth.assertThat
import org.junit.Test
import org.junit.runner.RunWith
@SmallTest
@RunWith(AndroidJUnit4::class)
class PerfettoNativeTest {
-
companion object {
init {
PerfettoNative.loadLib()
}
+ const val libraryVersion = "1.0.0-alpha01" // TODO: get using reflection
}
@Test
fun testEvents() {
PerfettoNative.nativeRegisterWithPerfetto()
+ assertThat(PerfettoNative.nativeVersion()).isEqualTo(libraryVersion)
+ assertThat(PerfettoNative.Metadata.version).isEqualTo(libraryVersion)
PerfettoNative.nativeTraceEventBegin(123, "foo")
PerfettoNative.nativeTraceEventBegin(321, "bar")
diff --git a/tracing/tracing-perfetto/src/androidTest/java/androidx/tracing/perfetto/test/TracingTest.kt b/tracing/tracing-perfetto/src/androidTest/java/androidx/tracing/perfetto/test/TracingTest.kt
index cd51044..b14f359 100644
--- a/tracing/tracing-perfetto/src/androidTest/java/androidx/tracing/perfetto/test/TracingTest.kt
+++ b/tracing/tracing-perfetto/src/androidTest/java/androidx/tracing/perfetto/test/TracingTest.kt
@@ -27,21 +27,24 @@
@RunWith(AndroidJUnit4::class)
class TracingTest {
@Test
- fun test_endToEnd_noCrash() {
- assertThat(Tracing.isTraceInProgress).isEqualTo(false)
+ fun test_endToEnd_binaryDependenciesPresent() {
+ assertThat(Tracing.isEnabled).isEqualTo(false)
+
+ // Note: no path to binary dependencies provided, so we are testing the case where the app
+ // directly depends on :tracing:tracing-perfetto-binary
+ Tracing.enable()
+ assertThat(Tracing.isEnabled).isEqualTo(true)
Tracing.enable()
- assertThat(Tracing.isTraceInProgress).isEqualTo(false)
-
- Tracing.setTraceInProgress(true)
- assertThat(Tracing.isTraceInProgress).isEqualTo(true)
+ assertThat(Tracing.isEnabled).isEqualTo(true)
Tracing.traceEventStart(123, "foo")
Tracing.traceEventStart(321, "bar")
Tracing.traceEventEnd()
Tracing.traceEventEnd()
- Tracing.setTraceInProgress(false)
- assertThat(Tracing.isTraceInProgress).isEqualTo(false)
+ Tracing.flushEvents()
+
+ // TODO(214562374): verify the content by getting it back from Perfetto
}
-}
+}
\ No newline at end of file
diff --git a/tracing/tracing-perfetto/src/main/AndroidManifest.xml b/tracing/tracing-perfetto/src/main/AndroidManifest.xml
index 76d8aad..40ba88c 100644
--- a/tracing/tracing-perfetto/src/main/AndroidManifest.xml
+++ b/tracing/tracing-perfetto/src/main/AndroidManifest.xml
@@ -16,4 +16,17 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
+ <application>
+ <receiver
+ android:name=".TracingReceiver"
+ android:directBootAware="false"
+ android:enabled="true"
+ android:exported="true"
+ android:permission="android.permission.DUMP">
+ <!-- Note: DUMP above highly limits who can call the receiver; Shell has DUMP perm. -->
+ <intent-filter>
+ <action android:name="androidx.tracing.perfetto.action.ENABLE_TRACING" />
+ </intent-filter>
+ </receiver>
+ </application>
</manifest>
diff --git a/tracing/tracing-perfetto/src/main/java/androidx/tracing/perfetto/Tracing.kt b/tracing/tracing-perfetto/src/main/java/androidx/tracing/perfetto/Tracing.kt
index 3811941..8bde634 100644
--- a/tracing/tracing-perfetto/src/main/java/androidx/tracing/perfetto/Tracing.kt
+++ b/tracing/tracing-perfetto/src/main/java/androidx/tracing/perfetto/Tracing.kt
@@ -15,35 +15,139 @@
*/
package androidx.tracing.perfetto
+import android.util.JsonWriter
+import androidx.tracing.perfetto.TracingReceiver.Companion.KEY_ERROR_MESSAGE
+import androidx.tracing.perfetto.TracingReceiver.Companion.KEY_EXIT_CODE
+import androidx.tracing.perfetto.TracingReceiver.Companion.KEY_REQUIRED_VERSION
+import androidx.tracing.perfetto.TracingReceiver.Companion.RESULT_CODE_ALREADY_ENABLED
+import androidx.tracing.perfetto.TracingReceiver.Companion.RESULT_CODE_ERROR_BINARY_MISSING
+import androidx.tracing.perfetto.TracingReceiver.Companion.RESULT_CODE_ERROR_BINARY_VERSION_MISMATCH
+import androidx.tracing.perfetto.TracingReceiver.Companion.RESULT_CODE_ERROR_OTHER
+import androidx.tracing.perfetto.TracingReceiver.Companion.RESULT_CODE_SUCCESS
+import androidx.tracing.perfetto.TracingReceiver.EnableTracingResultCode
import androidx.tracing.perfetto.jni.PerfettoNative
-import java.util.concurrent.atomic.AtomicBoolean
+import java.io.StringWriter
+import java.util.concurrent.locks.ReentrantReadWriteLock
+import kotlin.concurrent.withLock
object Tracing {
- private val isEnabled = AtomicBoolean()
+ /**
+ * Indicates that the tracing library has been loaded and that the app was registered with
+ * Perfetto as a data source.
+ *
+ * Note: some of class' code relies on the field ever changing from true -> false and not in
+ * the other direction, which is realistic (we cannot unload the library or unregister with
+ * Perfetto at the time of writing).
+ */
+ var isEnabled: Boolean = false
+ private set
- @Volatile
- private var _isTraceInProgress: Boolean = false
+ /**
+ * Ensures that we enable tracing (load the tracing library and register with Perfetto) only
+ * once.
+ *
+ * Note: not intended for synchronization during tracing as not to impact performance.
+ */
+ private val enableTracingLock = ReentrantReadWriteLock()
- val isTraceInProgress: Boolean
- get() = _isTraceInProgress
+ fun enable(path: String? = null): EnableTracingResponse {
+ enableTracingLock.readLock().withLock {
+ if (isEnabled) return EnableTracingResponse(RESULT_CODE_ALREADY_ENABLED)
+ }
- // TODO: replace with a Broadcast
- fun enable() {
- if (!isEnabled.getAndSet(true)) {
- PerfettoNative.loadLib()
- PerfettoNative.nativeRegisterWithPerfetto()
+ enableTracingLock.writeLock().withLock {
+ return enableImpl(path)
}
}
- // TODO: remove and replace with an observer wired into Perfetto
- fun setTraceInProgress(newState: Boolean) {
- val oldState = _isTraceInProgress
- _isTraceInProgress = newState
- if (newState != oldState && !newState) PerfettoNative.nativeFlushEvents()
+ /** Calling thread must obtain a write lock on [enableTracingLock] before calling this method */
+ private fun enableImpl(path: String?): EnableTracingResponse {
+ if (!enableTracingLock.isWriteLockedByCurrentThread) throw RuntimeException()
+
+ if (isEnabled) return EnableTracingResponse(RESULT_CODE_ALREADY_ENABLED)
+
+ // Load library
+ try {
+ PerfettoNative.loadLib(path)
+ } catch (t: Throwable) {
+ when (t) {
+ is UnsatisfiedLinkError, is Exception -> return EnableTracingResponse(
+ exitCode = RESULT_CODE_ERROR_BINARY_MISSING,
+ errorMessage = t.toErrorMessage()
+ )
+ else -> throw t
+ }
+ }
+
+ // Verify binary/java version match
+ val nativeVersion = PerfettoNative.nativeVersion()
+ val javaVersion = PerfettoNative.Metadata.version
+ if (nativeVersion != javaVersion) {
+ return EnableTracingResponse(
+ exitCode = RESULT_CODE_ERROR_BINARY_VERSION_MISMATCH,
+ errorMessage =
+ "Binary and Java version mismatch. " +
+ "Binary: $nativeVersion. " +
+ "Java: $javaVersion",
+ )
+ }
+
+ // Register as a Perfetto SDK data-source
+ try {
+ PerfettoNative.nativeRegisterWithPerfetto()
+ } catch (e: Exception) {
+ return EnableTracingResponse(RESULT_CODE_ERROR_OTHER, errorMessage = e.toErrorMessage())
+ }
+
+ isEnabled = true
+ return EnableTracingResponse(RESULT_CODE_SUCCESS)
}
- fun traceEventStart(key: Int, traceInfo: String) =
- PerfettoNative.nativeTraceEventBegin(key, traceInfo)
+ // TODO: remove and replace with an observer wired into Perfetto
+ fun flushEvents() {
+ if (isEnabled) {
+ PerfettoNative.nativeFlushEvents()
+ }
+ }
- fun traceEventEnd() = PerfettoNative.nativeTraceEventEnd()
+ fun traceEventStart(key: Int, traceInfo: String) {
+ if (isEnabled) {
+ PerfettoNative.nativeTraceEventBegin(key, traceInfo)
+ }
+ }
+
+ fun traceEventEnd() {
+ if (isEnabled) PerfettoNative.nativeTraceEventEnd()
+ }
+
+ data class EnableTracingResponse(
+ @EnableTracingResultCode val exitCode: Int,
+ val errorMessage: String? = null
+ ) {
+ fun toJsonString(): String {
+ val output = StringWriter()
+
+ JsonWriter(output).use {
+ it.beginObject()
+
+ it.name(KEY_EXIT_CODE)
+ it.value(exitCode)
+
+ it.name(KEY_REQUIRED_VERSION)
+ it.value(PerfettoNative.Metadata.version)
+
+ errorMessage?.let { msg ->
+ it.name(KEY_ERROR_MESSAGE)
+ it.value(msg)
+ }
+
+ it.endObject()
+ }
+
+ return output.toString()
+ }
+ }
}
+
+internal fun Throwable.toErrorMessage(): String =
+ javaClass.name + if (message != null) ": $message" else ""
diff --git a/tracing/tracing-perfetto/src/main/java/androidx/tracing/perfetto/TracingReceiver.kt b/tracing/tracing-perfetto/src/main/java/androidx/tracing/perfetto/TracingReceiver.kt
new file mode 100644
index 0000000..5334ceb
--- /dev/null
+++ b/tracing/tracing-perfetto/src/main/java/androidx/tracing/perfetto/TracingReceiver.kt
@@ -0,0 +1,136 @@
+/*
+ * 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.tracing.perfetto
+
+import android.content.BroadcastReceiver
+import android.content.Context
+import android.content.Intent
+import androidx.annotation.IntDef
+import androidx.annotation.RestrictTo
+import androidx.annotation.RestrictTo.Scope.LIBRARY
+import androidx.tracing.perfetto.Tracing.EnableTracingResponse
+import androidx.tracing.perfetto.TracingReceiver.Companion.ACTION_ENABLE_TRACING
+import java.io.File
+
+/** Allows for enabling tracing in an app using a broadcast. @see [ACTION_ENABLE_TRACING] */
+@RestrictTo(LIBRARY)
+class TracingReceiver : BroadcastReceiver() {
+ companion object {
+ /**
+ * Request to enable tracing.
+ *
+ * Request can include [KEY_PATH] as an optional extra.
+ *
+ * Response to the request is a JSON string (to allow for CLI support) with the following:
+ * - [KEY_EXIT_CODE] (always)
+ * - [KEY_REQUIRED_VERSION] (always)
+ * - [KEY_ERROR_MESSAGE] (optional)
+ */
+ const val ACTION_ENABLE_TRACING = "androidx.tracing.perfetto.action.ENABLE_TRACING"
+
+ /** Path to tracing native binary file (optional). */
+ const val KEY_PATH = "path"
+
+ /** Request exit code. */
+ const val KEY_EXIT_CODE = "exitCode"
+
+ /**
+ * Required version of the binaries. Java and binary library versions have to match to
+ * ensure compatibility.
+ */
+ const val KEY_REQUIRED_VERSION = "requiredVersion"
+
+ /** Response error message if present. */
+ const val KEY_ERROR_MESSAGE = "errorMessage"
+
+ const val RESULT_CODE_SUCCESS = 1
+ const val RESULT_CODE_ALREADY_ENABLED = 2
+ const val RESULT_CODE_ERROR_BINARY_MISSING = 11
+ const val RESULT_CODE_ERROR_BINARY_VERSION_MISMATCH = 12
+ const val RESULT_CODE_ERROR_BINARY_VERIFICATION_ERROR = 13
+ const val RESULT_CODE_ERROR_OTHER = 99
+ }
+
+ @Retention(AnnotationRetention.SOURCE)
+ @IntDef(
+ RESULT_CODE_SUCCESS,
+ RESULT_CODE_ALREADY_ENABLED,
+ RESULT_CODE_ERROR_BINARY_MISSING,
+ RESULT_CODE_ERROR_BINARY_VERSION_MISMATCH,
+ RESULT_CODE_ERROR_BINARY_VERIFICATION_ERROR,
+ RESULT_CODE_ERROR_OTHER
+ )
+ internal annotation class EnableTracingResultCode
+
+ // TODO: check value on app start
+ override fun onReceive(context: Context?, intent: Intent?) {
+ if (intent == null || intent.action != ACTION_ENABLE_TRACING) return
+
+ // Path to the provided library binary file (optional). If not provided, local library files
+ // will be used if present.
+ val srcPath = intent.extras?.getString(KEY_PATH)
+
+ val response: EnableTracingResponse = when {
+ srcPath != null && context != null -> {
+ try {
+ val dstFile = copyExternalLibraryFile(context, srcPath)
+ Tracing.enable(dstFile.path)
+ } catch (e: Exception) {
+ EnableTracingResponse(
+ exitCode = RESULT_CODE_ERROR_OTHER,
+ errorMessage = e.toErrorMessage()
+ )
+ }
+ }
+ srcPath != null && context == null -> {
+ EnableTracingResponse(
+ exitCode = RESULT_CODE_ERROR_OTHER,
+ errorMessage = "Cannot copy source file: $srcPath without access to" +
+ " a Context instance."
+ )
+ }
+ else -> {
+ // Library path was not provided, trying to resolve using app's local library files.
+ Tracing.enable(null)
+ }
+ }
+
+ setResult(response.exitCode, response.toJsonString(), null)
+ }
+
+ private fun copyExternalLibraryFile(
+ context: Context,
+ srcPath: String
+ ): File {
+ // Prepare a location to copy the library into with the following properties:
+ // 1) app has exclusive write access in
+ // 2) app can load binaries from
+ val abi: String = File(context.applicationInfo.nativeLibraryDir).name // e.g. arm64
+ val dstDir = context.cacheDir.resolve("lib/$abi")
+ dstDir.mkdirs()
+
+ // Copy the library file over
+ //
+ // TODO: load into memory and verify in-memory to prevent from copying a malicious
+ // library into app's local files. Use SHA or Signature to verify the binaries.
+ val srcFile = File(srcPath)
+ val dstFile = dstDir.resolve(srcFile.name)
+ srcFile.copyTo(dstFile, overwrite = true)
+
+ return dstFile
+ }
+}
\ No newline at end of file
diff --git a/tracing/tracing-perfetto/src/main/java/androidx/tracing/perfetto/jni/PerfettoNative.kt b/tracing/tracing-perfetto/src/main/java/androidx/tracing/perfetto/jni/PerfettoNative.kt
index 7d139447..c00ff72 100644
--- a/tracing/tracing-perfetto/src/main/java/androidx/tracing/perfetto/jni/PerfettoNative.kt
+++ b/tracing/tracing-perfetto/src/main/java/androidx/tracing/perfetto/jni/PerfettoNative.kt
@@ -16,10 +16,24 @@
package androidx.tracing.perfetto.jni
internal object PerfettoNative {
- fun loadLib() = System.loadLibrary("tracing_perfetto")
+ private const val libraryName = "tracing_perfetto"
+
+ // TODO: load from a file produced at build time
+ object Metadata {
+ const val version = "1.0.0-alpha01"
+ // TODO: add SHA / signature to verify binaries before loading
+ }
+
+ fun loadLib(path: String? = null) {
+ when (path) {
+ null -> System.loadLibrary(libraryName)
+ else -> System.load(path) // TODO: security
+ }
+ }
external fun nativeRegisterWithPerfetto()
external fun nativeTraceEventBegin(key: Int, traceInfo: String)
external fun nativeTraceEventEnd()
external fun nativeFlushEvents()
+ external fun nativeVersion(): String
}
diff --git a/vectordrawable/vectordrawable-seekable/api/api_lint.ignore b/vectordrawable/vectordrawable-seekable/api/api_lint.ignore
new file mode 100644
index 0000000..6aa513d
--- /dev/null
+++ b/vectordrawable/vectordrawable-seekable/api/api_lint.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+InvalidNullability: androidx.vectordrawable.graphics.drawable.SeekableAnimatedVectorDrawable#onBoundsChange(android.graphics.Rect) parameter #0:
+ Invalid nullability on parameter `bounds` in method `onBoundsChange`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.vectordrawable.graphics.drawable.SeekableAnimatedVectorDrawable#onStateChange(int[]) parameter #0:
+ Invalid nullability on parameter `state` in method `onStateChange`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
diff --git a/viewpager/viewpager/src/androidTest/java/androidx/viewpager/widget/BaseViewPagerTest.java b/viewpager/viewpager/src/androidTest/java/androidx/viewpager/widget/BaseViewPagerTest.java
index 20a36e7..88bd0a0 100644
--- a/viewpager/viewpager/src/androidTest/java/androidx/viewpager/widget/BaseViewPagerTest.java
+++ b/viewpager/viewpager/src/androidTest/java/androidx/viewpager/widget/BaseViewPagerTest.java
@@ -79,6 +79,7 @@
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
@@ -1131,7 +1132,7 @@
@Test
@LargeTest
- @FlakyTest(bugId = 179887413)
+ @Ignore("b/179887413")
public void testPageScrollPositionChangesSwipe() {
// Swipe one page to the left
verifyScrollCallbacksToHigherPage(ViewPagerActions.wrap(swipeLeft()), 1);
diff --git a/viewpager2/viewpager2/api/api_lint.ignore b/viewpager2/viewpager2/api/api_lint.ignore
index 52ddf8d..aed8d60 100644
--- a/viewpager2/viewpager2/api/api_lint.ignore
+++ b/viewpager2/viewpager2/api/api_lint.ignore
@@ -1,4 +1,10 @@
// Baseline format: 1.0
+InvalidNullability: androidx.viewpager2.widget.WindowInsetsApplier#onApplyWindowInsets(android.view.View, androidx.core.view.WindowInsetsCompat) parameter #0:
+ Invalid nullability on parameter `v` in method `onApplyWindowInsets`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.viewpager2.widget.WindowInsetsApplier#onApplyWindowInsets(android.view.View, androidx.core.view.WindowInsetsCompat) parameter #1:
+ Invalid nullability on parameter `insets` in method `onApplyWindowInsets`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+
+
MissingNullability: androidx.viewpager2.widget.ViewPager2#dispatchRestoreInstanceState(android.util.SparseArray<android.os.Parcelable>) parameter #0:
Missing nullability on parameter `container` in method `dispatchRestoreInstanceState`
MissingNullability: androidx.viewpager2.widget.ViewPager2#getAccessibilityClassName():
diff --git a/wear/compose/compose-material/api/current.txt b/wear/compose/compose-material/api/current.txt
index 8366b15..f419366 100644
--- a/wear/compose/compose-material/api/current.txt
+++ b/wear/compose/compose-material/api/current.txt
@@ -229,9 +229,9 @@
method public boolean getRepeatItems();
method public int getSelectedOption();
method public boolean isScrollInProgress();
- method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? scrollToOption(int index, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public void setNumberOfOptions(int newNumberOfOptions);
+ method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? scrollToOption(int index, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public void setNumberOfOptions(int);
property public boolean isScrollInProgress;
property public final int numberOfOptions;
property public final boolean repeatItems;
@@ -387,14 +387,14 @@
@androidx.compose.runtime.Stable public final class ScalingLazyListState implements androidx.compose.foundation.gestures.ScrollableState {
ctor public ScalingLazyListState(optional int initialCenterItemIndex, optional int initialCenterItemScrollOffset);
- method public suspend Object? animateScrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? animateScrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public float dispatchRawDelta(float delta);
method public int getCenterItemIndex();
method public int getCenterItemScrollOffset();
method public androidx.wear.compose.material.ScalingLazyListLayoutInfo getLayoutInfo();
method public boolean isScrollInProgress();
- method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? scrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? scrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final int centerItemIndex;
property public final int centerItemScrollOffset;
property public boolean isScrollInProgress;
@@ -492,7 +492,7 @@
method public androidx.wear.compose.material.SwipeToDismissValue getCurrentValue();
method public androidx.wear.compose.material.SwipeToDismissValue getTargetValue();
method public boolean isAnimationRunning();
- method public suspend Object? snapTo(androidx.wear.compose.material.SwipeToDismissValue targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? snapTo(androidx.wear.compose.material.SwipeToDismissValue targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final androidx.wear.compose.material.SwipeToDismissValue currentValue;
property public final boolean isAnimationRunning;
property public final androidx.wear.compose.material.SwipeToDismissValue targetValue;
diff --git a/wear/compose/compose-material/api/public_plus_experimental_current.txt b/wear/compose/compose-material/api/public_plus_experimental_current.txt
index dd4bf51..b06cca9 100644
--- a/wear/compose/compose-material/api/public_plus_experimental_current.txt
+++ b/wear/compose/compose-material/api/public_plus_experimental_current.txt
@@ -244,9 +244,9 @@
method public boolean getRepeatItems();
method public int getSelectedOption();
method public boolean isScrollInProgress();
- method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? scrollToOption(int index, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public void setNumberOfOptions(int newNumberOfOptions);
+ method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? scrollToOption(int index, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public void setNumberOfOptions(int);
property public boolean isScrollInProgress;
property public final int numberOfOptions;
property public final boolean repeatItems;
@@ -413,14 +413,14 @@
@androidx.compose.runtime.Stable public final class ScalingLazyListState implements androidx.compose.foundation.gestures.ScrollableState {
ctor public ScalingLazyListState(optional int initialCenterItemIndex, optional int initialCenterItemScrollOffset);
- method public suspend Object? animateScrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? animateScrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public float dispatchRawDelta(float delta);
method public int getCenterItemIndex();
method public int getCenterItemScrollOffset();
method public androidx.wear.compose.material.ScalingLazyListLayoutInfo getLayoutInfo();
method public boolean isScrollInProgress();
- method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? scrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? scrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final int centerItemIndex;
property public final int centerItemScrollOffset;
property public boolean isScrollInProgress;
@@ -528,7 +528,7 @@
method public androidx.wear.compose.material.SwipeToDismissValue getCurrentValue();
method public androidx.wear.compose.material.SwipeToDismissValue getTargetValue();
method public boolean isAnimationRunning();
- method public suspend Object? snapTo(androidx.wear.compose.material.SwipeToDismissValue targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? snapTo(androidx.wear.compose.material.SwipeToDismissValue targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final androidx.wear.compose.material.SwipeToDismissValue currentValue;
property public final boolean isAnimationRunning;
property public final androidx.wear.compose.material.SwipeToDismissValue targetValue;
@@ -567,7 +567,7 @@
@androidx.compose.runtime.Stable @androidx.wear.compose.material.ExperimentalWearMaterialApi public class SwipeableState<T> {
ctor public SwipeableState(T? initialValue, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animationSpec, optional kotlin.jvm.functions.Function1<? super T,java.lang.Boolean> confirmStateChange);
- method @androidx.wear.compose.material.ExperimentalWearMaterialApi public final suspend Object? animateTo(T? targetValue, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> anim, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @androidx.wear.compose.material.ExperimentalWearMaterialApi public final suspend Object? animateTo(T? targetValue, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> anim, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public final T! getCurrentValue();
method public final float getDirection();
method public final androidx.compose.runtime.State<java.lang.Float> getOffset();
@@ -575,8 +575,8 @@
method public final androidx.wear.compose.material.SwipeProgress<T> getProgress();
method public final T! getTargetValue();
method public final boolean isAnimationRunning();
- method @androidx.wear.compose.material.ExperimentalWearMaterialApi public final suspend Object? performFling(float velocity, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method @androidx.wear.compose.material.ExperimentalWearMaterialApi public final suspend Object? snapTo(T? targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @androidx.wear.compose.material.ExperimentalWearMaterialApi public final suspend Object? performFling(float velocity, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method @androidx.wear.compose.material.ExperimentalWearMaterialApi public final suspend Object? snapTo(T? targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final T! currentValue;
property public final float direction;
property public final boolean isAnimationRunning;
diff --git a/wear/compose/compose-material/api/restricted_current.txt b/wear/compose/compose-material/api/restricted_current.txt
index 8366b15..f419366 100644
--- a/wear/compose/compose-material/api/restricted_current.txt
+++ b/wear/compose/compose-material/api/restricted_current.txt
@@ -229,9 +229,9 @@
method public boolean getRepeatItems();
method public int getSelectedOption();
method public boolean isScrollInProgress();
- method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? scrollToOption(int index, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public void setNumberOfOptions(int newNumberOfOptions);
+ method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? scrollToOption(int index, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public void setNumberOfOptions(int);
property public boolean isScrollInProgress;
property public final int numberOfOptions;
property public final boolean repeatItems;
@@ -387,14 +387,14 @@
@androidx.compose.runtime.Stable public final class ScalingLazyListState implements androidx.compose.foundation.gestures.ScrollableState {
ctor public ScalingLazyListState(optional int initialCenterItemIndex, optional int initialCenterItemScrollOffset);
- method public suspend Object? animateScrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? animateScrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public float dispatchRawDelta(float delta);
method public int getCenterItemIndex();
method public int getCenterItemScrollOffset();
method public androidx.wear.compose.material.ScalingLazyListLayoutInfo getLayoutInfo();
method public boolean isScrollInProgress();
- method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public suspend Object? scrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? scroll(androidx.compose.foundation.MutatePriority scrollPriority, kotlin.jvm.functions.Function2<? super androidx.compose.foundation.gestures.ScrollScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? scrollToItem(int index, optional int scrollOffset, optional kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final int centerItemIndex;
property public final int centerItemScrollOffset;
property public boolean isScrollInProgress;
@@ -492,7 +492,7 @@
method public androidx.wear.compose.material.SwipeToDismissValue getCurrentValue();
method public androidx.wear.compose.material.SwipeToDismissValue getTargetValue();
method public boolean isAnimationRunning();
- method public suspend Object? snapTo(androidx.wear.compose.material.SwipeToDismissValue targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public suspend Object? snapTo(androidx.wear.compose.material.SwipeToDismissValue targetValue, kotlin.coroutines.Continuation<? super kotlin.Unit>);
property public final androidx.wear.compose.material.SwipeToDismissValue currentValue;
property public final boolean isAnimationRunning;
property public final androidx.wear.compose.material.SwipeToDismissValue targetValue;
diff --git a/wear/compose/compose-material/benchmark/src/androidTest/java/androidx/wear/compose/material/benchmark/ScalingLazyColumnBenchmark.kt b/wear/compose/compose-material/benchmark/src/androidTest/java/androidx/wear/compose/material/benchmark/ScalingLazyColumnBenchmark.kt
index ba004f2..dbb84ac 100644
--- a/wear/compose/compose-material/benchmark/src/androidTest/java/androidx/wear/compose/material/benchmark/ScalingLazyColumnBenchmark.kt
+++ b/wear/compose/compose-material/benchmark/src/androidTest/java/androidx/wear/compose/material/benchmark/ScalingLazyColumnBenchmark.kt
@@ -36,7 +36,6 @@
import androidx.compose.ui.unit.dp
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.LargeTest
-import androidx.wear.compose.material.ExperimentalWearMaterialApi
import androidx.wear.compose.material.MaterialTheme
import androidx.wear.compose.material.ScalingLazyColumn
import androidx.wear.compose.material.Text
@@ -93,7 +92,6 @@
private var itemSizeDp: Dp = 10.dp
private var defaultItemSpacingDp: Dp = 4.dp
- @OptIn(ExperimentalWearMaterialApi::class)
@Composable
override fun MeasuredContent() {
ScalingLazyColumn(
diff --git a/wear/compose/compose-material/src/androidAndroidTest/kotlin/androidx/wear/compose/material/InlineSliderTest.kt b/wear/compose/compose-material/src/androidAndroidTest/kotlin/androidx/wear/compose/material/InlineSliderTest.kt
index 2e9bc51..41c1ec5 100644
--- a/wear/compose/compose-material/src/androidAndroidTest/kotlin/androidx/wear/compose/material/InlineSliderTest.kt
+++ b/wear/compose/compose-material/src/androidAndroidTest/kotlin/androidx/wear/compose/material/InlineSliderTest.kt
@@ -41,7 +41,6 @@
import org.junit.Rule
import org.junit.Test
-@ExperimentalWearMaterialApi
public class InlineSliderTest {
@get:Rule
public val rule = createComposeRule()
@@ -410,7 +409,6 @@
private val DefaultIconWidth = 24.dp
}
-@ExperimentalWearMaterialApi
public class IntegerInlineSliderTest {
@get:Rule
public val rule = createComposeRule()
diff --git a/wear/compose/compose-material/src/androidAndroidTest/kotlin/androidx/wear/compose/material/StepperTest.kt b/wear/compose/compose-material/src/androidAndroidTest/kotlin/androidx/wear/compose/material/StepperTest.kt
index 078440c..e617d6b 100644
--- a/wear/compose/compose-material/src/androidAndroidTest/kotlin/androidx/wear/compose/material/StepperTest.kt
+++ b/wear/compose/compose-material/src/androidAndroidTest/kotlin/androidx/wear/compose/material/StepperTest.kt
@@ -44,7 +44,6 @@
import org.junit.Rule
import org.junit.Test
-@ExperimentalWearMaterialApi
public class StepperTest {
@get:Rule
public val rule = createComposeRule()
@@ -363,7 +362,6 @@
private val DefaultIconHeight = 24.dp
}
-@ExperimentalWearMaterialApi
public class IntegerStepperTest {
@get:Rule
public val rule = createComposeRule()
diff --git a/wear/compose/compose-navigation/src/androidTest/kotlin/androidx/wear/compose/navigation/SwipeDismissableNavHostTest.kt b/wear/compose/compose-navigation/src/androidTest/kotlin/androidx/wear/compose/navigation/SwipeDismissableNavHostTest.kt
index e496106..3716bae 100644
--- a/wear/compose/compose-navigation/src/androidTest/kotlin/androidx/wear/compose/navigation/SwipeDismissableNavHostTest.kt
+++ b/wear/compose/compose-navigation/src/androidTest/kotlin/androidx/wear/compose/navigation/SwipeDismissableNavHostTest.kt
@@ -260,6 +260,27 @@
}
@Test
+ fun updates_lifecycle_after_popping_back_stack() {
+ lateinit var navController: NavHostController
+ rule.setContentWithTheme {
+ navController = rememberSwipeDismissableNavController()
+ SwipeDismissWithNavigation(navController)
+ }
+
+ rule.waitForIdle()
+ rule.onNodeWithText(START).performClick()
+
+ rule.runOnIdle {
+ navController.popBackStack()
+ }
+
+ rule.runOnIdle {
+ assertThat(navController.currentBackStackEntry?.lifecycle?.currentState)
+ .isEqualTo(Lifecycle.State.RESUMED)
+ }
+ }
+
+ @Test
fun provides_access_to_current_backstack_entry_state() {
lateinit var navController: NavHostController
lateinit var backStackEntry: State<NavBackStackEntry?>
diff --git a/wear/compose/compose-navigation/src/main/java/androidx/wear/compose/navigation/SwipeDismissableNavHost.kt b/wear/compose/compose-navigation/src/main/java/androidx/wear/compose/navigation/SwipeDismissableNavHost.kt
index 9e84192..bf8658e 100644
--- a/wear/compose/compose-navigation/src/main/java/androidx/wear/compose/navigation/SwipeDismissableNavHost.kt
+++ b/wear/compose/compose-navigation/src/main/java/androidx/wear/compose/navigation/SwipeDismissableNavHost.kt
@@ -21,7 +21,6 @@
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.LaunchedEffect
-import androidx.compose.runtime.SideEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
@@ -155,6 +154,7 @@
val wearNavigator = navController.navigatorProvider.get<Navigator<out NavDestination>>(
WearNavigator.NAME
) as? WearNavigator ?: return
+
val backStack by wearNavigator.backStack.collectAsState()
val transitionsInProgress by wearNavigator.transitionsInProgress.collectAsState()
var initialContent by remember { mutableStateOf(true) }
@@ -182,9 +182,9 @@
// This effect marks the transitions completed when swipe animations finish,
// so that the navigation backstack entries can go to Lifecycle.State.RESUMED.
if (state.isAnimationRunning == false) {
- transitionsInProgress.forEach { entry ->
- wearNavigator.onTransitionComplete(entry)
- }
+ transitionsInProgress.forEach { entry ->
+ wearNavigator.onTransitionComplete(entry)
+ }
}
}
@@ -199,7 +199,7 @@
}
)
- SideEffect {
+ DisposableEffect(previous, current) {
if (initialContent) {
// There are no animations for showing the initial content, so mark transitions complete,
// allowing the navigation backstack entry to go to Lifecycle.State.RESUMED.
@@ -208,6 +208,11 @@
}
initialContent = false
}
+ onDispose {
+ transitionsInProgress.forEach { entry ->
+ wearNavigator.onTransitionComplete(entry)
+ }
+ }
}
}
diff --git a/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/ChipDefaults.java b/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/ChipDefaults.java
index 287db2c..192ad83 100644
--- a/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/ChipDefaults.java
+++ b/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/ChipDefaults.java
@@ -108,8 +108,8 @@
public static final DpProp ICON_SIZE = dp(24);
/** The recommended colors for a primary {@link Chip}. */
- @NonNull public static final ChipColors PRIMARY_COLORS =
- ChipColors.primaryChipColors(Colors.DEFAULT);
+ @NonNull
+ public static final ChipColors PRIMARY_COLORS = ChipColors.primaryChipColors(Colors.DEFAULT);
/** The recommended colors for a secondary {@link Chip}. */
@NonNull
diff --git a/wear/tiles/tiles/api/api_lint.ignore b/wear/tiles/tiles/api/api_lint.ignore
index 219d959..0855d14 100644
--- a/wear/tiles/tiles/api/api_lint.ignore
+++ b/wear/tiles/tiles/api/api_lint.ignore
@@ -3,3 +3,9 @@
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
+
+
+InvalidNullability: androidx.wear.tiles.TileService#onBind(android.content.Intent):
+ Invalid nullability on method `onBind` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.wear.tiles.TileService#onBind(android.content.Intent) parameter #0:
+ Invalid nullability on parameter `intent` in method `onBind`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
diff --git a/wear/watchface/watchface-client-guava/api/current.ignore b/wear/watchface/watchface-client-guava/api/current.ignore
new file mode 100644
index 0000000..6bcf2d9
--- /dev/null
+++ b/wear/watchface/watchface-client-guava/api/current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: 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>, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.InteractiveWatchFaceClient>) parameter #5:
+ Attempted to remove parameter name from parameter arg6 in androidx.wear.watchface.client.ListenableWatchFaceControlClient.getOrCreateInteractiveWatchFaceClient
diff --git a/wear/watchface/watchface-client-guava/api/current.txt b/wear/watchface/watchface-client-guava/api/current.txt
index 144e39a..a07af33 100644
--- a/wear/watchface/watchface-client-guava/api/current.txt
+++ b/wear/watchface/watchface-client-guava/api/current.txt
@@ -10,7 +10,7 @@
method public java.util.Map<java.lang.Integer,androidx.wear.watchface.client.DefaultComplicationDataSourcePolicyAndType> getDefaultComplicationDataSourcePoliciesAndType(android.content.ComponentName watchFaceName);
method public androidx.wear.watchface.client.EditorServiceClient getEditorServiceClient();
method public androidx.wear.watchface.client.InteractiveWatchFaceClient? getInteractiveWatchFaceClientInstance(String instanceId);
- method public suspend Object? getOrCreateInteractiveWatchFaceClient(String id, androidx.wear.watchface.client.DeviceConfig deviceConfig, androidx.wear.watchface.client.WatchUiState watchUiState, androidx.wear.watchface.style.UserStyleData? userStyle, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.InteractiveWatchFaceClient> p);
+ method public suspend Object? getOrCreateInteractiveWatchFaceClient(String id, androidx.wear.watchface.client.DeviceConfig deviceConfig, androidx.wear.watchface.client.WatchUiState watchUiState, androidx.wear.watchface.style.UserStyleData? userStyle, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.InteractiveWatchFaceClient>);
method public com.google.common.util.concurrent.ListenableFuture<androidx.wear.watchface.client.InteractiveWatchFaceClient> listenableGetOrCreateInteractiveWatchFaceClient(String id, androidx.wear.watchface.client.DeviceConfig deviceConfig, androidx.wear.watchface.client.WatchUiState watchUiState, androidx.wear.watchface.style.UserStyleData? userStyle, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData);
field public static final androidx.wear.watchface.client.ListenableWatchFaceControlClient.Companion Companion;
}
diff --git a/wear/watchface/watchface-client-guava/api/public_plus_experimental_current.txt b/wear/watchface/watchface-client-guava/api/public_plus_experimental_current.txt
index 144e39a..a07af33 100644
--- a/wear/watchface/watchface-client-guava/api/public_plus_experimental_current.txt
+++ b/wear/watchface/watchface-client-guava/api/public_plus_experimental_current.txt
@@ -10,7 +10,7 @@
method public java.util.Map<java.lang.Integer,androidx.wear.watchface.client.DefaultComplicationDataSourcePolicyAndType> getDefaultComplicationDataSourcePoliciesAndType(android.content.ComponentName watchFaceName);
method public androidx.wear.watchface.client.EditorServiceClient getEditorServiceClient();
method public androidx.wear.watchface.client.InteractiveWatchFaceClient? getInteractiveWatchFaceClientInstance(String instanceId);
- method public suspend Object? getOrCreateInteractiveWatchFaceClient(String id, androidx.wear.watchface.client.DeviceConfig deviceConfig, androidx.wear.watchface.client.WatchUiState watchUiState, androidx.wear.watchface.style.UserStyleData? userStyle, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.InteractiveWatchFaceClient> p);
+ method public suspend Object? getOrCreateInteractiveWatchFaceClient(String id, androidx.wear.watchface.client.DeviceConfig deviceConfig, androidx.wear.watchface.client.WatchUiState watchUiState, androidx.wear.watchface.style.UserStyleData? userStyle, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.InteractiveWatchFaceClient>);
method public com.google.common.util.concurrent.ListenableFuture<androidx.wear.watchface.client.InteractiveWatchFaceClient> listenableGetOrCreateInteractiveWatchFaceClient(String id, androidx.wear.watchface.client.DeviceConfig deviceConfig, androidx.wear.watchface.client.WatchUiState watchUiState, androidx.wear.watchface.style.UserStyleData? userStyle, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData);
field public static final androidx.wear.watchface.client.ListenableWatchFaceControlClient.Companion Companion;
}
diff --git a/wear/watchface/watchface-client-guava/api/restricted_current.ignore b/wear/watchface/watchface-client-guava/api/restricted_current.ignore
new file mode 100644
index 0000000..6bcf2d9
--- /dev/null
+++ b/wear/watchface/watchface-client-guava/api/restricted_current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: 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>, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.InteractiveWatchFaceClient>) parameter #5:
+ Attempted to remove parameter name from parameter arg6 in androidx.wear.watchface.client.ListenableWatchFaceControlClient.getOrCreateInteractiveWatchFaceClient
diff --git a/wear/watchface/watchface-client-guava/api/restricted_current.txt b/wear/watchface/watchface-client-guava/api/restricted_current.txt
index 144e39a..a07af33 100644
--- a/wear/watchface/watchface-client-guava/api/restricted_current.txt
+++ b/wear/watchface/watchface-client-guava/api/restricted_current.txt
@@ -10,7 +10,7 @@
method public java.util.Map<java.lang.Integer,androidx.wear.watchface.client.DefaultComplicationDataSourcePolicyAndType> getDefaultComplicationDataSourcePoliciesAndType(android.content.ComponentName watchFaceName);
method public androidx.wear.watchface.client.EditorServiceClient getEditorServiceClient();
method public androidx.wear.watchface.client.InteractiveWatchFaceClient? getInteractiveWatchFaceClientInstance(String instanceId);
- method public suspend Object? getOrCreateInteractiveWatchFaceClient(String id, androidx.wear.watchface.client.DeviceConfig deviceConfig, androidx.wear.watchface.client.WatchUiState watchUiState, androidx.wear.watchface.style.UserStyleData? userStyle, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.InteractiveWatchFaceClient> p);
+ method public suspend Object? getOrCreateInteractiveWatchFaceClient(String id, androidx.wear.watchface.client.DeviceConfig deviceConfig, androidx.wear.watchface.client.WatchUiState watchUiState, androidx.wear.watchface.style.UserStyleData? userStyle, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.InteractiveWatchFaceClient>);
method public com.google.common.util.concurrent.ListenableFuture<androidx.wear.watchface.client.InteractiveWatchFaceClient> listenableGetOrCreateInteractiveWatchFaceClient(String id, androidx.wear.watchface.client.DeviceConfig deviceConfig, androidx.wear.watchface.client.WatchUiState watchUiState, androidx.wear.watchface.style.UserStyleData? userStyle, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData);
field public static final androidx.wear.watchface.client.ListenableWatchFaceControlClient.Companion Companion;
}
diff --git a/wear/watchface/watchface-client/api/current.ignore b/wear/watchface/watchface-client/api/current.ignore
new file mode 100644
index 0000000..7fb20d2
--- /dev/null
+++ b/wear/watchface/watchface-client/api/current.ignore
@@ -0,0 +1,7 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.wear.watchface.client.WatchFaceControlClient#createWatchFaceControlClient(android.content.Context, String, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceControlClient>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.wear.watchface.client.WatchFaceControlClient.createWatchFaceControlClient
+ParameterNameChange: androidx.wear.watchface.client.WatchFaceControlClient#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>, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.InteractiveWatchFaceClient>) parameter #5:
+ Attempted to remove parameter name from parameter arg6 in androidx.wear.watchface.client.WatchFaceControlClient.getOrCreateInteractiveWatchFaceClient
+ParameterNameChange: androidx.wear.watchface.client.WatchFaceControlClient.Companion#createWatchFaceControlClient(android.content.Context, String, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceControlClient>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.wear.watchface.client.WatchFaceControlClient.Companion.createWatchFaceControlClient
diff --git a/wear/watchface/watchface-client/api/current.txt b/wear/watchface/watchface-client/api/current.txt
index 57c3903..6e77b4d 100644
--- a/wear/watchface/watchface-client/api/current.txt
+++ b/wear/watchface/watchface-client/api/current.txt
@@ -182,17 +182,17 @@
public interface WatchFaceControlClient extends java.lang.AutoCloseable {
method @Deprecated @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public androidx.wear.watchface.client.HeadlessWatchFaceClient? createHeadlessWatchFaceClient(android.content.ComponentName watchFaceName, androidx.wear.watchface.client.DeviceConfig deviceConfig, @Px int surfaceWidth, @Px int surfaceHeight) throws android.os.RemoteException;
method @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public default androidx.wear.watchface.client.HeadlessWatchFaceClient? createHeadlessWatchFaceClient(String id, android.content.ComponentName watchFaceName, androidx.wear.watchface.client.DeviceConfig deviceConfig, @Px int surfaceWidth, @Px int surfaceHeight) throws android.os.RemoteException;
- method @kotlin.jvm.Throws(exceptionClasses={ServiceNotBoundException::class, ServiceStartFailureException::class}) public default static suspend Object? createWatchFaceControlClient(android.content.Context context, String watchFacePackageName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceControlClient> p) throws androidx.wear.watchface.client.WatchFaceControlClient.ServiceNotBoundException, androidx.wear.watchface.client.WatchFaceControlClient.ServiceStartFailureException;
+ method @kotlin.jvm.Throws(exceptionClasses={ServiceNotBoundException::class, ServiceStartFailureException::class}) public default static suspend Object? createWatchFaceControlClient(android.content.Context context, String watchFacePackageName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceControlClient>) throws androidx.wear.watchface.client.WatchFaceControlClient.ServiceNotBoundException, androidx.wear.watchface.client.WatchFaceControlClient.ServiceStartFailureException;
method @Deprecated @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public java.util.Map<java.lang.Integer,androidx.wear.watchface.client.DefaultComplicationDataSourcePolicyAndType> getDefaultComplicationDataSourcePoliciesAndType(android.content.ComponentName watchFaceName) throws android.os.RemoteException;
method @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public androidx.wear.watchface.client.EditorServiceClient getEditorServiceClient() throws android.os.RemoteException;
method @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public androidx.wear.watchface.client.InteractiveWatchFaceClient? getInteractiveWatchFaceClientInstance(String instanceId) throws android.os.RemoteException;
- method @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public suspend Object? getOrCreateInteractiveWatchFaceClient(String id, androidx.wear.watchface.client.DeviceConfig deviceConfig, androidx.wear.watchface.client.WatchUiState watchUiState, androidx.wear.watchface.style.UserStyleData? userStyle, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.InteractiveWatchFaceClient> p) throws android.os.RemoteException;
+ method @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public suspend Object? getOrCreateInteractiveWatchFaceClient(String id, androidx.wear.watchface.client.DeviceConfig deviceConfig, androidx.wear.watchface.client.WatchUiState watchUiState, androidx.wear.watchface.style.UserStyleData? userStyle, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.InteractiveWatchFaceClient>) throws android.os.RemoteException;
method public default boolean hasComplicationDataCache();
field public static final androidx.wear.watchface.client.WatchFaceControlClient.Companion Companion;
}
public static final class WatchFaceControlClient.Companion {
- method @kotlin.jvm.Throws(exceptionClasses={ServiceNotBoundException::class, ServiceStartFailureException::class}) public suspend Object? createWatchFaceControlClient(android.content.Context context, String watchFacePackageName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceControlClient> p) throws androidx.wear.watchface.client.WatchFaceControlClient.ServiceNotBoundException, androidx.wear.watchface.client.WatchFaceControlClient.ServiceStartFailureException;
+ method @kotlin.jvm.Throws(exceptionClasses={ServiceNotBoundException::class, ServiceStartFailureException::class}) public suspend Object? createWatchFaceControlClient(android.content.Context context, String watchFacePackageName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceControlClient>) throws androidx.wear.watchface.client.WatchFaceControlClient.ServiceNotBoundException, androidx.wear.watchface.client.WatchFaceControlClient.ServiceStartFailureException;
}
public static final class WatchFaceControlClient.ServiceNotBoundException extends java.lang.Exception {
@@ -203,6 +203,22 @@
ctor public WatchFaceControlClient.ServiceStartFailureException(optional String message);
}
+ public final class WatchFaceException extends java.lang.Exception {
+ ctor public WatchFaceException(Exception e, int reason);
+ method public int getReason();
+ property public final int reason;
+ field public static final androidx.wear.watchface.client.WatchFaceException.Companion Companion;
+ field public static final int TRANSACTION_TOO_LARGE = 2; // 0x2
+ field public static final int UNKNOWN = 3; // 0x3
+ field public static final int WATCHFACE_DIED = 1; // 0x1
+ }
+
+ public static final class WatchFaceException.Companion {
+ }
+
+ public final class WatchFaceExceptionKt {
+ }
+
public final class WatchFaceId {
ctor public WatchFaceId(String id);
method public String getId();
@@ -210,15 +226,15 @@
}
public interface WatchFaceMetadataClient extends java.lang.AutoCloseable {
- method @kotlin.jvm.Throws(exceptionClasses=WatchFaceException::class) public java.util.Map<java.lang.Integer,androidx.wear.watchface.client.ComplicationSlotMetadata> getComplicationSlotMetadataMap() throws androidx.wear.watchface.client.WatchFaceMetadataClient.WatchFaceException;
- method @kotlin.jvm.Throws(exceptionClasses=WatchFaceException::class) public androidx.wear.watchface.style.UserStyleSchema getUserStyleSchema() throws androidx.wear.watchface.client.WatchFaceMetadataClient.WatchFaceException;
+ method @kotlin.jvm.Throws(exceptionClasses=WatchFaceException::class) public java.util.Map<java.lang.Integer,androidx.wear.watchface.client.ComplicationSlotMetadata> getComplicationSlotMetadataMap() throws androidx.wear.watchface.client.WatchFaceException;
+ method @kotlin.jvm.Throws(exceptionClasses=WatchFaceException::class) public androidx.wear.watchface.style.UserStyleSchema getUserStyleSchema() throws androidx.wear.watchface.client.WatchFaceException;
method public boolean isUserStyleSchemaStatic();
property public abstract boolean isUserStyleSchemaStatic;
field public static final androidx.wear.watchface.client.WatchFaceMetadataClient.Companion Companion;
}
public static final class WatchFaceMetadataClient.Companion {
- method @kotlin.jvm.Throws(exceptionClasses={ServiceNotBoundException::class, ServiceStartFailureException::class, PackageManager.NameNotFoundException::class}) public suspend Object? create(android.content.Context context, android.content.ComponentName watchFaceName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceMetadataClient> p) throws android.content.pm.PackageManager.NameNotFoundException, androidx.wear.watchface.client.WatchFaceMetadataClient.ServiceNotBoundException, androidx.wear.watchface.client.WatchFaceMetadataClient.ServiceStartFailureException;
+ method @kotlin.jvm.Throws(exceptionClasses={ServiceNotBoundException::class, ServiceStartFailureException::class, PackageManager.NameNotFoundException::class}) public suspend Object? create(android.content.Context context, android.content.ComponentName watchFaceName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceMetadataClient>) throws android.content.pm.PackageManager.NameNotFoundException, androidx.wear.watchface.client.WatchFaceMetadataClient.ServiceNotBoundException, androidx.wear.watchface.client.WatchFaceMetadataClient.ServiceStartFailureException;
}
public static final class WatchFaceMetadataClient.ServiceNotBoundException extends java.lang.Exception {
@@ -229,19 +245,6 @@
ctor public WatchFaceMetadataClient.ServiceStartFailureException(optional String message);
}
- public static final class WatchFaceMetadataClient.WatchFaceException extends java.lang.Exception {
- ctor public WatchFaceMetadataClient.WatchFaceException(Exception e, int reason);
- method public int getReason();
- property public final int reason;
- field public static final androidx.wear.watchface.client.WatchFaceMetadataClient.WatchFaceException.Companion Companion;
- field public static final int TRANSACTION_TOO_LARGE = 2; // 0x2
- field public static final int UNKNOWN = 3; // 0x3
- field public static final int WATCHFACE_DIED = 1; // 0x1
- }
-
- public static final class WatchFaceMetadataClient.WatchFaceException.Companion {
- }
-
public final class WatchUiState {
ctor public WatchUiState(boolean inAmbientMode, int interruptionFilter);
method public boolean getInAmbientMode();
diff --git a/wear/watchface/watchface-client/api/public_plus_experimental_current.txt b/wear/watchface/watchface-client/api/public_plus_experimental_current.txt
index 620300d..95ff68c 100644
--- a/wear/watchface/watchface-client/api/public_plus_experimental_current.txt
+++ b/wear/watchface/watchface-client/api/public_plus_experimental_current.txt
@@ -102,7 +102,7 @@
method public default static androidx.wear.watchface.client.HeadlessWatchFaceClient createFromBundle(android.os.Bundle bundle);
method @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public java.util.Map<java.lang.Integer,androidx.wear.watchface.client.ComplicationSlotState> getComplicationSlotsState();
method @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public java.time.Instant getPreviewReferenceInstant();
- method @androidx.wear.watchface.WatchFaceFlavorsExperimental @kotlin.jvm.Throws(exceptionClasses=WatchFaceException::class) public default androidx.wear.watchface.UserStyleFlavors getUserStyleFlavors() throws androidx.wear.watchface.client.HeadlessWatchFaceClient.WatchFaceException;
+ method @androidx.wear.watchface.WatchFaceFlavorsExperimental @kotlin.jvm.Throws(exceptionClasses=WatchFaceException::class) public default androidx.wear.watchface.UserStyleFlavors getUserStyleFlavors() throws androidx.wear.watchface.client.WatchFaceException;
method @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public androidx.wear.watchface.style.UserStyleSchema getUserStyleSchema();
method @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public default byte[] getUserStyleSchemaDigestHash() throws android.os.RemoteException;
method @AnyThread public boolean isConnectionAlive();
@@ -125,19 +125,6 @@
method public androidx.wear.watchface.client.HeadlessWatchFaceClient createFromBundle(android.os.Bundle bundle);
}
- @androidx.wear.watchface.WatchFaceFlavorsExperimental public static final class HeadlessWatchFaceClient.WatchFaceException extends java.lang.Exception {
- ctor public HeadlessWatchFaceClient.WatchFaceException(Exception e, int reason);
- method public int getReason();
- property public final int reason;
- field public static final androidx.wear.watchface.client.HeadlessWatchFaceClient.WatchFaceException.Companion Companion;
- field public static final int TRANSACTION_TOO_LARGE = 2; // 0x2
- field public static final int UNKNOWN = 3; // 0x3
- field public static final int WATCHFACE_DIED = 1; // 0x1
- }
-
- public static final class HeadlessWatchFaceClient.WatchFaceException.Companion {
- }
-
public interface InteractiveWatchFaceClient extends java.lang.AutoCloseable {
method @AnyThread public void addClientDisconnectListener(androidx.wear.watchface.client.InteractiveWatchFaceClient.ClientDisconnectListener listener, java.util.concurrent.Executor executor);
method public void addOnWatchFaceReadyListener(java.util.concurrent.Executor executor, androidx.wear.watchface.client.InteractiveWatchFaceClient.OnWatchFaceReadyListener listener);
@@ -199,17 +186,17 @@
public interface WatchFaceControlClient extends java.lang.AutoCloseable {
method @Deprecated @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public androidx.wear.watchface.client.HeadlessWatchFaceClient? createHeadlessWatchFaceClient(android.content.ComponentName watchFaceName, androidx.wear.watchface.client.DeviceConfig deviceConfig, @Px int surfaceWidth, @Px int surfaceHeight) throws android.os.RemoteException;
method @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public default androidx.wear.watchface.client.HeadlessWatchFaceClient? createHeadlessWatchFaceClient(String id, android.content.ComponentName watchFaceName, androidx.wear.watchface.client.DeviceConfig deviceConfig, @Px int surfaceWidth, @Px int surfaceHeight) throws android.os.RemoteException;
- method @kotlin.jvm.Throws(exceptionClasses={ServiceNotBoundException::class, ServiceStartFailureException::class}) public default static suspend Object? createWatchFaceControlClient(android.content.Context context, String watchFacePackageName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceControlClient> p) throws androidx.wear.watchface.client.WatchFaceControlClient.ServiceNotBoundException, androidx.wear.watchface.client.WatchFaceControlClient.ServiceStartFailureException;
+ method @kotlin.jvm.Throws(exceptionClasses={ServiceNotBoundException::class, ServiceStartFailureException::class}) public default static suspend Object? createWatchFaceControlClient(android.content.Context context, String watchFacePackageName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceControlClient>) throws androidx.wear.watchface.client.WatchFaceControlClient.ServiceNotBoundException, androidx.wear.watchface.client.WatchFaceControlClient.ServiceStartFailureException;
method @Deprecated @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public java.util.Map<java.lang.Integer,androidx.wear.watchface.client.DefaultComplicationDataSourcePolicyAndType> getDefaultComplicationDataSourcePoliciesAndType(android.content.ComponentName watchFaceName) throws android.os.RemoteException;
method @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public androidx.wear.watchface.client.EditorServiceClient getEditorServiceClient() throws android.os.RemoteException;
method @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public androidx.wear.watchface.client.InteractiveWatchFaceClient? getInteractiveWatchFaceClientInstance(String instanceId) throws android.os.RemoteException;
- method @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public suspend Object? getOrCreateInteractiveWatchFaceClient(String id, androidx.wear.watchface.client.DeviceConfig deviceConfig, androidx.wear.watchface.client.WatchUiState watchUiState, androidx.wear.watchface.style.UserStyleData? userStyle, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.InteractiveWatchFaceClient> p) throws android.os.RemoteException;
+ method @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public suspend Object? getOrCreateInteractiveWatchFaceClient(String id, androidx.wear.watchface.client.DeviceConfig deviceConfig, androidx.wear.watchface.client.WatchUiState watchUiState, androidx.wear.watchface.style.UserStyleData? userStyle, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.InteractiveWatchFaceClient>) throws android.os.RemoteException;
method public default boolean hasComplicationDataCache();
field public static final androidx.wear.watchface.client.WatchFaceControlClient.Companion Companion;
}
public static final class WatchFaceControlClient.Companion {
- method @kotlin.jvm.Throws(exceptionClasses={ServiceNotBoundException::class, ServiceStartFailureException::class}) public suspend Object? createWatchFaceControlClient(android.content.Context context, String watchFacePackageName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceControlClient> p) throws androidx.wear.watchface.client.WatchFaceControlClient.ServiceNotBoundException, androidx.wear.watchface.client.WatchFaceControlClient.ServiceStartFailureException;
+ method @kotlin.jvm.Throws(exceptionClasses={ServiceNotBoundException::class, ServiceStartFailureException::class}) public suspend Object? createWatchFaceControlClient(android.content.Context context, String watchFacePackageName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceControlClient>) throws androidx.wear.watchface.client.WatchFaceControlClient.ServiceNotBoundException, androidx.wear.watchface.client.WatchFaceControlClient.ServiceStartFailureException;
}
public static final class WatchFaceControlClient.ServiceNotBoundException extends java.lang.Exception {
@@ -220,6 +207,22 @@
ctor public WatchFaceControlClient.ServiceStartFailureException(optional String message);
}
+ public final class WatchFaceException extends java.lang.Exception {
+ ctor public WatchFaceException(Exception e, int reason);
+ method public int getReason();
+ property public final int reason;
+ field public static final androidx.wear.watchface.client.WatchFaceException.Companion Companion;
+ field public static final int TRANSACTION_TOO_LARGE = 2; // 0x2
+ field public static final int UNKNOWN = 3; // 0x3
+ field public static final int WATCHFACE_DIED = 1; // 0x1
+ }
+
+ public static final class WatchFaceException.Companion {
+ }
+
+ public final class WatchFaceExceptionKt {
+ }
+
public final class WatchFaceId {
ctor public WatchFaceId(String id);
method public String getId();
@@ -227,16 +230,16 @@
}
public interface WatchFaceMetadataClient extends java.lang.AutoCloseable {
- method @kotlin.jvm.Throws(exceptionClasses=WatchFaceException::class) public java.util.Map<java.lang.Integer,androidx.wear.watchface.client.ComplicationSlotMetadata> getComplicationSlotMetadataMap() throws androidx.wear.watchface.client.WatchFaceMetadataClient.WatchFaceException;
- method @androidx.wear.watchface.WatchFaceFlavorsExperimental @kotlin.jvm.Throws(exceptionClasses=WatchFaceException::class) public androidx.wear.watchface.UserStyleFlavors getUserStyleFlavors() throws androidx.wear.watchface.client.WatchFaceMetadataClient.WatchFaceException;
- method @kotlin.jvm.Throws(exceptionClasses=WatchFaceException::class) public androidx.wear.watchface.style.UserStyleSchema getUserStyleSchema() throws androidx.wear.watchface.client.WatchFaceMetadataClient.WatchFaceException;
+ method @kotlin.jvm.Throws(exceptionClasses=WatchFaceException::class) public java.util.Map<java.lang.Integer,androidx.wear.watchface.client.ComplicationSlotMetadata> getComplicationSlotMetadataMap() throws androidx.wear.watchface.client.WatchFaceException;
+ method @androidx.wear.watchface.WatchFaceFlavorsExperimental @kotlin.jvm.Throws(exceptionClasses=WatchFaceException::class) public androidx.wear.watchface.UserStyleFlavors getUserStyleFlavors() throws androidx.wear.watchface.client.WatchFaceException;
+ method @kotlin.jvm.Throws(exceptionClasses=WatchFaceException::class) public androidx.wear.watchface.style.UserStyleSchema getUserStyleSchema() throws androidx.wear.watchface.client.WatchFaceException;
method public boolean isUserStyleSchemaStatic();
property public abstract boolean isUserStyleSchemaStatic;
field public static final androidx.wear.watchface.client.WatchFaceMetadataClient.Companion Companion;
}
public static final class WatchFaceMetadataClient.Companion {
- method @kotlin.jvm.Throws(exceptionClasses={ServiceNotBoundException::class, ServiceStartFailureException::class, PackageManager.NameNotFoundException::class}) public suspend Object? create(android.content.Context context, android.content.ComponentName watchFaceName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceMetadataClient> p) throws android.content.pm.PackageManager.NameNotFoundException, androidx.wear.watchface.client.WatchFaceMetadataClient.ServiceNotBoundException, androidx.wear.watchface.client.WatchFaceMetadataClient.ServiceStartFailureException;
+ method @kotlin.jvm.Throws(exceptionClasses={ServiceNotBoundException::class, ServiceStartFailureException::class, PackageManager.NameNotFoundException::class}) public suspend Object? create(android.content.Context context, android.content.ComponentName watchFaceName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceMetadataClient>) throws android.content.pm.PackageManager.NameNotFoundException, androidx.wear.watchface.client.WatchFaceMetadataClient.ServiceNotBoundException, androidx.wear.watchface.client.WatchFaceMetadataClient.ServiceStartFailureException;
}
public static final class WatchFaceMetadataClient.ServiceNotBoundException extends java.lang.Exception {
@@ -247,19 +250,6 @@
ctor public WatchFaceMetadataClient.ServiceStartFailureException(optional String message);
}
- public static final class WatchFaceMetadataClient.WatchFaceException extends java.lang.Exception {
- ctor public WatchFaceMetadataClient.WatchFaceException(Exception e, int reason);
- method public int getReason();
- property public final int reason;
- field public static final androidx.wear.watchface.client.WatchFaceMetadataClient.WatchFaceException.Companion Companion;
- field public static final int TRANSACTION_TOO_LARGE = 2; // 0x2
- field public static final int UNKNOWN = 3; // 0x3
- field public static final int WATCHFACE_DIED = 1; // 0x1
- }
-
- public static final class WatchFaceMetadataClient.WatchFaceException.Companion {
- }
-
public final class WatchUiState {
ctor public WatchUiState(boolean inAmbientMode, int interruptionFilter);
method public boolean getInAmbientMode();
diff --git a/wear/watchface/watchface-client/api/restricted_current.ignore b/wear/watchface/watchface-client/api/restricted_current.ignore
new file mode 100644
index 0000000..7fb20d2
--- /dev/null
+++ b/wear/watchface/watchface-client/api/restricted_current.ignore
@@ -0,0 +1,7 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.wear.watchface.client.WatchFaceControlClient#createWatchFaceControlClient(android.content.Context, String, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceControlClient>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.wear.watchface.client.WatchFaceControlClient.createWatchFaceControlClient
+ParameterNameChange: androidx.wear.watchface.client.WatchFaceControlClient#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>, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.InteractiveWatchFaceClient>) parameter #5:
+ Attempted to remove parameter name from parameter arg6 in androidx.wear.watchface.client.WatchFaceControlClient.getOrCreateInteractiveWatchFaceClient
+ParameterNameChange: androidx.wear.watchface.client.WatchFaceControlClient.Companion#createWatchFaceControlClient(android.content.Context, String, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceControlClient>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.wear.watchface.client.WatchFaceControlClient.Companion.createWatchFaceControlClient
diff --git a/wear/watchface/watchface-client/api/restricted_current.txt b/wear/watchface/watchface-client/api/restricted_current.txt
index 57c3903..6e77b4d 100644
--- a/wear/watchface/watchface-client/api/restricted_current.txt
+++ b/wear/watchface/watchface-client/api/restricted_current.txt
@@ -182,17 +182,17 @@
public interface WatchFaceControlClient extends java.lang.AutoCloseable {
method @Deprecated @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public androidx.wear.watchface.client.HeadlessWatchFaceClient? createHeadlessWatchFaceClient(android.content.ComponentName watchFaceName, androidx.wear.watchface.client.DeviceConfig deviceConfig, @Px int surfaceWidth, @Px int surfaceHeight) throws android.os.RemoteException;
method @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public default androidx.wear.watchface.client.HeadlessWatchFaceClient? createHeadlessWatchFaceClient(String id, android.content.ComponentName watchFaceName, androidx.wear.watchface.client.DeviceConfig deviceConfig, @Px int surfaceWidth, @Px int surfaceHeight) throws android.os.RemoteException;
- method @kotlin.jvm.Throws(exceptionClasses={ServiceNotBoundException::class, ServiceStartFailureException::class}) public default static suspend Object? createWatchFaceControlClient(android.content.Context context, String watchFacePackageName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceControlClient> p) throws androidx.wear.watchface.client.WatchFaceControlClient.ServiceNotBoundException, androidx.wear.watchface.client.WatchFaceControlClient.ServiceStartFailureException;
+ method @kotlin.jvm.Throws(exceptionClasses={ServiceNotBoundException::class, ServiceStartFailureException::class}) public default static suspend Object? createWatchFaceControlClient(android.content.Context context, String watchFacePackageName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceControlClient>) throws androidx.wear.watchface.client.WatchFaceControlClient.ServiceNotBoundException, androidx.wear.watchface.client.WatchFaceControlClient.ServiceStartFailureException;
method @Deprecated @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public java.util.Map<java.lang.Integer,androidx.wear.watchface.client.DefaultComplicationDataSourcePolicyAndType> getDefaultComplicationDataSourcePoliciesAndType(android.content.ComponentName watchFaceName) throws android.os.RemoteException;
method @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public androidx.wear.watchface.client.EditorServiceClient getEditorServiceClient() throws android.os.RemoteException;
method @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public androidx.wear.watchface.client.InteractiveWatchFaceClient? getInteractiveWatchFaceClientInstance(String instanceId) throws android.os.RemoteException;
- method @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public suspend Object? getOrCreateInteractiveWatchFaceClient(String id, androidx.wear.watchface.client.DeviceConfig deviceConfig, androidx.wear.watchface.client.WatchUiState watchUiState, androidx.wear.watchface.style.UserStyleData? userStyle, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.InteractiveWatchFaceClient> p) throws android.os.RemoteException;
+ method @kotlin.jvm.Throws(exceptionClasses=RemoteException::class) public suspend Object? getOrCreateInteractiveWatchFaceClient(String id, androidx.wear.watchface.client.DeviceConfig deviceConfig, androidx.wear.watchface.client.WatchUiState watchUiState, androidx.wear.watchface.style.UserStyleData? userStyle, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.InteractiveWatchFaceClient>) throws android.os.RemoteException;
method public default boolean hasComplicationDataCache();
field public static final androidx.wear.watchface.client.WatchFaceControlClient.Companion Companion;
}
public static final class WatchFaceControlClient.Companion {
- method @kotlin.jvm.Throws(exceptionClasses={ServiceNotBoundException::class, ServiceStartFailureException::class}) public suspend Object? createWatchFaceControlClient(android.content.Context context, String watchFacePackageName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceControlClient> p) throws androidx.wear.watchface.client.WatchFaceControlClient.ServiceNotBoundException, androidx.wear.watchface.client.WatchFaceControlClient.ServiceStartFailureException;
+ method @kotlin.jvm.Throws(exceptionClasses={ServiceNotBoundException::class, ServiceStartFailureException::class}) public suspend Object? createWatchFaceControlClient(android.content.Context context, String watchFacePackageName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceControlClient>) throws androidx.wear.watchface.client.WatchFaceControlClient.ServiceNotBoundException, androidx.wear.watchface.client.WatchFaceControlClient.ServiceStartFailureException;
}
public static final class WatchFaceControlClient.ServiceNotBoundException extends java.lang.Exception {
@@ -203,6 +203,22 @@
ctor public WatchFaceControlClient.ServiceStartFailureException(optional String message);
}
+ public final class WatchFaceException extends java.lang.Exception {
+ ctor public WatchFaceException(Exception e, int reason);
+ method public int getReason();
+ property public final int reason;
+ field public static final androidx.wear.watchface.client.WatchFaceException.Companion Companion;
+ field public static final int TRANSACTION_TOO_LARGE = 2; // 0x2
+ field public static final int UNKNOWN = 3; // 0x3
+ field public static final int WATCHFACE_DIED = 1; // 0x1
+ }
+
+ public static final class WatchFaceException.Companion {
+ }
+
+ public final class WatchFaceExceptionKt {
+ }
+
public final class WatchFaceId {
ctor public WatchFaceId(String id);
method public String getId();
@@ -210,15 +226,15 @@
}
public interface WatchFaceMetadataClient extends java.lang.AutoCloseable {
- method @kotlin.jvm.Throws(exceptionClasses=WatchFaceException::class) public java.util.Map<java.lang.Integer,androidx.wear.watchface.client.ComplicationSlotMetadata> getComplicationSlotMetadataMap() throws androidx.wear.watchface.client.WatchFaceMetadataClient.WatchFaceException;
- method @kotlin.jvm.Throws(exceptionClasses=WatchFaceException::class) public androidx.wear.watchface.style.UserStyleSchema getUserStyleSchema() throws androidx.wear.watchface.client.WatchFaceMetadataClient.WatchFaceException;
+ method @kotlin.jvm.Throws(exceptionClasses=WatchFaceException::class) public java.util.Map<java.lang.Integer,androidx.wear.watchface.client.ComplicationSlotMetadata> getComplicationSlotMetadataMap() throws androidx.wear.watchface.client.WatchFaceException;
+ method @kotlin.jvm.Throws(exceptionClasses=WatchFaceException::class) public androidx.wear.watchface.style.UserStyleSchema getUserStyleSchema() throws androidx.wear.watchface.client.WatchFaceException;
method public boolean isUserStyleSchemaStatic();
property public abstract boolean isUserStyleSchemaStatic;
field public static final androidx.wear.watchface.client.WatchFaceMetadataClient.Companion Companion;
}
public static final class WatchFaceMetadataClient.Companion {
- method @kotlin.jvm.Throws(exceptionClasses={ServiceNotBoundException::class, ServiceStartFailureException::class, PackageManager.NameNotFoundException::class}) public suspend Object? create(android.content.Context context, android.content.ComponentName watchFaceName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceMetadataClient> p) throws android.content.pm.PackageManager.NameNotFoundException, androidx.wear.watchface.client.WatchFaceMetadataClient.ServiceNotBoundException, androidx.wear.watchface.client.WatchFaceMetadataClient.ServiceStartFailureException;
+ method @kotlin.jvm.Throws(exceptionClasses={ServiceNotBoundException::class, ServiceStartFailureException::class, PackageManager.NameNotFoundException::class}) public suspend Object? create(android.content.Context context, android.content.ComponentName watchFaceName, kotlin.coroutines.Continuation<? super androidx.wear.watchface.client.WatchFaceMetadataClient>) throws android.content.pm.PackageManager.NameNotFoundException, androidx.wear.watchface.client.WatchFaceMetadataClient.ServiceNotBoundException, androidx.wear.watchface.client.WatchFaceMetadataClient.ServiceStartFailureException;
}
public static final class WatchFaceMetadataClient.ServiceNotBoundException extends java.lang.Exception {
@@ -229,19 +245,6 @@
ctor public WatchFaceMetadataClient.ServiceStartFailureException(optional String message);
}
- public static final class WatchFaceMetadataClient.WatchFaceException extends java.lang.Exception {
- ctor public WatchFaceMetadataClient.WatchFaceException(Exception e, int reason);
- method public int getReason();
- property public final int reason;
- field public static final androidx.wear.watchface.client.WatchFaceMetadataClient.WatchFaceException.Companion Companion;
- field public static final int TRANSACTION_TOO_LARGE = 2; // 0x2
- field public static final int UNKNOWN = 3; // 0x3
- field public static final int WATCHFACE_DIED = 1; // 0x1
- }
-
- public static final class WatchFaceMetadataClient.WatchFaceException.Companion {
- }
-
public final class WatchUiState {
ctor public WatchUiState(boolean inAmbientMode, int interruptionFilter);
method public boolean getInAmbientMode();
diff --git a/wear/watchface/watchface-client/src/main/java/androidx/wear/watchface/client/HeadlessWatchFaceClient.kt b/wear/watchface/watchface-client/src/main/java/androidx/wear/watchface/client/HeadlessWatchFaceClient.kt
index ee8c54c..5b88032 100644
--- a/wear/watchface/watchface-client/src/main/java/androidx/wear/watchface/client/HeadlessWatchFaceClient.kt
+++ b/wear/watchface/watchface-client/src/main/java/androidx/wear/watchface/client/HeadlessWatchFaceClient.kt
@@ -19,12 +19,9 @@
import android.graphics.Bitmap
import android.graphics.drawable.Icon
import android.os.Bundle
-import android.os.DeadObjectException
import android.os.RemoteException
-import android.os.TransactionTooLargeException
import android.support.wearable.watchface.SharedMemoryImage
import androidx.annotation.AnyThread
-import androidx.annotation.IntDef
import androidx.annotation.RequiresApi
import androidx.wear.watchface.complications.data.ComplicationData
import androidx.wear.watchface.utility.TraceEvent
@@ -62,52 +59,6 @@
)
}
- /**
- * Why the remote watch face query failed.
- * @hide
- **/
- @Retention(AnnotationRetention.SOURCE)
- @WatchFaceFlavorsExperimental
- @IntDef(
- WatchFaceException.WATCHFACE_DIED,
- WatchFaceException.TRANSACTION_TOO_LARGE,
- WatchFaceException.UNKNOWN
- )
- annotation class WatchFaceExceptionReason
-
- /**
- * The watch face threw an exception while trying to service the request.
- *
- * @property reason The [WatchFaceExceptionReason] for the exception.
- */
- // TODO: b/227151490 Get rid of WatchFaceException duplication
- @WatchFaceFlavorsExperimental
- public class WatchFaceException(
- e: Exception,
- @WatchFaceExceptionReason val reason: Int
- ) : Exception(e) {
-
- companion object {
- /**
- * The watchface process died. Connecting again might work, but this isn't guaranteed.
- */
- const val WATCHFACE_DIED = 1
-
- /**
- * The watchface tried to send us too much data. Currently the limit on binder
- * transactions is 1mb. See [TransactionTooLargeException] for more details.
- */
- const val TRANSACTION_TOO_LARGE = 2
-
- /**
- * The watch face threw an exception, typically during initialization. Depending on the
- * nature of the problem this might be a transient issue or it might occur every time
- * for that particular watch face.
- */
- const val UNKNOWN = 3
- }
- }
-
/** The [Instant] to use when rendering previews. */
@get:Throws(RemoteException::class)
public val previewReferenceInstant: Instant
@@ -256,27 +207,12 @@
@OptIn(WatchFaceFlavorsExperimental::class)
override fun getUserStyleFlavors(): UserStyleFlavors =
- try {
+ callRemote {
if (iHeadlessWatchFace.apiVersion >= 3) {
UserStyleFlavors(iHeadlessWatchFace.userStyleFlavors)
} else {
UserStyleFlavors()
}
- } catch (e: DeadObjectException) {
- throw WatchFaceMetadataClient.WatchFaceException(
- e,
- WatchFaceMetadataClient.WatchFaceException.WATCHFACE_DIED
- )
- } catch (e: TransactionTooLargeException) {
- throw WatchFaceMetadataClient.WatchFaceException(
- e,
- WatchFaceMetadataClient.WatchFaceException.TRANSACTION_TOO_LARGE
- )
- } catch (e: RemoteException) {
- throw WatchFaceMetadataClient.WatchFaceException(
- e,
- WatchFaceMetadataClient.WatchFaceException.UNKNOWN
- )
}
override val complicationSlotsState: Map<Int, ComplicationSlotState>
diff --git a/wear/watchface/watchface-client/src/main/java/androidx/wear/watchface/client/WatchFaceException.kt b/wear/watchface/watchface-client/src/main/java/androidx/wear/watchface/client/WatchFaceException.kt
new file mode 100644
index 0000000..eb5f023
--- /dev/null
+++ b/wear/watchface/watchface-client/src/main/java/androidx/wear/watchface/client/WatchFaceException.kt
@@ -0,0 +1,77 @@
+/*
+ * 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.wear.watchface.client
+
+import android.os.DeadObjectException
+import android.os.RemoteException
+import android.os.TransactionTooLargeException
+import androidx.annotation.IntDef
+
+/**
+ * Why the remote watch face query failed.
+ * @hide
+ **/
+@Retention(AnnotationRetention.SOURCE)
+@IntDef(
+ WatchFaceException.WATCHFACE_DIED,
+ WatchFaceException.TRANSACTION_TOO_LARGE,
+ WatchFaceException.UNKNOWN
+)
+annotation class WatchFaceExceptionReason
+
+/**
+ * The watch face threw an exception while trying to service the request.
+ *
+ * @property reason The [WatchFaceExceptionReason] for the exception.
+ */
+public class WatchFaceException(
+ e: Exception,
+ @WatchFaceExceptionReason val reason: Int
+) : Exception(e) {
+
+ companion object {
+ /**
+ * The watchface process died. Connecting again might work, but this isn't guaranteed.
+ */
+ const val WATCHFACE_DIED = 1
+
+ /**
+ * The watchface tried to send us too much data. Currently the limit on binder
+ * transactions is 1mb. See [TransactionTooLargeException] for more details.
+ */
+ const val TRANSACTION_TOO_LARGE = 2
+
+ /**
+ * The watch face threw an exception, typically during initialization. Depending on the
+ * nature of the problem this might be a transient issue or it might occur every time
+ * for that particular watch face.
+ */
+ const val UNKNOWN = 3
+ }
+}
+
+@Throws(WatchFaceException::class)
+internal fun <R> callRemote(task: () -> R): R =
+ try {
+ task()
+ } catch (e: DeadObjectException) {
+ throw WatchFaceException(e, WatchFaceException.WATCHFACE_DIED)
+ } catch (e: TransactionTooLargeException) {
+ throw WatchFaceException(e, WatchFaceException.TRANSACTION_TOO_LARGE)
+ } catch (e: RemoteException) {
+ throw WatchFaceException(e, WatchFaceException.UNKNOWN)
+ }
diff --git a/wear/watchface/watchface-client/src/main/java/androidx/wear/watchface/client/WatchFaceMetadataClient.kt b/wear/watchface/watchface-client/src/main/java/androidx/wear/watchface/client/WatchFaceMetadataClient.kt
index d6b76f2..94309b4 100644
--- a/wear/watchface/watchface-client/src/main/java/androidx/wear/watchface/client/WatchFaceMetadataClient.kt
+++ b/wear/watchface/watchface-client/src/main/java/androidx/wear/watchface/client/WatchFaceMetadataClient.kt
@@ -24,11 +24,7 @@
import android.content.res.XmlResourceParser
import android.graphics.RectF
import android.os.Bundle
-import android.os.DeadObjectException
import android.os.IBinder
-import android.os.RemoteException
-import android.os.TransactionTooLargeException
-import androidx.annotation.IntDef
import androidx.annotation.RestrictTo
import androidx.wear.watchface.complications.ComplicationSlotBounds
import androidx.wear.watchface.complications.DefaultComplicationDataSourcePolicy
@@ -168,49 +164,6 @@
public class ServiceStartFailureException(message: String = "") : Exception(message)
/**
- * Why the remote watch face query failed.
- * @hide
- **/
- @Retention(AnnotationRetention.SOURCE)
- @IntDef(
- WatchFaceException.WATCHFACE_DIED,
- WatchFaceException.TRANSACTION_TOO_LARGE,
- WatchFaceException.UNKNOWN
- )
- annotation class WatchFaceExceptionReason
-
- /**
- * The watch face threw an exception while trying to service the request.
- *
- * @property reason The [WatchFaceExceptionReason] for the exception.
- */
- public class WatchFaceException(
- e: Exception,
- @WatchFaceExceptionReason val reason: Int
- ) : Exception(e) {
-
- companion object {
- /**
- * The watchface process died. Connecting again might work, but this isn't guaranteed.
- */
- const val WATCHFACE_DIED = 1
-
- /**
- * The watchface tried to send us too much data. Currently the limit on binder
- * transactions is 1mb. See [TransactionTooLargeException] for more details.
- */
- const val TRANSACTION_TOO_LARGE = 2
-
- /**
- * The watch face threw an exception, typically during initialization. Depending on the
- * nature of the problem this might be a transient issue or it might occur every time
- * for that particular watch face.
- */
- const val UNKNOWN = 3
- }
- }
-
- /**
* Returns the watch face's [UserStyleSchema].
*/
@Throws(WatchFaceException::class)
@@ -311,37 +264,21 @@
}
}
- override fun getUserStyleSchema(): UserStyleSchema {
- return try {
+ override fun getUserStyleSchema(): UserStyleSchema =
+ callRemote {
if (service.apiVersion >= 3) {
UserStyleSchema(service.getUserStyleSchema(GetUserStyleSchemaParams(watchFaceName)))
} else {
headlessClient.userStyleSchema
}
- } catch (e: DeadObjectException) {
- throw WatchFaceMetadataClient.WatchFaceException(
- e,
- WatchFaceMetadataClient.WatchFaceException.WATCHFACE_DIED
- )
- } catch (e: TransactionTooLargeException) {
- throw WatchFaceMetadataClient.WatchFaceException(
- e,
- WatchFaceMetadataClient.WatchFaceException.TRANSACTION_TOO_LARGE
- )
- } catch (e: RemoteException) {
- throw WatchFaceMetadataClient.WatchFaceException(
- e,
- WatchFaceMetadataClient.WatchFaceException.UNKNOWN
- )
}
- }
override val isUserStyleSchemaStatic: Boolean
get() = false
override fun getComplicationSlotMetadataMap(): Map<Int, ComplicationSlotMetadata> {
requireNotClosed()
- return try {
+ return callRemote {
if (service.apiVersion >= 3) {
val wireFormat = service.getComplicationSlotMetadata(
GetComplicationSlotMetadataParams(watchFaceName)
@@ -389,51 +326,19 @@
)
}
}
- } catch (e: DeadObjectException) {
- throw WatchFaceMetadataClient.WatchFaceException(
- e,
- WatchFaceMetadataClient.WatchFaceException.WATCHFACE_DIED
- )
- } catch (e: TransactionTooLargeException) {
- throw WatchFaceMetadataClient.WatchFaceException(
- e,
- WatchFaceMetadataClient.WatchFaceException.TRANSACTION_TOO_LARGE
- )
- } catch (e: RemoteException) {
- throw WatchFaceMetadataClient.WatchFaceException(
- e,
- WatchFaceMetadataClient.WatchFaceException.UNKNOWN
- )
}
}
@OptIn(WatchFaceFlavorsExperimental::class)
- override fun getUserStyleFlavors(): UserStyleFlavors {
- return try {
- if (service.apiVersion >= 5) {
- UserStyleFlavors(
- service.getUserStyleFlavors(
- GetUserStyleFlavorsParams(watchFaceName)
- )
+ override fun getUserStyleFlavors(): UserStyleFlavors = callRemote {
+ if (service.apiVersion >= 5) {
+ UserStyleFlavors(
+ service.getUserStyleFlavors(
+ GetUserStyleFlavorsParams(watchFaceName)
)
- } else {
- UserStyleFlavors()
- }
- } catch (e: DeadObjectException) {
- throw WatchFaceMetadataClient.WatchFaceException(
- e,
- WatchFaceMetadataClient.WatchFaceException.WATCHFACE_DIED
)
- } catch (e: TransactionTooLargeException) {
- throw WatchFaceMetadataClient.WatchFaceException(
- e,
- WatchFaceMetadataClient.WatchFaceException.TRANSACTION_TOO_LARGE
- )
- } catch (e: RemoteException) {
- throw WatchFaceMetadataClient.WatchFaceException(
- e,
- WatchFaceMetadataClient.WatchFaceException.UNKNOWN
- )
+ } else {
+ UserStyleFlavors()
}
}
diff --git a/wear/watchface/watchface-complications-data-source-ktx/api/current.ignore b/wear/watchface/watchface-complications-data-source-ktx/api/current.ignore
new file mode 100644
index 0000000..775c3ad
--- /dev/null
+++ b/wear/watchface/watchface-complications-data-source-ktx/api/current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.wear.watchface.complications.datasource.SuspendingComplicationDataSourceService#onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.data.ComplicationData>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.wear.watchface.complications.datasource.SuspendingComplicationDataSourceService.onComplicationRequest
diff --git a/wear/watchface/watchface-complications-data-source-ktx/api/current.txt b/wear/watchface/watchface-complications-data-source-ktx/api/current.txt
index 48cef33b..55d30d5 100644
--- a/wear/watchface/watchface-complications-data-source-ktx/api/current.txt
+++ b/wear/watchface/watchface-complications-data-source-ktx/api/current.txt
@@ -4,13 +4,13 @@
public abstract class SuspendingComplicationDataSourceService extends androidx.wear.watchface.complications.datasource.ComplicationDataSourceService {
ctor public SuspendingComplicationDataSourceService();
method public final void onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest request, androidx.wear.watchface.complications.datasource.ComplicationDataSourceService.ComplicationRequestListener listener);
- method @UiThread public abstract suspend Object? onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest request, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.data.ComplicationData> p);
+ method @UiThread public abstract suspend Object? onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest request, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.data.ComplicationData>);
}
public abstract class SuspendingTimelineComplicationDataSourceService extends androidx.wear.watchface.complications.datasource.ComplicationDataSourceService {
ctor public SuspendingTimelineComplicationDataSourceService();
method public final void onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest request, androidx.wear.watchface.complications.datasource.ComplicationDataSourceService.ComplicationRequestListener listener);
- method @UiThread public abstract suspend Object? onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest request, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.datasource.ComplicationDataTimeline> p);
+ method @UiThread public abstract suspend Object? onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest request, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.datasource.ComplicationDataTimeline>);
}
}
diff --git a/wear/watchface/watchface-complications-data-source-ktx/api/public_plus_experimental_current.txt b/wear/watchface/watchface-complications-data-source-ktx/api/public_plus_experimental_current.txt
index 48cef33b..55d30d5 100644
--- a/wear/watchface/watchface-complications-data-source-ktx/api/public_plus_experimental_current.txt
+++ b/wear/watchface/watchface-complications-data-source-ktx/api/public_plus_experimental_current.txt
@@ -4,13 +4,13 @@
public abstract class SuspendingComplicationDataSourceService extends androidx.wear.watchface.complications.datasource.ComplicationDataSourceService {
ctor public SuspendingComplicationDataSourceService();
method public final void onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest request, androidx.wear.watchface.complications.datasource.ComplicationDataSourceService.ComplicationRequestListener listener);
- method @UiThread public abstract suspend Object? onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest request, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.data.ComplicationData> p);
+ method @UiThread public abstract suspend Object? onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest request, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.data.ComplicationData>);
}
public abstract class SuspendingTimelineComplicationDataSourceService extends androidx.wear.watchface.complications.datasource.ComplicationDataSourceService {
ctor public SuspendingTimelineComplicationDataSourceService();
method public final void onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest request, androidx.wear.watchface.complications.datasource.ComplicationDataSourceService.ComplicationRequestListener listener);
- method @UiThread public abstract suspend Object? onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest request, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.datasource.ComplicationDataTimeline> p);
+ method @UiThread public abstract suspend Object? onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest request, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.datasource.ComplicationDataTimeline>);
}
}
diff --git a/wear/watchface/watchface-complications-data-source-ktx/api/restricted_current.ignore b/wear/watchface/watchface-complications-data-source-ktx/api/restricted_current.ignore
new file mode 100644
index 0000000..775c3ad
--- /dev/null
+++ b/wear/watchface/watchface-complications-data-source-ktx/api/restricted_current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.wear.watchface.complications.datasource.SuspendingComplicationDataSourceService#onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.data.ComplicationData>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.wear.watchface.complications.datasource.SuspendingComplicationDataSourceService.onComplicationRequest
diff --git a/wear/watchface/watchface-complications-data-source-ktx/api/restricted_current.txt b/wear/watchface/watchface-complications-data-source-ktx/api/restricted_current.txt
index 48cef33b..55d30d5 100644
--- a/wear/watchface/watchface-complications-data-source-ktx/api/restricted_current.txt
+++ b/wear/watchface/watchface-complications-data-source-ktx/api/restricted_current.txt
@@ -4,13 +4,13 @@
public abstract class SuspendingComplicationDataSourceService extends androidx.wear.watchface.complications.datasource.ComplicationDataSourceService {
ctor public SuspendingComplicationDataSourceService();
method public final void onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest request, androidx.wear.watchface.complications.datasource.ComplicationDataSourceService.ComplicationRequestListener listener);
- method @UiThread public abstract suspend Object? onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest request, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.data.ComplicationData> p);
+ method @UiThread public abstract suspend Object? onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest request, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.data.ComplicationData>);
}
public abstract class SuspendingTimelineComplicationDataSourceService extends androidx.wear.watchface.complications.datasource.ComplicationDataSourceService {
ctor public SuspendingTimelineComplicationDataSourceService();
method public final void onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest request, androidx.wear.watchface.complications.datasource.ComplicationDataSourceService.ComplicationRequestListener listener);
- method @UiThread public abstract suspend Object? onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest request, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.datasource.ComplicationDataTimeline> p);
+ method @UiThread public abstract suspend Object? onComplicationRequest(androidx.wear.watchface.complications.datasource.ComplicationRequest request, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.datasource.ComplicationDataTimeline>);
}
}
diff --git a/wear/watchface/watchface-complications-data-source/api/api_lint.ignore b/wear/watchface/watchface-complications-data-source/api/api_lint.ignore
new file mode 100644
index 0000000..53ac4a5
--- /dev/null
+++ b/wear/watchface/watchface-complications-data-source/api/api_lint.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+InvalidNullability: androidx.wear.watchface.complications.datasource.ComplicationDataSourceService#onBind(android.content.Intent):
+ Invalid nullability on method `onBind` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.wear.watchface.complications.datasource.ComplicationDataSourceService#onBind(android.content.Intent) parameter #0:
+ Invalid nullability on parameter `intent` in method `onBind`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
diff --git a/wear/watchface/watchface-complications-data-source/api/current.txt b/wear/watchface/watchface-complications-data-source/api/current.txt
index 6878a68..d57c497 100644
--- a/wear/watchface/watchface-complications-data-source/api/current.txt
+++ b/wear/watchface/watchface-complications-data-source/api/current.txt
@@ -69,8 +69,8 @@
ctor public TimeInterval(java.time.Instant start, java.time.Instant end);
method public java.time.Instant getEnd();
method public java.time.Instant getStart();
- method public void setEnd(java.time.Instant end);
- method public void setStart(java.time.Instant start);
+ method public void setEnd(java.time.Instant);
+ method public void setStart(java.time.Instant);
property public final java.time.Instant end;
property public final java.time.Instant start;
}
@@ -79,8 +79,8 @@
ctor public TimelineEntry(androidx.wear.watchface.complications.datasource.TimeInterval validity, androidx.wear.watchface.complications.data.ComplicationData complicationData);
method public androidx.wear.watchface.complications.data.ComplicationData getComplicationData();
method public androidx.wear.watchface.complications.datasource.TimeInterval getValidity();
- method public void setComplicationData(androidx.wear.watchface.complications.data.ComplicationData complicationData);
- method public void setValidity(androidx.wear.watchface.complications.datasource.TimeInterval validity);
+ method public void setComplicationData(androidx.wear.watchface.complications.data.ComplicationData);
+ method public void setValidity(androidx.wear.watchface.complications.datasource.TimeInterval);
property public final androidx.wear.watchface.complications.data.ComplicationData complicationData;
property public final androidx.wear.watchface.complications.datasource.TimeInterval validity;
}
diff --git a/wear/watchface/watchface-complications-data-source/api/public_plus_experimental_current.txt b/wear/watchface/watchface-complications-data-source/api/public_plus_experimental_current.txt
index 6878a68..d57c497 100644
--- a/wear/watchface/watchface-complications-data-source/api/public_plus_experimental_current.txt
+++ b/wear/watchface/watchface-complications-data-source/api/public_plus_experimental_current.txt
@@ -69,8 +69,8 @@
ctor public TimeInterval(java.time.Instant start, java.time.Instant end);
method public java.time.Instant getEnd();
method public java.time.Instant getStart();
- method public void setEnd(java.time.Instant end);
- method public void setStart(java.time.Instant start);
+ method public void setEnd(java.time.Instant);
+ method public void setStart(java.time.Instant);
property public final java.time.Instant end;
property public final java.time.Instant start;
}
@@ -79,8 +79,8 @@
ctor public TimelineEntry(androidx.wear.watchface.complications.datasource.TimeInterval validity, androidx.wear.watchface.complications.data.ComplicationData complicationData);
method public androidx.wear.watchface.complications.data.ComplicationData getComplicationData();
method public androidx.wear.watchface.complications.datasource.TimeInterval getValidity();
- method public void setComplicationData(androidx.wear.watchface.complications.data.ComplicationData complicationData);
- method public void setValidity(androidx.wear.watchface.complications.datasource.TimeInterval validity);
+ method public void setComplicationData(androidx.wear.watchface.complications.data.ComplicationData);
+ method public void setValidity(androidx.wear.watchface.complications.datasource.TimeInterval);
property public final androidx.wear.watchface.complications.data.ComplicationData complicationData;
property public final androidx.wear.watchface.complications.datasource.TimeInterval validity;
}
diff --git a/wear/watchface/watchface-complications-data-source/api/restricted_current.txt b/wear/watchface/watchface-complications-data-source/api/restricted_current.txt
index 6878a68..d57c497 100644
--- a/wear/watchface/watchface-complications-data-source/api/restricted_current.txt
+++ b/wear/watchface/watchface-complications-data-source/api/restricted_current.txt
@@ -69,8 +69,8 @@
ctor public TimeInterval(java.time.Instant start, java.time.Instant end);
method public java.time.Instant getEnd();
method public java.time.Instant getStart();
- method public void setEnd(java.time.Instant end);
- method public void setStart(java.time.Instant start);
+ method public void setEnd(java.time.Instant);
+ method public void setStart(java.time.Instant);
property public final java.time.Instant end;
property public final java.time.Instant start;
}
@@ -79,8 +79,8 @@
ctor public TimelineEntry(androidx.wear.watchface.complications.datasource.TimeInterval validity, androidx.wear.watchface.complications.data.ComplicationData complicationData);
method public androidx.wear.watchface.complications.data.ComplicationData getComplicationData();
method public androidx.wear.watchface.complications.datasource.TimeInterval getValidity();
- method public void setComplicationData(androidx.wear.watchface.complications.data.ComplicationData complicationData);
- method public void setValidity(androidx.wear.watchface.complications.datasource.TimeInterval validity);
+ method public void setComplicationData(androidx.wear.watchface.complications.data.ComplicationData);
+ method public void setValidity(androidx.wear.watchface.complications.datasource.TimeInterval);
property public final androidx.wear.watchface.complications.data.ComplicationData complicationData;
property public final androidx.wear.watchface.complications.datasource.TimeInterval validity;
}
diff --git a/wear/watchface/watchface-complications-data/api/current.txt b/wear/watchface/watchface-complications-data/api/current.txt
index ce7283f..cb5f04a 100644
--- a/wear/watchface/watchface-complications-data/api/current.txt
+++ b/wear/watchface/watchface-complications-data/api/current.txt
@@ -9,7 +9,7 @@
method public final androidx.wear.watchface.complications.data.TimeRange getValidTimeRange();
method public boolean hasPlaceholderFields();
method public final boolean isTapActionLostDueToSerialization();
- method public final void setTapActionLostDueToSerialization(boolean tapActionLostDueToSerialization);
+ method public final void setTapActionLostDueToSerialization(boolean);
property public final android.content.ComponentName? dataSource;
property public final android.app.PendingIntent? tapAction;
property public final boolean tapActionLostDueToSerialization;
diff --git a/wear/watchface/watchface-complications-data/api/public_plus_experimental_current.txt b/wear/watchface/watchface-complications-data/api/public_plus_experimental_current.txt
index ce7283f..cb5f04a 100644
--- a/wear/watchface/watchface-complications-data/api/public_plus_experimental_current.txt
+++ b/wear/watchface/watchface-complications-data/api/public_plus_experimental_current.txt
@@ -9,7 +9,7 @@
method public final androidx.wear.watchface.complications.data.TimeRange getValidTimeRange();
method public boolean hasPlaceholderFields();
method public final boolean isTapActionLostDueToSerialization();
- method public final void setTapActionLostDueToSerialization(boolean tapActionLostDueToSerialization);
+ method public final void setTapActionLostDueToSerialization(boolean);
property public final android.content.ComponentName? dataSource;
property public final android.app.PendingIntent? tapAction;
property public final boolean tapActionLostDueToSerialization;
diff --git a/wear/watchface/watchface-complications-data/api/restricted_current.txt b/wear/watchface/watchface-complications-data/api/restricted_current.txt
index a13a3d0..355944f 100644
--- a/wear/watchface/watchface-complications-data/api/restricted_current.txt
+++ b/wear/watchface/watchface-complications-data/api/restricted_current.txt
@@ -9,7 +9,7 @@
method public final androidx.wear.watchface.complications.data.TimeRange getValidTimeRange();
method public boolean hasPlaceholderFields();
method public final boolean isTapActionLostDueToSerialization();
- method public final void setTapActionLostDueToSerialization(boolean tapActionLostDueToSerialization);
+ method public final void setTapActionLostDueToSerialization(boolean);
property public final android.content.ComponentName? dataSource;
property public final android.app.PendingIntent? tapAction;
property public final boolean tapActionLostDueToSerialization;
diff --git a/wear/watchface/watchface-complications-data/build.gradle b/wear/watchface/watchface-complications-data/build.gradle
index e4c1784..305e615 100644
--- a/wear/watchface/watchface-complications-data/build.gradle
+++ b/wear/watchface/watchface-complications-data/build.gradle
@@ -26,6 +26,7 @@
dependencies {
api("androidx.annotation:annotation:1.1.0")
+ api("androidx.versionedparcelable:versionedparcelable:1.1.0")
api(libs.kotlinStdlib)
api(libs.kotlinCoroutinesAndroid)
implementation("androidx.core:core:1.1.0")
@@ -38,6 +39,8 @@
testImplementation(libs.mockitoCore)
testImplementation(libs.truth)
testImplementation(libs.junit)
+
+ annotationProcessor(project(":versionedparcelable:versionedparcelable-compiler"))
}
android {
diff --git a/wear/watchface/watchface-complications-data/proguard-rules.pro b/wear/watchface/watchface-complications-data/proguard-rules.pro
index 6d11f81..de1e0af 100644
--- a/wear/watchface/watchface-complications-data/proguard-rules.pro
+++ b/wear/watchface/watchface-complications-data/proguard-rules.pro
@@ -13,6 +13,8 @@
# limitations under the License.
# Prevent Parcelizer objects from being removed or renamed.
+-keep public class androidx.wear.watchface.complications.data.**Parcelizer { *; }
+-keep public class androidx.wear.watchface.complications.data.DefaultComplicationDataSourcePolicyWireFormat { *; }
-keep public class android.support.wearable.complications.ComplicationData { *; }
-keep public class android.support.wearable.complications.ComplicationProviderInfo { *; }
-keep public class android.support.wearable.complications.ComplicationText { *; }
diff --git a/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/TimeDifferenceText.java b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/TimeDifferenceText.java
index 60d5669..84232ff 100644
--- a/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/TimeDifferenceText.java
+++ b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/TimeDifferenceText.java
@@ -29,6 +29,7 @@
import java.io.ObjectInputStream;
import java.io.Serializable;
import java.util.Locale;
+import java.util.Objects;
import java.util.concurrent.TimeUnit;
/**
@@ -71,6 +72,31 @@
mMinimumUnit = minimumUnit;
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ TimeDifferenceText that = (TimeDifferenceText) o;
+ return mReferencePeriodStart == that.mReferencePeriodStart
+ && mReferencePeriodEnd == that.mReferencePeriodEnd && mStyle == that.mStyle
+ && mShowNowText == that.mShowNowText && mMinimumUnit == that.mMinimumUnit;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(mReferencePeriodStart, mReferencePeriodEnd, mStyle, mShowNowText,
+ mMinimumUnit);
+ }
+
+ @NonNull
+ @Override
+ public String toString() {
+ return "TimeDifferenceText{mReferencePeriodStart=" + mReferencePeriodStart
+ + ", mReferencePeriodEnd=" + mReferencePeriodEnd
+ + ", mStyle=" + mStyle + ", mShowNowText=" + mShowNowText
+ + ", mMinimumUnit=" + mMinimumUnit + '}';
+ }
+
private static class SerializedForm implements Serializable {
long mReferencePeriodStart;
long mReferencePeriodEnd;
diff --git a/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/TimeFormatText.java b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/TimeFormatText.java
index e88ced6..43b2c1d 100644
--- a/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/TimeFormatText.java
+++ b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/TimeFormatText.java
@@ -28,6 +28,7 @@
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
+import java.util.Objects;
import java.util.TimeZone;
import java.util.concurrent.TimeUnit;
@@ -40,6 +41,30 @@
@RestrictTo(RestrictTo.Scope.LIBRARY)
public final class TimeFormatText implements TimeDependentText {
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ TimeFormatText that = (TimeFormatText) o;
+ return mStyle == that.mStyle && mTimePrecision == that.mTimePrecision
+ && Objects.equals(mDateFormat, that.mDateFormat) && Objects.equals(
+ mTimeZone, that.mTimeZone)
+ && Objects.equals(mDate.toString(), that.mDate.toString());
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(mDateFormat, mStyle, mTimeZone, mDate, mTimePrecision);
+ }
+
+ @NonNull
+ @Override
+ public String toString() {
+ return "TimeFormatText{mDateFormat=" + mDateFormat
+ + ", mStyle=" + mStyle + ", mTimeZone=" + mTimeZone + ", mDate=" + mDate
+ + ", mTimePrecision=" + mTimePrecision + '}';
+ }
+
private static class DateTimeFormat {
final String[] mFormatSymbols;
long mPrecision;
@@ -85,7 +110,7 @@
}
TimeFormatText(SimpleDateFormat dateFormat,
- @ComplicationText.TimeFormatStyle int style,
+ @ComplicationText.TimeFormatStyle int style,
TimeZone timeZone,
long timePrecision) {
mDateFormat = dateFormat;
@@ -97,7 +122,8 @@
private static class SerializedForm implements Serializable {
SimpleDateFormat mDateFormat;
- @ComplicationText.TimeFormatStyle int mStyle;
+ @ComplicationText.TimeFormatStyle
+ int mStyle;
TimeZone mTimeZone;
long mTimePrecision;
diff --git a/wear/watchface/watchface-complications-rendering/api/api_lint.ignore b/wear/watchface/watchface-complications-rendering/api/api_lint.ignore
new file mode 100644
index 0000000..e9553c8
--- /dev/null
+++ b/wear/watchface/watchface-complications-rendering/api/api_lint.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+InvalidNullability: androidx.wear.watchface.complications.rendering.ComplicationDrawable#onBoundsChange(android.graphics.Rect) parameter #0:
+ Invalid nullability on parameter `bounds` in method `onBoundsChange`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
diff --git a/wear/watchface/watchface-complications-rendering/api/current.ignore b/wear/watchface/watchface-complications-rendering/api/current.ignore
new file mode 100644
index 0000000..85aa9bc
--- /dev/null
+++ b/wear/watchface/watchface-complications-rendering/api/current.ignore
@@ -0,0 +1,55 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.wear.watchface.complications.rendering.CanvasComplicationDrawable#setDrawable(androidx.wear.watchface.complications.rendering.ComplicationDrawable) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.CanvasComplicationDrawable.setDrawable
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationDrawable#setBurnInProtectionOn(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationDrawable.setBurnInProtectionOn
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationDrawable#setCurrentTime(java.time.Instant) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationDrawable.setCurrentTime
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationDrawable#setHighlightDuration(long) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationDrawable.setHighlightDuration
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationDrawable#setHighlighted(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationDrawable.setHighlighted
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationDrawable#setInAmbientMode(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationDrawable.setInAmbientMode
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationDrawable#setLowBitAmbient(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationDrawable.setLowBitAmbient
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationDrawable#setNoDataText(CharSequence) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationDrawable.setNoDataText
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationDrawable#setRangedValueProgressHidden(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationDrawable.setRangedValueProgressHidden
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setBackgroundColor(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setBackgroundColor
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setBackgroundDrawable(android.graphics.drawable.Drawable) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setBackgroundDrawable
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setBorderColor(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setBorderColor
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setBorderDashGap(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setBorderDashGap
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setBorderDashWidth(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setBorderDashWidth
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setBorderRadius(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setBorderRadius
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setBorderStyle(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setBorderStyle
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setBorderWidth(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setBorderWidth
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setHighlightColor(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setHighlightColor
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setIconColor(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setIconColor
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setImageColorFilter(android.graphics.ColorFilter) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setImageColorFilter
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setRangedValuePrimaryColor(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setRangedValuePrimaryColor
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setRangedValueRingWidth(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setRangedValueRingWidth
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setRangedValueSecondaryColor(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setRangedValueSecondaryColor
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setTextColor(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setTextColor
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setTextSize(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setTextSize
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setTitleColor(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setTitleColor
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setTitleSize(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setTitleSize
diff --git a/wear/watchface/watchface-complications-rendering/api/current.txt b/wear/watchface/watchface-complications-rendering/api/current.txt
index 2a0aaa0..97f9d47 100644
--- a/wear/watchface/watchface-complications-rendering/api/current.txt
+++ b/wear/watchface/watchface-complications-rendering/api/current.txt
@@ -8,7 +8,7 @@
method public final androidx.wear.watchface.complications.rendering.ComplicationDrawable getDrawable();
method @CallSuper public void loadData(androidx.wear.watchface.complications.data.ComplicationData complicationData, boolean loadDrawablesAsynchronous);
method public void render(android.graphics.Canvas canvas, android.graphics.Rect bounds, java.time.ZonedDateTime zonedDateTime, androidx.wear.watchface.RenderParameters renderParameters, int slotId);
- method public final void setDrawable(androidx.wear.watchface.complications.rendering.ComplicationDrawable value);
+ method public final void setDrawable(androidx.wear.watchface.complications.rendering.ComplicationDrawable);
property public final androidx.wear.watchface.complications.rendering.ComplicationDrawable drawable;
}
@@ -32,18 +32,18 @@
method public boolean isLowBitAmbient();
method public boolean isRangedValueProgressHidden();
method public boolean onTap(@Px int x, @Px int y);
- method public void setAlpha(@IntRange(from=0, to=255) int alpha);
- method public void setBurnInProtectionOn(boolean isBurnInProtectionOn);
+ method public void setAlpha(@IntRange(from=0L, to=255L) int alpha);
+ method public void setBurnInProtectionOn(boolean);
method public void setColorFilter(android.graphics.ColorFilter? colorFilter);
method public void setComplicationData(androidx.wear.watchface.complications.data.ComplicationData complicationData, boolean loadDrawablesAsync);
method public void setContext(android.content.Context context);
- method public void setCurrentTime(java.time.Instant currentTime);
- method public void setHighlightDuration(@IntRange(from=0) long highlightDurationMillis);
- method public void setHighlighted(boolean isHighlighted);
- method public void setInAmbientMode(boolean isInAmbientMode);
- method public void setLowBitAmbient(boolean isLowBitAmbient);
- method public void setNoDataText(CharSequence? noDataText);
- method public void setRangedValueProgressHidden(boolean rangedValueProgressHidden);
+ method public void setCurrentTime(java.time.Instant);
+ method public void setHighlightDuration(@IntRange(from=0L) long);
+ method public void setHighlighted(boolean);
+ method public void setInAmbientMode(boolean);
+ method public void setLowBitAmbient(boolean);
+ method public void setNoDataText(CharSequence?);
+ method public void setRangedValueProgressHidden(boolean);
property public final androidx.wear.watchface.complications.rendering.ComplicationStyle activeStyle;
property public final androidx.wear.watchface.complications.rendering.ComplicationStyle ambientStyle;
property public final androidx.wear.watchface.complications.data.ComplicationData complicationData;
@@ -91,25 +91,25 @@
method @ColorInt public int getTitleColor();
method @Px public int getTitleSize();
method public android.graphics.Typeface getTitleTypeface();
- method public void setBackgroundColor(@ColorInt int backgroundColor);
- method public void setBackgroundDrawable(android.graphics.drawable.Drawable? backgroundDrawable);
- method public void setBorderColor(@ColorInt int borderColor);
- method public void setBorderDashGap(@Px int borderDashGap);
- method public void setBorderDashWidth(@Px int borderDashWidth);
- method public void setBorderRadius(@Px int borderRadius);
- method public void setBorderStyle(int borderStyle);
- method public void setBorderWidth(@Px int borderWidth);
- method public void setHighlightColor(@ColorInt int highlightColor);
- method public void setIconColor(@ColorInt int iconColor);
- method public void setImageColorFilter(android.graphics.ColorFilter? colorFilter);
- method public void setRangedValuePrimaryColor(@ColorInt int rangedValuePrimaryColor);
- method public void setRangedValueRingWidth(@Px int rangedValueRingWidth);
- method public void setRangedValueSecondaryColor(@ColorInt int rangedValueSecondaryColor);
- method public void setTextColor(@ColorInt int textColor);
- method public void setTextSize(@Px int textSize);
+ method public void setBackgroundColor(@ColorInt int);
+ method public void setBackgroundDrawable(android.graphics.drawable.Drawable?);
+ method public void setBorderColor(@ColorInt int);
+ method public void setBorderDashGap(@Px int);
+ method public void setBorderDashWidth(@Px int);
+ method public void setBorderRadius(@Px int);
+ method public void setBorderStyle(int);
+ method public void setBorderWidth(@Px int);
+ method public void setHighlightColor(@ColorInt int);
+ method public void setIconColor(@ColorInt int);
+ method public void setImageColorFilter(android.graphics.ColorFilter?);
+ method public void setRangedValuePrimaryColor(@ColorInt int);
+ method public void setRangedValueRingWidth(@Px int);
+ method public void setRangedValueSecondaryColor(@ColorInt int);
+ method public void setTextColor(@ColorInt int);
+ method public void setTextSize(@Px int);
method public void setTextTypeface(android.graphics.Typeface textTypeface);
- method public void setTitleColor(@ColorInt int titleColor);
- method public void setTitleSize(@Px int titleSize);
+ method public void setTitleColor(@ColorInt int);
+ method public void setTitleSize(@Px int);
method public void setTitleTypeface(android.graphics.Typeface titleTypeface);
property @ColorInt public final int backgroundColor;
property public final android.graphics.drawable.Drawable? backgroundDrawable;
diff --git a/wear/watchface/watchface-complications-rendering/api/public_plus_experimental_current.txt b/wear/watchface/watchface-complications-rendering/api/public_plus_experimental_current.txt
index 2a0aaa0..97f9d47 100644
--- a/wear/watchface/watchface-complications-rendering/api/public_plus_experimental_current.txt
+++ b/wear/watchface/watchface-complications-rendering/api/public_plus_experimental_current.txt
@@ -8,7 +8,7 @@
method public final androidx.wear.watchface.complications.rendering.ComplicationDrawable getDrawable();
method @CallSuper public void loadData(androidx.wear.watchface.complications.data.ComplicationData complicationData, boolean loadDrawablesAsynchronous);
method public void render(android.graphics.Canvas canvas, android.graphics.Rect bounds, java.time.ZonedDateTime zonedDateTime, androidx.wear.watchface.RenderParameters renderParameters, int slotId);
- method public final void setDrawable(androidx.wear.watchface.complications.rendering.ComplicationDrawable value);
+ method public final void setDrawable(androidx.wear.watchface.complications.rendering.ComplicationDrawable);
property public final androidx.wear.watchface.complications.rendering.ComplicationDrawable drawable;
}
@@ -32,18 +32,18 @@
method public boolean isLowBitAmbient();
method public boolean isRangedValueProgressHidden();
method public boolean onTap(@Px int x, @Px int y);
- method public void setAlpha(@IntRange(from=0, to=255) int alpha);
- method public void setBurnInProtectionOn(boolean isBurnInProtectionOn);
+ method public void setAlpha(@IntRange(from=0L, to=255L) int alpha);
+ method public void setBurnInProtectionOn(boolean);
method public void setColorFilter(android.graphics.ColorFilter? colorFilter);
method public void setComplicationData(androidx.wear.watchface.complications.data.ComplicationData complicationData, boolean loadDrawablesAsync);
method public void setContext(android.content.Context context);
- method public void setCurrentTime(java.time.Instant currentTime);
- method public void setHighlightDuration(@IntRange(from=0) long highlightDurationMillis);
- method public void setHighlighted(boolean isHighlighted);
- method public void setInAmbientMode(boolean isInAmbientMode);
- method public void setLowBitAmbient(boolean isLowBitAmbient);
- method public void setNoDataText(CharSequence? noDataText);
- method public void setRangedValueProgressHidden(boolean rangedValueProgressHidden);
+ method public void setCurrentTime(java.time.Instant);
+ method public void setHighlightDuration(@IntRange(from=0L) long);
+ method public void setHighlighted(boolean);
+ method public void setInAmbientMode(boolean);
+ method public void setLowBitAmbient(boolean);
+ method public void setNoDataText(CharSequence?);
+ method public void setRangedValueProgressHidden(boolean);
property public final androidx.wear.watchface.complications.rendering.ComplicationStyle activeStyle;
property public final androidx.wear.watchface.complications.rendering.ComplicationStyle ambientStyle;
property public final androidx.wear.watchface.complications.data.ComplicationData complicationData;
@@ -91,25 +91,25 @@
method @ColorInt public int getTitleColor();
method @Px public int getTitleSize();
method public android.graphics.Typeface getTitleTypeface();
- method public void setBackgroundColor(@ColorInt int backgroundColor);
- method public void setBackgroundDrawable(android.graphics.drawable.Drawable? backgroundDrawable);
- method public void setBorderColor(@ColorInt int borderColor);
- method public void setBorderDashGap(@Px int borderDashGap);
- method public void setBorderDashWidth(@Px int borderDashWidth);
- method public void setBorderRadius(@Px int borderRadius);
- method public void setBorderStyle(int borderStyle);
- method public void setBorderWidth(@Px int borderWidth);
- method public void setHighlightColor(@ColorInt int highlightColor);
- method public void setIconColor(@ColorInt int iconColor);
- method public void setImageColorFilter(android.graphics.ColorFilter? colorFilter);
- method public void setRangedValuePrimaryColor(@ColorInt int rangedValuePrimaryColor);
- method public void setRangedValueRingWidth(@Px int rangedValueRingWidth);
- method public void setRangedValueSecondaryColor(@ColorInt int rangedValueSecondaryColor);
- method public void setTextColor(@ColorInt int textColor);
- method public void setTextSize(@Px int textSize);
+ method public void setBackgroundColor(@ColorInt int);
+ method public void setBackgroundDrawable(android.graphics.drawable.Drawable?);
+ method public void setBorderColor(@ColorInt int);
+ method public void setBorderDashGap(@Px int);
+ method public void setBorderDashWidth(@Px int);
+ method public void setBorderRadius(@Px int);
+ method public void setBorderStyle(int);
+ method public void setBorderWidth(@Px int);
+ method public void setHighlightColor(@ColorInt int);
+ method public void setIconColor(@ColorInt int);
+ method public void setImageColorFilter(android.graphics.ColorFilter?);
+ method public void setRangedValuePrimaryColor(@ColorInt int);
+ method public void setRangedValueRingWidth(@Px int);
+ method public void setRangedValueSecondaryColor(@ColorInt int);
+ method public void setTextColor(@ColorInt int);
+ method public void setTextSize(@Px int);
method public void setTextTypeface(android.graphics.Typeface textTypeface);
- method public void setTitleColor(@ColorInt int titleColor);
- method public void setTitleSize(@Px int titleSize);
+ method public void setTitleColor(@ColorInt int);
+ method public void setTitleSize(@Px int);
method public void setTitleTypeface(android.graphics.Typeface titleTypeface);
property @ColorInt public final int backgroundColor;
property public final android.graphics.drawable.Drawable? backgroundDrawable;
diff --git a/wear/watchface/watchface-complications-rendering/api/restricted_current.ignore b/wear/watchface/watchface-complications-rendering/api/restricted_current.ignore
new file mode 100644
index 0000000..85aa9bc
--- /dev/null
+++ b/wear/watchface/watchface-complications-rendering/api/restricted_current.ignore
@@ -0,0 +1,55 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.wear.watchface.complications.rendering.CanvasComplicationDrawable#setDrawable(androidx.wear.watchface.complications.rendering.ComplicationDrawable) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.CanvasComplicationDrawable.setDrawable
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationDrawable#setBurnInProtectionOn(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationDrawable.setBurnInProtectionOn
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationDrawable#setCurrentTime(java.time.Instant) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationDrawable.setCurrentTime
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationDrawable#setHighlightDuration(long) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationDrawable.setHighlightDuration
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationDrawable#setHighlighted(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationDrawable.setHighlighted
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationDrawable#setInAmbientMode(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationDrawable.setInAmbientMode
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationDrawable#setLowBitAmbient(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationDrawable.setLowBitAmbient
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationDrawable#setNoDataText(CharSequence) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationDrawable.setNoDataText
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationDrawable#setRangedValueProgressHidden(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationDrawable.setRangedValueProgressHidden
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setBackgroundColor(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setBackgroundColor
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setBackgroundDrawable(android.graphics.drawable.Drawable) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setBackgroundDrawable
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setBorderColor(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setBorderColor
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setBorderDashGap(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setBorderDashGap
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setBorderDashWidth(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setBorderDashWidth
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setBorderRadius(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setBorderRadius
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setBorderStyle(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setBorderStyle
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setBorderWidth(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setBorderWidth
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setHighlightColor(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setHighlightColor
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setIconColor(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setIconColor
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setImageColorFilter(android.graphics.ColorFilter) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setImageColorFilter
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setRangedValuePrimaryColor(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setRangedValuePrimaryColor
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setRangedValueRingWidth(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setRangedValueRingWidth
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setRangedValueSecondaryColor(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setRangedValueSecondaryColor
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setTextColor(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setTextColor
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setTextSize(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setTextSize
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setTitleColor(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setTitleColor
+ParameterNameChange: androidx.wear.watchface.complications.rendering.ComplicationStyle#setTitleSize(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.complications.rendering.ComplicationStyle.setTitleSize
diff --git a/wear/watchface/watchface-complications-rendering/api/restricted_current.txt b/wear/watchface/watchface-complications-rendering/api/restricted_current.txt
index 2a0aaa0..97f9d47 100644
--- a/wear/watchface/watchface-complications-rendering/api/restricted_current.txt
+++ b/wear/watchface/watchface-complications-rendering/api/restricted_current.txt
@@ -8,7 +8,7 @@
method public final androidx.wear.watchface.complications.rendering.ComplicationDrawable getDrawable();
method @CallSuper public void loadData(androidx.wear.watchface.complications.data.ComplicationData complicationData, boolean loadDrawablesAsynchronous);
method public void render(android.graphics.Canvas canvas, android.graphics.Rect bounds, java.time.ZonedDateTime zonedDateTime, androidx.wear.watchface.RenderParameters renderParameters, int slotId);
- method public final void setDrawable(androidx.wear.watchface.complications.rendering.ComplicationDrawable value);
+ method public final void setDrawable(androidx.wear.watchface.complications.rendering.ComplicationDrawable);
property public final androidx.wear.watchface.complications.rendering.ComplicationDrawable drawable;
}
@@ -32,18 +32,18 @@
method public boolean isLowBitAmbient();
method public boolean isRangedValueProgressHidden();
method public boolean onTap(@Px int x, @Px int y);
- method public void setAlpha(@IntRange(from=0, to=255) int alpha);
- method public void setBurnInProtectionOn(boolean isBurnInProtectionOn);
+ method public void setAlpha(@IntRange(from=0L, to=255L) int alpha);
+ method public void setBurnInProtectionOn(boolean);
method public void setColorFilter(android.graphics.ColorFilter? colorFilter);
method public void setComplicationData(androidx.wear.watchface.complications.data.ComplicationData complicationData, boolean loadDrawablesAsync);
method public void setContext(android.content.Context context);
- method public void setCurrentTime(java.time.Instant currentTime);
- method public void setHighlightDuration(@IntRange(from=0) long highlightDurationMillis);
- method public void setHighlighted(boolean isHighlighted);
- method public void setInAmbientMode(boolean isInAmbientMode);
- method public void setLowBitAmbient(boolean isLowBitAmbient);
- method public void setNoDataText(CharSequence? noDataText);
- method public void setRangedValueProgressHidden(boolean rangedValueProgressHidden);
+ method public void setCurrentTime(java.time.Instant);
+ method public void setHighlightDuration(@IntRange(from=0L) long);
+ method public void setHighlighted(boolean);
+ method public void setInAmbientMode(boolean);
+ method public void setLowBitAmbient(boolean);
+ method public void setNoDataText(CharSequence?);
+ method public void setRangedValueProgressHidden(boolean);
property public final androidx.wear.watchface.complications.rendering.ComplicationStyle activeStyle;
property public final androidx.wear.watchface.complications.rendering.ComplicationStyle ambientStyle;
property public final androidx.wear.watchface.complications.data.ComplicationData complicationData;
@@ -91,25 +91,25 @@
method @ColorInt public int getTitleColor();
method @Px public int getTitleSize();
method public android.graphics.Typeface getTitleTypeface();
- method public void setBackgroundColor(@ColorInt int backgroundColor);
- method public void setBackgroundDrawable(android.graphics.drawable.Drawable? backgroundDrawable);
- method public void setBorderColor(@ColorInt int borderColor);
- method public void setBorderDashGap(@Px int borderDashGap);
- method public void setBorderDashWidth(@Px int borderDashWidth);
- method public void setBorderRadius(@Px int borderRadius);
- method public void setBorderStyle(int borderStyle);
- method public void setBorderWidth(@Px int borderWidth);
- method public void setHighlightColor(@ColorInt int highlightColor);
- method public void setIconColor(@ColorInt int iconColor);
- method public void setImageColorFilter(android.graphics.ColorFilter? colorFilter);
- method public void setRangedValuePrimaryColor(@ColorInt int rangedValuePrimaryColor);
- method public void setRangedValueRingWidth(@Px int rangedValueRingWidth);
- method public void setRangedValueSecondaryColor(@ColorInt int rangedValueSecondaryColor);
- method public void setTextColor(@ColorInt int textColor);
- method public void setTextSize(@Px int textSize);
+ method public void setBackgroundColor(@ColorInt int);
+ method public void setBackgroundDrawable(android.graphics.drawable.Drawable?);
+ method public void setBorderColor(@ColorInt int);
+ method public void setBorderDashGap(@Px int);
+ method public void setBorderDashWidth(@Px int);
+ method public void setBorderRadius(@Px int);
+ method public void setBorderStyle(int);
+ method public void setBorderWidth(@Px int);
+ method public void setHighlightColor(@ColorInt int);
+ method public void setIconColor(@ColorInt int);
+ method public void setImageColorFilter(android.graphics.ColorFilter?);
+ method public void setRangedValuePrimaryColor(@ColorInt int);
+ method public void setRangedValueRingWidth(@Px int);
+ method public void setRangedValueSecondaryColor(@ColorInt int);
+ method public void setTextColor(@ColorInt int);
+ method public void setTextSize(@Px int);
method public void setTextTypeface(android.graphics.Typeface textTypeface);
- method public void setTitleColor(@ColorInt int titleColor);
- method public void setTitleSize(@Px int titleSize);
+ method public void setTitleColor(@ColorInt int);
+ method public void setTitleSize(@Px int);
method public void setTitleTypeface(android.graphics.Typeface titleTypeface);
property @ColorInt public final int backgroundColor;
property public final android.graphics.drawable.Drawable? backgroundDrawable;
diff --git a/wear/watchface/watchface-complications/api/current.ignore b/wear/watchface/watchface-complications/api/current.ignore
new file mode 100644
index 0000000..d9a3a6c
--- /dev/null
+++ b/wear/watchface/watchface-complications/api/current.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever#retrieveComplicationDataSourceInfo(android.content.ComponentName, int[], kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.Result[]>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.retrieveComplicationDataSourceInfo
+ParameterNameChange: androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever#retrievePreviewComplicationData(android.content.ComponentName, androidx.wear.watchface.complications.data.ComplicationType, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.data.ComplicationData>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.retrievePreviewComplicationData
diff --git a/wear/watchface/watchface-complications/api/current.txt b/wear/watchface/watchface-complications/api/current.txt
index af0ccd0..c7efd47 100644
--- a/wear/watchface/watchface-complications/api/current.txt
+++ b/wear/watchface/watchface-complications/api/current.txt
@@ -20,8 +20,8 @@
public final class ComplicationDataSourceInfoRetriever implements java.lang.AutoCloseable {
ctor public ComplicationDataSourceInfoRetriever(android.content.Context context);
method public void close();
- method @kotlin.jvm.Throws(exceptionClasses=ServiceDisconnectedException::class) public suspend Object? retrieveComplicationDataSourceInfo(android.content.ComponentName watchFaceComponent, int[] watchFaceComplicationIds, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.Result[]> p) throws androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.ServiceDisconnectedException;
- method @RequiresApi(android.os.Build.VERSION_CODES.R) @kotlin.jvm.Throws(exceptionClasses=ServiceDisconnectedException::class) public suspend Object? retrievePreviewComplicationData(android.content.ComponentName complicationDataSourceComponent, androidx.wear.watchface.complications.data.ComplicationType complicationType, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.data.ComplicationData> p) throws androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.ServiceDisconnectedException;
+ method @kotlin.jvm.Throws(exceptionClasses=ServiceDisconnectedException::class) public suspend Object? retrieveComplicationDataSourceInfo(android.content.ComponentName watchFaceComponent, int[] watchFaceComplicationIds, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.Result[]>) throws androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.ServiceDisconnectedException;
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) @kotlin.jvm.Throws(exceptionClasses=ServiceDisconnectedException::class) public suspend Object? retrievePreviewComplicationData(android.content.ComponentName complicationDataSourceComponent, androidx.wear.watchface.complications.data.ComplicationType complicationType, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.data.ComplicationData>) throws androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.ServiceDisconnectedException;
}
public static final class ComplicationDataSourceInfoRetriever.Result {
diff --git a/wear/watchface/watchface-complications/api/public_plus_experimental_current.txt b/wear/watchface/watchface-complications/api/public_plus_experimental_current.txt
index af0ccd0..c7efd47 100644
--- a/wear/watchface/watchface-complications/api/public_plus_experimental_current.txt
+++ b/wear/watchface/watchface-complications/api/public_plus_experimental_current.txt
@@ -20,8 +20,8 @@
public final class ComplicationDataSourceInfoRetriever implements java.lang.AutoCloseable {
ctor public ComplicationDataSourceInfoRetriever(android.content.Context context);
method public void close();
- method @kotlin.jvm.Throws(exceptionClasses=ServiceDisconnectedException::class) public suspend Object? retrieveComplicationDataSourceInfo(android.content.ComponentName watchFaceComponent, int[] watchFaceComplicationIds, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.Result[]> p) throws androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.ServiceDisconnectedException;
- method @RequiresApi(android.os.Build.VERSION_CODES.R) @kotlin.jvm.Throws(exceptionClasses=ServiceDisconnectedException::class) public suspend Object? retrievePreviewComplicationData(android.content.ComponentName complicationDataSourceComponent, androidx.wear.watchface.complications.data.ComplicationType complicationType, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.data.ComplicationData> p) throws androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.ServiceDisconnectedException;
+ method @kotlin.jvm.Throws(exceptionClasses=ServiceDisconnectedException::class) public suspend Object? retrieveComplicationDataSourceInfo(android.content.ComponentName watchFaceComponent, int[] watchFaceComplicationIds, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.Result[]>) throws androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.ServiceDisconnectedException;
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) @kotlin.jvm.Throws(exceptionClasses=ServiceDisconnectedException::class) public suspend Object? retrievePreviewComplicationData(android.content.ComponentName complicationDataSourceComponent, androidx.wear.watchface.complications.data.ComplicationType complicationType, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.data.ComplicationData>) throws androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.ServiceDisconnectedException;
}
public static final class ComplicationDataSourceInfoRetriever.Result {
diff --git a/wear/watchface/watchface-complications/api/restricted_current.ignore b/wear/watchface/watchface-complications/api/restricted_current.ignore
new file mode 100644
index 0000000..d9a3a6c
--- /dev/null
+++ b/wear/watchface/watchface-complications/api/restricted_current.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever#retrieveComplicationDataSourceInfo(android.content.ComponentName, int[], kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.Result[]>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.retrieveComplicationDataSourceInfo
+ParameterNameChange: androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever#retrievePreviewComplicationData(android.content.ComponentName, androidx.wear.watchface.complications.data.ComplicationType, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.data.ComplicationData>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.retrievePreviewComplicationData
diff --git a/wear/watchface/watchface-complications/api/restricted_current.txt b/wear/watchface/watchface-complications/api/restricted_current.txt
index 54a9b5f..8d0a8d7 100644
--- a/wear/watchface/watchface-complications/api/restricted_current.txt
+++ b/wear/watchface/watchface-complications/api/restricted_current.txt
@@ -20,8 +20,8 @@
public final class ComplicationDataSourceInfoRetriever implements java.lang.AutoCloseable {
ctor public ComplicationDataSourceInfoRetriever(android.content.Context context);
method public void close();
- method @kotlin.jvm.Throws(exceptionClasses=ServiceDisconnectedException::class) public suspend Object? retrieveComplicationDataSourceInfo(android.content.ComponentName watchFaceComponent, int[] watchFaceComplicationIds, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.Result[]> p) throws androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.ServiceDisconnectedException;
- method @RequiresApi(android.os.Build.VERSION_CODES.R) @kotlin.jvm.Throws(exceptionClasses=ServiceDisconnectedException::class) public suspend Object? retrievePreviewComplicationData(android.content.ComponentName complicationDataSourceComponent, androidx.wear.watchface.complications.data.ComplicationType complicationType, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.data.ComplicationData> p) throws androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.ServiceDisconnectedException;
+ method @kotlin.jvm.Throws(exceptionClasses=ServiceDisconnectedException::class) public suspend Object? retrieveComplicationDataSourceInfo(android.content.ComponentName watchFaceComponent, int[] watchFaceComplicationIds, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.Result[]>) throws androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.ServiceDisconnectedException;
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) @kotlin.jvm.Throws(exceptionClasses=ServiceDisconnectedException::class) public suspend Object? retrievePreviewComplicationData(android.content.ComponentName complicationDataSourceComponent, androidx.wear.watchface.complications.data.ComplicationType complicationType, kotlin.coroutines.Continuation<? super androidx.wear.watchface.complications.data.ComplicationData>) throws androidx.wear.watchface.complications.ComplicationDataSourceInfoRetriever.ServiceDisconnectedException;
}
public static final class ComplicationDataSourceInfoRetriever.Result {
diff --git a/wear/watchface/watchface-complications/src/main/java/androidx/wear/watchface/complications/ComplicationSlotBounds.kt b/wear/watchface/watchface-complications/src/main/java/androidx/wear/watchface/complications/ComplicationSlotBounds.kt
index 2543bed..35e913f 100644
--- a/wear/watchface/watchface-complications/src/main/java/androidx/wear/watchface/complications/ComplicationSlotBounds.kt
+++ b/wear/watchface/watchface-complications/src/main/java/androidx/wear/watchface/complications/ComplicationSlotBounds.kt
@@ -19,8 +19,6 @@
package androidx.wear.watchface.complications
-import android.content.res.Resources
-import android.content.res.TypedArray
import android.content.res.XmlResourceParser
import android.graphics.RectF
import androidx.annotation.RestrictTo
@@ -28,6 +26,9 @@
import java.io.DataOutputStream
import org.xmlpull.v1.XmlPullParser
+const val NAMESPACE_APP = "http://schemas.android.com/apk/res-auto"
+const val NAMESPACE_ANDROID = "http://schemas.android.com/apk/res/android"
+
/**
* ComplicationSlotBounds are defined by fractional screen space coordinates in unit-square [0..1].
* These bounds will be subsequently clamped to the unit square and converted to screen space
@@ -76,7 +77,7 @@
* The [parser] should be inside a node with any number of ComplicationSlotBounds child
* nodes. No other child nodes are expected.
*/
- fun inflate(resources: Resources, parser: XmlResourceParser): ComplicationSlotBounds? {
+ fun inflate(parser: XmlResourceParser): ComplicationSlotBounds? {
var type = 0
val outerDepth = parser.depth
val perComplicationTypeBounds by lazy { HashMap<ComplicationType, RectF>() }
@@ -84,31 +85,29 @@
if (type == XmlPullParser.START_TAG) {
when (parser.name) {
"ComplicationSlotBounds" -> {
- val attrs = resources.obtainAttributes(
- parser,
- R.styleable.ComplicationSlotBounds
- )
val rect = RectF(
- attrs.requireAndGet(R.styleable.ComplicationSlotBounds_left) {
+ parser.requireAndGet("left") {
"ComplicationSlotBounds must define 'left'"
},
- attrs.requireAndGet(R.styleable.ComplicationSlotBounds_top) {
+ parser.requireAndGet("top") {
"ComplicationSlotBounds must define 'top'"
},
- attrs.requireAndGet(R.styleable.ComplicationSlotBounds_right) {
+ parser.requireAndGet("right") {
"ComplicationSlotBounds must define 'right'"
},
- attrs.requireAndGet(R.styleable.ComplicationSlotBounds_bottom) {
+ parser.requireAndGet("bottom") {
"ComplicationSlotBounds must define 'bottom'"
}
)
- if (attrs.hasValue(
- R.styleable.ComplicationSlotBounds_complicationType
+ if (null != parser.getAttributeValue(
+ NAMESPACE_APP,
+ "complicationType"
)
) {
val complicationType = ComplicationType.fromWireType(
- attrs.getInteger(
- R.styleable.ComplicationSlotBounds_complicationType,
+ parser.getAttributeIntValue(
+ NAMESPACE_APP,
+ "complicationType",
0
)
)
@@ -130,7 +129,6 @@
perComplicationTypeBounds[complicationType] = rect
}
}
- attrs.recycle()
}
else -> throw IllegalArgumentException(
"Unexpected node ${parser.name} at line ${parser.lineNumber}"
@@ -149,7 +147,11 @@
}
}
-internal fun TypedArray.requireAndGet(resourceId: Int, produceError: () -> String): Float {
- require(hasValue(resourceId), produceError)
- return getFloat(resourceId, 0f)
+internal fun XmlResourceParser.requireAndGet(id: String, produceError: () -> String): Float {
+ require(null != getAttributeValue(NAMESPACE_APP, id), produceError)
+ return getAttributeFloatValue(NAMESPACE_APP, id, 0f)
+}
+
+fun XmlResourceParser.hasValue(id: String): Boolean {
+ return null != getAttributeValue(NAMESPACE_APP, id)
}
diff --git a/wear/watchface/watchface-editor-guava/api/current.ignore b/wear/watchface/watchface-editor-guava/api/current.ignore
new file mode 100644
index 0000000..190860b
--- /dev/null
+++ b/wear/watchface/watchface-editor-guava/api/current.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.wear.watchface.editor.ListenableEditorSession#openComplicationDataSourceChooser(int, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.ChosenComplicationDataSource>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.wear.watchface.editor.ListenableEditorSession.openComplicationDataSourceChooser
+ParameterNameChange: androidx.wear.watchface.editor.ListenableEditorSession#setCommitChangesOnClose(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.editor.ListenableEditorSession.setCommitChangesOnClose
diff --git a/wear/watchface/watchface-editor-guava/api/current.txt b/wear/watchface/watchface-editor-guava/api/current.txt
index 5592a04..1e5a0c8 100644
--- a/wear/watchface/watchface-editor-guava/api/current.txt
+++ b/wear/watchface/watchface-editor-guava/api/current.txt
@@ -18,9 +18,9 @@
method public boolean isCommitChangesOnClose();
method @UiThread public static com.google.common.util.concurrent.ListenableFuture<androidx.wear.watchface.editor.ListenableEditorSession> listenableCreateOnWatchEditorSession(androidx.activity.ComponentActivity activity);
method public com.google.common.util.concurrent.ListenableFuture<androidx.wear.watchface.editor.ChosenComplicationDataSource> listenableOpenComplicationDataSourceChooser(int complicationSlotId);
- method public suspend Object? openComplicationDataSourceChooser(int complicationSlotId, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.ChosenComplicationDataSource> p);
+ method public suspend Object? openComplicationDataSourceChooser(int complicationSlotId, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.ChosenComplicationDataSource>);
method public android.graphics.Bitmap renderWatchFaceToBitmap(androidx.wear.watchface.RenderParameters renderParameters, java.time.Instant instant, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData);
- method public void setCommitChangesOnClose(boolean commitChangesOnClose);
+ method public void setCommitChangesOnClose(boolean);
property public Integer? backgroundComplicationSlotId;
property public boolean commitChangesOnClose;
property public kotlinx.coroutines.flow.StateFlow<java.util.Map<java.lang.Integer,androidx.wear.watchface.client.ComplicationSlotState>> complicationSlotsState;
diff --git a/wear/watchface/watchface-editor-guava/api/public_plus_experimental_current.txt b/wear/watchface/watchface-editor-guava/api/public_plus_experimental_current.txt
index 5592a04..1e5a0c8 100644
--- a/wear/watchface/watchface-editor-guava/api/public_plus_experimental_current.txt
+++ b/wear/watchface/watchface-editor-guava/api/public_plus_experimental_current.txt
@@ -18,9 +18,9 @@
method public boolean isCommitChangesOnClose();
method @UiThread public static com.google.common.util.concurrent.ListenableFuture<androidx.wear.watchface.editor.ListenableEditorSession> listenableCreateOnWatchEditorSession(androidx.activity.ComponentActivity activity);
method public com.google.common.util.concurrent.ListenableFuture<androidx.wear.watchface.editor.ChosenComplicationDataSource> listenableOpenComplicationDataSourceChooser(int complicationSlotId);
- method public suspend Object? openComplicationDataSourceChooser(int complicationSlotId, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.ChosenComplicationDataSource> p);
+ method public suspend Object? openComplicationDataSourceChooser(int complicationSlotId, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.ChosenComplicationDataSource>);
method public android.graphics.Bitmap renderWatchFaceToBitmap(androidx.wear.watchface.RenderParameters renderParameters, java.time.Instant instant, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData);
- method public void setCommitChangesOnClose(boolean commitChangesOnClose);
+ method public void setCommitChangesOnClose(boolean);
property public Integer? backgroundComplicationSlotId;
property public boolean commitChangesOnClose;
property public kotlinx.coroutines.flow.StateFlow<java.util.Map<java.lang.Integer,androidx.wear.watchface.client.ComplicationSlotState>> complicationSlotsState;
diff --git a/wear/watchface/watchface-editor-guava/api/restricted_current.ignore b/wear/watchface/watchface-editor-guava/api/restricted_current.ignore
new file mode 100644
index 0000000..190860b
--- /dev/null
+++ b/wear/watchface/watchface-editor-guava/api/restricted_current.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.wear.watchface.editor.ListenableEditorSession#openComplicationDataSourceChooser(int, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.ChosenComplicationDataSource>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.wear.watchface.editor.ListenableEditorSession.openComplicationDataSourceChooser
+ParameterNameChange: androidx.wear.watchface.editor.ListenableEditorSession#setCommitChangesOnClose(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.editor.ListenableEditorSession.setCommitChangesOnClose
diff --git a/wear/watchface/watchface-editor-guava/api/restricted_current.txt b/wear/watchface/watchface-editor-guava/api/restricted_current.txt
index 5592a04..1e5a0c8 100644
--- a/wear/watchface/watchface-editor-guava/api/restricted_current.txt
+++ b/wear/watchface/watchface-editor-guava/api/restricted_current.txt
@@ -18,9 +18,9 @@
method public boolean isCommitChangesOnClose();
method @UiThread public static com.google.common.util.concurrent.ListenableFuture<androidx.wear.watchface.editor.ListenableEditorSession> listenableCreateOnWatchEditorSession(androidx.activity.ComponentActivity activity);
method public com.google.common.util.concurrent.ListenableFuture<androidx.wear.watchface.editor.ChosenComplicationDataSource> listenableOpenComplicationDataSourceChooser(int complicationSlotId);
- method public suspend Object? openComplicationDataSourceChooser(int complicationSlotId, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.ChosenComplicationDataSource> p);
+ method public suspend Object? openComplicationDataSourceChooser(int complicationSlotId, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.ChosenComplicationDataSource>);
method public android.graphics.Bitmap renderWatchFaceToBitmap(androidx.wear.watchface.RenderParameters renderParameters, java.time.Instant instant, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData);
- method public void setCommitChangesOnClose(boolean commitChangesOnClose);
+ method public void setCommitChangesOnClose(boolean);
property public Integer? backgroundComplicationSlotId;
property public boolean commitChangesOnClose;
property public kotlinx.coroutines.flow.StateFlow<java.util.Map<java.lang.Integer,androidx.wear.watchface.client.ComplicationSlotState>> complicationSlotsState;
diff --git a/wear/watchface/watchface-editor/api/api_lint.ignore b/wear/watchface/watchface-editor/api/api_lint.ignore
new file mode 100644
index 0000000..d7ed79d
--- /dev/null
+++ b/wear/watchface/watchface-editor/api/api_lint.ignore
@@ -0,0 +1,9 @@
+// Baseline format: 1.0
+BannedThrow: androidx.wear.watchface.editor.EditorRequest#createFromIntent(android.content.Intent):
+ Methods must not throw unchecked exceptions
+BannedThrow: androidx.wear.watchface.editor.EditorRequest.Companion#createFromIntent(android.content.Intent):
+ Methods must not throw unchecked exceptions
+BannedThrow: androidx.wear.watchface.editor.EditorSession#createOnWatchEditorSession(androidx.activity.ComponentActivity, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.EditorSession>):
+ Methods must not throw unchecked exceptions
+BannedThrow: androidx.wear.watchface.editor.EditorSession.Companion#createOnWatchEditorSession(androidx.activity.ComponentActivity, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.EditorSession>):
+ Methods must not throw unchecked exceptions
diff --git a/wear/watchface/watchface-editor/api/current.ignore b/wear/watchface/watchface-editor/api/current.ignore
new file mode 100644
index 0000000..0d08f7a
--- /dev/null
+++ b/wear/watchface/watchface-editor/api/current.ignore
@@ -0,0 +1,9 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.wear.watchface.editor.EditorSession#createOnWatchEditorSession(androidx.activity.ComponentActivity, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.EditorSession>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.wear.watchface.editor.EditorSession.createOnWatchEditorSession
+ParameterNameChange: androidx.wear.watchface.editor.EditorSession#openComplicationDataSourceChooser(int, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.ChosenComplicationDataSource>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.wear.watchface.editor.EditorSession.openComplicationDataSourceChooser
+ParameterNameChange: androidx.wear.watchface.editor.EditorSession#setCommitChangesOnClose(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.editor.EditorSession.setCommitChangesOnClose
+ParameterNameChange: androidx.wear.watchface.editor.EditorSession.Companion#createOnWatchEditorSession(androidx.activity.ComponentActivity, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.EditorSession>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.wear.watchface.editor.EditorSession.Companion.createOnWatchEditorSession
diff --git a/wear/watchface/watchface-editor/api/current.txt b/wear/watchface/watchface-editor/api/current.txt
index c9be1ef..817f024 100644
--- a/wear/watchface/watchface-editor/api/current.txt
+++ b/wear/watchface/watchface-editor/api/current.txt
@@ -36,7 +36,7 @@
public interface EditorSession extends java.lang.AutoCloseable {
method @RequiresApi(27) @UiThread public default static androidx.wear.watchface.editor.EditorSession createHeadlessEditorSession(androidx.activity.ComponentActivity activity, android.content.Intent editIntent, androidx.wear.watchface.client.HeadlessWatchFaceClient headlessWatchFaceClient);
- method @UiThread @kotlin.jvm.Throws(exceptionClasses=TimeoutCancellationException::class) public default static suspend Object? createOnWatchEditorSession(androidx.activity.ComponentActivity activity, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.EditorSession> p) throws kotlinx.coroutines.TimeoutCancellationException;
+ method @UiThread @kotlin.jvm.Throws(exceptionClasses=TimeoutCancellationException::class) public default static suspend Object? createOnWatchEditorSession(androidx.activity.ComponentActivity activity, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.EditorSession>) throws kotlinx.coroutines.TimeoutCancellationException;
method public Integer? getBackgroundComplicationSlotId();
method @UiThread public Integer? getComplicationSlotIdAt(@Px int x, @Px int y);
method public kotlinx.coroutines.flow.StateFlow<java.util.Map<java.lang.Integer,androidx.wear.watchface.client.ComplicationSlotState>> getComplicationSlotsState();
@@ -48,9 +48,9 @@
method public android.content.ComponentName getWatchFaceComponentName();
method public androidx.wear.watchface.client.WatchFaceId getWatchFaceId();
method @UiThread public boolean isCommitChangesOnClose();
- method @UiThread public suspend Object? openComplicationDataSourceChooser(int complicationSlotId, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.ChosenComplicationDataSource> p);
+ method @UiThread public suspend Object? openComplicationDataSourceChooser(int complicationSlotId, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.ChosenComplicationDataSource>);
method @UiThread public android.graphics.Bitmap renderWatchFaceToBitmap(androidx.wear.watchface.RenderParameters renderParameters, java.time.Instant instant, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData);
- method @UiThread public void setCommitChangesOnClose(boolean commitChangesOnClose);
+ method @UiThread public void setCommitChangesOnClose(boolean);
property public abstract Integer? backgroundComplicationSlotId;
property @UiThread public abstract boolean commitChangesOnClose;
property public abstract kotlinx.coroutines.flow.StateFlow<java.util.Map<java.lang.Integer,androidx.wear.watchface.client.ComplicationSlotState>> complicationSlotsState;
@@ -68,7 +68,7 @@
public static final class EditorSession.Companion {
method @RequiresApi(27) @UiThread public androidx.wear.watchface.editor.EditorSession createHeadlessEditorSession(androidx.activity.ComponentActivity activity, android.content.Intent editIntent, androidx.wear.watchface.client.HeadlessWatchFaceClient headlessWatchFaceClient);
- method @UiThread @kotlin.jvm.Throws(exceptionClasses=TimeoutCancellationException::class) public suspend Object? createOnWatchEditorSession(androidx.activity.ComponentActivity activity, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.EditorSession> p) throws kotlinx.coroutines.TimeoutCancellationException;
+ method @UiThread @kotlin.jvm.Throws(exceptionClasses=TimeoutCancellationException::class) public suspend Object? createOnWatchEditorSession(androidx.activity.ComponentActivity activity, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.EditorSession>) throws kotlinx.coroutines.TimeoutCancellationException;
}
public final class EditorSessionKt {
diff --git a/wear/watchface/watchface-editor/api/public_plus_experimental_current.txt b/wear/watchface/watchface-editor/api/public_plus_experimental_current.txt
index c9be1ef..817f024 100644
--- a/wear/watchface/watchface-editor/api/public_plus_experimental_current.txt
+++ b/wear/watchface/watchface-editor/api/public_plus_experimental_current.txt
@@ -36,7 +36,7 @@
public interface EditorSession extends java.lang.AutoCloseable {
method @RequiresApi(27) @UiThread public default static androidx.wear.watchface.editor.EditorSession createHeadlessEditorSession(androidx.activity.ComponentActivity activity, android.content.Intent editIntent, androidx.wear.watchface.client.HeadlessWatchFaceClient headlessWatchFaceClient);
- method @UiThread @kotlin.jvm.Throws(exceptionClasses=TimeoutCancellationException::class) public default static suspend Object? createOnWatchEditorSession(androidx.activity.ComponentActivity activity, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.EditorSession> p) throws kotlinx.coroutines.TimeoutCancellationException;
+ method @UiThread @kotlin.jvm.Throws(exceptionClasses=TimeoutCancellationException::class) public default static suspend Object? createOnWatchEditorSession(androidx.activity.ComponentActivity activity, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.EditorSession>) throws kotlinx.coroutines.TimeoutCancellationException;
method public Integer? getBackgroundComplicationSlotId();
method @UiThread public Integer? getComplicationSlotIdAt(@Px int x, @Px int y);
method public kotlinx.coroutines.flow.StateFlow<java.util.Map<java.lang.Integer,androidx.wear.watchface.client.ComplicationSlotState>> getComplicationSlotsState();
@@ -48,9 +48,9 @@
method public android.content.ComponentName getWatchFaceComponentName();
method public androidx.wear.watchface.client.WatchFaceId getWatchFaceId();
method @UiThread public boolean isCommitChangesOnClose();
- method @UiThread public suspend Object? openComplicationDataSourceChooser(int complicationSlotId, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.ChosenComplicationDataSource> p);
+ method @UiThread public suspend Object? openComplicationDataSourceChooser(int complicationSlotId, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.ChosenComplicationDataSource>);
method @UiThread public android.graphics.Bitmap renderWatchFaceToBitmap(androidx.wear.watchface.RenderParameters renderParameters, java.time.Instant instant, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData);
- method @UiThread public void setCommitChangesOnClose(boolean commitChangesOnClose);
+ method @UiThread public void setCommitChangesOnClose(boolean);
property public abstract Integer? backgroundComplicationSlotId;
property @UiThread public abstract boolean commitChangesOnClose;
property public abstract kotlinx.coroutines.flow.StateFlow<java.util.Map<java.lang.Integer,androidx.wear.watchface.client.ComplicationSlotState>> complicationSlotsState;
@@ -68,7 +68,7 @@
public static final class EditorSession.Companion {
method @RequiresApi(27) @UiThread public androidx.wear.watchface.editor.EditorSession createHeadlessEditorSession(androidx.activity.ComponentActivity activity, android.content.Intent editIntent, androidx.wear.watchface.client.HeadlessWatchFaceClient headlessWatchFaceClient);
- method @UiThread @kotlin.jvm.Throws(exceptionClasses=TimeoutCancellationException::class) public suspend Object? createOnWatchEditorSession(androidx.activity.ComponentActivity activity, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.EditorSession> p) throws kotlinx.coroutines.TimeoutCancellationException;
+ method @UiThread @kotlin.jvm.Throws(exceptionClasses=TimeoutCancellationException::class) public suspend Object? createOnWatchEditorSession(androidx.activity.ComponentActivity activity, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.EditorSession>) throws kotlinx.coroutines.TimeoutCancellationException;
}
public final class EditorSessionKt {
diff --git a/wear/watchface/watchface-editor/api/restricted_current.ignore b/wear/watchface/watchface-editor/api/restricted_current.ignore
new file mode 100644
index 0000000..0d08f7a
--- /dev/null
+++ b/wear/watchface/watchface-editor/api/restricted_current.ignore
@@ -0,0 +1,9 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.wear.watchface.editor.EditorSession#createOnWatchEditorSession(androidx.activity.ComponentActivity, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.EditorSession>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.wear.watchface.editor.EditorSession.createOnWatchEditorSession
+ParameterNameChange: androidx.wear.watchface.editor.EditorSession#openComplicationDataSourceChooser(int, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.ChosenComplicationDataSource>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.wear.watchface.editor.EditorSession.openComplicationDataSourceChooser
+ParameterNameChange: androidx.wear.watchface.editor.EditorSession#setCommitChangesOnClose(boolean) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.editor.EditorSession.setCommitChangesOnClose
+ParameterNameChange: androidx.wear.watchface.editor.EditorSession.Companion#createOnWatchEditorSession(androidx.activity.ComponentActivity, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.EditorSession>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.wear.watchface.editor.EditorSession.Companion.createOnWatchEditorSession
diff --git a/wear/watchface/watchface-editor/api/restricted_current.txt b/wear/watchface/watchface-editor/api/restricted_current.txt
index c9be1ef..817f024 100644
--- a/wear/watchface/watchface-editor/api/restricted_current.txt
+++ b/wear/watchface/watchface-editor/api/restricted_current.txt
@@ -36,7 +36,7 @@
public interface EditorSession extends java.lang.AutoCloseable {
method @RequiresApi(27) @UiThread public default static androidx.wear.watchface.editor.EditorSession createHeadlessEditorSession(androidx.activity.ComponentActivity activity, android.content.Intent editIntent, androidx.wear.watchface.client.HeadlessWatchFaceClient headlessWatchFaceClient);
- method @UiThread @kotlin.jvm.Throws(exceptionClasses=TimeoutCancellationException::class) public default static suspend Object? createOnWatchEditorSession(androidx.activity.ComponentActivity activity, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.EditorSession> p) throws kotlinx.coroutines.TimeoutCancellationException;
+ method @UiThread @kotlin.jvm.Throws(exceptionClasses=TimeoutCancellationException::class) public default static suspend Object? createOnWatchEditorSession(androidx.activity.ComponentActivity activity, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.EditorSession>) throws kotlinx.coroutines.TimeoutCancellationException;
method public Integer? getBackgroundComplicationSlotId();
method @UiThread public Integer? getComplicationSlotIdAt(@Px int x, @Px int y);
method public kotlinx.coroutines.flow.StateFlow<java.util.Map<java.lang.Integer,androidx.wear.watchface.client.ComplicationSlotState>> getComplicationSlotsState();
@@ -48,9 +48,9 @@
method public android.content.ComponentName getWatchFaceComponentName();
method public androidx.wear.watchface.client.WatchFaceId getWatchFaceId();
method @UiThread public boolean isCommitChangesOnClose();
- method @UiThread public suspend Object? openComplicationDataSourceChooser(int complicationSlotId, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.ChosenComplicationDataSource> p);
+ method @UiThread public suspend Object? openComplicationDataSourceChooser(int complicationSlotId, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.ChosenComplicationDataSource>);
method @UiThread public android.graphics.Bitmap renderWatchFaceToBitmap(androidx.wear.watchface.RenderParameters renderParameters, java.time.Instant instant, java.util.Map<java.lang.Integer,? extends androidx.wear.watchface.complications.data.ComplicationData>? slotIdToComplicationData);
- method @UiThread public void setCommitChangesOnClose(boolean commitChangesOnClose);
+ method @UiThread public void setCommitChangesOnClose(boolean);
property public abstract Integer? backgroundComplicationSlotId;
property @UiThread public abstract boolean commitChangesOnClose;
property public abstract kotlinx.coroutines.flow.StateFlow<java.util.Map<java.lang.Integer,androidx.wear.watchface.client.ComplicationSlotState>> complicationSlotsState;
@@ -68,7 +68,7 @@
public static final class EditorSession.Companion {
method @RequiresApi(27) @UiThread public androidx.wear.watchface.editor.EditorSession createHeadlessEditorSession(androidx.activity.ComponentActivity activity, android.content.Intent editIntent, androidx.wear.watchface.client.HeadlessWatchFaceClient headlessWatchFaceClient);
- method @UiThread @kotlin.jvm.Throws(exceptionClasses=TimeoutCancellationException::class) public suspend Object? createOnWatchEditorSession(androidx.activity.ComponentActivity activity, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.EditorSession> p) throws kotlinx.coroutines.TimeoutCancellationException;
+ method @UiThread @kotlin.jvm.Throws(exceptionClasses=TimeoutCancellationException::class) public suspend Object? createOnWatchEditorSession(androidx.activity.ComponentActivity activity, kotlin.coroutines.Continuation<? super androidx.wear.watchface.editor.EditorSession>) throws kotlinx.coroutines.TimeoutCancellationException;
}
public final class EditorSessionKt {
diff --git a/wear/watchface/watchface-guava/api/current.ignore b/wear/watchface/watchface-guava/api/current.ignore
index 8125e1d..664332e 100644
--- a/wear/watchface/watchface-guava/api/current.ignore
+++ b/wear/watchface/watchface-guava/api/current.ignore
@@ -1,3 +1,13 @@
// Baseline format: 1.0
ChangedThrows: androidx.wear.watchface.ListenableGlesRenderer#ListenableGlesRenderer(android.view.SurfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository, androidx.wear.watchface.WatchState, long, int[], int[]):
Constructor androidx.wear.watchface.ListenableGlesRenderer added thrown exception androidx.wear.watchface.Renderer.GlesRenderer.GlesException
+
+
+ParameterNameChange: androidx.wear.watchface.ListenableCanvasRenderer#init(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.ListenableCanvasRenderer.init
+ParameterNameChange: androidx.wear.watchface.ListenableGlesRenderer#onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.ListenableGlesRenderer.onBackgroundThreadGlContextCreated
+ParameterNameChange: androidx.wear.watchface.ListenableGlesRenderer#onUiThreadGlSurfaceCreated(int, int, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.wear.watchface.ListenableGlesRenderer.onUiThreadGlSurfaceCreated
+ParameterNameChange: androidx.wear.watchface.ListenableWatchFaceService#createWatchFace(android.view.SurfaceHolder, androidx.wear.watchface.WatchState, androidx.wear.watchface.ComplicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>) parameter #4:
+ Attempted to remove parameter name from parameter arg5 in androidx.wear.watchface.ListenableWatchFaceService.createWatchFace
diff --git a/wear/watchface/watchface-guava/api/current.txt b/wear/watchface/watchface-guava/api/current.txt
index 6e4a4df..98993bd 100644
--- a/wear/watchface/watchface-guava/api/current.txt
+++ b/wear/watchface/watchface-guava/api/current.txt
@@ -2,42 +2,42 @@
package androidx.wear.watchface {
@Deprecated public abstract class ListenableCanvasRenderer extends androidx.wear.watchface.Renderer.CanvasRenderer {
- ctor @Deprecated public ListenableCanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
- ctor @Deprecated public ListenableCanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis);
- method @Deprecated public suspend Object? init(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ ctor @Deprecated public ListenableCanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
+ ctor @Deprecated public ListenableCanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis);
+ method @Deprecated public suspend Object? init(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @Deprecated @UiThread public com.google.common.util.concurrent.ListenableFuture<kotlin.Unit> initFuture();
}
public abstract class ListenableCanvasRenderer2<SharedAssetsT extends androidx.wear.watchface.Renderer.SharedAssets> extends androidx.wear.watchface.Renderer.CanvasRenderer2<SharedAssetsT> {
- ctor public ListenableCanvasRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
- ctor public ListenableCanvasRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis);
- method protected final suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT> p);
+ ctor public ListenableCanvasRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
+ ctor public ListenableCanvasRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis);
+ method protected final suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT>);
method @WorkerThread public abstract com.google.common.util.concurrent.ListenableFuture<SharedAssetsT> createSharedAssetsFuture();
- method public final suspend Object? init(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public final suspend Object? init(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @UiThread public com.google.common.util.concurrent.ListenableFuture<kotlin.Unit> initFuture();
}
@Deprecated public abstract class ListenableGlesRenderer extends androidx.wear.watchface.Renderer.GlesRenderer {
- ctor @Deprecated @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @Deprecated @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @Deprecated @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- method @Deprecated public suspend Object? onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ ctor @Deprecated @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @Deprecated @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @Deprecated @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ method @Deprecated public suspend Object? onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @Deprecated protected com.google.common.util.concurrent.ListenableFuture<kotlin.Unit> onBackgroundThreadGlContextCreatedFuture();
- method @Deprecated public suspend Object? onUiThreadGlSurfaceCreated(@Px int width, @Px int height, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @Deprecated public suspend Object? onUiThreadGlSurfaceCreated(@Px int width, @Px int height, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @Deprecated @UiThread protected com.google.common.util.concurrent.ListenableFuture<kotlin.Unit> onUiThreadGlSurfaceCreatedFuture(@Px int width, @Px int height);
method @Deprecated @WorkerThread public final void runBackgroundThreadGlCommands(Runnable runnable);
method @Deprecated @UiThread public final void runUiThreadGlCommands(Runnable runnable);
}
public abstract class ListenableGlesRenderer2<SharedAssetsT extends androidx.wear.watchface.Renderer.SharedAssets> extends androidx.wear.watchface.Renderer.GlesRenderer2<SharedAssetsT> {
- ctor @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- method protected final suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT> p);
+ ctor @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ method protected final suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT>);
method @WorkerThread public abstract com.google.common.util.concurrent.ListenableFuture<SharedAssetsT> createSharedAssetsFuture();
- method public final suspend Object? onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public final suspend Object? onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method protected com.google.common.util.concurrent.ListenableFuture<kotlin.Unit> onBackgroundThreadGlContextCreatedFuture();
- method public final suspend Object? onUiThreadGlSurfaceCreated(@Px int width, @Px int height, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public final suspend Object? onUiThreadGlSurfaceCreated(@Px int width, @Px int height, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @UiThread protected com.google.common.util.concurrent.ListenableFuture<kotlin.Unit> onUiThreadGlSurfaceCreatedFuture(@Px int width, @Px int height);
method @WorkerThread public final void runBackgroundThreadGlCommands(Runnable runnable);
method @UiThread public final void runUiThreadGlCommands(Runnable runnable);
@@ -48,7 +48,7 @@
public abstract class ListenableWatchFaceService extends androidx.wear.watchface.WatchFaceService {
ctor public ListenableWatchFaceService();
- method protected suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace> p);
+ method protected suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
method protected abstract com.google.common.util.concurrent.ListenableFuture<androidx.wear.watchface.WatchFace> createWatchFaceFuture(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository);
}
diff --git a/wear/watchface/watchface-guava/api/public_plus_experimental_current.txt b/wear/watchface/watchface-guava/api/public_plus_experimental_current.txt
index 6e4a4df..98993bd 100644
--- a/wear/watchface/watchface-guava/api/public_plus_experimental_current.txt
+++ b/wear/watchface/watchface-guava/api/public_plus_experimental_current.txt
@@ -2,42 +2,42 @@
package androidx.wear.watchface {
@Deprecated public abstract class ListenableCanvasRenderer extends androidx.wear.watchface.Renderer.CanvasRenderer {
- ctor @Deprecated public ListenableCanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
- ctor @Deprecated public ListenableCanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis);
- method @Deprecated public suspend Object? init(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ ctor @Deprecated public ListenableCanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
+ ctor @Deprecated public ListenableCanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis);
+ method @Deprecated public suspend Object? init(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @Deprecated @UiThread public com.google.common.util.concurrent.ListenableFuture<kotlin.Unit> initFuture();
}
public abstract class ListenableCanvasRenderer2<SharedAssetsT extends androidx.wear.watchface.Renderer.SharedAssets> extends androidx.wear.watchface.Renderer.CanvasRenderer2<SharedAssetsT> {
- ctor public ListenableCanvasRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
- ctor public ListenableCanvasRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis);
- method protected final suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT> p);
+ ctor public ListenableCanvasRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
+ ctor public ListenableCanvasRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis);
+ method protected final suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT>);
method @WorkerThread public abstract com.google.common.util.concurrent.ListenableFuture<SharedAssetsT> createSharedAssetsFuture();
- method public final suspend Object? init(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public final suspend Object? init(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @UiThread public com.google.common.util.concurrent.ListenableFuture<kotlin.Unit> initFuture();
}
@Deprecated public abstract class ListenableGlesRenderer extends androidx.wear.watchface.Renderer.GlesRenderer {
- ctor @Deprecated @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @Deprecated @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @Deprecated @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- method @Deprecated public suspend Object? onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ ctor @Deprecated @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @Deprecated @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @Deprecated @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ method @Deprecated public suspend Object? onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @Deprecated protected com.google.common.util.concurrent.ListenableFuture<kotlin.Unit> onBackgroundThreadGlContextCreatedFuture();
- method @Deprecated public suspend Object? onUiThreadGlSurfaceCreated(@Px int width, @Px int height, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @Deprecated public suspend Object? onUiThreadGlSurfaceCreated(@Px int width, @Px int height, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @Deprecated @UiThread protected com.google.common.util.concurrent.ListenableFuture<kotlin.Unit> onUiThreadGlSurfaceCreatedFuture(@Px int width, @Px int height);
method @Deprecated @WorkerThread public final void runBackgroundThreadGlCommands(Runnable runnable);
method @Deprecated @UiThread public final void runUiThreadGlCommands(Runnable runnable);
}
public abstract class ListenableGlesRenderer2<SharedAssetsT extends androidx.wear.watchface.Renderer.SharedAssets> extends androidx.wear.watchface.Renderer.GlesRenderer2<SharedAssetsT> {
- ctor @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- method protected final suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT> p);
+ ctor @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ method protected final suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT>);
method @WorkerThread public abstract com.google.common.util.concurrent.ListenableFuture<SharedAssetsT> createSharedAssetsFuture();
- method public final suspend Object? onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public final suspend Object? onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method protected com.google.common.util.concurrent.ListenableFuture<kotlin.Unit> onBackgroundThreadGlContextCreatedFuture();
- method public final suspend Object? onUiThreadGlSurfaceCreated(@Px int width, @Px int height, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public final suspend Object? onUiThreadGlSurfaceCreated(@Px int width, @Px int height, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @UiThread protected com.google.common.util.concurrent.ListenableFuture<kotlin.Unit> onUiThreadGlSurfaceCreatedFuture(@Px int width, @Px int height);
method @WorkerThread public final void runBackgroundThreadGlCommands(Runnable runnable);
method @UiThread public final void runUiThreadGlCommands(Runnable runnable);
@@ -48,7 +48,7 @@
public abstract class ListenableWatchFaceService extends androidx.wear.watchface.WatchFaceService {
ctor public ListenableWatchFaceService();
- method protected suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace> p);
+ method protected suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
method protected abstract com.google.common.util.concurrent.ListenableFuture<androidx.wear.watchface.WatchFace> createWatchFaceFuture(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository);
}
diff --git a/wear/watchface/watchface-guava/api/restricted_current.ignore b/wear/watchface/watchface-guava/api/restricted_current.ignore
index 8125e1d..664332e 100644
--- a/wear/watchface/watchface-guava/api/restricted_current.ignore
+++ b/wear/watchface/watchface-guava/api/restricted_current.ignore
@@ -1,3 +1,13 @@
// Baseline format: 1.0
ChangedThrows: androidx.wear.watchface.ListenableGlesRenderer#ListenableGlesRenderer(android.view.SurfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository, androidx.wear.watchface.WatchState, long, int[], int[]):
Constructor androidx.wear.watchface.ListenableGlesRenderer added thrown exception androidx.wear.watchface.Renderer.GlesRenderer.GlesException
+
+
+ParameterNameChange: androidx.wear.watchface.ListenableCanvasRenderer#init(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.ListenableCanvasRenderer.init
+ParameterNameChange: androidx.wear.watchface.ListenableGlesRenderer#onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.ListenableGlesRenderer.onBackgroundThreadGlContextCreated
+ParameterNameChange: androidx.wear.watchface.ListenableGlesRenderer#onUiThreadGlSurfaceCreated(int, int, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.wear.watchface.ListenableGlesRenderer.onUiThreadGlSurfaceCreated
+ParameterNameChange: androidx.wear.watchface.ListenableWatchFaceService#createWatchFace(android.view.SurfaceHolder, androidx.wear.watchface.WatchState, androidx.wear.watchface.ComplicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>) parameter #4:
+ Attempted to remove parameter name from parameter arg5 in androidx.wear.watchface.ListenableWatchFaceService.createWatchFace
diff --git a/wear/watchface/watchface-guava/api/restricted_current.txt b/wear/watchface/watchface-guava/api/restricted_current.txt
index 6e4a4df..98993bd 100644
--- a/wear/watchface/watchface-guava/api/restricted_current.txt
+++ b/wear/watchface/watchface-guava/api/restricted_current.txt
@@ -2,42 +2,42 @@
package androidx.wear.watchface {
@Deprecated public abstract class ListenableCanvasRenderer extends androidx.wear.watchface.Renderer.CanvasRenderer {
- ctor @Deprecated public ListenableCanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
- ctor @Deprecated public ListenableCanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis);
- method @Deprecated public suspend Object? init(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ ctor @Deprecated public ListenableCanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
+ ctor @Deprecated public ListenableCanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis);
+ method @Deprecated public suspend Object? init(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @Deprecated @UiThread public com.google.common.util.concurrent.ListenableFuture<kotlin.Unit> initFuture();
}
public abstract class ListenableCanvasRenderer2<SharedAssetsT extends androidx.wear.watchface.Renderer.SharedAssets> extends androidx.wear.watchface.Renderer.CanvasRenderer2<SharedAssetsT> {
- ctor public ListenableCanvasRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
- ctor public ListenableCanvasRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis);
- method protected final suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT> p);
+ ctor public ListenableCanvasRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
+ ctor public ListenableCanvasRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @androidx.wear.watchface.CanvasType int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis);
+ method protected final suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT>);
method @WorkerThread public abstract com.google.common.util.concurrent.ListenableFuture<SharedAssetsT> createSharedAssetsFuture();
- method public final suspend Object? init(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public final suspend Object? init(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @UiThread public com.google.common.util.concurrent.ListenableFuture<kotlin.Unit> initFuture();
}
@Deprecated public abstract class ListenableGlesRenderer extends androidx.wear.watchface.Renderer.GlesRenderer {
- ctor @Deprecated @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @Deprecated @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @Deprecated @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- method @Deprecated public suspend Object? onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ ctor @Deprecated @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @Deprecated @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @Deprecated @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ method @Deprecated public suspend Object? onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @Deprecated protected com.google.common.util.concurrent.ListenableFuture<kotlin.Unit> onBackgroundThreadGlContextCreatedFuture();
- method @Deprecated public suspend Object? onUiThreadGlSurfaceCreated(@Px int width, @Px int height, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @Deprecated public suspend Object? onUiThreadGlSurfaceCreated(@Px int width, @Px int height, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @Deprecated @UiThread protected com.google.common.util.concurrent.ListenableFuture<kotlin.Unit> onUiThreadGlSurfaceCreatedFuture(@Px int width, @Px int height);
method @Deprecated @WorkerThread public final void runBackgroundThreadGlCommands(Runnable runnable);
method @Deprecated @UiThread public final void runUiThreadGlCommands(Runnable runnable);
}
public abstract class ListenableGlesRenderer2<SharedAssetsT extends androidx.wear.watchface.Renderer.SharedAssets> extends androidx.wear.watchface.Renderer.GlesRenderer2<SharedAssetsT> {
- ctor @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- method protected final suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT> p);
+ ctor @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public ListenableGlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ method protected final suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT>);
method @WorkerThread public abstract com.google.common.util.concurrent.ListenableFuture<SharedAssetsT> createSharedAssetsFuture();
- method public final suspend Object? onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public final suspend Object? onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method protected com.google.common.util.concurrent.ListenableFuture<kotlin.Unit> onBackgroundThreadGlContextCreatedFuture();
- method public final suspend Object? onUiThreadGlSurfaceCreated(@Px int width, @Px int height, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public final suspend Object? onUiThreadGlSurfaceCreated(@Px int width, @Px int height, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @UiThread protected com.google.common.util.concurrent.ListenableFuture<kotlin.Unit> onUiThreadGlSurfaceCreatedFuture(@Px int width, @Px int height);
method @WorkerThread public final void runBackgroundThreadGlCommands(Runnable runnable);
method @UiThread public final void runUiThreadGlCommands(Runnable runnable);
@@ -48,7 +48,7 @@
public abstract class ListenableWatchFaceService extends androidx.wear.watchface.WatchFaceService {
ctor public ListenableWatchFaceService();
- method protected suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace> p);
+ method protected suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
method protected abstract com.google.common.util.concurrent.ListenableFuture<androidx.wear.watchface.WatchFace> createWatchFaceFuture(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository);
}
diff --git a/wear/watchface/watchface-style/src/main/java/androidx/wear/watchface/style/UserStyleSetting.kt b/wear/watchface/watchface-style/src/main/java/androidx/wear/watchface/style/UserStyleSetting.kt
index b0b72e1..f6fe09a 100644
--- a/wear/watchface/watchface-style/src/main/java/androidx/wear/watchface/style/UserStyleSetting.kt
+++ b/wear/watchface/watchface-style/src/main/java/androidx/wear/watchface/style/UserStyleSetting.kt
@@ -20,7 +20,6 @@
import android.content.ContentResolver
import android.content.Context
import android.content.res.Resources
-import android.content.res.TypedArray
import android.content.res.XmlResourceParser
import android.graphics.BitmapFactory
import android.graphics.drawable.Icon
@@ -32,7 +31,10 @@
import androidx.annotation.RestrictTo
import androidx.annotation.StringRes
import androidx.wear.watchface.complications.ComplicationSlotBounds
+import androidx.wear.watchface.complications.NAMESPACE_ANDROID
+import androidx.wear.watchface.complications.NAMESPACE_APP
import androidx.wear.watchface.complications.data.ComplicationType
+import androidx.wear.watchface.complications.hasValue
import androidx.wear.watchface.style.UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay
import androidx.wear.watchface.style.UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotsOption
import androidx.wear.watchface.style.data.BooleanOptionWireFormat
@@ -149,14 +151,9 @@
@SuppressLint("ResourceType")
fun inflate(resources: Resources, parser: XmlResourceParser): WatchFaceEditorData {
- val attributes = resources.obtainAttributes(
- parser,
- R.styleable.OnWatchEditorData
- )
val icon = createIcon(
resources,
- attributes,
- R.styleable.OnWatchEditorData_android_icon
+ parser
)
return WatchFaceEditorData(icon)
}
@@ -311,23 +308,23 @@
internal fun createDisplayText(
resources: Resources,
- attributes: TypedArray,
- attributeId: Int
+ parser: XmlResourceParser,
+ attributeId: String
): DisplayText {
- val displayNameId = attributes.getResourceId(attributeId, -1)
+ val displayNameId = parser.getAttributeResourceValue(NAMESPACE_APP, attributeId, -1)
return if (displayNameId != -1) {
DisplayText.ResourceDisplayText(resources, displayNameId)
} else {
- DisplayText.CharSequenceDisplayText(attributes.getString(attributeId) ?: "")
+ DisplayText.CharSequenceDisplayText(
+ parser.getAttributeValue(NAMESPACE_APP, attributeId) ?: "")
}
}
internal fun createIcon(
resources: Resources,
- attributes: TypedArray,
- attributeId: Int
+ parser: XmlResourceParser
): Icon? {
- val iconId = attributes.getResourceId(attributeId, -1)
+ val iconId = parser.getAttributeResourceValue(NAMESPACE_ANDROID, "icon", -1)
return if (iconId != -1) {
Icon.createWithResource(resources.getResourcePackageName(iconId), iconId)
} else {
@@ -702,46 +699,40 @@
internal companion object {
@SuppressLint("ResourceType")
fun inflate(resources: Resources, parser: XmlResourceParser): BooleanUserStyleSetting {
- val attributes = resources.obtainAttributes(
- parser,
- R.styleable.BooleanUserStyleSetting
- )
- val id = attributes.getString(R.styleable.BooleanUserStyleSetting_id)
+ val id = parser.getAttributeValue(NAMESPACE_APP, "id")
require(id != null) { "BooleanUserStyleSetting must have an id" }
val displayName = createDisplayText(
resources,
- attributes,
- R.styleable.BooleanUserStyleSetting_displayName
+ parser,
+ "displayName"
)
val description = createDisplayText(
resources,
- attributes,
- R.styleable.BooleanUserStyleSetting_description
+ parser,
+ "description"
)
val icon = createIcon(
resources,
- attributes,
- R.styleable.BooleanUserStyleSetting_android_icon
+ parser
)
- require(
- attributes.hasValue(R.styleable.BooleanUserStyleSetting_defaultBoolean)
- ) {
+ require(parser.hasValue("defaultBoolean")) {
"defaultBoolean is required for BooleanUserStyleSetting"
}
- val defaultValue = attributes.getBoolean(
- R.styleable.BooleanUserStyleSetting_defaultBoolean,
+ val defaultValue = parser.getAttributeBooleanValue(
+ NAMESPACE_APP,
+ "defaultBoolean",
true
)
val affectsWatchFaceLayers = affectsWatchFaceLayersFlagsToSet(
- attributes.getInt(
- R.styleable.BooleanUserStyleSetting_affectedWatchFaceLayers,
+ parser.getAttributeIntValue(
+ NAMESPACE_APP,
+ "affectedWatchFaceLayers",
0b111 // first 3 bits set
)
)
val watchFaceEditorData =
WatchFaceEditorData.inflateSingleOnWatchEditorData(resources, parser)
- attributes.recycle()
return BooleanUserStyleSetting(
Id(id),
@@ -943,45 +934,37 @@
internal companion object {
@SuppressLint("ResourceType")
fun inflate(
- resources: Resources,
parser: XmlResourceParser
): ComplicationSlotOverlay {
- val attributes = resources.obtainAttributes(
- parser,
- R.styleable.ComplicationSlotOverlay
- )
- require(
- attributes.hasValue(R.styleable.ComplicationSlotOverlay_complicationSlotId)
- ) {
+ require(parser.hasValue("complicationSlotId")) {
"ComplicationSlotOverlay missing complicationSlotId"
}
- val complicationSlotId = attributes.getInteger(
- R.styleable.ComplicationSlotOverlay_complicationSlotId,
+ val complicationSlotId = parser.getAttributeIntValue(
+ NAMESPACE_APP,
+ "complicationSlotId",
0
)
val enabled =
- if (attributes.hasValue(R.styleable.ComplicationSlotOverlay_enabled)) {
- attributes.getBoolean(
- R.styleable.ComplicationSlotOverlay_enabled,
+ if (parser.hasValue("enabled")) {
+ parser.getAttributeBooleanValue(
+ NAMESPACE_APP,
+ "enabled",
true
)
} else {
null
}
val accessibilityTraversalIndex =
- if (attributes.hasValue(
- R.styleable.ComplicationSlotOverlay_accessibilityTraversalIndex
- )
- ) {
- attributes.getInteger(
- R.styleable.ComplicationSlotOverlay_accessibilityTraversalIndex,
+ if (parser.hasValue("accessibilityTraversalIndex")) {
+ parser.getAttributeIntValue(
+ NAMESPACE_APP,
+ "accessibilityTraversalIndex",
0
)
} else {
null
}
- val bounds = ComplicationSlotBounds.inflate(resources, parser)
- attributes.recycle()
+ val bounds = ComplicationSlotBounds.inflate(parser)
return ComplicationSlotOverlay(
complicationSlotId,
@@ -1156,34 +1139,31 @@
resources: Resources,
parser: XmlResourceParser
): ComplicationSlotsUserStyleSetting {
- val attributes = resources.obtainAttributes(
- parser,
- R.styleable.ComplicationSlotsUserStyleSetting
- )
- val id = attributes.getString(R.styleable.ComplicationSlotsUserStyleSetting_id)
+ val id = parser.getAttributeValue(NAMESPACE_APP, "id")
require(id != null) { "ComplicationSlotsUserStyleSetting must have an id" }
val displayName = createDisplayText(
resources,
- attributes,
- R.styleable.ComplicationSlotsUserStyleSetting_displayName
+ parser,
+ "displayName"
)
val description = createDisplayText(
resources,
- attributes,
- R.styleable.ComplicationSlotsUserStyleSetting_description
+ parser,
+ "description"
)
val icon = createIcon(
resources,
- attributes,
- R.styleable.ComplicationSlotsUserStyleSetting_android_icon
+ parser
)
- val defaultOptionIndex = attributes.getInteger(
- R.styleable.ComplicationSlotsUserStyleSetting_defaultOptionIndex,
+ val defaultOptionIndex = parser.getAttributeIntValue(
+ NAMESPACE_APP,
+ "defaultOptionIndex",
0
)
val affectsWatchFaceLayers = affectsWatchFaceLayersFlagsToSet(
- attributes.getInt(
- R.styleable.BooleanUserStyleSetting_affectedWatchFaceLayers,
+ parser.getAttributeIntValue(
+ NAMESPACE_APP,
+ "affectedWatchFaceLayers",
0b111 // first 3 bits set
)
)
@@ -1218,7 +1198,6 @@
}
type = parser.next()
} while (type != XmlPullParser.END_DOCUMENT && parser.depth > outerDepth)
- attributes.recycle()
return ComplicationSlotsUserStyleSetting(
Id(id),
@@ -1404,21 +1383,16 @@
resources: Resources,
parser: XmlResourceParser
): ComplicationSlotsOption {
- val attributes = resources.obtainAttributes(
- parser,
- R.styleable.ComplicationSlotsOption
- )
- val id = attributes.getString(R.styleable.ComplicationSlotsOption_id)
+ val id = parser.getAttributeValue(NAMESPACE_APP, "id")
require(id != null) { "ComplicationSlotsOption must have an id" }
val displayName = createDisplayText(
resources,
- attributes,
- R.styleable.ComplicationSlotsOption_displayName
+ parser,
+ "displayName"
)
val icon = createIcon(
resources,
- attributes,
- R.styleable.ComplicationSlotsOption_android_icon
+ parser
)
var watchFaceEditorData: WatchFaceEditorData? = null
@@ -1429,7 +1403,7 @@
if (type == XmlPullParser.START_TAG) {
when (parser.name) {
"ComplicationSlotOverlay" -> complicationSlotOverlays.add(
- ComplicationSlotOverlay.inflate(resources, parser)
+ ComplicationSlotOverlay.inflate(parser)
)
"OnWatchEditorData" -> {
@@ -1451,7 +1425,6 @@
}
type = parser.next()
} while (type != XmlPullParser.END_DOCUMENT && parser.depth > outerDepth)
- attributes.recycle()
return ComplicationSlotsOption(
Id(id),
@@ -1497,56 +1470,45 @@
resources: Resources,
parser: XmlResourceParser
): DoubleRangeUserStyleSetting {
- val attributes = resources.obtainAttributes(
- parser,
- R.styleable.DoubleRangeUserStyleSetting
- )
- val id = attributes.getString(R.styleable.DoubleRangeUserStyleSetting_id)
+ val id = parser.getAttributeValue(NAMESPACE_APP, "id")
require(id != null) { "DoubleRangeUserStyleSetting must have an id" }
val displayName = createDisplayText(
resources,
- attributes,
- R.styleable.DoubleRangeUserStyleSetting_displayName
+ parser,
+ "displayName"
)
val description = createDisplayText(
resources,
- attributes,
- R.styleable.DoubleRangeUserStyleSetting_description
+ parser,
+ "description"
)
val icon = createIcon(
resources,
- attributes,
- R.styleable.DoubleRangeUserStyleSetting_android_icon
+ parser
)
- require(attributes.hasValue(R.styleable.DoubleRangeUserStyleSetting_maxDouble)) {
+ require(parser.hasValue("maxDouble")) {
"maxInteger is required for DoubleRangeUserStyleSetting"
}
- require(attributes.hasValue(R.styleable.DoubleRangeUserStyleSetting_minDouble)) {
+ require(parser.hasValue("minDouble")) {
"minInteger is required for DoubleRangeUserStyleSetting"
}
- require(
- attributes.hasValue(R.styleable.DoubleRangeUserStyleSetting_defaultDouble)
- ) {
+ require(parser.hasValue("defaultDouble")) {
"defaultInteger is required for DoubleRangeUserStyleSetting"
}
- val maxDouble = attributes.getString(
- R.styleable.DoubleRangeUserStyleSetting_maxDouble
- )!!.toDouble()
- val minDouble = attributes.getString(
- R.styleable.DoubleRangeUserStyleSetting_minDouble
- )!!.toDouble()
- val defaultDouble = attributes.getString(
- R.styleable.DoubleRangeUserStyleSetting_defaultDouble
- )!!.toDouble()
+ val maxDouble = parser.getAttributeValue(NAMESPACE_APP, "maxDouble")!!.toDouble()
+ val minDouble = parser.getAttributeValue(NAMESPACE_APP, "minDouble")!!.toDouble()
+ val defaultDouble = parser.getAttributeValue(
+ NAMESPACE_APP,
+ "defaultDouble")!!.toDouble()
val affectsWatchFaceLayers = affectsWatchFaceLayersFlagsToSet(
- attributes.getInt(
- R.styleable.BooleanUserStyleSetting_affectedWatchFaceLayers,
+ parser.getAttributeIntValue(
+ NAMESPACE_APP,
+ "affectedWatchFaceLayers",
0b111 // first 3 bits set
)
)
val watchFaceEditorData =
WatchFaceEditorData.inflateSingleOnWatchEditorData(resources, parser)
- attributes.recycle()
return DoubleRangeUserStyleSetting(
Id(id),
@@ -1919,30 +1881,28 @@
parser: XmlResourceParser,
idToSetting: Map<String, UserStyleSetting>
): ListUserStyleSetting {
- val attributes =
- resources.obtainAttributes(parser, R.styleable.ListUserStyleSetting)
- val id = attributes.getString(R.styleable.ListUserStyleSetting_id)
+ val id = parser.getAttributeValue(NAMESPACE_APP, "id")
require(id != null) { "ListUserStyleSetting must have an id" }
val displayName = createDisplayText(
resources,
- attributes,
- R.styleable.ListUserStyleSetting_displayName
+ parser,
+ "displayName"
)
val description = createDisplayText(
resources,
- attributes,
- R.styleable.ListUserStyleSetting_description
+ parser,
+ "description"
)
val icon = createIcon(
resources,
- attributes,
- R.styleable.ListUserStyleSetting_android_icon
+ parser
)
val defaultOptionIndex =
- attributes.getInteger(R.styleable.ListUserStyleSetting_defaultOptionIndex, 0)
+ parser.getAttributeIntValue(NAMESPACE_APP, "defaultOptionIndex", 0)
val affectsWatchFaceLayers = affectsWatchFaceLayersFlagsToSet(
- attributes.getInt(
- R.styleable.BooleanUserStyleSetting_affectedWatchFaceLayers,
+ parser.getAttributeIntValue(
+ NAMESPACE_APP,
+ "affectedWatchFaceLayers",
0b111 // first 3 bits set
)
)
@@ -1976,7 +1936,6 @@
}
type = parser.next()
} while (type != XmlPullParser.END_DOCUMENT && parser.depth > outerDepth)
- attributes.recycle()
return ListUserStyleSetting(
Id(id),
@@ -2171,18 +2130,16 @@
parser: XmlResourceParser,
idToSetting: Map<String, UserStyleSetting>
): ListOption {
- val attributes = resources.obtainAttributes(parser, R.styleable.ListOption)
- val id = attributes.getString(R.styleable.ListOption_id)
+ val id = parser.getAttributeValue(NAMESPACE_APP, "id")
require(id != null) { "ListOption must have an id" }
val displayName = createDisplayText(
resources,
- attributes,
- R.styleable.ListOption_displayName
+ parser,
+ "displayName"
)
val icon = createIcon(
resources,
- attributes,
- R.styleable.ListOption_android_icon
+ parser
)
var watchFaceEditorData: WatchFaceEditorData? = null
@@ -2193,10 +2150,7 @@
if (type == XmlPullParser.START_TAG) {
when (parser.name) {
"ChildSetting" -> {
- val childAttributes =
- resources.obtainAttributes(parser, R.styleable.ChildSetting)
- val childId =
- childAttributes.getString(R.styleable.ChildSetting_id)
+ val childId = parser.getAttributeValue(NAMESPACE_APP, "id")
require(childId != null) {
"ChildSetting must have an id"
}
@@ -2227,7 +2181,6 @@
}
type = parser.next()
} while (type != XmlPullParser.END_DOCUMENT && parser.depth > outerDepth)
- attributes.recycle()
return ListOption(
Id(id),
@@ -2276,52 +2229,46 @@
resources: Resources,
parser: XmlResourceParser
): LongRangeUserStyleSetting {
- val attributes = resources.obtainAttributes(
- parser,
- R.styleable.LongRangeUserStyleSetting
- )
- val id = attributes.getString(R.styleable.LongRangeUserStyleSetting_id)
+ val id = parser.getAttributeValue(NAMESPACE_APP, "id")
require(id != null) { "LongRangeUserStyleSetting must have an id" }
val displayName = createDisplayText(
resources,
- attributes,
- R.styleable.LongRangeUserStyleSetting_displayName
+ parser,
+ "displayName"
)
val description = createDisplayText(
resources,
- attributes,
- R.styleable.LongRangeUserStyleSetting_description
+ parser,
+ "description"
)
val icon = createIcon(
resources,
- attributes,
- R.styleable.LongRangeUserStyleSetting_android_icon
+ parser
)
- require(attributes.hasValue(R.styleable.LongRangeUserStyleSetting_maxLong)) {
+ require(parser.hasValue("maxLong")) {
"maxLong is required for LongRangeUserStyleSetting"
}
- require(attributes.hasValue(R.styleable.LongRangeUserStyleSetting_minLong)) {
+ require(parser.hasValue("minLong")) {
"minLong is required for LongRangeUserStyleSetting"
}
- require(attributes.hasValue(R.styleable.LongRangeUserStyleSetting_defaultLong)) {
+ require(parser.hasValue("defaultLong")) {
"defaultLong is required for LongRangeUserStyleSetting"
}
val maxInteger =
- attributes.getString(R.styleable.LongRangeUserStyleSetting_maxLong)!!.toLong()
+ parser.getAttributeValue(NAMESPACE_APP, "maxLong")!!.toLong()
val minInteger =
- attributes.getString(R.styleable.LongRangeUserStyleSetting_minLong)!!.toLong()
- val defaultInteger = attributes.getString(
- R.styleable.LongRangeUserStyleSetting_defaultLong
- )!!.toLong()
+ parser.getAttributeValue(NAMESPACE_APP, "minLong")!!.toLong()
+ val defaultInteger =
+ parser.getAttributeValue(NAMESPACE_APP, "defaultLong")!!.toLong()
val affectsWatchFaceLayers = affectsWatchFaceLayersFlagsToSet(
- attributes.getInt(
- R.styleable.BooleanUserStyleSetting_affectedWatchFaceLayers,
+ parser.getAttributeIntValue(
+ NAMESPACE_APP,
+ "affectedWatchFaceLayers",
0b111 // first 3 bits set
)
)
val watchFaceEditorData =
WatchFaceEditorData.inflateSingleOnWatchEditorData(resources, parser)
- attributes.recycle()
return LongRangeUserStyleSetting(
Id(id),
diff --git a/wear/watchface/watchface/api/api_lint.ignore b/wear/watchface/watchface/api/api_lint.ignore
new file mode 100644
index 0000000..b9528fc
--- /dev/null
+++ b/wear/watchface/watchface/api/api_lint.ignore
@@ -0,0 +1,7 @@
+// Baseline format: 1.0
+InvalidNullability: androidx.wear.watchface.WatchFaceService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]) parameter #0:
+ Invalid nullability on parameter `fd` in method `dump`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.wear.watchface.WatchFaceService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]) parameter #1:
+ Invalid nullability on parameter `writer` in method `dump`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.wear.watchface.WatchFaceService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]) parameter #2:
+ Invalid nullability on parameter `args` in method `dump`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
diff --git a/wear/watchface/watchface/api/current.ignore b/wear/watchface/watchface/api/current.ignore
new file mode 100644
index 0000000..dacf67f
--- /dev/null
+++ b/wear/watchface/watchface/api/current.ignore
@@ -0,0 +1,23 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.wear.watchface.Renderer#setAdditionalContentDescriptionLabels(java.util.Collection<kotlin.Pair<java.lang.Integer,androidx.wear.watchface.ContentDescriptionLabel>>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.Renderer.setAdditionalContentDescriptionLabels
+ParameterNameChange: androidx.wear.watchface.Renderer#setInteractiveDrawModeUpdateDelayMillis(long) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.Renderer.setInteractiveDrawModeUpdateDelayMillis
+ParameterNameChange: androidx.wear.watchface.Renderer.CanvasRenderer#init(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.Renderer.CanvasRenderer.init
+ParameterNameChange: androidx.wear.watchface.Renderer.GlesRenderer#onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.Renderer.GlesRenderer.onBackgroundThreadGlContextCreated
+ParameterNameChange: androidx.wear.watchface.Renderer.GlesRenderer#onUiThreadGlSurfaceCreated(int, int, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.wear.watchface.Renderer.GlesRenderer.onUiThreadGlSurfaceCreated
+ParameterNameChange: androidx.wear.watchface.Renderer.GlesRenderer#runBackgroundThreadGlCommands(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.wear.watchface.Renderer.GlesRenderer.runBackgroundThreadGlCommands
+ParameterNameChange: androidx.wear.watchface.Renderer.GlesRenderer#runUiThreadGlCommands(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.wear.watchface.Renderer.GlesRenderer.runUiThreadGlCommands
+ParameterNameChange: androidx.wear.watchface.Renderer.GlesRenderer#setEglConfig(android.opengl.EGLConfig) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.Renderer.GlesRenderer.setEglConfig
+ParameterNameChange: androidx.wear.watchface.Renderer.GlesRenderer#setEglDisplay(android.opengl.EGLDisplay) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.Renderer.GlesRenderer.setEglDisplay
+ParameterNameChange: androidx.wear.watchface.WatchFace#setWatchFaceType(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.WatchFace.setWatchFaceType
+ParameterNameChange: androidx.wear.watchface.WatchFaceService#createWatchFace(android.view.SurfaceHolder, androidx.wear.watchface.WatchState, androidx.wear.watchface.ComplicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>) parameter #4:
+ Attempted to remove parameter name from parameter arg5 in androidx.wear.watchface.WatchFaceService.createWatchFace
diff --git a/wear/watchface/watchface/api/current.txt b/wear/watchface/watchface/api/current.txt
index b83d1b8b..027672b 100644
--- a/wear/watchface/watchface/api/current.txt
+++ b/wear/watchface/watchface/api/current.txt
@@ -47,7 +47,7 @@
method @UiThread public boolean isEnabled();
method @UiThread public void render(android.graphics.Canvas canvas, java.time.ZonedDateTime zonedDateTime, androidx.wear.watchface.RenderParameters renderParameters);
method @UiThread public void renderHighlightLayer(android.graphics.Canvas canvas, java.time.ZonedDateTime zonedDateTime, androidx.wear.watchface.RenderParameters renderParameters);
- method public void setConfigExtras(android.os.Bundle value);
+ method public void setConfigExtras(android.os.Bundle);
property @UiThread public final int accessibilityTraversalIndex;
property public final int boundsType;
property public final androidx.wear.watchface.CanvasComplicationFactory canvasComplicationFactory;
@@ -200,8 +200,8 @@
method @UiThread public abstract void onDump(java.io.PrintWriter writer);
method @UiThread protected void onRenderParametersChanged(androidx.wear.watchface.RenderParameters renderParameters);
method public final void postInvalidate();
- method public final void setAdditionalContentDescriptionLabels(java.util.Collection<kotlin.Pair<java.lang.Integer,androidx.wear.watchface.ContentDescriptionLabel>> value);
- method public final void setInteractiveDrawModeUpdateDelayMillis(long interactiveDrawModeUpdateDelayMillis);
+ method public final void setAdditionalContentDescriptionLabels(java.util.Collection<kotlin.Pair<java.lang.Integer,androidx.wear.watchface.ContentDescriptionLabel>>);
+ method public final void setInteractiveDrawModeUpdateDelayMillis(long);
method @UiThread public boolean shouldAnimate();
property public final java.util.Collection<kotlin.Pair<java.lang.Integer,androidx.wear.watchface.ContentDescriptionLabel>> additionalContentDescriptionLabels;
property public final float centerX;
@@ -213,10 +213,10 @@
}
@Deprecated public abstract static class Renderer.CanvasRenderer extends androidx.wear.watchface.Renderer {
- ctor @Deprecated @WorkerThread public Renderer.CanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
- ctor @Deprecated @WorkerThread public Renderer.CanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis);
+ ctor @Deprecated @WorkerThread public Renderer.CanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
+ ctor @Deprecated @WorkerThread public Renderer.CanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis);
method @Deprecated public final boolean getClearWithBackgroundTintBeforeRenderingHighlightLayer();
- method @Deprecated @UiThread public suspend Object? init(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @Deprecated @UiThread public suspend Object? init(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @Deprecated public void onDump(java.io.PrintWriter writer);
method @Deprecated @UiThread public abstract void render(android.graphics.Canvas canvas, android.graphics.Rect bounds, java.time.ZonedDateTime zonedDateTime);
method @Deprecated @UiThread public abstract void renderHighlightLayer(android.graphics.Canvas canvas, android.graphics.Rect bounds, java.time.ZonedDateTime zonedDateTime);
@@ -224,8 +224,8 @@
}
public abstract static class Renderer.CanvasRenderer2<SharedAssetsT extends androidx.wear.watchface.Renderer.SharedAssets> extends androidx.wear.watchface.Renderer.CanvasRenderer {
- ctor @WorkerThread public Renderer.CanvasRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
- method @WorkerThread protected abstract suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT> p);
+ ctor @WorkerThread public Renderer.CanvasRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
+ method @WorkerThread protected abstract suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT>);
method @UiThread public abstract void render(android.graphics.Canvas canvas, android.graphics.Rect bounds, java.time.ZonedDateTime zonedDateTime, SharedAssetsT sharedAssets);
method public final void render(android.graphics.Canvas canvas, android.graphics.Rect bounds, java.time.ZonedDateTime zonedDateTime);
method @UiThread public abstract void renderHighlightLayer(android.graphics.Canvas canvas, android.graphics.Rect bounds, java.time.ZonedDateTime zonedDateTime, SharedAssetsT sharedAssets);
@@ -233,22 +233,22 @@
}
@Deprecated public abstract static class Renderer.GlesRenderer extends androidx.wear.watchface.Renderer {
- ctor @Deprecated @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @Deprecated @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @Deprecated @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @Deprecated @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @Deprecated @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @Deprecated @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
method @Deprecated public final android.opengl.EGLContext getEglBackgroundThreadContext();
method @Deprecated public final android.opengl.EGLConfig getEglConfig();
method @Deprecated public final android.opengl.EGLDisplay getEglDisplay();
method @Deprecated public final android.opengl.EGLContext getEglUiThreadContext();
- method @Deprecated @WorkerThread public suspend Object? onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @Deprecated @WorkerThread public suspend Object? onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @Deprecated public void onDump(java.io.PrintWriter writer);
- method @Deprecated @UiThread public suspend Object? onUiThreadGlSurfaceCreated(@Px int width, @Px int height, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @Deprecated @UiThread public suspend Object? onUiThreadGlSurfaceCreated(@Px int width, @Px int height, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @Deprecated @UiThread public abstract void render(java.time.ZonedDateTime zonedDateTime);
method @Deprecated @UiThread public abstract void renderHighlightLayer(java.time.ZonedDateTime zonedDateTime);
- method @Deprecated @WorkerThread public final suspend Object? runBackgroundThreadGlCommands(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> commands, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method @Deprecated public final suspend Object? runUiThreadGlCommands(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> commands, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method @Deprecated public final void setEglConfig(android.opengl.EGLConfig eglConfig);
- method @Deprecated public final void setEglDisplay(android.opengl.EGLDisplay eglDisplay);
+ method @Deprecated @WorkerThread public final suspend Object? runBackgroundThreadGlCommands(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> commands, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method @Deprecated public final suspend Object? runUiThreadGlCommands(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> commands, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method @Deprecated public final void setEglConfig(android.opengl.EGLConfig);
+ method @Deprecated public final void setEglDisplay(android.opengl.EGLDisplay);
property public final android.opengl.EGLContext eglBackgroundThreadContext;
property public final android.opengl.EGLConfig eglConfig;
property public final android.opengl.EGLDisplay eglDisplay;
@@ -260,10 +260,10 @@
}
public abstract static class Renderer.GlesRenderer2<SharedAssetsT extends androidx.wear.watchface.Renderer.SharedAssets> extends androidx.wear.watchface.Renderer.GlesRenderer {
- ctor @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- method @WorkerThread protected abstract suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT> p);
+ ctor @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ method @WorkerThread protected abstract suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT>);
method @UiThread public abstract void render(java.time.ZonedDateTime zonedDateTime, SharedAssetsT sharedAssets);
method public final void render(java.time.ZonedDateTime zonedDateTime);
method @UiThread public abstract void renderHighlightLayer(java.time.ZonedDateTime zonedDateTime, SharedAssetsT sharedAssets);
@@ -306,7 +306,7 @@
method public androidx.wear.watchface.WatchFace setOverlayStyle(androidx.wear.watchface.WatchFace.OverlayStyle watchFaceOverlayStyle);
method public androidx.wear.watchface.WatchFace setOverridePreviewReferenceInstant(java.time.Instant previewReferenceTimeMillis);
method public androidx.wear.watchface.WatchFace setTapListener(androidx.wear.watchface.WatchFace.TapListener? tapListener);
- method public void setWatchFaceType(int watchFaceType);
+ method public void setWatchFaceType(int);
property public final androidx.wear.watchface.WatchFace.LegacyWatchFaceOverlayStyle legacyWatchFaceStyle;
property public final androidx.wear.watchface.WatchFace.OverlayStyle overlayStyle;
property public final java.time.Instant? overridePreviewReferenceInstant;
@@ -352,7 +352,7 @@
ctor public WatchFaceService();
method @WorkerThread protected androidx.wear.watchface.ComplicationSlotsManager createComplicationSlotsManager(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository);
method @WorkerThread protected androidx.wear.watchface.style.UserStyleSchema createUserStyleSchema();
- method @WorkerThread protected abstract suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace> p);
+ method @WorkerThread protected abstract suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
method public final android.os.Handler getBackgroundThreadHandler();
method @WorkerThread protected androidx.wear.watchface.ComplicationSlotInflationFactory? getComplicationSlotInflationFactory();
method public final android.os.Handler getUiThreadHandler();
diff --git a/wear/watchface/watchface/api/public_plus_experimental_current.txt b/wear/watchface/watchface/api/public_plus_experimental_current.txt
index 56091a4..a83ca76 100644
--- a/wear/watchface/watchface/api/public_plus_experimental_current.txt
+++ b/wear/watchface/watchface/api/public_plus_experimental_current.txt
@@ -47,7 +47,7 @@
method @UiThread public boolean isEnabled();
method @UiThread public void render(android.graphics.Canvas canvas, java.time.ZonedDateTime zonedDateTime, androidx.wear.watchface.RenderParameters renderParameters);
method @UiThread public void renderHighlightLayer(android.graphics.Canvas canvas, java.time.ZonedDateTime zonedDateTime, androidx.wear.watchface.RenderParameters renderParameters);
- method public void setConfigExtras(android.os.Bundle value);
+ method public void setConfigExtras(android.os.Bundle);
property @UiThread public final int accessibilityTraversalIndex;
property public final int boundsType;
property public final androidx.wear.watchface.CanvasComplicationFactory canvasComplicationFactory;
@@ -200,8 +200,8 @@
method @UiThread public abstract void onDump(java.io.PrintWriter writer);
method @UiThread protected void onRenderParametersChanged(androidx.wear.watchface.RenderParameters renderParameters);
method public final void postInvalidate();
- method public final void setAdditionalContentDescriptionLabels(java.util.Collection<kotlin.Pair<java.lang.Integer,androidx.wear.watchface.ContentDescriptionLabel>> value);
- method public final void setInteractiveDrawModeUpdateDelayMillis(long interactiveDrawModeUpdateDelayMillis);
+ method public final void setAdditionalContentDescriptionLabels(java.util.Collection<kotlin.Pair<java.lang.Integer,androidx.wear.watchface.ContentDescriptionLabel>>);
+ method public final void setInteractiveDrawModeUpdateDelayMillis(long);
method @UiThread public boolean shouldAnimate();
property public final java.util.Collection<kotlin.Pair<java.lang.Integer,androidx.wear.watchface.ContentDescriptionLabel>> additionalContentDescriptionLabels;
property public final float centerX;
@@ -213,10 +213,10 @@
}
@Deprecated public abstract static class Renderer.CanvasRenderer extends androidx.wear.watchface.Renderer {
- ctor @Deprecated @WorkerThread public Renderer.CanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
- ctor @Deprecated @WorkerThread public Renderer.CanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis);
+ ctor @Deprecated @WorkerThread public Renderer.CanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
+ ctor @Deprecated @WorkerThread public Renderer.CanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis);
method @Deprecated public final boolean getClearWithBackgroundTintBeforeRenderingHighlightLayer();
- method @Deprecated @UiThread public suspend Object? init(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @Deprecated @UiThread public suspend Object? init(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @Deprecated public void onDump(java.io.PrintWriter writer);
method @Deprecated @UiThread public abstract void render(android.graphics.Canvas canvas, android.graphics.Rect bounds, java.time.ZonedDateTime zonedDateTime);
method @Deprecated @UiThread public abstract void renderHighlightLayer(android.graphics.Canvas canvas, android.graphics.Rect bounds, java.time.ZonedDateTime zonedDateTime);
@@ -224,8 +224,8 @@
}
public abstract static class Renderer.CanvasRenderer2<SharedAssetsT extends androidx.wear.watchface.Renderer.SharedAssets> extends androidx.wear.watchface.Renderer.CanvasRenderer {
- ctor @WorkerThread public Renderer.CanvasRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
- method @WorkerThread protected abstract suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT> p);
+ ctor @WorkerThread public Renderer.CanvasRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
+ method @WorkerThread protected abstract suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT>);
method @UiThread public abstract void render(android.graphics.Canvas canvas, android.graphics.Rect bounds, java.time.ZonedDateTime zonedDateTime, SharedAssetsT sharedAssets);
method public final void render(android.graphics.Canvas canvas, android.graphics.Rect bounds, java.time.ZonedDateTime zonedDateTime);
method @UiThread public abstract void renderHighlightLayer(android.graphics.Canvas canvas, android.graphics.Rect bounds, java.time.ZonedDateTime zonedDateTime, SharedAssetsT sharedAssets);
@@ -233,22 +233,22 @@
}
@Deprecated public abstract static class Renderer.GlesRenderer extends androidx.wear.watchface.Renderer {
- ctor @Deprecated @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @Deprecated @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @Deprecated @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @Deprecated @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @Deprecated @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @Deprecated @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
method @Deprecated public final android.opengl.EGLContext getEglBackgroundThreadContext();
method @Deprecated public final android.opengl.EGLConfig getEglConfig();
method @Deprecated public final android.opengl.EGLDisplay getEglDisplay();
method @Deprecated public final android.opengl.EGLContext getEglUiThreadContext();
- method @Deprecated @WorkerThread public suspend Object? onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @Deprecated @WorkerThread public suspend Object? onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @Deprecated public void onDump(java.io.PrintWriter writer);
- method @Deprecated @UiThread public suspend Object? onUiThreadGlSurfaceCreated(@Px int width, @Px int height, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @Deprecated @UiThread public suspend Object? onUiThreadGlSurfaceCreated(@Px int width, @Px int height, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @Deprecated @UiThread public abstract void render(java.time.ZonedDateTime zonedDateTime);
method @Deprecated @UiThread public abstract void renderHighlightLayer(java.time.ZonedDateTime zonedDateTime);
- method @Deprecated @WorkerThread public final suspend Object? runBackgroundThreadGlCommands(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> commands, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method @Deprecated public final suspend Object? runUiThreadGlCommands(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> commands, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method @Deprecated public final void setEglConfig(android.opengl.EGLConfig eglConfig);
- method @Deprecated public final void setEglDisplay(android.opengl.EGLDisplay eglDisplay);
+ method @Deprecated @WorkerThread public final suspend Object? runBackgroundThreadGlCommands(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> commands, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method @Deprecated public final suspend Object? runUiThreadGlCommands(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> commands, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method @Deprecated public final void setEglConfig(android.opengl.EGLConfig);
+ method @Deprecated public final void setEglDisplay(android.opengl.EGLDisplay);
property public final android.opengl.EGLContext eglBackgroundThreadContext;
property public final android.opengl.EGLConfig eglConfig;
property public final android.opengl.EGLDisplay eglDisplay;
@@ -260,10 +260,10 @@
}
public abstract static class Renderer.GlesRenderer2<SharedAssetsT extends androidx.wear.watchface.Renderer.SharedAssets> extends androidx.wear.watchface.Renderer.GlesRenderer {
- ctor @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- method @WorkerThread protected abstract suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT> p);
+ ctor @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ method @WorkerThread protected abstract suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT>);
method @UiThread public abstract void render(java.time.ZonedDateTime zonedDateTime, SharedAssetsT sharedAssets);
method public final void render(java.time.ZonedDateTime zonedDateTime);
method @UiThread public abstract void renderHighlightLayer(java.time.ZonedDateTime zonedDateTime, SharedAssetsT sharedAssets);
@@ -324,7 +324,7 @@
method public androidx.wear.watchface.WatchFace setOverlayStyle(androidx.wear.watchface.WatchFace.OverlayStyle watchFaceOverlayStyle);
method public androidx.wear.watchface.WatchFace setOverridePreviewReferenceInstant(java.time.Instant previewReferenceTimeMillis);
method public androidx.wear.watchface.WatchFace setTapListener(androidx.wear.watchface.WatchFace.TapListener? tapListener);
- method public void setWatchFaceType(int watchFaceType);
+ method public void setWatchFaceType(int);
property public final androidx.wear.watchface.WatchFace.LegacyWatchFaceOverlayStyle legacyWatchFaceStyle;
property public final androidx.wear.watchface.WatchFace.OverlayStyle overlayStyle;
property public final java.time.Instant? overridePreviewReferenceInstant;
@@ -374,7 +374,7 @@
method @WorkerThread protected androidx.wear.watchface.ComplicationSlotsManager createComplicationSlotsManager(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository);
method @WorkerThread @androidx.wear.watchface.WatchFaceFlavorsExperimental protected androidx.wear.watchface.UserStyleFlavors createUserStyleFlavors(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager);
method @WorkerThread protected androidx.wear.watchface.style.UserStyleSchema createUserStyleSchema();
- method @WorkerThread protected abstract suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace> p);
+ method @WorkerThread protected abstract suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
method public final android.os.Handler getBackgroundThreadHandler();
method @WorkerThread protected androidx.wear.watchface.ComplicationSlotInflationFactory? getComplicationSlotInflationFactory();
method public final android.os.Handler getUiThreadHandler();
diff --git a/wear/watchface/watchface/api/restricted_current.ignore b/wear/watchface/watchface/api/restricted_current.ignore
new file mode 100644
index 0000000..dacf67f
--- /dev/null
+++ b/wear/watchface/watchface/api/restricted_current.ignore
@@ -0,0 +1,23 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.wear.watchface.Renderer#setAdditionalContentDescriptionLabels(java.util.Collection<kotlin.Pair<java.lang.Integer,androidx.wear.watchface.ContentDescriptionLabel>>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.Renderer.setAdditionalContentDescriptionLabels
+ParameterNameChange: androidx.wear.watchface.Renderer#setInteractiveDrawModeUpdateDelayMillis(long) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.Renderer.setInteractiveDrawModeUpdateDelayMillis
+ParameterNameChange: androidx.wear.watchface.Renderer.CanvasRenderer#init(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.Renderer.CanvasRenderer.init
+ParameterNameChange: androidx.wear.watchface.Renderer.GlesRenderer#onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.Renderer.GlesRenderer.onBackgroundThreadGlContextCreated
+ParameterNameChange: androidx.wear.watchface.Renderer.GlesRenderer#onUiThreadGlSurfaceCreated(int, int, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #2:
+ Attempted to remove parameter name from parameter arg3 in androidx.wear.watchface.Renderer.GlesRenderer.onUiThreadGlSurfaceCreated
+ParameterNameChange: androidx.wear.watchface.Renderer.GlesRenderer#runBackgroundThreadGlCommands(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.wear.watchface.Renderer.GlesRenderer.runBackgroundThreadGlCommands
+ParameterNameChange: androidx.wear.watchface.Renderer.GlesRenderer#runUiThreadGlCommands(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?>, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.wear.watchface.Renderer.GlesRenderer.runUiThreadGlCommands
+ParameterNameChange: androidx.wear.watchface.Renderer.GlesRenderer#setEglConfig(android.opengl.EGLConfig) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.Renderer.GlesRenderer.setEglConfig
+ParameterNameChange: androidx.wear.watchface.Renderer.GlesRenderer#setEglDisplay(android.opengl.EGLDisplay) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.Renderer.GlesRenderer.setEglDisplay
+ParameterNameChange: androidx.wear.watchface.WatchFace#setWatchFaceType(int) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.wear.watchface.WatchFace.setWatchFaceType
+ParameterNameChange: androidx.wear.watchface.WatchFaceService#createWatchFace(android.view.SurfaceHolder, androidx.wear.watchface.WatchState, androidx.wear.watchface.ComplicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>) parameter #4:
+ Attempted to remove parameter name from parameter arg5 in androidx.wear.watchface.WatchFaceService.createWatchFace
diff --git a/wear/watchface/watchface/api/restricted_current.txt b/wear/watchface/watchface/api/restricted_current.txt
index 3bd371e..be6af4f 100644
--- a/wear/watchface/watchface/api/restricted_current.txt
+++ b/wear/watchface/watchface/api/restricted_current.txt
@@ -47,7 +47,7 @@
method @UiThread public boolean isEnabled();
method @UiThread public void render(android.graphics.Canvas canvas, java.time.ZonedDateTime zonedDateTime, androidx.wear.watchface.RenderParameters renderParameters);
method @UiThread public void renderHighlightLayer(android.graphics.Canvas canvas, java.time.ZonedDateTime zonedDateTime, androidx.wear.watchface.RenderParameters renderParameters);
- method public void setConfigExtras(android.os.Bundle value);
+ method public void setConfigExtras(android.os.Bundle);
property @UiThread public final int accessibilityTraversalIndex;
property public final int boundsType;
property public final androidx.wear.watchface.CanvasComplicationFactory canvasComplicationFactory;
@@ -202,8 +202,8 @@
method @UiThread public abstract void onDump(java.io.PrintWriter writer);
method @UiThread protected void onRenderParametersChanged(androidx.wear.watchface.RenderParameters renderParameters);
method public final void postInvalidate();
- method public final void setAdditionalContentDescriptionLabels(java.util.Collection<kotlin.Pair<java.lang.Integer,androidx.wear.watchface.ContentDescriptionLabel>> value);
- method public final void setInteractiveDrawModeUpdateDelayMillis(long interactiveDrawModeUpdateDelayMillis);
+ method public final void setAdditionalContentDescriptionLabels(java.util.Collection<kotlin.Pair<java.lang.Integer,androidx.wear.watchface.ContentDescriptionLabel>>);
+ method public final void setInteractiveDrawModeUpdateDelayMillis(long);
method @UiThread public boolean shouldAnimate();
property public final java.util.Collection<kotlin.Pair<java.lang.Integer,androidx.wear.watchface.ContentDescriptionLabel>> additionalContentDescriptionLabels;
property public final float centerX;
@@ -215,10 +215,10 @@
}
@Deprecated public abstract static class Renderer.CanvasRenderer extends androidx.wear.watchface.Renderer {
- ctor @Deprecated @WorkerThread public Renderer.CanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
- ctor @Deprecated @WorkerThread public Renderer.CanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis);
+ ctor @Deprecated @WorkerThread public Renderer.CanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
+ ctor @Deprecated @WorkerThread public Renderer.CanvasRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis);
method @Deprecated public final boolean getClearWithBackgroundTintBeforeRenderingHighlightLayer();
- method @Deprecated @UiThread public suspend Object? init(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @Deprecated @UiThread public suspend Object? init(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @Deprecated public void onDump(java.io.PrintWriter writer);
method @Deprecated @UiThread public abstract void render(android.graphics.Canvas canvas, android.graphics.Rect bounds, java.time.ZonedDateTime zonedDateTime);
method @Deprecated @UiThread public abstract void renderHighlightLayer(android.graphics.Canvas canvas, android.graphics.Rect bounds, java.time.ZonedDateTime zonedDateTime);
@@ -226,8 +226,8 @@
}
public abstract static class Renderer.CanvasRenderer2<SharedAssetsT extends androidx.wear.watchface.Renderer.SharedAssets> extends androidx.wear.watchface.Renderer.CanvasRenderer {
- ctor @WorkerThread public Renderer.CanvasRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, int canvasType, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
- method @WorkerThread protected abstract suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT> p);
+ ctor @WorkerThread public Renderer.CanvasRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, int canvasType, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, boolean clearWithBackgroundTintBeforeRenderingHighlightLayer);
+ method @WorkerThread protected abstract suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT>);
method @UiThread public abstract void render(android.graphics.Canvas canvas, android.graphics.Rect bounds, java.time.ZonedDateTime zonedDateTime, SharedAssetsT sharedAssets);
method public final void render(android.graphics.Canvas canvas, android.graphics.Rect bounds, java.time.ZonedDateTime zonedDateTime);
method @UiThread public abstract void renderHighlightLayer(android.graphics.Canvas canvas, android.graphics.Rect bounds, java.time.ZonedDateTime zonedDateTime, SharedAssetsT sharedAssets);
@@ -235,22 +235,22 @@
}
@Deprecated public abstract static class Renderer.GlesRenderer extends androidx.wear.watchface.Renderer {
- ctor @Deprecated @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @Deprecated @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @Deprecated @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @Deprecated @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @Deprecated @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @Deprecated @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
method @Deprecated public final android.opengl.EGLContext getEglBackgroundThreadContext();
method @Deprecated public final android.opengl.EGLConfig getEglConfig();
method @Deprecated public final android.opengl.EGLDisplay getEglDisplay();
method @Deprecated public final android.opengl.EGLContext getEglUiThreadContext();
- method @Deprecated @WorkerThread public suspend Object? onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @Deprecated @WorkerThread public suspend Object? onBackgroundThreadGlContextCreated(kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @Deprecated public void onDump(java.io.PrintWriter writer);
- method @Deprecated @UiThread public suspend Object? onUiThreadGlSurfaceCreated(@Px int width, @Px int height, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method @Deprecated @UiThread public suspend Object? onUiThreadGlSurfaceCreated(@Px int width, @Px int height, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @Deprecated @UiThread public abstract void render(java.time.ZonedDateTime zonedDateTime);
method @Deprecated @UiThread public abstract void renderHighlightLayer(java.time.ZonedDateTime zonedDateTime);
- method @Deprecated @WorkerThread public final suspend Object? runBackgroundThreadGlCommands(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> commands, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method @Deprecated public final suspend Object? runUiThreadGlCommands(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> commands, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method @Deprecated public final void setEglConfig(android.opengl.EGLConfig eglConfig);
- method @Deprecated public final void setEglDisplay(android.opengl.EGLDisplay eglDisplay);
+ method @Deprecated @WorkerThread public final suspend Object? runBackgroundThreadGlCommands(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> commands, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method @Deprecated public final suspend Object? runUiThreadGlCommands(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> commands, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method @Deprecated public final void setEglConfig(android.opengl.EGLConfig);
+ method @Deprecated public final void setEglDisplay(android.opengl.EGLDisplay);
property public final android.opengl.EGLContext eglBackgroundThreadContext;
property public final android.opengl.EGLConfig eglConfig;
property public final android.opengl.EGLDisplay eglDisplay;
@@ -262,10 +262,10 @@
}
public abstract static class Renderer.GlesRenderer2<SharedAssetsT extends androidx.wear.watchface.Renderer.SharedAssets> extends androidx.wear.watchface.Renderer.GlesRenderer {
- ctor @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- ctor @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0, to=60000) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
- method @WorkerThread protected abstract suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT> p);
+ ctor @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList, optional int[] eglSurfaceAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis, optional int[] eglConfigAttribList) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ ctor @WorkerThread @kotlin.jvm.Throws(exceptionClasses=GlesException::class) public Renderer.GlesRenderer2(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, androidx.wear.watchface.WatchState watchState, @IntRange(from=0L, to=60000L) long interactiveDrawModeUpdateDelayMillis) throws androidx.wear.watchface.Renderer.GlesRenderer.GlesException;
+ method @WorkerThread protected abstract suspend Object? createSharedAssets(kotlin.coroutines.Continuation<? super SharedAssetsT>);
method @UiThread public abstract void render(java.time.ZonedDateTime zonedDateTime, SharedAssetsT sharedAssets);
method public final void render(java.time.ZonedDateTime zonedDateTime);
method @UiThread public abstract void renderHighlightLayer(java.time.ZonedDateTime zonedDateTime, SharedAssetsT sharedAssets);
@@ -308,7 +308,7 @@
method public androidx.wear.watchface.WatchFace setOverlayStyle(androidx.wear.watchface.WatchFace.OverlayStyle watchFaceOverlayStyle);
method public androidx.wear.watchface.WatchFace setOverridePreviewReferenceInstant(java.time.Instant previewReferenceTimeMillis);
method public androidx.wear.watchface.WatchFace setTapListener(androidx.wear.watchface.WatchFace.TapListener? tapListener);
- method public void setWatchFaceType(int watchFaceType);
+ method public void setWatchFaceType(int);
property public final androidx.wear.watchface.WatchFace.LegacyWatchFaceOverlayStyle legacyWatchFaceStyle;
property public final androidx.wear.watchface.WatchFace.OverlayStyle overlayStyle;
property public final java.time.Instant? overridePreviewReferenceInstant;
@@ -354,7 +354,7 @@
ctor public WatchFaceService();
method @WorkerThread protected androidx.wear.watchface.ComplicationSlotsManager createComplicationSlotsManager(androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository);
method @WorkerThread protected androidx.wear.watchface.style.UserStyleSchema createUserStyleSchema();
- method @WorkerThread protected abstract suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace> p);
+ method @WorkerThread protected abstract suspend Object? createWatchFace(android.view.SurfaceHolder surfaceHolder, androidx.wear.watchface.WatchState watchState, androidx.wear.watchface.ComplicationSlotsManager complicationSlotsManager, androidx.wear.watchface.style.CurrentUserStyleRepository currentUserStyleRepository, kotlin.coroutines.Continuation<? super androidx.wear.watchface.WatchFace>);
method public final android.os.Handler getBackgroundThreadHandler();
method @WorkerThread protected androidx.wear.watchface.ComplicationSlotInflationFactory? getComplicationSlotInflationFactory();
method public final android.os.Handler getUiThreadHandler();
diff --git a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/UserStyleFlavors.kt b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/UserStyleFlavors.kt
index 371d3cd..ccae980 100644
--- a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/UserStyleFlavors.kt
+++ b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/UserStyleFlavors.kt
@@ -16,10 +16,11 @@
package androidx.wear.watchface
-import android.content.res.Resources
import android.content.res.XmlResourceParser
import androidx.annotation.RestrictTo
import androidx.wear.watchface.complications.DefaultComplicationDataSourcePolicy
+import androidx.wear.watchface.complications.NAMESPACE_APP
+import androidx.wear.watchface.complications.hasValue
import androidx.wear.watchface.style.UserStyle
import androidx.wear.watchface.style.UserStyleData
import androidx.wear.watchface.style.UserStyleSchema
@@ -103,7 +104,6 @@
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@Throws(IOException::class, XmlPullParserException::class)
fun inflate(
- resources: Resources,
parser: XmlResourceParser,
schema: UserStyleSchema
): UserStyleFlavor {
@@ -111,8 +111,7 @@
"Expected a UserStyleFlavor node"
}
- val flavorAttributes = resources.obtainAttributes(parser, R.styleable.UserStyleFlavor)
- val flavorId = flavorAttributes.getString(R.styleable.UserStyleFlavor_id)
+ val flavorId = parser.getAttributeValue(NAMESPACE_APP, "id")
require(flavorId != null) { "UserStyleFlavor must have an id" }
val userStyle = schema.getDefaultUserStyle().toMutableUserStyle()
@@ -125,24 +124,21 @@
if (type == XmlPullParser.START_TAG) {
when (parser.name) {
"StyleOption" -> {
- val attributes = resources.obtainAttributes(
- parser,
- R.styleable.StyleOption
- )
- val id = attributes.getString(R.styleable.StyleOption_id)
+ val id = parser.getAttributeValue(NAMESPACE_APP, "id")
require(id != null) { "StyleOption must have an id" }
- require(attributes.hasValue(R.styleable.StyleOption_value)) {
+ require(parser.hasValue("value")) {
"value is required for BooleanOption"
}
- val value = attributes.getString(R.styleable.StyleOption_value)
+ val value = parser.getAttributeValue(NAMESPACE_APP, "value")
val setting = schema[UserStyleSetting.Id(id)]
require(setting != null) { "no setting found for id $id" }
when (setting) {
is UserStyleSetting.BooleanUserStyleSetting -> {
- val booleanValue = attributes.getBoolean(
- R.styleable.StyleOption_value,
+ val booleanValue = parser.getAttributeBooleanValue(
+ NAMESPACE_APP,
+ "value",
true
)
@@ -167,27 +163,16 @@
}
}
"ComplicationPolicy" -> {
- val attributes = resources.obtainAttributes(
- parser,
- R.styleable.ComplicationPolicy
- )
- require(attributes.hasValue(R.styleable.ComplicationPolicy_slotId)) {
- "id is required for ComplicationPolicy"
+ require(parser.hasValue("slotId")) {
+ "slotId is required for ComplicationPolicy"
}
- val id = attributes.getInt(R.styleable.ComplicationPolicy_slotId, 0)
+ val id = parser.getAttributeIntValue(NAMESPACE_APP, "slotId", 0)
val policy =
XmlSchemaAndComplicationSlotsDefinition.ComplicationSlotStaticData
.inflateDefaultComplicationDataSourcePolicy(
- attributes,
- R.styleable.ComplicationPolicy_primaryDataSource,
- R.styleable.ComplicationPolicy_primaryDataSourceDefaultType,
- R.styleable.ComplicationPolicy_secondaryDataSource,
- R.styleable.ComplicationPolicy_secondaryDataSourceDefaultType,
- R.styleable.ComplicationPolicy_systemDataSourceFallback,
- R.styleable
- .ComplicationPolicy_systemDataSourceFallbackDefaultType
- )
+ parser,
+ "ComplicationPolicy")
complications[id] = policy
}
@@ -256,7 +241,6 @@
companion object {
@Throws(IOException::class, XmlPullParserException::class)
fun inflate(
- resources: Resources,
parser: XmlResourceParser,
schema: UserStyleSchema
): UserStyleFlavors {
@@ -273,7 +257,7 @@
if (type == XmlPullParser.START_TAG) {
when (parser.name) {
"UserStyleFlavor" -> flavors.add(
- UserStyleFlavor.inflate(resources, parser, schema)
+ UserStyleFlavor.inflate(parser, schema)
)
else -> throw IllegalArgumentException(
diff --git a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/XmlSchemaAndComplicationSlotsDefinition.kt b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/XmlSchemaAndComplicationSlotsDefinition.kt
index 8b73113..4b8fd44 100644
--- a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/XmlSchemaAndComplicationSlotsDefinition.kt
+++ b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/XmlSchemaAndComplicationSlotsDefinition.kt
@@ -19,13 +19,14 @@
import android.content.ComponentName
import android.content.pm.PackageManager
import android.content.res.Resources
-import android.content.res.TypedArray
import android.content.res.XmlResourceParser
import android.os.Bundle
import androidx.annotation.RestrictTo
import androidx.wear.watchface.complications.ComplicationSlotBounds
import androidx.wear.watchface.complications.DefaultComplicationDataSourcePolicy
+import androidx.wear.watchface.complications.NAMESPACE_APP
import androidx.wear.watchface.complications.data.ComplicationType
+import androidx.wear.watchface.complications.hasValue
import androidx.wear.watchface.style.CurrentUserStyleRepository
import androidx.wear.watchface.style.UserStyleSchema
import org.xmlpull.v1.XmlPullParser
@@ -71,14 +72,14 @@
}
"ComplicationSlot" -> {
complicationSlots.add(
- ComplicationSlotStaticData.inflate(resources, parser)
+ ComplicationSlotStaticData.inflate(parser)
)
}
"UserStyleFlavors" -> {
require(schema != null) {
"A UserStyleFlavors node requires a previous UserStyleSchema node"
}
- flavors = UserStyleFlavors.inflate(resources, parser, schema)
+ flavors = UserStyleFlavors.inflate(parser, schema)
}
else -> throw IllegalArgumentException(
"Unexpected node ${parser.name} at line ${parser.lineNumber}"
@@ -108,23 +109,19 @@
) {
companion object {
fun inflateDefaultComplicationDataSourcePolicy(
- attributes: TypedArray,
- primaryDataSourceAttr: Int,
- primaryDataSourceDefaultTypeAttr: Int,
- secondaryDataSourceAttr: Int,
- secondaryDataSourceDefaultTypeAttr: Int,
- systemDataSourceFallbackAttr: Int,
- systemDataSourceFallbackDefaultTypeAttr: Int
+ parser: XmlResourceParser,
+ nodeName: String,
): DefaultComplicationDataSourcePolicy {
val primaryDataSource =
- attributes.getString(primaryDataSourceAttr)?.let {
+ parser.getAttributeValue(NAMESPACE_APP, "primaryDataSource")?.let {
ComponentName.unflattenFromString(it)
}
val primaryDataSourceDefaultType =
- if (attributes.hasValue(primaryDataSourceDefaultTypeAttr)) {
+ if (parser.hasValue("primaryDataSourceDefaultType")) {
ComplicationType.fromWireType(
- attributes.getInt(
- R.styleable.ComplicationSlot_primaryDataSourceDefaultType,
+ parser.getAttributeIntValue(
+ NAMESPACE_APP,
+ "primaryDataSourceDefaultType",
0
)
)
@@ -132,15 +129,16 @@
null
}
val secondaryDataSource =
- attributes.getString(secondaryDataSourceAttr)?.let {
+ parser.getAttributeValue(NAMESPACE_APP, "secondaryDataSource")?.let {
ComponentName.unflattenFromString(it)
}
val secondaryDataSourceDefaultType =
- if (attributes.hasValue(secondaryDataSourceDefaultTypeAttr)) {
+ if (parser.hasValue("secondaryDataSourceDefaultType")) {
ComplicationType.fromWireType(
- attributes.getInt(
- R.styleable.ComplicationSlot_secondaryDataSourceDefaultType,
+ parser.getAttributeIntValue(
+ NAMESPACE_APP,
+ "secondaryDataSourceDefaultType",
0
)
)
@@ -148,16 +146,17 @@
null
}
- require(attributes.hasValue(systemDataSourceFallbackAttr)) {
- "A ComplicationSlot must have a systemDataSourceFallback attribute"
+ require(parser.hasValue("systemDataSourceFallback")) {
+ "A $nodeName must have a systemDataSourceFallback attribute"
}
- val systemDataSourceFallback = attributes.getInt(systemDataSourceFallbackAttr, 0)
- require(attributes.hasValue(systemDataSourceFallbackDefaultTypeAttr)) {
- "A ComplicationSlot must have a systemDataSourceFallbackDefaultType" +
- " attribute"
+ val systemDataSourceFallback = parser.getAttributeIntValue(
+ NAMESPACE_APP, "systemDataSourceFallback", 0)
+ require(parser.hasValue("systemDataSourceFallbackDefaultType")) {
+ "A $nodeName must have a systemDataSourceFallbackDefaultType attribute"
}
val systemDataSourceFallbackDefaultType = ComplicationType.fromWireType(
- attributes.getInt(systemDataSourceFallbackDefaultTypeAttr, 0))
+ parser.getAttributeIntValue(
+ NAMESPACE_APP, "systemDataSourceFallbackDefaultType", 0))
return when {
secondaryDataSource != null -> {
require(primaryDataSource != null) {
@@ -204,37 +203,33 @@
}
fun inflate(
- resources: Resources,
parser: XmlResourceParser
): ComplicationSlotStaticData {
require(parser.name == "ComplicationSlot") {
"Expected a UserStyleSchema node"
}
- val attributes = resources.obtainAttributes(
- parser,
- R.styleable.ComplicationSlot
- )
- require(attributes.hasValue(R.styleable.ComplicationSlot_slotId)) {
- "A ComplicationSlot must have an id attribute"
+ require(parser.hasValue("slotId")) {
+ "A ComplicationSlot must have a slotId attribute"
}
- val slotId = attributes.getString(R.styleable.ComplicationSlot_slotId)!!.toInt()
+ val slotId = parser.getAttributeValue(NAMESPACE_APP, "slotId")!!.toInt()
val accessibilityTraversalIndex = if (
- attributes.hasValue(R.styleable.ComplicationSlot_accessibilityTraversalIndex)
+ parser.hasValue("accessibilityTraversalIndex")
) {
- attributes.getInteger(
- R.styleable.ComplicationSlot_accessibilityTraversalIndex,
+ parser.getAttributeIntValue(
+ NAMESPACE_APP,
+ "accessibilityTraversalIndex",
0
)
} else {
null
}
- require(attributes.hasValue(R.styleable.ComplicationSlot_boundsType)) {
+ require(parser.hasValue("boundsType")) {
"A ComplicationSlot must have a boundsType attribute"
}
val boundsType = when (
- attributes.getInteger(R.styleable.ComplicationSlot_boundsType, 0)
+ parser.getAttributeIntValue(NAMESPACE_APP, "boundsType", 0)
) {
0 -> ComplicationSlotBoundsType.ROUND_RECT
1 -> ComplicationSlotBoundsType.BACKGROUND
@@ -242,11 +237,11 @@
else -> throw IllegalArgumentException("Unknown boundsType")
}
- require(attributes.hasValue(R.styleable.ComplicationSlot_supportedTypes)) {
+ require(parser.hasValue("supportedTypes")) {
"A ComplicationSlot must have a supportedTypes attribute"
}
val supportedTypes =
- attributes.getInteger(R.styleable.ComplicationSlot_supportedTypes, 0)
+ parser.getAttributeIntValue(NAMESPACE_APP, "supportedTypes", 0)
val supportedTypesList = ArrayList<ComplicationType>()
if ((supportedTypes and 0x1) != 0) {
supportedTypesList.add(ComplicationType.SHORT_TEXT)
@@ -268,44 +263,35 @@
}
val defaultComplicationDataSourcePolicy =
- inflateDefaultComplicationDataSourcePolicy(
- attributes,
- R.styleable.ComplicationSlot_primaryDataSource,
- R.styleable.ComplicationSlot_primaryDataSourceDefaultType,
- R.styleable.ComplicationSlot_secondaryDataSource,
- R.styleable.ComplicationSlot_secondaryDataSourceDefaultType,
- R.styleable.ComplicationSlot_systemDataSourceFallback,
- R.styleable.ComplicationSlot_systemDataSourceFallbackDefaultType
- )
+ inflateDefaultComplicationDataSourcePolicy(parser, "ComplicationSlot")
- val initiallyEnabled = attributes.getBoolean(
- R.styleable.ComplicationSlot_initiallyEnabled,
+ val initiallyEnabled = parser.getAttributeBooleanValue(
+ NAMESPACE_APP,
+ "initiallyEnabled",
true
)
- val fixedComplicationDataSource = attributes.getBoolean(
- R.styleable.ComplicationSlot_fixedComplicationDataSource,
+ val fixedComplicationDataSource = parser.getAttributeBooleanValue(
+ NAMESPACE_APP,
+ "fixedComplicationDataSource",
false
)
- val bounds = ComplicationSlotBounds.inflate(resources, parser)
- require(bounds != null) {
- "ComplicationSlot must have either one ComplicationSlotBounds child node or " +
- "one per ComplicationType."
- }
-
val nameResourceId =
- if (attributes.hasValue(R.styleable.ComplicationSlot_name)) {
- attributes.getResourceId(R.styleable.ComplicationSlot_name, 0)
+ if (parser.hasValue("name")) {
+ parser.getAttributeResourceValue(NAMESPACE_APP, "name", 0)
} else {
null
}
val screenReaderNameResourceId =
- if (attributes.hasValue(R.styleable.ComplicationSlot_screenReaderName)) {
- attributes.getResourceId(R.styleable.ComplicationSlot_screenReaderName, 0)
+ if (parser.hasValue("screenReaderName")) {
+ parser.getAttributeResourceValue(NAMESPACE_APP, "screenReaderName", 0)
} else {
null
}
-
- attributes.recycle()
+ val bounds = ComplicationSlotBounds.inflate(parser)
+ require(bounds != null) {
+ "ComplicationSlot must have either one ComplicationSlotBounds child node or " +
+ "one per ComplicationType."
+ }
return ComplicationSlotStaticData(
slotId,
diff --git a/wear/wear-phone-interactions/api/api_lint.ignore b/wear/wear-phone-interactions/api/api_lint.ignore
index 30e9a82..b2ccf0ac 100644
--- a/wear/wear-phone-interactions/api/api_lint.ignore
+++ b/wear/wear-phone-interactions/api/api_lint.ignore
@@ -1,3 +1,9 @@
// Baseline format: 1.0
+InvalidNullability: androidx.wear.phone.interactions.authentication.RemoteAuthService#onUnbind(android.content.Intent) parameter #0:
+ Invalid nullability on parameter `intent` in method `onUnbind`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.wear.phone.interactions.notifications.BridgingManagerService#onBind(android.content.Intent):
+ Invalid nullability on method `onBind` return. Overrides of unannotated super method cannot be Nullable.
+
+
NullableCollection: androidx.wear.phone.interactions.notifications.BridgingConfig#getExcludedTags():
Return type of method androidx.wear.phone.interactions.notifications.BridgingConfig.getExcludedTags() is a nullable collection (`java.util.Set`); must be non-null
diff --git a/wear/wear/api/api_lint.ignore b/wear/wear/api/api_lint.ignore
index 776b3d6..2190519f 100644
--- a/wear/wear/api/api_lint.ignore
+++ b/wear/wear/api/api_lint.ignore
@@ -27,6 +27,56 @@
Symmetric method for `isLocked` must be named `setLocked`; was `setIsLocked`
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: androidx.wear.widget.ArcLayout#generateLayoutParams(android.util.AttributeSet) parameter #0:
+ Invalid nullability on parameter `attrs` in method `generateLayoutParams`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.wear.widget.ArcLayout#generateLayoutParams(android.view.ViewGroup.LayoutParams) parameter #0:
+ Invalid nullability on parameter `p` in method `generateLayoutParams`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.wear.widget.ArcLayout#onInterceptTouchEvent(android.view.MotionEvent) parameter #0:
+ Invalid nullability on parameter `event` in method `onInterceptTouchEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: 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.
+InvalidNullability: androidx.wear.widget.CurvedTextView#onPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent) parameter #0:
+ Invalid nullability on parameter `event` in method `onPopulateAccessibilityEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.wear.widget.CurvedTextView#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.
+InvalidNullability: androidx.wear.widget.DismissibleFrameLayout#onInterceptTouchEvent(android.view.MotionEvent) parameter #0:
+ Invalid nullability on parameter `ev` in method `onInterceptTouchEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.wear.widget.DismissibleFrameLayout#onTouchEvent(android.view.MotionEvent) parameter #0:
+ Invalid nullability on parameter `ev` in method `onTouchEvent`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.wear.widget.drawer.WearableDrawerLayout#onNestedFling(android.view.View, float, float, boolean) parameter #0:
+ Invalid nullability on parameter `target` in method `onNestedFling`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.wear.widget.drawer.WearableDrawerLayout#onNestedPreFling(android.view.View, float, float) parameter #0:
+ Invalid nullability on parameter `target` in method `onNestedPreFling`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.wear.widget.drawer.WearableDrawerLayout#onNestedPreScroll(android.view.View, int, int, int[]) parameter #0:
+ Invalid nullability on parameter `target` in method `onNestedPreScroll`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.wear.widget.drawer.WearableDrawerLayout#onNestedPreScroll(android.view.View, int, int, int[]) parameter #3:
+ Invalid nullability on parameter `consumed` in method `onNestedPreScroll`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.wear.widget.drawer.WearableDrawerLayout#onNestedScroll(android.view.View, int, int, int, int) parameter #0:
+ Invalid nullability on parameter `target` in method `onNestedScroll`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.wear.widget.drawer.WearableDrawerLayout#onNestedScrollAccepted(android.view.View, android.view.View, int) parameter #0:
+ Invalid nullability on parameter `child` in method `onNestedScrollAccepted`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.wear.widget.drawer.WearableDrawerLayout#onNestedScrollAccepted(android.view.View, android.view.View, int) parameter #1:
+ Invalid nullability on parameter `target` in method `onNestedScrollAccepted`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.wear.widget.drawer.WearableDrawerLayout#onStartNestedScroll(android.view.View, android.view.View, int) parameter #0:
+ Invalid nullability on parameter `child` in method `onStartNestedScroll`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.wear.widget.drawer.WearableDrawerLayout#onStartNestedScroll(android.view.View, android.view.View, int) parameter #1:
+ Invalid nullability on parameter `target` in method `onStartNestedScroll`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.wear.widget.drawer.WearableDrawerLayout#onStopNestedScroll(android.view.View) parameter #0:
+ Invalid nullability on parameter `target` in method `onStopNestedScroll`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+
+
MissingNullability: androidx.wear.activity.ConfirmationActivity#onCreate(android.os.Bundle) parameter #0:
Missing nullability on parameter `savedInstanceState` in method `onCreate`
MissingNullability: androidx.wear.ambient.AmbientMode#attachAmbientSupport(T):
diff --git a/webkit/integration-tests/testapp/src/main/AndroidManifest.xml b/webkit/integration-tests/testapp/src/main/AndroidManifest.xml
index 2970267..503de45 100644
--- a/webkit/integration-tests/testapp/src/main/AndroidManifest.xml
+++ b/webkit/integration-tests/testapp/src/main/AndroidManifest.xml
@@ -120,5 +120,7 @@
<activity
android:name=".GetVariationsHeaderActivity"
android:exported="true" />
+ <activity android:name=".RequestedWithHeaderActivity"
+ android:exported="true" />
</application>
</manifest>
diff --git a/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/HttpServer.java b/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/HttpServer.java
new file mode 100644
index 0000000..f47fa96
--- /dev/null
+++ b/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/HttpServer.java
@@ -0,0 +1,243 @@
+/*
+ * Copyright 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.androidx.webkit;
+
+import static java.nio.charset.StandardCharsets.UTF_8;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Simple HTTP server that accepts requests.
+ * Can be used to test proxying or as a end destination server.
+ */
+public class HttpServer {
+
+ /**
+ * This interface offers a callback that is run when a request is served.
+ */
+ public interface OnRequestCallback {
+
+ /**
+ * Called when this proxy serves a request.
+ */
+ void onRequestServed();
+ }
+
+ /**
+ * Provider of request handlers.
+ *
+ * Typically just a static reference to either {@code HttpServer.EchoRequestHandler::new} or
+ * {@code HttpServer.ProxyRequestHandler::new}
+ */
+ public interface RequestHandlerFactory {
+ /**
+ * Called to initialize a new RequestHandler
+ */
+ @NonNull
+ RequestHandler create(@NonNull Socket socket);
+ }
+
+ private static final int TIMEOUT_MILLIS = 5000;
+ private boolean mRunning = false;
+ private OnRequestCallback mCallback;
+ private RequestHandlerFactory mHandlerFactory;
+ private ServerSocket mServerSocket;
+ private List<Thread> mThreadsList;
+ private int mRequestCount;
+
+ /**
+ * Create a server using provided port number.
+ *
+ * @param port port number
+ * @param handlerFactory Provider of request handler
+ * @param callback callback run when this a request is served
+ */
+ @SuppressWarnings("CatchAndPrintStackTrace")
+ public HttpServer(int port,
+ @NonNull RequestHandlerFactory handlerFactory,
+ @Nullable OnRequestCallback callback) {
+ mRequestCount = 0;
+ mCallback = callback;
+ mHandlerFactory = handlerFactory;
+ mThreadsList = new ArrayList<>();
+ try {
+ mServerSocket = new ServerSocket(port);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Get port number.
+ */
+ public int getPort() {
+ return mServerSocket.getLocalPort();
+ }
+
+ /**
+ * Get the number of requests this server has served.
+ */
+ public int getRequestCount() {
+ return mRequestCount;
+ }
+
+ /**
+ * Start listening for requests.
+ */
+ public void start() {
+ if (mRunning) return;
+ mRunning = true;
+ new Thread(() -> {
+ while (mRunning) {
+ listen();
+ }
+ }).start();
+ }
+
+ @SuppressWarnings("CatchAndPrintStackTrace")
+ private void listen() {
+ try {
+ Socket socket = mServerSocket.accept();
+ mRequestCount++;
+ if (mCallback != null) {
+ mCallback.onRequestServed();
+ }
+ Thread thread = new Thread(mHandlerFactory.create(socket));
+ mThreadsList.add(thread);
+ thread.start();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Shutdown.
+ */
+ @SuppressWarnings("CatchAndPrintStackTrace")
+ public void shutdown() {
+ if (!mRunning) return;
+ mRunning = false;
+ for (Thread thread : mThreadsList) {
+ if (thread.isAlive()) {
+ try {
+ thread.join(TIMEOUT_MILLIS);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ mThreadsList.clear();
+ try {
+ mServerSocket.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Request handler whose response can be controlled through the
+ * {@link #writeResponse(String, BufferedWriter)} method.
+ */
+ abstract static class RequestHandler implements Runnable {
+ private Socket mSocket;
+ private BufferedReader mReader;
+ private BufferedWriter mWriter;
+
+ @SuppressWarnings("CatchAndPrintStackTrace")
+ RequestHandler(Socket socket) {
+ mSocket = socket;
+ try {
+ mSocket.setSoTimeout(TIMEOUT_MILLIS);
+ mReader = new BufferedReader(
+ new InputStreamReader(mSocket.getInputStream(), UTF_8));
+ mWriter = new BufferedWriter(
+ new OutputStreamWriter(mSocket.getOutputStream(), UTF_8));
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ @SuppressWarnings("CatchAndPrintStackTrace")
+ public void run() {
+ try {
+ StringBuilder sb = new StringBuilder();
+ String s = mReader.readLine();
+ while (s != null && !s.trim().isEmpty()) {
+ sb.append(s);
+ sb.append("\n");
+ s = mReader.readLine();
+ }
+ String request = sb.toString();
+ writeResponse(request, mWriter);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ abstract void writeResponse(String request, BufferedWriter responseWriter)
+ throws IOException;
+ }
+
+ /**
+ * Request handler that responds with a HTML document containing the received request header.
+ */
+ static class EchoRequestHandler extends RequestHandler {
+ EchoRequestHandler(Socket socket) {
+ super(socket);
+ }
+
+ @Override
+ void writeResponse(String request, BufferedWriter responseWriter) throws IOException {
+ responseWriter.write("HTTP/1.0 200 OK\nContent-Type: text/html\n\r\n");
+ responseWriter.write("<html><head><title>HttpServer</title></head>"
+ + "<body>Server handled this request:<br><pre>"
+ + request + "</pre></body></html>");
+ responseWriter.flush();
+ }
+ }
+
+ /**
+ * Respond with text that indicates that the request was handled by a proxy.
+ */
+ static class ProxyRequestHandler extends RequestHandler {
+
+ ProxyRequestHandler(Socket socket) {
+ super(socket);
+ }
+
+ @Override
+ void writeResponse(String request, BufferedWriter responseWriter) throws IOException {
+ responseWriter.write("HTTP/1.0 200 OK\nUser-Agent: Proxy\n\r\n");
+ responseWriter.write("<html><head><title>Proxy</title></head>"
+ + "<body>Proxy handled this request:<br><br>"
+ + request + "</body></html>");
+ responseWriter.flush();
+ }
+ }
+}
diff --git a/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/MainActivity.java b/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/MainActivity.java
index b93d025..5df0d20 100644
--- a/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/MainActivity.java
+++ b/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/MainActivity.java
@@ -75,6 +75,9 @@
new MenuListView.MenuItem(
getResources().getString(R.string.variations_header_activity_title),
new Intent(activityContext, GetVariationsHeaderActivity.class)),
+ new MenuListView.MenuItem(
+ getResources().getString(R.string.requested_with_activity_title),
+ new Intent(activityContext, RequestedWithHeaderActivity.class)),
};
listView.setItems(menuItems);
diff --git a/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/Proxy.java b/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/Proxy.java
deleted file mode 100644
index aecb050..0000000
--- a/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/Proxy.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.example.androidx.webkit;
-
-import static java.nio.charset.StandardCharsets.UTF_8;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Simple proxy that accepts requests.
- */
-public class Proxy {
-
- /**
- * This interface offers a callback that is run when this proxy serves a request.
- */
- public interface ProxyRequestCallback {
-
- /**
- * Called when this proxy serves a request.
- */
- void onProxyRequestServed();
- }
-
- private static final int TIMEOUT_MILLIS = 5000;
- private boolean mRunning = false;
- private ProxyRequestCallback mCallback;
- private ServerSocket mServerSocket;
- private List<Thread> mThreadsList;
- private int mRequestCount;
-
- /**
- * Create a proxy using provided port number.
- *
- * @param port port number
- * @param callback callback run when this proxy serves a request
- */
- @SuppressWarnings("CatchAndPrintStackTrace")
- public Proxy(int port, ProxyRequestCallback callback) {
- mRequestCount = 0;
- mCallback = callback;
- mThreadsList = new ArrayList<>();
- try {
- mServerSocket = new ServerSocket(port);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Create a proxy using provided port number.
- *
- * @param port port number
- */
- public Proxy(int port) {
- this (port, null);
- }
-
- /**
- * Create a proxy using an available port.
- */
- public Proxy() {
- this(0, null);
- }
-
- /**
- * Get port number.
- */
- public int getPort() {
- return mServerSocket.getLocalPort();
- }
-
- /**
- * Get the number of requests this proxy has served.
- */
- public int getRequestCount() {
- return mRequestCount;
- }
-
- /**
- * Start listening for requests.
- */
- public void start() {
- if (mRunning) return;
- mRunning = true;
- new Thread(() -> {
- while (mRunning) {
- listen();
- }
- }).start();
- }
-
- @SuppressWarnings("CatchAndPrintStackTrace")
- private void listen() {
- try {
- Socket socket = mServerSocket.accept();
- mRequestCount++;
- if (mCallback != null) {
- mCallback.onProxyRequestServed();
- }
- Thread thread = new Thread(new RequestHandler(socket));
- mThreadsList.add(thread);
- thread.start();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Shutdown.
- */
- @SuppressWarnings("CatchAndPrintStackTrace")
- public void shutdown() {
- if (!mRunning) return;
- mRunning = false;
- for (Thread thread : mThreadsList) {
- if (thread.isAlive()) {
- try {
- thread.join(TIMEOUT_MILLIS);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }
- mThreadsList.clear();
- try {
- mServerSocket.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- private static class RequestHandler implements Runnable {
- private Socket mSocket;
- private BufferedReader mReader;
- private BufferedWriter mWriter;
-
- @SuppressWarnings("CatchAndPrintStackTrace")
- RequestHandler(Socket socket) {
- mSocket = socket;
- try {
- mSocket.setSoTimeout(TIMEOUT_MILLIS);
- mReader = new BufferedReader(
- new InputStreamReader(mSocket.getInputStream(), UTF_8));
- mWriter = new BufferedWriter(
- new OutputStreamWriter(mSocket.getOutputStream(), UTF_8));
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- @Override
- @SuppressWarnings("CatchAndPrintStackTrace")
- public void run() {
- try {
- StringBuilder sb = new StringBuilder();
- String s = mReader.readLine();
- while (s != null && !s.trim().isEmpty()) {
- sb.append(s);
- sb.append(" ");
- s = mReader.readLine();
- }
- String request = sb.toString();
- mWriter.write("HTTP/1.0 200 OK\nUser-Agent: Proxy\n\r\n");
- mWriter.write("<html><head><title>Proxy</title></head>"
- + "<body>Proxy handled this request:<br><br>"
- + request + "</body></html>");
- mWriter.flush();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-}
diff --git a/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/ProxyOverrideActivity.java b/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/ProxyOverrideActivity.java
index 29f1844..ae283e3 100644
--- a/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/ProxyOverrideActivity.java
+++ b/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/ProxyOverrideActivity.java
@@ -35,7 +35,7 @@
* An {@link Activity} to exercise Proxy Override functionality.
*/
public class ProxyOverrideActivity extends AppCompatActivity {
- private Proxy mProxy;
+ private HttpServer mProxy;
private Button mSetProxyOverrideButton;
private Button mLoadURLButton;
private Button mLoadBypassURLButton;
@@ -81,9 +81,10 @@
// Initialize proxy server
// Skip this step if you already have a proxy url
- mProxy = new Proxy(/*port=*/0, () -> runOnUiThread(() -> mRequestCountTextView.setText(
- getResources().getString(R.string.proxy_override_requests_served,
- mProxy.getRequestCount()))));
+ mProxy = new HttpServer(/*port=*/0, HttpServer.ProxyRequestHandler::new,
+ () -> runOnUiThread(() -> mRequestCountTextView.setText(
+ getResources().getString(R.string.proxy_override_requests_served,
+ mProxy.getRequestCount()))));
mProxy.start();
}
diff --git a/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/RequestedWithHeaderActivity.java b/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/RequestedWithHeaderActivity.java
new file mode 100644
index 0000000..dd3ef6f
--- /dev/null
+++ b/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/RequestedWithHeaderActivity.java
@@ -0,0 +1,115 @@
+/*
+ * 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 com.example.androidx.webkit;
+
+import android.app.Activity;
+import android.net.Uri;
+import android.os.Bundle;
+import android.webkit.WebSettings;
+import android.webkit.WebView;
+import android.widget.RadioGroup;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.webkit.WebSettingsCompat;
+import androidx.webkit.WebViewFeature;
+
+/**
+ * An {@link Activity} to exercise X-Requested-With header control functionality.
+ */
+public class RequestedWithHeaderActivity extends AppCompatActivity {
+ private HttpServer mServer;
+ private WebView mWebView;
+
+ @Override
+ protected void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_requested_with_header);
+
+ setTitle(R.string.requested_with_activity_title);
+ WebkitHelpers.appendWebViewVersionToTitle(this);
+
+ // Check for proxy override feature
+ if (!WebViewFeature.isFeatureSupported(WebViewFeature.REQUESTED_WITH_HEADER_CONTROL)) {
+ WebkitHelpers.showMessageInActivity(this, R.string.webkit_api_not_available);
+ return;
+ }
+
+ // Initialize http server to show us what we requested
+ mServer = new HttpServer(/*port=*/0, HttpServer.EchoRequestHandler::new, null);
+ mServer.start();
+
+ // Set up our WebView
+ mWebView = findViewById(R.id.requested_with_header_webview);
+ // Disable caching to always get fresh requests to the test server
+ mWebView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
+
+ // Get the current Requested With Header Mode to initialize the UI
+ int requestedWithHeaderMode = WebSettingsCompat.getRequestedWithHeaderMode(
+ mWebView.getSettings());
+
+ // Wire up the UI
+ RadioGroup radioGroup = findViewById(R.id.requested_with_header_radio_group);
+ // Check the radio button corresponding to the current setting
+ radioGroup.check(
+ requestedWithHeaderMode == WebSettingsCompat.REQUESTED_WITH_HEADER_MODE_NO_HEADER
+ ? R.id.requested_with_header_no_header_mode
+ : R.id.requested_with_header_app_package_name_mode);
+ // Register a change handler
+ radioGroup.setOnCheckedChangeListener(this::onRadioGroupChanged);
+
+ // Send a request to our echo server to show the headers
+ refreshView(requestedWithHeaderMode);
+ }
+
+ private void refreshView(int requestedWithHeaderMode) {
+ // Set the header mode
+ WebSettingsCompat.setRequestedWithHeaderMode(mWebView.getSettings(),
+ requestedWithHeaderMode);
+ String requestUrl = new Uri.Builder()
+ .scheme("http")
+ .authority("localhost:" + mServer.getPort())
+ .build()
+ .toString();
+ mWebView.loadUrl(requestUrl);
+ }
+
+ /**
+ * Handler for selecting a new header mode through the radio group.
+ * @param unused Triggering radio group
+ * @param checkedId ID of checked radio button
+ */
+ public void onRadioGroupChanged(@NonNull RadioGroup unused, int checkedId) {
+ switch (checkedId) {
+ case R.id.requested_with_header_no_header_mode:
+ refreshView(WebSettingsCompat.REQUESTED_WITH_HEADER_MODE_NO_HEADER);
+ break;
+ case R.id.requested_with_header_app_package_name_mode:
+ refreshView(WebSettingsCompat.REQUESTED_WITH_HEADER_MODE_APP_PACKAGE_NAME);
+ break;
+ }
+ }
+
+ @Override
+ protected void onDestroy() {
+ if (mServer != null) {
+ mServer.shutdown();
+ }
+ super.onDestroy();
+ }
+}
diff --git a/webkit/integration-tests/testapp/src/main/res/layout/activity_requested_with_header.xml b/webkit/integration-tests/testapp/src/main/res/layout/activity_requested_with_header.xml
new file mode 100644
index 0000000..01ebf93
--- /dev/null
+++ b/webkit/integration-tests/testapp/src/main/res/layout/activity_requested_with_header.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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.
+ -->
+
+<RelativeLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/activity_requested_with_header"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <TextView
+ android:id="@+id/requested_with_header_radio_group_heading"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/requested_with_header_mode"
+ android:textColor="@color/colorPrimary"
+ android:textSize="10pt"
+ android:layout_alignParentTop="true"/>
+ <RadioGroup
+ android:id="@+id/requested_with_header_radio_group"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/requested_with_header_radio_group_heading">
+ <RadioButton
+ android:id="@+id/requested_with_header_no_header_mode"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="48dp"
+ android:text="@string/requested_with_no_header"
+ android:textColor="@color/colorAccent"/>
+ <RadioButton
+ android:id="@+id/requested_with_header_app_package_name_mode"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="48dp"
+ android:textColor="@color/colorAccent"
+ android:text="@string/requested_with_app_package_name"/>
+ </RadioGroup>
+ <WebView
+ android:id="@+id/requested_with_header_webview"
+ android:layout_width="match_parent"
+ android:layout_below="@id/requested_with_header_radio_group"
+ android:layout_alignParentBottom="true"
+ android:layout_height="0dp"/>
+</RelativeLayout>
diff --git a/webkit/integration-tests/testapp/src/main/res/values/donottranslate-strings.xml b/webkit/integration-tests/testapp/src/main/res/values/donottranslate-strings.xml
index a59492b..81b2dd2 100644
--- a/webkit/integration-tests/testapp/src/main/res/values/donottranslate-strings.xml
+++ b/webkit/integration-tests/testapp/src/main/res/values/donottranslate-strings.xml
@@ -92,4 +92,10 @@
<string name="proxy_override_load_url">Load URL</string>
<string name="proxy_override_load_bypass_url">Load bypass URL</string>
+ <!-- Requested With Header -->
+ <string name="requested_with_activity_title">X-Requested-With header</string>
+ <string name="requested_with_header_mode">Header Mode</string>
+ <string name="requested_with_no_header">No Header</string>
+ <string name="requested_with_app_package_name">App Package Name</string>
+
</resources>
diff --git a/webkit/webkit/api/api_lint.ignore b/webkit/webkit/api/api_lint.ignore
index be3cd99..9c9c8ff 100644
--- a/webkit/webkit/api/api_lint.ignore
+++ b/webkit/webkit/api/api_lint.ignore
@@ -21,6 +21,34 @@
Symmetric method for `setBlockNetworkLoads` must be named `isBlockNetworkLoads`; was `getBlockNetworkLoads`
+InvalidNullability: androidx.webkit.WebViewClientCompat#onPageCommitVisible(android.webkit.WebView, String) parameter #0:
+ Invalid nullability on parameter `view` in method `onPageCommitVisible`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.webkit.WebViewClientCompat#onPageCommitVisible(android.webkit.WebView, String) parameter #1:
+ Invalid nullability on parameter `url` in method `onPageCommitVisible`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.webkit.WebViewClientCompat#onReceivedError(android.webkit.WebView, android.webkit.WebResourceRequest, android.webkit.WebResourceError) parameter #0:
+ Invalid nullability on parameter `view` in method `onReceivedError`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.webkit.WebViewClientCompat#onReceivedError(android.webkit.WebView, android.webkit.WebResourceRequest, android.webkit.WebResourceError) parameter #1:
+ Invalid nullability on parameter `request` in method `onReceivedError`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.webkit.WebViewClientCompat#onReceivedError(android.webkit.WebView, android.webkit.WebResourceRequest, android.webkit.WebResourceError) parameter #2:
+ Invalid nullability on parameter `error` in method `onReceivedError`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.webkit.WebViewClientCompat#onReceivedHttpError(android.webkit.WebView, android.webkit.WebResourceRequest, android.webkit.WebResourceResponse) parameter #0:
+ Invalid nullability on parameter `view` in method `onReceivedHttpError`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.webkit.WebViewClientCompat#onReceivedHttpError(android.webkit.WebView, android.webkit.WebResourceRequest, android.webkit.WebResourceResponse) parameter #1:
+ Invalid nullability on parameter `request` in method `onReceivedHttpError`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.webkit.WebViewClientCompat#onReceivedHttpError(android.webkit.WebView, android.webkit.WebResourceRequest, android.webkit.WebResourceResponse) parameter #2:
+ Invalid nullability on parameter `errorResponse` in method `onReceivedHttpError`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.webkit.WebViewClientCompat#onSafeBrowsingHit(android.webkit.WebView, android.webkit.WebResourceRequest, int, android.webkit.SafeBrowsingResponse) parameter #0:
+ Invalid nullability on parameter `view` in method `onSafeBrowsingHit`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.webkit.WebViewClientCompat#onSafeBrowsingHit(android.webkit.WebView, android.webkit.WebResourceRequest, int, android.webkit.SafeBrowsingResponse) parameter #1:
+ Invalid nullability on parameter `request` in method `onSafeBrowsingHit`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.webkit.WebViewClientCompat#onSafeBrowsingHit(android.webkit.WebView, android.webkit.WebResourceRequest, int, android.webkit.SafeBrowsingResponse) parameter #3:
+ Invalid nullability on parameter `response` in method `onSafeBrowsingHit`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.webkit.WebViewClientCompat#shouldOverrideUrlLoading(android.webkit.WebView, android.webkit.WebResourceRequest) parameter #0:
+ Invalid nullability on parameter `view` in method `shouldOverrideUrlLoading`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.webkit.WebViewClientCompat#shouldOverrideUrlLoading(android.webkit.WebView, android.webkit.WebResourceRequest) parameter #1:
+ Invalid nullability on parameter `request` in method `shouldOverrideUrlLoading`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+
+
MissingGetterMatchingBuilder: androidx.webkit.ProxyConfig.Builder#addDirect():
androidx.webkit.ProxyConfig does not declare a `getDirects()` method matching method androidx.webkit.ProxyConfig.Builder.addDirect()
MissingGetterMatchingBuilder: androidx.webkit.ProxyConfig.Builder#addDirect(String):
diff --git a/webkit/webkit/src/androidTest/java/androidx/webkit/ServiceWorkerWebSettingsCompatTest.java b/webkit/webkit/src/androidTest/java/androidx/webkit/ServiceWorkerWebSettingsCompatTest.java
index 34c9e9e8..3f6e0f4 100644
--- a/webkit/webkit/src/androidTest/java/androidx/webkit/ServiceWorkerWebSettingsCompatTest.java
+++ b/webkit/webkit/src/androidTest/java/androidx/webkit/ServiceWorkerWebSettingsCompatTest.java
@@ -16,25 +16,125 @@
package androidx.webkit;
+import static androidx.webkit.WebViewFeature.isFeatureSupported;
+
import android.webkit.WebSettings;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
+import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+
+import okhttp3.mockwebserver.Dispatcher;
+import okhttp3.mockwebserver.MockResponse;
+import okhttp3.mockwebserver.MockWebServer;
+import okhttp3.mockwebserver.RecordedRequest;
+
@LargeTest
@RunWith(AndroidJUnit4.class)
public class ServiceWorkerWebSettingsCompatTest {
private ServiceWorkerWebSettingsCompat mSettings;
+ private static final String INDEX_HTML_PATH = "/";
+ // Website which installs a service worker and sends an empty message to it once it's ready.
+ private static final String INDEX_HTML_DOCUMENT = "<!DOCTYPE html>\n"
+ + "<link rel=\"icon\" href=\"data:;base64,=\">\n"
+ + "<script>\n"
+ + " function swReady(sw) {\n"
+ + " sw.postMessage({});\n"
+ + " }\n"
+ + " navigator.serviceWorker.register('sw.js')\n"
+ + " .then(sw_reg => {\n"
+ + " let sw = sw_reg.installing || sw_reg.waiting || sw_reg.active;\n"
+ + " if (sw.state == 'activated') {\n"
+ + " swReady(sw);\n"
+ + " } else {\n"
+ + " sw.addEventListener('statechange', e => {\n"
+ + " if(e.target.state == 'activated') swReady(e.target); \n"
+ + " });\n"
+ + " }\n"
+ + " });\n"
+ + "</script>\n";
+
+ private static final String SERVICE_WORKER_PATH = "/sw.js";
+ // ServiceWorker which registers a message event listener that fetches a file.
+ private static final String SERVICE_WORKER_JAVASCRIPT =
+ "self.addEventListener('message', async event => await fetch('content.txt') );\n";
+
+ private static final String TEXT_CONTENT_PATH = "/content.txt";
+ private static final String TEXT_CONTENT = "fetch_ok";
+
+
+ /**
+ * Class to hold the default values of the ServiceWorkerWebSettings while we run the test so
+ * we can restore them afterwards.
+ */
+ private static class ServiceWorkerWebSettingsCompatCache {
+ private int mCacheMode;
+ private boolean mAllowContentAccess;
+ private boolean mAllowFileAccess;
+ private boolean mBlockNetworkLoads;
+ private int mRequestedHeaderMode;
+
+ ServiceWorkerWebSettingsCompatCache(ServiceWorkerWebSettingsCompat settingsCompat) {
+ if (isFeatureSupported(WebViewFeature.SERVICE_WORKER_CACHE_MODE)) {
+ mCacheMode = settingsCompat.getCacheMode();
+ }
+ if (isFeatureSupported(WebViewFeature.SERVICE_WORKER_CONTENT_ACCESS)) {
+ mAllowContentAccess = settingsCompat.getAllowContentAccess();
+ }
+ if (isFeatureSupported(WebViewFeature.SERVICE_WORKER_FILE_ACCESS)) {
+ mAllowFileAccess = settingsCompat.getAllowFileAccess();
+ }
+ if (isFeatureSupported(WebViewFeature.SERVICE_WORKER_BLOCK_NETWORK_LOADS)) {
+ mBlockNetworkLoads = settingsCompat.getBlockNetworkLoads();
+ }
+ if (isFeatureSupported(WebViewFeature.REQUESTED_WITH_HEADER_CONTROL)) {
+ mRequestedHeaderMode = settingsCompat.getRequestedWithHeaderMode();
+ }
+ }
+
+ void restoreSavedValues(ServiceWorkerWebSettingsCompat mSettings) {
+ if (isFeatureSupported(WebViewFeature.SERVICE_WORKER_CACHE_MODE)) {
+ mSettings.setCacheMode(mCacheMode);
+ }
+ if (isFeatureSupported(WebViewFeature.SERVICE_WORKER_CONTENT_ACCESS)) {
+ mSettings.setAllowContentAccess(mAllowContentAccess);
+ }
+ if (isFeatureSupported(WebViewFeature.SERVICE_WORKER_FILE_ACCESS)) {
+ mSettings.setAllowFileAccess(mAllowFileAccess);
+ }
+ if (isFeatureSupported(WebViewFeature.SERVICE_WORKER_BLOCK_NETWORK_LOADS)) {
+ mSettings.setBlockNetworkLoads(mBlockNetworkLoads);
+ }
+ if (isFeatureSupported(WebViewFeature.REQUESTED_WITH_HEADER_CONTROL)) {
+ mSettings.setRequestedWithHeaderMode(mRequestedHeaderMode);
+ }
+ }
+ }
+ private ServiceWorkerWebSettingsCompatCache mSavedDefaults;
+
@Before
- public void setUp() throws Exception {
+ public void setUp() {
WebkitUtils.checkFeature(WebViewFeature.SERVICE_WORKER_BASIC_USAGE);
mSettings = ServiceWorkerControllerCompat.getInstance().getServiceWorkerWebSettings();
+ // Remember to update this constructor when adding new settings to this test case
+ mSavedDefaults = new ServiceWorkerWebSettingsCompatCache(mSettings);
+ }
+
+ @After
+ public void tearDown() {
+ // Remember to update the restore method when adding new settings to this test case
+ if (mSavedDefaults != null) {
+ mSavedDefaults.restoreSavedValues(mSettings);
+ }
}
/**
@@ -105,4 +205,96 @@
Assert.assertEquals(b, mSettings.getBlockNetworkLoads());
}
}
+
+
+ /**
+ * Create, configure and start a MockWebServer to test the X-Requested-With header for
+ * ServiceWorkers.
+ */
+ MockWebServer getXRequestedWithMockWebServer() throws IOException {
+ MockWebServer server = new MockWebServer();
+ server.setDispatcher(new Dispatcher() {
+ @Override
+ public MockResponse dispatch(RecordedRequest request) {
+ MockResponse response = new MockResponse();
+ switch (request.getPath()) {
+ case INDEX_HTML_PATH:
+ response.setResponseCode(200);
+ response.setHeader("Content-Type", "text/html");
+ response.setBody(INDEX_HTML_DOCUMENT);
+ break;
+ case SERVICE_WORKER_PATH:
+ response.setResponseCode(200);
+ response.setHeader("Content-Type", "text/javascript");
+ response.setBody(SERVICE_WORKER_JAVASCRIPT);
+ break;
+ case TEXT_CONTENT_PATH:
+ response.setResponseCode(200);
+ response.setHeader("Content-Type", "text/text");
+ response.setBody(TEXT_CONTENT);
+ break;
+ default:
+ response.setResponseCode(404);
+ break;
+ }
+ return response;
+ }
+ });
+ server.start();
+ return server;
+ }
+
+ @Test
+ public void testDisableXRequestedWithHeader() throws Throwable {
+ WebkitUtils.checkFeature(WebViewFeature.REQUESTED_WITH_HEADER_CONTROL);
+
+ mSettings.setRequestedWithHeaderMode(
+ WebSettingsCompat.REQUESTED_WITH_HEADER_MODE_NO_HEADER);
+ Assert.assertEquals(WebSettingsCompat.REQUESTED_WITH_HEADER_MODE_NO_HEADER,
+ mSettings.getRequestedWithHeaderMode());
+
+ try (MockWebServer server = getXRequestedWithMockWebServer();
+ WebViewOnUiThread webViewOnUiThread = new WebViewOnUiThread()) {
+ webViewOnUiThread.getSettings().setJavaScriptEnabled(true);
+
+ String requestUrl = server.url(INDEX_HTML_PATH).toString();
+ webViewOnUiThread.loadUrl(requestUrl);
+
+ RecordedRequest request;
+ do {
+ // Wait until we get the request for the text content
+ request = server.takeRequest(5, TimeUnit.SECONDS);
+ } while (request != null && !TEXT_CONTENT_PATH.equals(request.getPath()));
+ Assert.assertNotNull("Test timed out while waiting for expected request", request);
+ Assert.assertNull("No X-Requested-With header is expected",
+ request.getHeader("X-Requested-With"));
+ }
+ }
+
+ @Test
+ public void testSetAppPackageNameXRequestedWithHeader() throws Throwable {
+ WebkitUtils.checkFeature(WebViewFeature.REQUESTED_WITH_HEADER_CONTROL);
+
+ mSettings.setRequestedWithHeaderMode(
+ WebSettingsCompat.REQUESTED_WITH_HEADER_MODE_APP_PACKAGE_NAME);
+ Assert.assertEquals(WebSettingsCompat.REQUESTED_WITH_HEADER_MODE_APP_PACKAGE_NAME,
+ mSettings.getRequestedWithHeaderMode());
+
+ try (MockWebServer server = getXRequestedWithMockWebServer();
+ WebViewOnUiThread webViewOnUiThread = new WebViewOnUiThread()) {
+
+ webViewOnUiThread.getSettings().setJavaScriptEnabled(true);
+
+ String requestUrl = server.url(INDEX_HTML_PATH).toString();
+ webViewOnUiThread.loadUrl(requestUrl);
+
+ RecordedRequest request;
+ do {
+ // Wait until we get the request for the text content
+ request = server.takeRequest(5, TimeUnit.SECONDS);
+ } while (request != null && !TEXT_CONTENT_PATH.equals(request.getPath()));
+ Assert.assertNotNull("Test timed out while waiting for expected request", request);
+ Assert.assertEquals("androidx.webkit.test", request.getHeader("X-Requested-With"));
+ }
+ }
}
diff --git a/webkit/webkit/src/androidTest/java/androidx/webkit/WebSettingsCompatTest.java b/webkit/webkit/src/androidTest/java/androidx/webkit/WebSettingsCompatTest.java
index 9e23e9f..b7e49e6 100644
--- a/webkit/webkit/src/androidTest/java/androidx/webkit/WebSettingsCompatTest.java
+++ b/webkit/webkit/src/androidTest/java/androidx/webkit/WebSettingsCompatTest.java
@@ -26,10 +26,14 @@
import androidx.test.filters.SmallTest;
import org.junit.After;
+import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+import okhttp3.mockwebserver.MockWebServer;
+import okhttp3.mockwebserver.RecordedRequest;
+
@SmallTest
@RunWith(AndroidJUnit4.class)
public class WebSettingsCompatTest {
@@ -97,7 +101,7 @@
WebSettingsCompat.setDisabledActionModeMenuItems(mWebViewOnUiThread.getSettings(),
WebSettings.MENU_ITEM_PROCESS_TEXT | WebSettings.MENU_ITEM_WEB_SEARCH);
assertEquals("Disabled action mode items should have been set to (MENU_ITEM_PROCESS_TEXT "
- + "| MENU_ITEM_WEB_SEARCH)",
+ + "| MENU_ITEM_WEB_SEARCH)",
WebSettings.MENU_ITEM_PROCESS_TEXT | WebSettings.MENU_ITEM_WEB_SEARCH,
WebSettingsCompat.getDisabledActionModeMenuItems(mWebViewOnUiThread.getSettings()));
}
@@ -123,4 +127,41 @@
// bad navigation and then checks).
}
+
+ @Test
+ public void testDisableXRequestedWithHeader() throws Throwable {
+
+ WebkitUtils.checkFeature(WebViewFeature.REQUESTED_WITH_HEADER_CONTROL);
+
+ WebSettingsCompat.setRequestedWithHeaderMode(mWebViewOnUiThread.getSettings(),
+ WebSettingsCompat.REQUESTED_WITH_HEADER_MODE_NO_HEADER);
+ Assert.assertEquals(WebSettingsCompat.REQUESTED_WITH_HEADER_MODE_NO_HEADER,
+ WebSettingsCompat.getRequestedWithHeaderMode(mWebViewOnUiThread.getSettings()));
+
+ try (MockWebServer mockWebServer = new MockWebServer()) {
+ String requestUrl = mockWebServer.url("/").toString();
+ mWebViewOnUiThread.loadUrl(requestUrl);
+ RecordedRequest recordedRequest = mockWebServer.takeRequest();
+ String headerValue = recordedRequest.getHeader("X-Requested-With");
+ Assert.assertNull("No X-Requested-With header should have been sent.", headerValue);
+ }
+ }
+
+ @Test
+ public void testSetAppPackageNameXRequestedWithHeader() throws Throwable {
+ WebkitUtils.checkFeature(WebViewFeature.REQUESTED_WITH_HEADER_CONTROL);
+
+ WebSettingsCompat.setRequestedWithHeaderMode(mWebViewOnUiThread.getSettings(),
+ WebSettingsCompat.REQUESTED_WITH_HEADER_MODE_APP_PACKAGE_NAME);
+ Assert.assertEquals(WebSettingsCompat.REQUESTED_WITH_HEADER_MODE_APP_PACKAGE_NAME,
+ WebSettingsCompat.getRequestedWithHeaderMode(mWebViewOnUiThread.getSettings()));
+
+ try (MockWebServer mockWebServer = new MockWebServer()) {
+ String requestUrl = mockWebServer.url("/").toString();
+ mWebViewOnUiThread.loadUrl(requestUrl);
+ RecordedRequest recordedRequest = mockWebServer.takeRequest();
+ String headerValue = recordedRequest.getHeader("X-Requested-With");
+ Assert.assertEquals("androidx.webkit.test", headerValue);
+ }
+ }
}
diff --git a/webkit/webkit/src/androidTest/java/androidx/webkit/WebViewOnUiThread.java b/webkit/webkit/src/androidTest/java/androidx/webkit/WebViewOnUiThread.java
index 3ba2829..89967db 100644
--- a/webkit/webkit/src/androidTest/java/androidx/webkit/WebViewOnUiThread.java
+++ b/webkit/webkit/src/androidTest/java/androidx/webkit/WebViewOnUiThread.java
@@ -49,7 +49,7 @@
* Modifications to this class should be reflected in that class as necessary. See
* http://go/modifying-webview-cts.
*/
-public class WebViewOnUiThread {
+public class WebViewOnUiThread implements AutoCloseable{
/**
* The maximum time, in milliseconds (10 seconds) to wait for a load
* to be triggered.
@@ -102,6 +102,11 @@
});
}
+ @Override
+ public void close() throws Exception {
+ cleanUp();
+ }
+
private static class Holder {
volatile WebView mView;
}
diff --git a/webkit/webkit/src/main/java/androidx/webkit/ServiceWorkerWebSettingsCompat.java b/webkit/webkit/src/main/java/androidx/webkit/ServiceWorkerWebSettingsCompat.java
index 5e48bd2..acfef8a 100644
--- a/webkit/webkit/src/main/java/androidx/webkit/ServiceWorkerWebSettingsCompat.java
+++ b/webkit/webkit/src/main/java/androidx/webkit/ServiceWorkerWebSettingsCompat.java
@@ -21,6 +21,7 @@
import androidx.annotation.IntDef;
import androidx.annotation.RequiresFeature;
import androidx.annotation.RestrictTo;
+import androidx.webkit.WebSettingsCompat.RequestedWithHeaderMode;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -173,4 +174,48 @@
@RequiresFeature(name = WebViewFeature.SERVICE_WORKER_BLOCK_NETWORK_LOADS,
enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
public abstract boolean getBlockNetworkLoads();
+
+
+ /**
+ * Sets how Service Workers will set the X-Requested-With header on requests.
+ *
+ * If you are calling this method, you may also want to call
+ * {@link WebSettingsCompat#setRequestedWithHeaderMode(WebSettings, int)} with the same
+ * parameter value to configure non-ServiceWorker requests.
+ *
+ * The default behavior may vary depending on the WebView implementation.
+ *
+ * <p>
+ * This method should only be called if
+ * {@link WebViewFeature#isFeatureSupported(String)}
+ * returns true for {@link WebViewFeature#REQUESTED_WITH_HEADER_CONTROL}.
+ *
+ * @param requestedWithHeaderMode The {@code REQUESTED_WITH_HEADER_MODE to use}
+ * @see WebSettingsCompat#setRequestedWithHeaderMode(WebSettings, int)
+ * @see #getBlockNetworkLoads
+ * @hide
+ */
+ @RequiresFeature(name = WebViewFeature.REQUESTED_WITH_HEADER_CONTROL,
+ enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
+ @RestrictTo(RestrictTo.Scope.LIBRARY)
+ public abstract void setRequestedWithHeaderMode(
+ @RequestedWithHeaderMode int requestedWithHeaderMode);
+
+ /**
+ * Gets how Service Workers will set the X-Requested-With header on HTTP requests.
+ *
+ * <p>
+ * This method should only be called if
+ * {@link WebViewFeature#isFeatureSupported(String)}
+ * returns true for {@link WebViewFeature#REQUESTED_WITH_HEADER_CONTROL}.
+ *
+ * @return the currently configured {@code REQUESTED_WITH_HEADER_MODE}
+ * @see #setRequestedWithHeaderMode(int)
+ * @hide
+ */
+ @RequiresFeature(name = WebViewFeature.REQUESTED_WITH_HEADER_CONTROL,
+ enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
+ @RestrictTo(RestrictTo.Scope.LIBRARY)
+ @RequestedWithHeaderMode
+ public abstract int getRequestedWithHeaderMode();
}
diff --git a/webkit/webkit/src/main/java/androidx/webkit/WebSettingsCompat.java b/webkit/webkit/src/main/java/androidx/webkit/WebSettingsCompat.java
index 3917232..dc78c65 100644
--- a/webkit/webkit/src/main/java/androidx/webkit/WebSettingsCompat.java
+++ b/webkit/webkit/src/main/java/androidx/webkit/WebSettingsCompat.java
@@ -622,6 +622,101 @@
}
}
+ /**
+ * In this mode the WebView will not add an X-Requested-With header on HTTP
+ * requests automatically.
+ *
+ * @see #setRequestedWithHeaderMode(WebSettings, int)
+ * @see ServiceWorkerWebSettingsCompat#setRequestedWithHeaderMode(int)
+ * @hide
+ */
+ @RestrictTo(RestrictTo.Scope.LIBRARY)
+ public static final int REQUESTED_WITH_HEADER_MODE_NO_HEADER =
+ WebSettingsBoundaryInterface.RequestedWithHeaderMode.NO_HEADER;
+ /**
+ * In this mode the WebView automatically add an X-Requested-With header to outgoing
+ * requests, if the application or the loaded webpage has not already set a header value.
+ * The value of this automatically added header will be the package name of the app.
+ *
+ * This is the default mode.
+ *
+ * @see #setRequestedWithHeaderMode(WebSettings, int)
+ * @see ServiceWorkerWebSettingsCompat#setRequestedWithHeaderMode(int)
+ * @hide
+ */
+ @RestrictTo(RestrictTo.Scope.LIBRARY)
+ public static final int REQUESTED_WITH_HEADER_MODE_APP_PACKAGE_NAME =
+ WebSettingsBoundaryInterface.RequestedWithHeaderMode.APP_PACKAGE_NAME;
+
+ /**
+ * @hide
+ */
+ @RestrictTo(RestrictTo.Scope.LIBRARY)
+ @IntDef(value = {
+ REQUESTED_WITH_HEADER_MODE_NO_HEADER,
+ REQUESTED_WITH_HEADER_MODE_APP_PACKAGE_NAME
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ @Target({ElementType.PARAMETER, ElementType.METHOD})
+ public @interface RequestedWithHeaderMode {}
+
+ /**
+ * Sets how the WebView will set the X-Requested-With header on requests.
+ *
+ * If you are calling this method, you may also want to call
+ * {@link ServiceWorkerWebSettingsCompat#setRequestedWithHeaderMode(int)} with the same
+ * parameter value to configure ServiceWorker requests.
+ *
+ * The default behavior may vary depending on the WebView implementation.
+ *
+ * <p>
+ * This method should only be called if
+ * {@link WebViewFeature#isFeatureSupported(String)}
+ * returns true for {@link WebViewFeature#REQUESTED_WITH_HEADER_CONTROL}.
+ *
+ * @param requestedWithHeaderMode The {@code REQUESTED_WITH_HEADER_MODE to use}
+ * @see ServiceWorkerWebSettingsCompat#setRequestedWithHeaderMode(int)
+ * @see #getRequestedWithHeaderMode(WebSettings)
+ * @hide
+ */
+ @RestrictTo(RestrictTo.Scope.LIBRARY)
+ @RequiresFeature(name = WebViewFeature.REQUESTED_WITH_HEADER_CONTROL,
+ enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
+ public static void setRequestedWithHeaderMode(@NonNull WebSettings settings,
+ @RequestedWithHeaderMode int requestedWithHeaderMode) {
+ WebViewFeatureInternal feature = WebViewFeatureInternal.REQUESTED_WITH_HEADER_CONTROL;
+ if (feature.isSupportedByWebView()) {
+ getAdapter(settings).setRequestedWithHeaderMode(requestedWithHeaderMode);
+ } else {
+ throw WebViewFeatureInternal.getUnsupportedOperationException();
+ }
+ }
+
+ /**
+ * Gets how the WebView will set the X-Requested-With header on HTTP requests.
+ *
+ * <p>
+ * This method should only be called if
+ * {@link WebViewFeature#isFeatureSupported(String)}
+ * returns true for {@link WebViewFeature#REQUESTED_WITH_HEADER_CONTROL}.
+ *
+ * @return the currently configured {@code REQUESTED_WITH_HEADER_MODE}
+ * @see #setRequestedWithHeaderMode(WebSettings, int)
+ * @hide
+ */
+ @RestrictTo(RestrictTo.Scope.LIBRARY)
+ @RequiresFeature(name = WebViewFeature.REQUESTED_WITH_HEADER_CONTROL,
+ enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
+ @RequestedWithHeaderMode
+ public static int getRequestedWithHeaderMode(@NonNull WebSettings settings) {
+ WebViewFeatureInternal feature = WebViewFeatureInternal.REQUESTED_WITH_HEADER_CONTROL;
+ if (feature.isSupportedByWebView()) {
+ return getAdapter(settings).getRequestedWithHeaderMode();
+ } else {
+ throw WebViewFeatureInternal.getUnsupportedOperationException();
+ }
+ }
+
private static WebSettingsAdapter getAdapter(WebSettings settings) {
return WebViewGlueCommunicator.getCompatConverter().convertSettings(settings);
}
diff --git a/webkit/webkit/src/main/java/androidx/webkit/WebViewFeature.java b/webkit/webkit/src/main/java/androidx/webkit/WebViewFeature.java
index 3ec182c..1eef16b 100644
--- a/webkit/webkit/src/main/java/androidx/webkit/WebViewFeature.java
+++ b/webkit/webkit/src/main/java/androidx/webkit/WebViewFeature.java
@@ -97,6 +97,7 @@
PROXY_OVERRIDE_REVERSE_BYPASS,
GET_VARIATIONS_HEADER,
ALGORITHMIC_DARKENING,
+ REQUESTED_WITH_HEADER_CONTROL,
})
@Retention(RetentionPolicy.SOURCE)
@Target({ElementType.PARAMETER, ElementType.METHOD})
@@ -476,6 +477,17 @@
public static final String GET_VARIATIONS_HEADER = "GET_VARIATIONS_HEADER";
/**
+ * Feature for {@link #isFeatureSupported(String)}.
+ * This feature covers {@link WebSettingsCompat#setRequestedWithHeaderMode(WebSettings, int)},
+ * {@link WebSettingsCompat#getRequestedWithHeaderMode(WebSettings)},
+ * {@link ServiceWorkerWebSettingsCompat#setRequestedWithHeaderMode(int)},
+ * and {@link ServiceWorkerWebSettingsCompat#getRequestedWithHeaderMode()}.
+ * @hide
+ */
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ public static final String REQUESTED_WITH_HEADER_CONTROL = "REQUESTED_WITH_HEADER_CONTROL";
+
+ /**
* Return whether a feature is supported at run-time. On devices running Android version {@link
* android.os.Build.VERSION_CODES#LOLLIPOP} and higher, this will check whether a feature is
* supported, depending on the combination of the desired feature, the Android version of
diff --git a/webkit/webkit/src/main/java/androidx/webkit/internal/ServiceWorkerWebSettingsImpl.java b/webkit/webkit/src/main/java/androidx/webkit/internal/ServiceWorkerWebSettingsImpl.java
index d246d6d..6706532 100644
--- a/webkit/webkit/src/main/java/androidx/webkit/internal/ServiceWorkerWebSettingsImpl.java
+++ b/webkit/webkit/src/main/java/androidx/webkit/internal/ServiceWorkerWebSettingsImpl.java
@@ -183,4 +183,26 @@
throw WebViewFeatureInternal.getUnsupportedOperationException();
}
}
+
+ @Override
+ public void setRequestedWithHeaderMode(int requestedWithHeaderMode) {
+ final WebViewFeatureInternal feature =
+ WebViewFeatureInternal.REQUESTED_WITH_HEADER_CONTROL;
+ if (feature.isSupportedByWebView()) {
+ getBoundaryInterface().setRequestedWithHeaderMode(requestedWithHeaderMode);
+ } else {
+ throw WebViewFeatureInternal.getUnsupportedOperationException();
+ }
+ }
+
+ @Override
+ public int getRequestedWithHeaderMode() {
+ final WebViewFeatureInternal feature =
+ WebViewFeatureInternal.REQUESTED_WITH_HEADER_CONTROL;
+ if (feature.isSupportedByWebView()) {
+ return getBoundaryInterface().getRequestedWithHeaderMode();
+ } else {
+ throw WebViewFeatureInternal.getUnsupportedOperationException();
+ }
+ }
}
diff --git a/webkit/webkit/src/main/java/androidx/webkit/internal/WebSettingsAdapter.java b/webkit/webkit/src/main/java/androidx/webkit/internal/WebSettingsAdapter.java
index 4e7ae53..1b7e334 100644
--- a/webkit/webkit/src/main/java/androidx/webkit/internal/WebSettingsAdapter.java
+++ b/webkit/webkit/src/main/java/androidx/webkit/internal/WebSettingsAdapter.java
@@ -127,4 +127,20 @@
public boolean isAlgorithmicDarkeningAllowed() {
return mBoundaryInterface.isAlgorithmicDarkeningAllowed();
}
+
+ /**
+ * Adapter method for
+ * {@link androidx.webkit.WebSettingsCompat#setRequestedWithHeaderMode(android.webkit.WebSettings, int)}
+ */
+ public void setRequestedWithHeaderMode(int requestedWithHeaderMode) {
+ mBoundaryInterface.setRequestedWithHeaderMode(requestedWithHeaderMode);
+ }
+
+ /**
+ * Adapter method for
+ * {@link androidx.webkit.WebSettingsCompat#getRequestedWithHeaderMode(android.webkit.WebSettings)}
+ */
+ public int getRequestedWithHeaderMode() {
+ return mBoundaryInterface.getRequestedWithHeaderMode();
+ }
}
diff --git a/webkit/webkit/src/main/java/androidx/webkit/internal/WebViewFeatureInternal.java b/webkit/webkit/src/main/java/androidx/webkit/internal/WebViewFeatureInternal.java
index f7569bd..6d376f03 100644
--- a/webkit/webkit/src/main/java/androidx/webkit/internal/WebViewFeatureInternal.java
+++ b/webkit/webkit/src/main/java/androidx/webkit/internal/WebViewFeatureInternal.java
@@ -421,6 +421,16 @@
*/
GET_VARIATIONS_HEADER(WebViewFeature.GET_VARIATIONS_HEADER, Features.GET_VARIATIONS_HEADER),
+ /**
+ * This feature covers
+ * {@link androidx.webkit.WebSettingsCompat#setRequestedWithHeaderMode(WebSettings, int)},
+ * {@link androidx.webkit.WebSettingsCompat#getRequestedWithHeaderMode(WebSettings)},
+ * {@link androidx.webkit.ServiceWorkerWebSettingsCompat#setRequestedWithHeaderMode(int)},
+ * and {@link androidx.webkit.ServiceWorkerWebSettingsCompat#getRequestedWithHeaderMode()}
+ */
+ REQUESTED_WITH_HEADER_CONTROL(WebViewFeature.REQUESTED_WITH_HEADER_CONTROL,
+ Features.REQUESTED_WITH_HEADER_CONTROL),
+
; // This semicolon ends the enum. Add new features with a trailing comma above this line.
private static final int NOT_SUPPORTED_BY_FRAMEWORK = -1;
diff --git a/window/window-testing/api/api_lint.ignore b/window/window-testing/api/api_lint.ignore
new file mode 100644
index 0000000..d43dd3d
--- /dev/null
+++ b/window/window-testing/api/api_lint.ignore
@@ -0,0 +1,9 @@
+// Baseline format: 1.0
+InvalidNullability: androidx.window.testing.layout.StubWindowMetricsCalculatorRule#apply(org.junit.runners.model.Statement, org.junit.runner.Description) parameter #0:
+ Invalid nullability on parameter `base` in method `apply`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.window.testing.layout.StubWindowMetricsCalculatorRule#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.
+InvalidNullability: androidx.window.testing.layout.WindowLayoutInfoPublisherRule#apply(org.junit.runners.model.Statement, org.junit.runner.Description) parameter #0:
+ Invalid nullability on parameter `base` in method `apply`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+InvalidNullability: androidx.window.testing.layout.WindowLayoutInfoPublisherRule#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.
diff --git a/window/window/src/androidTest/java/androidx/window/layout/ExtensionWindowLayoutInfoBackendTest.kt b/window/window/src/androidTest/java/androidx/window/layout/ExtensionWindowLayoutInfoBackendTest.kt
index bdc40da..a5f8cbd 100644
--- a/window/window/src/androidTest/java/androidx/window/layout/ExtensionWindowLayoutInfoBackendTest.kt
+++ b/window/window/src/androidTest/java/androidx/window/layout/ExtensionWindowLayoutInfoBackendTest.kt
@@ -44,6 +44,7 @@
import androidx.window.extensions.layout.FoldingFeature as OEMFoldingFeature
import androidx.window.extensions.layout.WindowLayoutInfo as OEMWindowLayoutInfo
import java.util.function.Consumer as JavaConsumer
+import com.nhaarman.mockitokotlin2.times
class ExtensionWindowLayoutInfoBackendTest {
@@ -150,6 +151,27 @@
}
@Test
+ public fun testExtensionWindowBackend_reRegisterCallback() {
+ val component = mock<WindowLayoutComponent>()
+
+ val backend = ExtensionWindowLayoutInfoBackend(component, consumerAdapter)
+
+ activityScenario.scenario.onActivity { activity ->
+ val consumer = TestConsumer<WindowLayoutInfo>()
+ backend.registerLayoutChangeCallback(activity, Runnable::run, consumer)
+ backend.unregisterLayoutChangeCallback(consumer)
+ backend.registerLayoutChangeCallback(activity, Runnable::run, consumer)
+
+ val consumerCaptor = argumentCaptor<JavaConsumer<OEMWindowLayoutInfo>>()
+ verify(component, times(2)).addWindowLayoutInfoListener(
+ eq(activity),
+ consumerCaptor.capture()
+ )
+ verify(component).removeWindowLayoutInfoListener(consumerCaptor.firstValue)
+ }
+ }
+
+ @Test
public fun testRegisterLayoutChangeCallback_clearListeners() {
activityScenario.scenario.onActivity { activity ->
val component = FakeWindowComponent()
diff --git a/window/window/src/main/java/androidx/window/layout/ExtensionWindowLayoutInfoBackend.kt b/window/window/src/main/java/androidx/window/layout/ExtensionWindowLayoutInfoBackend.kt
index da5995e..d8ff7b3 100644
--- a/window/window/src/main/java/androidx/window/layout/ExtensionWindowLayoutInfoBackend.kt
+++ b/window/window/src/main/java/androidx/window/layout/ExtensionWindowLayoutInfoBackend.kt
@@ -93,6 +93,8 @@
multicastListener.removeListener(callback)
if (multicastListener.isEmpty()) {
consumerToToken.remove(multicastListener)?.dispose()
+ listenerToActivity.remove(callback)
+ activityToListeners.remove(activity)
}
}
}
diff --git a/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java b/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java
index 78f913c..aa83e1c 100644
--- a/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java
+++ b/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java
@@ -54,6 +54,7 @@
import androidx.work.WorkRequest;
import androidx.work.impl.background.systemjob.SystemJobService;
import androidx.work.impl.workers.ConstraintTrackingWorker;
+import androidx.work.impl.workers.ConstraintTrackingWorkerKt;
import androidx.work.integration.testapp.imageprocessing.ImageProcessingActivity;
import androidx.work.integration.testapp.sherlockholmes.AnalyzeSherlockHolmesActivity;
import androidx.work.multiprocess.RemoteWorkerService;
@@ -376,7 +377,7 @@
@Override
public void onClick(View v) {
Data inputData = new Data.Builder()
- .putString(ConstraintTrackingWorker.ARGUMENT_CLASS_NAME,
+ .putString(ConstraintTrackingWorkerKt.ARGUMENT_CLASS_NAME,
ForegroundWorker.class.getName())
.build();
diff --git a/work/work-multiprocess/api/api_lint.ignore b/work/work-multiprocess/api/api_lint.ignore
index 07b6896..319c709 100644
--- a/work/work-multiprocess/api/api_lint.ignore
+++ b/work/work-multiprocess/api/api_lint.ignore
@@ -5,3 +5,9 @@
Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
AsyncSuffixFuture: androidx.work.multiprocess.RemoteListenableWorker#startWork():
Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
+
+
+InvalidNullability: androidx.work.multiprocess.RemoteWorkerService#onBind(android.content.Intent):
+ Invalid nullability on method `onBind` return. Overrides of unannotated super method cannot be Nullable.
+InvalidNullability: androidx.work.multiprocess.RemoteWorkerService#onBind(android.content.Intent) parameter #0:
+ Invalid nullability on parameter `intent` in method `onBind`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
diff --git a/work/work-multiprocess/api/current.ignore b/work/work-multiprocess/api/current.ignore
new file mode 100644
index 0000000..b746b39
--- /dev/null
+++ b/work/work-multiprocess/api/current.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.work.multiprocess.RemoteCoroutineWorker#doRemoteWork(kotlin.coroutines.Continuation<? super androidx.work.ListenableWorker.Result>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.work.multiprocess.RemoteCoroutineWorker.doRemoteWork
+ParameterNameChange: androidx.work.multiprocess.RemoteCoroutineWorker#setProgress(androidx.work.Data, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.work.multiprocess.RemoteCoroutineWorker.setProgress
diff --git a/work/work-multiprocess/api/current.txt b/work/work-multiprocess/api/current.txt
index e033a49..bd27cfb 100644
--- a/work/work-multiprocess/api/current.txt
+++ b/work/work-multiprocess/api/current.txt
@@ -3,9 +3,9 @@
public abstract class RemoteCoroutineWorker extends androidx.work.multiprocess.RemoteListenableWorker {
ctor public RemoteCoroutineWorker(android.content.Context context, androidx.work.WorkerParameters parameters);
- method public abstract suspend Object? doRemoteWork(kotlin.coroutines.Continuation<? super androidx.work.ListenableWorker.Result> p);
+ method public abstract suspend Object? doRemoteWork(kotlin.coroutines.Continuation<? super androidx.work.ListenableWorker.Result>);
method public final void onStopped();
- method public final suspend Object? setProgress(androidx.work.Data data, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public final suspend Object? setProgress(androidx.work.Data data, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public com.google.common.util.concurrent.ListenableFuture<androidx.work.ListenableWorker.Result> startRemoteWork();
}
diff --git a/work/work-multiprocess/api/public_plus_experimental_current.txt b/work/work-multiprocess/api/public_plus_experimental_current.txt
index e033a49..bd27cfb 100644
--- a/work/work-multiprocess/api/public_plus_experimental_current.txt
+++ b/work/work-multiprocess/api/public_plus_experimental_current.txt
@@ -3,9 +3,9 @@
public abstract class RemoteCoroutineWorker extends androidx.work.multiprocess.RemoteListenableWorker {
ctor public RemoteCoroutineWorker(android.content.Context context, androidx.work.WorkerParameters parameters);
- method public abstract suspend Object? doRemoteWork(kotlin.coroutines.Continuation<? super androidx.work.ListenableWorker.Result> p);
+ method public abstract suspend Object? doRemoteWork(kotlin.coroutines.Continuation<? super androidx.work.ListenableWorker.Result>);
method public final void onStopped();
- method public final suspend Object? setProgress(androidx.work.Data data, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public final suspend Object? setProgress(androidx.work.Data data, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public com.google.common.util.concurrent.ListenableFuture<androidx.work.ListenableWorker.Result> startRemoteWork();
}
diff --git a/work/work-multiprocess/api/restricted_current.ignore b/work/work-multiprocess/api/restricted_current.ignore
new file mode 100644
index 0000000..b746b39
--- /dev/null
+++ b/work/work-multiprocess/api/restricted_current.ignore
@@ -0,0 +1,5 @@
+// Baseline format: 1.0
+ParameterNameChange: androidx.work.multiprocess.RemoteCoroutineWorker#doRemoteWork(kotlin.coroutines.Continuation<? super androidx.work.ListenableWorker.Result>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.work.multiprocess.RemoteCoroutineWorker.doRemoteWork
+ParameterNameChange: androidx.work.multiprocess.RemoteCoroutineWorker#setProgress(androidx.work.Data, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.work.multiprocess.RemoteCoroutineWorker.setProgress
diff --git a/work/work-multiprocess/api/restricted_current.txt b/work/work-multiprocess/api/restricted_current.txt
index e033a49..bd27cfb 100644
--- a/work/work-multiprocess/api/restricted_current.txt
+++ b/work/work-multiprocess/api/restricted_current.txt
@@ -3,9 +3,9 @@
public abstract class RemoteCoroutineWorker extends androidx.work.multiprocess.RemoteListenableWorker {
ctor public RemoteCoroutineWorker(android.content.Context context, androidx.work.WorkerParameters parameters);
- method public abstract suspend Object? doRemoteWork(kotlin.coroutines.Continuation<? super androidx.work.ListenableWorker.Result> p);
+ method public abstract suspend Object? doRemoteWork(kotlin.coroutines.Continuation<? super androidx.work.ListenableWorker.Result>);
method public final void onStopped();
- method public final suspend Object? setProgress(androidx.work.Data data, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public final suspend Object? setProgress(androidx.work.Data data, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public com.google.common.util.concurrent.ListenableFuture<androidx.work.ListenableWorker.Result> startRemoteWork();
}
diff --git a/work/work-runtime-ktx/api/api_lint.ignore b/work/work-runtime-ktx/api/api_lint.ignore
index ee82cf9..7a1b7a5 100644
--- a/work/work-runtime-ktx/api/api_lint.ignore
+++ b/work/work-runtime-ktx/api/api_lint.ignore
@@ -1,15 +1,3 @@
// Baseline format: 1.0
AsyncSuffixFuture: androidx.work.CoroutineWorker#startWork():
Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
-
-
-MissingNullability: androidx.work.OneTimeWorkRequestKt#OneTimeWorkRequestBuilder():
- Missing nullability on method `OneTimeWorkRequestBuilder` return
-MissingNullability: androidx.work.PeriodicWorkRequestKt#PeriodicWorkRequestBuilder(java.time.Duration):
- Missing nullability on method `PeriodicWorkRequestBuilder` return
-MissingNullability: androidx.work.PeriodicWorkRequestKt#PeriodicWorkRequestBuilder(java.time.Duration, java.time.Duration):
- Missing nullability on method `PeriodicWorkRequestBuilder` return
-MissingNullability: androidx.work.PeriodicWorkRequestKt#PeriodicWorkRequestBuilder(long, java.util.concurrent.TimeUnit):
- Missing nullability on method `PeriodicWorkRequestBuilder` return
-MissingNullability: androidx.work.PeriodicWorkRequestKt#PeriodicWorkRequestBuilder(long, java.util.concurrent.TimeUnit, long, java.util.concurrent.TimeUnit):
- Missing nullability on method `PeriodicWorkRequestBuilder` return
diff --git a/work/work-runtime-ktx/api/current.ignore b/work/work-runtime-ktx/api/current.ignore
new file mode 100644
index 0000000..fb0fcc1
--- /dev/null
+++ b/work/work-runtime-ktx/api/current.ignore
@@ -0,0 +1,17 @@
+// Baseline format: 1.0
+
+ParameterNameChange: androidx.work.CoroutineWorker#doWork(kotlin.coroutines.Continuation<? super androidx.work.ListenableWorker.Result>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.work.CoroutineWorker.doWork
+ParameterNameChange: androidx.work.CoroutineWorker#getForegroundInfo(kotlin.coroutines.Continuation<? super androidx.work.ForegroundInfo>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.work.CoroutineWorker.getForegroundInfo
+ParameterNameChange: androidx.work.CoroutineWorker#setForeground(androidx.work.ForegroundInfo, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.work.CoroutineWorker.setForeground
+ParameterNameChange: androidx.work.CoroutineWorker#setProgress(androidx.work.Data, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.work.CoroutineWorker.setProgress
+ParameterNameChange: androidx.work.OperationKt#await(androidx.work.Operation, kotlin.coroutines.Continuation<? super androidx.work.Operation.State.SUCCESS>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.work.OperationKt.await
+
+RemovedClass: androidx.work.OneTimeWorkRequestKt:
+ Removed class androidx.work.OneTimeWorkRequestKt
+RemovedClass: androidx.work.PeriodicWorkRequestKt:
+ Removed class androidx.work.PeriodicWorkRequestKt
diff --git a/work/work-runtime-ktx/api/current.txt b/work/work-runtime-ktx/api/current.txt
index 8535d65..efdea4c 100644
--- a/work/work-runtime-ktx/api/current.txt
+++ b/work/work-runtime-ktx/api/current.txt
@@ -3,13 +3,13 @@
public abstract class CoroutineWorker extends androidx.work.ListenableWorker {
ctor public CoroutineWorker(android.content.Context appContext, androidx.work.WorkerParameters params);
- method public abstract suspend Object? doWork(kotlin.coroutines.Continuation<? super androidx.work.ListenableWorker.Result> p);
+ method public abstract suspend Object? doWork(kotlin.coroutines.Continuation<? super androidx.work.ListenableWorker.Result>);
method @Deprecated public kotlinx.coroutines.CoroutineDispatcher getCoroutineContext();
- method public suspend Object? getForegroundInfo(kotlin.coroutines.Continuation<? super androidx.work.ForegroundInfo> p);
+ method public suspend Object? getForegroundInfo(kotlin.coroutines.Continuation<? super androidx.work.ForegroundInfo>);
method public final com.google.common.util.concurrent.ListenableFuture<androidx.work.ForegroundInfo> getForegroundInfoAsync();
method public final void onStopped();
- method public final suspend Object? setForeground(androidx.work.ForegroundInfo foregroundInfo, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public final suspend Object? setProgress(androidx.work.Data data, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public final suspend Object? setForeground(androidx.work.ForegroundInfo foregroundInfo, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public final suspend Object? setProgress(androidx.work.Data data, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public final com.google.common.util.concurrent.ListenableFuture<androidx.work.ListenableWorker.Result> startWork();
property @Deprecated public kotlinx.coroutines.CoroutineDispatcher coroutineContext;
}
@@ -22,20 +22,8 @@
public final class ListenableFutureKt {
}
- public final class OneTimeWorkRequestKt {
- method public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.OneTimeWorkRequest.Builder! OneTimeWorkRequestBuilder();
- method public static inline androidx.work.OneTimeWorkRequest.Builder setInputMerger(androidx.work.OneTimeWorkRequest.Builder, kotlin.reflect.KClass<? extends androidx.work.InputMerger> inputMerger);
- }
-
public final class OperationKt {
- method public static suspend inline Object? await(androidx.work.Operation, kotlin.coroutines.Continuation<? super androidx.work.Operation.State.SUCCESS> p);
- }
-
- public final class PeriodicWorkRequestKt {
- method public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(long repeatInterval, java.util.concurrent.TimeUnit repeatIntervalTimeUnit);
- method @RequiresApi(26) public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(java.time.Duration repeatInterval);
- method public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(long repeatInterval, java.util.concurrent.TimeUnit repeatIntervalTimeUnit, long flexTimeInterval, java.util.concurrent.TimeUnit flexTimeIntervalUnit);
- method @RequiresApi(26) public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(java.time.Duration repeatInterval, java.time.Duration flexTimeInterval);
+ method public static suspend inline Object? await(androidx.work.Operation, kotlin.coroutines.Continuation<? super androidx.work.Operation.State.SUCCESS>);
}
}
diff --git a/work/work-runtime-ktx/api/public_plus_experimental_current.txt b/work/work-runtime-ktx/api/public_plus_experimental_current.txt
index 8535d65..efdea4c 100644
--- a/work/work-runtime-ktx/api/public_plus_experimental_current.txt
+++ b/work/work-runtime-ktx/api/public_plus_experimental_current.txt
@@ -3,13 +3,13 @@
public abstract class CoroutineWorker extends androidx.work.ListenableWorker {
ctor public CoroutineWorker(android.content.Context appContext, androidx.work.WorkerParameters params);
- method public abstract suspend Object? doWork(kotlin.coroutines.Continuation<? super androidx.work.ListenableWorker.Result> p);
+ method public abstract suspend Object? doWork(kotlin.coroutines.Continuation<? super androidx.work.ListenableWorker.Result>);
method @Deprecated public kotlinx.coroutines.CoroutineDispatcher getCoroutineContext();
- method public suspend Object? getForegroundInfo(kotlin.coroutines.Continuation<? super androidx.work.ForegroundInfo> p);
+ method public suspend Object? getForegroundInfo(kotlin.coroutines.Continuation<? super androidx.work.ForegroundInfo>);
method public final com.google.common.util.concurrent.ListenableFuture<androidx.work.ForegroundInfo> getForegroundInfoAsync();
method public final void onStopped();
- method public final suspend Object? setForeground(androidx.work.ForegroundInfo foregroundInfo, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public final suspend Object? setProgress(androidx.work.Data data, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public final suspend Object? setForeground(androidx.work.ForegroundInfo foregroundInfo, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public final suspend Object? setProgress(androidx.work.Data data, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public final com.google.common.util.concurrent.ListenableFuture<androidx.work.ListenableWorker.Result> startWork();
property @Deprecated public kotlinx.coroutines.CoroutineDispatcher coroutineContext;
}
@@ -22,20 +22,8 @@
public final class ListenableFutureKt {
}
- public final class OneTimeWorkRequestKt {
- method public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.OneTimeWorkRequest.Builder! OneTimeWorkRequestBuilder();
- method public static inline androidx.work.OneTimeWorkRequest.Builder setInputMerger(androidx.work.OneTimeWorkRequest.Builder, kotlin.reflect.KClass<? extends androidx.work.InputMerger> inputMerger);
- }
-
public final class OperationKt {
- method public static suspend inline Object? await(androidx.work.Operation, kotlin.coroutines.Continuation<? super androidx.work.Operation.State.SUCCESS> p);
- }
-
- public final class PeriodicWorkRequestKt {
- method public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(long repeatInterval, java.util.concurrent.TimeUnit repeatIntervalTimeUnit);
- method @RequiresApi(26) public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(java.time.Duration repeatInterval);
- method public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(long repeatInterval, java.util.concurrent.TimeUnit repeatIntervalTimeUnit, long flexTimeInterval, java.util.concurrent.TimeUnit flexTimeIntervalUnit);
- method @RequiresApi(26) public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(java.time.Duration repeatInterval, java.time.Duration flexTimeInterval);
+ method public static suspend inline Object? await(androidx.work.Operation, kotlin.coroutines.Continuation<? super androidx.work.Operation.State.SUCCESS>);
}
}
diff --git a/work/work-runtime-ktx/api/restricted_current.ignore b/work/work-runtime-ktx/api/restricted_current.ignore
new file mode 100644
index 0000000..fb0fcc1
--- /dev/null
+++ b/work/work-runtime-ktx/api/restricted_current.ignore
@@ -0,0 +1,17 @@
+// Baseline format: 1.0
+
+ParameterNameChange: androidx.work.CoroutineWorker#doWork(kotlin.coroutines.Continuation<? super androidx.work.ListenableWorker.Result>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.work.CoroutineWorker.doWork
+ParameterNameChange: androidx.work.CoroutineWorker#getForegroundInfo(kotlin.coroutines.Continuation<? super androidx.work.ForegroundInfo>) parameter #0:
+ Attempted to remove parameter name from parameter arg1 in androidx.work.CoroutineWorker.getForegroundInfo
+ParameterNameChange: androidx.work.CoroutineWorker#setForeground(androidx.work.ForegroundInfo, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.work.CoroutineWorker.setForeground
+ParameterNameChange: androidx.work.CoroutineWorker#setProgress(androidx.work.Data, kotlin.coroutines.Continuation<? super kotlin.Unit>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.work.CoroutineWorker.setProgress
+ParameterNameChange: androidx.work.OperationKt#await(androidx.work.Operation, kotlin.coroutines.Continuation<? super androidx.work.Operation.State.SUCCESS>) parameter #1:
+ Attempted to remove parameter name from parameter arg2 in androidx.work.OperationKt.await
+
+RemovedClass: androidx.work.OneTimeWorkRequestKt:
+ Removed class androidx.work.OneTimeWorkRequestKt
+RemovedClass: androidx.work.PeriodicWorkRequestKt:
+ Removed class androidx.work.PeriodicWorkRequestKt
diff --git a/work/work-runtime-ktx/api/restricted_current.txt b/work/work-runtime-ktx/api/restricted_current.txt
index 8535d65..efdea4c 100644
--- a/work/work-runtime-ktx/api/restricted_current.txt
+++ b/work/work-runtime-ktx/api/restricted_current.txt
@@ -3,13 +3,13 @@
public abstract class CoroutineWorker extends androidx.work.ListenableWorker {
ctor public CoroutineWorker(android.content.Context appContext, androidx.work.WorkerParameters params);
- method public abstract suspend Object? doWork(kotlin.coroutines.Continuation<? super androidx.work.ListenableWorker.Result> p);
+ method public abstract suspend Object? doWork(kotlin.coroutines.Continuation<? super androidx.work.ListenableWorker.Result>);
method @Deprecated public kotlinx.coroutines.CoroutineDispatcher getCoroutineContext();
- method public suspend Object? getForegroundInfo(kotlin.coroutines.Continuation<? super androidx.work.ForegroundInfo> p);
+ method public suspend Object? getForegroundInfo(kotlin.coroutines.Continuation<? super androidx.work.ForegroundInfo>);
method public final com.google.common.util.concurrent.ListenableFuture<androidx.work.ForegroundInfo> getForegroundInfoAsync();
method public final void onStopped();
- method public final suspend Object? setForeground(androidx.work.ForegroundInfo foregroundInfo, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
- method public final suspend Object? setProgress(androidx.work.Data data, kotlin.coroutines.Continuation<? super kotlin.Unit> p);
+ method public final suspend Object? setForeground(androidx.work.ForegroundInfo foregroundInfo, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public final suspend Object? setProgress(androidx.work.Data data, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public final com.google.common.util.concurrent.ListenableFuture<androidx.work.ListenableWorker.Result> startWork();
property @Deprecated public kotlinx.coroutines.CoroutineDispatcher coroutineContext;
}
@@ -22,20 +22,8 @@
public final class ListenableFutureKt {
}
- public final class OneTimeWorkRequestKt {
- method public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.OneTimeWorkRequest.Builder! OneTimeWorkRequestBuilder();
- method public static inline androidx.work.OneTimeWorkRequest.Builder setInputMerger(androidx.work.OneTimeWorkRequest.Builder, kotlin.reflect.KClass<? extends androidx.work.InputMerger> inputMerger);
- }
-
public final class OperationKt {
- method public static suspend inline Object? await(androidx.work.Operation, kotlin.coroutines.Continuation<? super androidx.work.Operation.State.SUCCESS> p);
- }
-
- public final class PeriodicWorkRequestKt {
- method public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(long repeatInterval, java.util.concurrent.TimeUnit repeatIntervalTimeUnit);
- method @RequiresApi(26) public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(java.time.Duration repeatInterval);
- method public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(long repeatInterval, java.util.concurrent.TimeUnit repeatIntervalTimeUnit, long flexTimeInterval, java.util.concurrent.TimeUnit flexTimeIntervalUnit);
- method @RequiresApi(26) public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(java.time.Duration repeatInterval, java.time.Duration flexTimeInterval);
+ method public static suspend inline Object? await(androidx.work.Operation, kotlin.coroutines.Continuation<? super androidx.work.Operation.State.SUCCESS>);
}
}
diff --git a/work/work-runtime-ktx/src/main/java/androidx/work/OneTimeWorkRequest.kt b/work/work-runtime-ktx/src/main/java/androidx/work/OneTimeWorkRequest.kt
deleted file mode 100644
index 60a4d98..0000000
--- a/work/work-runtime-ktx/src/main/java/androidx/work/OneTimeWorkRequest.kt
+++ /dev/null
@@ -1,36 +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.
- */
-
-// Always inline ktx extension methods unless we have additional call site costs.
-@file:Suppress("NOTHING_TO_INLINE")
-
-package androidx.work
-
-import androidx.annotation.NonNull
-import kotlin.reflect.KClass
-
-/**
- * Creates a [OneTimeWorkRequest] with the given [ListenableWorker].
- */
-public inline fun <reified W : ListenableWorker> OneTimeWorkRequestBuilder():
- OneTimeWorkRequest.Builder = OneTimeWorkRequest.Builder(W::class.java)
-
-/**
- * Sets an [InputMerger] on the [OneTimeWorkRequest.Builder].
- */
-public inline fun OneTimeWorkRequest.Builder.setInputMerger(
- @NonNull inputMerger: KClass<out InputMerger>
-): OneTimeWorkRequest.Builder = setInputMerger(inputMerger.java)
diff --git a/work/work-runtime-ktx/src/main/java/androidx/work/PeriodicWorkRequest.kt b/work/work-runtime-ktx/src/main/java/androidx/work/PeriodicWorkRequest.kt
deleted file mode 100644
index a057043..0000000
--- a/work/work-runtime-ktx/src/main/java/androidx/work/PeriodicWorkRequest.kt
+++ /dev/null
@@ -1,84 +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
-
-import androidx.annotation.RequiresApi
-import java.time.Duration
-import java.util.concurrent.TimeUnit
-
-/**
- * Creates a [PeriodicWorkRequest.Builder] with a given [ListenableWorker].
- *
- * @param repeatInterval @see [androidx.work.PeriodicWorkRequest.Builder]
- * @param repeatIntervalTimeUnit @see [androidx.work.PeriodicWorkRequest.Builder]
- */
-public inline fun <reified W : ListenableWorker> PeriodicWorkRequestBuilder(
- repeatInterval: Long,
- repeatIntervalTimeUnit: TimeUnit
-): PeriodicWorkRequest.Builder {
- return PeriodicWorkRequest.Builder(W::class.java, repeatInterval, repeatIntervalTimeUnit)
-}
-
-/**
- * Creates a [PeriodicWorkRequest.Builder] with a given [ListenableWorker].
- *
- * @param repeatInterval @see [androidx.work.PeriodicWorkRequest.Builder]
- */
-@RequiresApi(26)
-public inline fun <reified W : ListenableWorker> PeriodicWorkRequestBuilder(
- repeatInterval: Duration
-): PeriodicWorkRequest.Builder {
- return PeriodicWorkRequest.Builder(W::class.java, repeatInterval)
-}
-
-/**
- * Creates a [PeriodicWorkRequest.Builder] with a given [ListenableWorker].
- *
- * @param repeatInterval @see [androidx.work.PeriodicWorkRequest.Builder]
- * @param repeatIntervalTimeUnit @see [androidx.work.PeriodicWorkRequest.Builder]
- * @param flexTimeInterval @see [androidx.work.PeriodicWorkRequest.Builder]
- * @param flexTimeIntervalUnit @see [androidx.work.PeriodicWorkRequest.Builder]
- */
-public inline fun <reified W : ListenableWorker> PeriodicWorkRequestBuilder(
- repeatInterval: Long,
- repeatIntervalTimeUnit: TimeUnit,
- flexTimeInterval: Long,
- flexTimeIntervalUnit: TimeUnit
-): PeriodicWorkRequest.Builder {
-
- return PeriodicWorkRequest.Builder(
- W::class.java,
- repeatInterval,
- repeatIntervalTimeUnit,
- flexTimeInterval,
- flexTimeIntervalUnit
- )
-}
-
-/**
- * Creates a [PeriodicWorkRequest.Builder] with a given [ListenableWorker].
- *
- * @param repeatInterval @see [androidx.work.PeriodicWorkRequest.Builder]
- * @param flexTimeInterval @see [androidx.work.PeriodicWorkRequest.Builder]
- */
-@RequiresApi(26)
-public inline fun <reified W : ListenableWorker> PeriodicWorkRequestBuilder(
- repeatInterval: Duration,
- flexTimeInterval: Duration
-): PeriodicWorkRequest.Builder {
- return PeriodicWorkRequest.Builder(W::class.java, repeatInterval, flexTimeInterval)
-}
diff --git a/work/work-runtime/api/api_lint.ignore b/work/work-runtime/api/api_lint.ignore
index 655f26b..f3c1cac 100644
--- a/work/work-runtime/api/api_lint.ignore
+++ b/work/work-runtime/api/api_lint.ignore
@@ -126,6 +126,16 @@
MissingGetterMatchingBuilder: androidx.work.WorkRequest.Builder#setInputData(androidx.work.Data):
W does not declare a `getInputData()` method matching method androidx.work.WorkRequest.Builder.setInputData(androidx.work.Data)
+MissingNullability: androidx.work.OneTimeWorkRequestKt#OneTimeWorkRequestBuilder():
+ Missing nullability on method `OneTimeWorkRequestBuilder` return
+MissingNullability: androidx.work.PeriodicWorkRequestKt#PeriodicWorkRequestBuilder(java.time.Duration):
+ Missing nullability on method `PeriodicWorkRequestBuilder` return
+MissingNullability: androidx.work.PeriodicWorkRequestKt#PeriodicWorkRequestBuilder(java.time.Duration, java.time.Duration):
+ Missing nullability on method `PeriodicWorkRequestBuilder` return
+MissingNullability: androidx.work.PeriodicWorkRequestKt#PeriodicWorkRequestBuilder(long, java.util.concurrent.TimeUnit):
+ Missing nullability on method `PeriodicWorkRequestBuilder` return
+MissingNullability: androidx.work.PeriodicWorkRequestKt#PeriodicWorkRequestBuilder(long, java.util.concurrent.TimeUnit, long, java.util.concurrent.TimeUnit):
+ Missing nullability on method `PeriodicWorkRequestBuilder` return
NoByteOrShort: androidx.work.Data#getByte(String, byte):
Should avoid odd sized primitives; use `int` instead of `byte` in method androidx.work.Data.getByte(String,byte)
@@ -139,5 +149,23 @@
Return type of method androidx.work.Data.getStringArray(String) is a nullable collection (`java.lang.String[]`); must be non-null
+SetterReturnsThis: androidx.work.WorkRequest.Builder#addTag(String):
+ Methods must return the builder object (return type androidx.work.WorkRequest.Builder<B,W> instead of B): method androidx.work.WorkRequest.Builder.addTag(String)
+SetterReturnsThis: androidx.work.WorkRequest.Builder#setBackoffCriteria(androidx.work.BackoffPolicy, java.time.Duration):
+ Methods must return the builder object (return type androidx.work.WorkRequest.Builder<B,W> instead of B): method androidx.work.WorkRequest.Builder.setBackoffCriteria(androidx.work.BackoffPolicy,java.time.Duration)
+SetterReturnsThis: androidx.work.WorkRequest.Builder#setBackoffCriteria(androidx.work.BackoffPolicy, long, java.util.concurrent.TimeUnit):
+ Methods must return the builder object (return type androidx.work.WorkRequest.Builder<B,W> instead of B): method androidx.work.WorkRequest.Builder.setBackoffCriteria(androidx.work.BackoffPolicy,long,java.util.concurrent.TimeUnit)
+SetterReturnsThis: androidx.work.WorkRequest.Builder#setConstraints(androidx.work.Constraints):
+ Methods must return the builder object (return type androidx.work.WorkRequest.Builder<B,W> instead of B): method androidx.work.WorkRequest.Builder.setConstraints(androidx.work.Constraints)
+SetterReturnsThis: androidx.work.WorkRequest.Builder#setExpedited(androidx.work.OutOfQuotaPolicy):
+ Methods must return the builder object (return type androidx.work.WorkRequest.Builder<B,W> instead of B): method androidx.work.WorkRequest.Builder.setExpedited(androidx.work.OutOfQuotaPolicy)
+SetterReturnsThis: androidx.work.WorkRequest.Builder#setInitialDelay(java.time.Duration):
+ Methods must return the builder object (return type androidx.work.WorkRequest.Builder<B,W> instead of B): method androidx.work.WorkRequest.Builder.setInitialDelay(java.time.Duration)
+SetterReturnsThis: androidx.work.WorkRequest.Builder#setInitialDelay(long, java.util.concurrent.TimeUnit):
+ Methods must return the builder object (return type androidx.work.WorkRequest.Builder<B,W> instead of B): method androidx.work.WorkRequest.Builder.setInitialDelay(long,java.util.concurrent.TimeUnit)
+SetterReturnsThis: androidx.work.WorkRequest.Builder#setInputData(androidx.work.Data):
+ Methods must return the builder object (return type androidx.work.WorkRequest.Builder<B,W> instead of B): method androidx.work.WorkRequest.Builder.setInputData(androidx.work.Data)
+
+
StaticFinalBuilder: androidx.work.WorkRequest.Builder:
Builder must be final: androidx.work.WorkRequest.Builder
diff --git a/work/work-runtime/api/current.ignore b/work/work-runtime/api/current.ignore
index d568462..759c5da 100644
--- a/work/work-runtime/api/current.ignore
+++ b/work/work-runtime/api/current.ignore
@@ -1,3 +1,27 @@
// Baseline format: 1.0
AddedAbstractMethod: androidx.work.WorkManager#getConfiguration():
Added method androidx.work.WorkManager.getConfiguration()
+
+
+ChangedType: androidx.work.OneTimeWorkRequest#from(java.util.List<? extends java.lang.Class<? extends androidx.work.ListenableWorker>>):
+ Method androidx.work.OneTimeWorkRequest.from has changed return type from java.util.List<androidx.work.OneTimeWorkRequest!> to java.util.List<androidx.work.OneTimeWorkRequest>
+ChangedType: androidx.work.WorkRequest.Builder#addTag(String):
+ Method androidx.work.WorkRequest.Builder.addTag has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
+ChangedType: androidx.work.WorkRequest.Builder#keepResultsForAtLeast(java.time.Duration):
+ Method androidx.work.WorkRequest.Builder.keepResultsForAtLeast has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
+ChangedType: androidx.work.WorkRequest.Builder#keepResultsForAtLeast(long, java.util.concurrent.TimeUnit):
+ Method androidx.work.WorkRequest.Builder.keepResultsForAtLeast has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
+ChangedType: androidx.work.WorkRequest.Builder#setBackoffCriteria(androidx.work.BackoffPolicy, java.time.Duration):
+ Method androidx.work.WorkRequest.Builder.setBackoffCriteria has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
+ChangedType: androidx.work.WorkRequest.Builder#setBackoffCriteria(androidx.work.BackoffPolicy, long, java.util.concurrent.TimeUnit):
+ Method androidx.work.WorkRequest.Builder.setBackoffCriteria has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
+ChangedType: androidx.work.WorkRequest.Builder#setConstraints(androidx.work.Constraints):
+ Method androidx.work.WorkRequest.Builder.setConstraints has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
+ChangedType: androidx.work.WorkRequest.Builder#setExpedited(androidx.work.OutOfQuotaPolicy):
+ Method androidx.work.WorkRequest.Builder.setExpedited has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
+ChangedType: androidx.work.WorkRequest.Builder#setInitialDelay(java.time.Duration):
+ Method androidx.work.WorkRequest.Builder.setInitialDelay has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
+ChangedType: androidx.work.WorkRequest.Builder#setInitialDelay(long, java.util.concurrent.TimeUnit):
+ Method androidx.work.WorkRequest.Builder.setInitialDelay has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
+ChangedType: androidx.work.WorkRequest.Builder#setInputData(androidx.work.Data):
+ Method androidx.work.WorkRequest.Builder.setInputData has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
diff --git a/work/work-runtime/api/current.txt b/work/work-runtime/api/current.txt
index 6df5943..3d3cc10 100644
--- a/work/work-runtime/api/current.txt
+++ b/work/work-runtime/api/current.txt
@@ -208,13 +208,24 @@
}
public final class OneTimeWorkRequest extends androidx.work.WorkRequest {
- method public static androidx.work.OneTimeWorkRequest from(Class<? extends androidx.work.ListenableWorker>);
- method public static java.util.List<androidx.work.OneTimeWorkRequest!> from(java.util.List<java.lang.Class<? extends androidx.work.ListenableWorker>!>);
+ method public static androidx.work.OneTimeWorkRequest from(Class<? extends androidx.work.ListenableWorker> workerClass);
+ method public static java.util.List<androidx.work.OneTimeWorkRequest> from(java.util.List<? extends java.lang.Class<? extends androidx.work.ListenableWorker>> workerClasses);
+ field public static final androidx.work.OneTimeWorkRequest.Companion Companion;
}
public static final class OneTimeWorkRequest.Builder extends androidx.work.WorkRequest.Builder<androidx.work.OneTimeWorkRequest.Builder,androidx.work.OneTimeWorkRequest> {
- ctor public OneTimeWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker>);
- method public androidx.work.OneTimeWorkRequest.Builder setInputMerger(Class<? extends androidx.work.InputMerger>);
+ ctor public OneTimeWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker> workerClass);
+ method public androidx.work.OneTimeWorkRequest.Builder setInputMerger(Class<? extends androidx.work.InputMerger> inputMerger);
+ }
+
+ public static final class OneTimeWorkRequest.Companion {
+ method public androidx.work.OneTimeWorkRequest from(Class<? extends androidx.work.ListenableWorker> workerClass);
+ method public java.util.List<androidx.work.OneTimeWorkRequest> from(java.util.List<? extends java.lang.Class<? extends androidx.work.ListenableWorker>> workerClasses);
+ }
+
+ public final class OneTimeWorkRequestKt {
+ method public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.OneTimeWorkRequest.Builder! OneTimeWorkRequestBuilder();
+ method public static inline androidx.work.OneTimeWorkRequest.Builder setInputMerger(androidx.work.OneTimeWorkRequest.Builder, kotlin.reflect.KClass<? extends androidx.work.InputMerger> inputMerger);
}
public interface Operation {
@@ -247,15 +258,26 @@
}
public final class PeriodicWorkRequest extends androidx.work.WorkRequest {
+ field public static final androidx.work.PeriodicWorkRequest.Companion Companion;
field public static final long MIN_PERIODIC_FLEX_MILLIS = 300000L; // 0x493e0L
field public static final long MIN_PERIODIC_INTERVAL_MILLIS = 900000L; // 0xdbba0L
}
public static final class PeriodicWorkRequest.Builder extends androidx.work.WorkRequest.Builder<androidx.work.PeriodicWorkRequest.Builder,androidx.work.PeriodicWorkRequest> {
- ctor public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker>, long, java.util.concurrent.TimeUnit);
- ctor @RequiresApi(26) public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker>, java.time.Duration);
- ctor public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker>, long, java.util.concurrent.TimeUnit, long, java.util.concurrent.TimeUnit);
- ctor @RequiresApi(26) public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker>, java.time.Duration, java.time.Duration);
+ ctor public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker> workerClass, long repeatInterval, java.util.concurrent.TimeUnit repeatIntervalTimeUnit);
+ ctor @RequiresApi(26) public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker> workerClass, java.time.Duration repeatInterval);
+ ctor public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker> workerClass, long repeatInterval, java.util.concurrent.TimeUnit repeatIntervalTimeUnit, long flexInterval, java.util.concurrent.TimeUnit flexIntervalTimeUnit);
+ ctor @RequiresApi(26) public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker> workerClass, java.time.Duration repeatInterval, java.time.Duration flexInterval);
+ }
+
+ public static final class PeriodicWorkRequest.Companion {
+ }
+
+ public final class PeriodicWorkRequestKt {
+ method public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(long repeatInterval, java.util.concurrent.TimeUnit repeatIntervalTimeUnit);
+ method @RequiresApi(26) public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(java.time.Duration repeatInterval);
+ method public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(long repeatInterval, java.util.concurrent.TimeUnit repeatIntervalTimeUnit, long flexTimeInterval, java.util.concurrent.TimeUnit flexTimeIntervalUnit);
+ method @RequiresApi(26) public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(java.time.Duration repeatInterval, java.time.Duration flexTimeInterval);
}
public interface ProgressUpdater {
@@ -364,23 +386,28 @@
public abstract class WorkRequest {
method public java.util.UUID getId();
+ property public java.util.UUID id;
+ field public static final androidx.work.WorkRequest.Companion Companion;
field public static final long DEFAULT_BACKOFF_DELAY_MILLIS = 30000L; // 0x7530L
field public static final long MAX_BACKOFF_MILLIS = 18000000L; // 0x112a880L
field public static final long MIN_BACKOFF_MILLIS = 10000L; // 0x2710L
}
- public abstract static class WorkRequest.Builder<B extends androidx.work.WorkRequest.Builder<?, ?>, W extends androidx.work.WorkRequest> {
- method public final B addTag(String);
+ public abstract static class WorkRequest.Builder<B extends androidx.work.WorkRequest.Builder<B, ?>, W extends androidx.work.WorkRequest> {
+ method public final B addTag(String tag);
method public final W build();
- method public final B keepResultsForAtLeast(long, java.util.concurrent.TimeUnit);
- method @RequiresApi(26) public final B keepResultsForAtLeast(java.time.Duration);
- method public final B setBackoffCriteria(androidx.work.BackoffPolicy, long, java.util.concurrent.TimeUnit);
- method @RequiresApi(26) public final B setBackoffCriteria(androidx.work.BackoffPolicy, java.time.Duration);
- method public final B setConstraints(androidx.work.Constraints);
- method public B setExpedited(androidx.work.OutOfQuotaPolicy);
- method public B setInitialDelay(long, java.util.concurrent.TimeUnit);
- method @RequiresApi(26) public B setInitialDelay(java.time.Duration);
- method public final B setInputData(androidx.work.Data);
+ method public final B keepResultsForAtLeast(long duration, java.util.concurrent.TimeUnit timeUnit);
+ method @RequiresApi(26) public final B keepResultsForAtLeast(java.time.Duration duration);
+ method public final B setBackoffCriteria(androidx.work.BackoffPolicy backoffPolicy, long backoffDelay, java.util.concurrent.TimeUnit timeUnit);
+ method @RequiresApi(26) public final B setBackoffCriteria(androidx.work.BackoffPolicy backoffPolicy, java.time.Duration duration);
+ method public final B setConstraints(androidx.work.Constraints constraints);
+ method public B setExpedited(androidx.work.OutOfQuotaPolicy policy);
+ method public B setInitialDelay(long duration, java.util.concurrent.TimeUnit timeUnit);
+ method @RequiresApi(26) public B setInitialDelay(java.time.Duration duration);
+ method public final B setInputData(androidx.work.Data inputData);
+ }
+
+ public static final class WorkRequest.Companion {
}
public abstract class Worker extends androidx.work.ListenableWorker {
diff --git a/work/work-runtime/api/public_plus_experimental_current.txt b/work/work-runtime/api/public_plus_experimental_current.txt
index 6df5943..3d3cc10 100644
--- a/work/work-runtime/api/public_plus_experimental_current.txt
+++ b/work/work-runtime/api/public_plus_experimental_current.txt
@@ -208,13 +208,24 @@
}
public final class OneTimeWorkRequest extends androidx.work.WorkRequest {
- method public static androidx.work.OneTimeWorkRequest from(Class<? extends androidx.work.ListenableWorker>);
- method public static java.util.List<androidx.work.OneTimeWorkRequest!> from(java.util.List<java.lang.Class<? extends androidx.work.ListenableWorker>!>);
+ method public static androidx.work.OneTimeWorkRequest from(Class<? extends androidx.work.ListenableWorker> workerClass);
+ method public static java.util.List<androidx.work.OneTimeWorkRequest> from(java.util.List<? extends java.lang.Class<? extends androidx.work.ListenableWorker>> workerClasses);
+ field public static final androidx.work.OneTimeWorkRequest.Companion Companion;
}
public static final class OneTimeWorkRequest.Builder extends androidx.work.WorkRequest.Builder<androidx.work.OneTimeWorkRequest.Builder,androidx.work.OneTimeWorkRequest> {
- ctor public OneTimeWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker>);
- method public androidx.work.OneTimeWorkRequest.Builder setInputMerger(Class<? extends androidx.work.InputMerger>);
+ ctor public OneTimeWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker> workerClass);
+ method public androidx.work.OneTimeWorkRequest.Builder setInputMerger(Class<? extends androidx.work.InputMerger> inputMerger);
+ }
+
+ public static final class OneTimeWorkRequest.Companion {
+ method public androidx.work.OneTimeWorkRequest from(Class<? extends androidx.work.ListenableWorker> workerClass);
+ method public java.util.List<androidx.work.OneTimeWorkRequest> from(java.util.List<? extends java.lang.Class<? extends androidx.work.ListenableWorker>> workerClasses);
+ }
+
+ public final class OneTimeWorkRequestKt {
+ method public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.OneTimeWorkRequest.Builder! OneTimeWorkRequestBuilder();
+ method public static inline androidx.work.OneTimeWorkRequest.Builder setInputMerger(androidx.work.OneTimeWorkRequest.Builder, kotlin.reflect.KClass<? extends androidx.work.InputMerger> inputMerger);
}
public interface Operation {
@@ -247,15 +258,26 @@
}
public final class PeriodicWorkRequest extends androidx.work.WorkRequest {
+ field public static final androidx.work.PeriodicWorkRequest.Companion Companion;
field public static final long MIN_PERIODIC_FLEX_MILLIS = 300000L; // 0x493e0L
field public static final long MIN_PERIODIC_INTERVAL_MILLIS = 900000L; // 0xdbba0L
}
public static final class PeriodicWorkRequest.Builder extends androidx.work.WorkRequest.Builder<androidx.work.PeriodicWorkRequest.Builder,androidx.work.PeriodicWorkRequest> {
- ctor public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker>, long, java.util.concurrent.TimeUnit);
- ctor @RequiresApi(26) public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker>, java.time.Duration);
- ctor public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker>, long, java.util.concurrent.TimeUnit, long, java.util.concurrent.TimeUnit);
- ctor @RequiresApi(26) public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker>, java.time.Duration, java.time.Duration);
+ ctor public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker> workerClass, long repeatInterval, java.util.concurrent.TimeUnit repeatIntervalTimeUnit);
+ ctor @RequiresApi(26) public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker> workerClass, java.time.Duration repeatInterval);
+ ctor public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker> workerClass, long repeatInterval, java.util.concurrent.TimeUnit repeatIntervalTimeUnit, long flexInterval, java.util.concurrent.TimeUnit flexIntervalTimeUnit);
+ ctor @RequiresApi(26) public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker> workerClass, java.time.Duration repeatInterval, java.time.Duration flexInterval);
+ }
+
+ public static final class PeriodicWorkRequest.Companion {
+ }
+
+ public final class PeriodicWorkRequestKt {
+ method public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(long repeatInterval, java.util.concurrent.TimeUnit repeatIntervalTimeUnit);
+ method @RequiresApi(26) public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(java.time.Duration repeatInterval);
+ method public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(long repeatInterval, java.util.concurrent.TimeUnit repeatIntervalTimeUnit, long flexTimeInterval, java.util.concurrent.TimeUnit flexTimeIntervalUnit);
+ method @RequiresApi(26) public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(java.time.Duration repeatInterval, java.time.Duration flexTimeInterval);
}
public interface ProgressUpdater {
@@ -364,23 +386,28 @@
public abstract class WorkRequest {
method public java.util.UUID getId();
+ property public java.util.UUID id;
+ field public static final androidx.work.WorkRequest.Companion Companion;
field public static final long DEFAULT_BACKOFF_DELAY_MILLIS = 30000L; // 0x7530L
field public static final long MAX_BACKOFF_MILLIS = 18000000L; // 0x112a880L
field public static final long MIN_BACKOFF_MILLIS = 10000L; // 0x2710L
}
- public abstract static class WorkRequest.Builder<B extends androidx.work.WorkRequest.Builder<?, ?>, W extends androidx.work.WorkRequest> {
- method public final B addTag(String);
+ public abstract static class WorkRequest.Builder<B extends androidx.work.WorkRequest.Builder<B, ?>, W extends androidx.work.WorkRequest> {
+ method public final B addTag(String tag);
method public final W build();
- method public final B keepResultsForAtLeast(long, java.util.concurrent.TimeUnit);
- method @RequiresApi(26) public final B keepResultsForAtLeast(java.time.Duration);
- method public final B setBackoffCriteria(androidx.work.BackoffPolicy, long, java.util.concurrent.TimeUnit);
- method @RequiresApi(26) public final B setBackoffCriteria(androidx.work.BackoffPolicy, java.time.Duration);
- method public final B setConstraints(androidx.work.Constraints);
- method public B setExpedited(androidx.work.OutOfQuotaPolicy);
- method public B setInitialDelay(long, java.util.concurrent.TimeUnit);
- method @RequiresApi(26) public B setInitialDelay(java.time.Duration);
- method public final B setInputData(androidx.work.Data);
+ method public final B keepResultsForAtLeast(long duration, java.util.concurrent.TimeUnit timeUnit);
+ method @RequiresApi(26) public final B keepResultsForAtLeast(java.time.Duration duration);
+ method public final B setBackoffCriteria(androidx.work.BackoffPolicy backoffPolicy, long backoffDelay, java.util.concurrent.TimeUnit timeUnit);
+ method @RequiresApi(26) public final B setBackoffCriteria(androidx.work.BackoffPolicy backoffPolicy, java.time.Duration duration);
+ method public final B setConstraints(androidx.work.Constraints constraints);
+ method public B setExpedited(androidx.work.OutOfQuotaPolicy policy);
+ method public B setInitialDelay(long duration, java.util.concurrent.TimeUnit timeUnit);
+ method @RequiresApi(26) public B setInitialDelay(java.time.Duration duration);
+ method public final B setInputData(androidx.work.Data inputData);
+ }
+
+ public static final class WorkRequest.Companion {
}
public abstract class Worker extends androidx.work.ListenableWorker {
diff --git a/work/work-runtime/api/restricted_current.ignore b/work/work-runtime/api/restricted_current.ignore
index d568462..759c5da 100644
--- a/work/work-runtime/api/restricted_current.ignore
+++ b/work/work-runtime/api/restricted_current.ignore
@@ -1,3 +1,27 @@
// Baseline format: 1.0
AddedAbstractMethod: androidx.work.WorkManager#getConfiguration():
Added method androidx.work.WorkManager.getConfiguration()
+
+
+ChangedType: androidx.work.OneTimeWorkRequest#from(java.util.List<? extends java.lang.Class<? extends androidx.work.ListenableWorker>>):
+ Method androidx.work.OneTimeWorkRequest.from has changed return type from java.util.List<androidx.work.OneTimeWorkRequest!> to java.util.List<androidx.work.OneTimeWorkRequest>
+ChangedType: androidx.work.WorkRequest.Builder#addTag(String):
+ Method androidx.work.WorkRequest.Builder.addTag has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
+ChangedType: androidx.work.WorkRequest.Builder#keepResultsForAtLeast(java.time.Duration):
+ Method androidx.work.WorkRequest.Builder.keepResultsForAtLeast has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
+ChangedType: androidx.work.WorkRequest.Builder#keepResultsForAtLeast(long, java.util.concurrent.TimeUnit):
+ Method androidx.work.WorkRequest.Builder.keepResultsForAtLeast has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
+ChangedType: androidx.work.WorkRequest.Builder#setBackoffCriteria(androidx.work.BackoffPolicy, java.time.Duration):
+ Method androidx.work.WorkRequest.Builder.setBackoffCriteria has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
+ChangedType: androidx.work.WorkRequest.Builder#setBackoffCriteria(androidx.work.BackoffPolicy, long, java.util.concurrent.TimeUnit):
+ Method androidx.work.WorkRequest.Builder.setBackoffCriteria has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
+ChangedType: androidx.work.WorkRequest.Builder#setConstraints(androidx.work.Constraints):
+ Method androidx.work.WorkRequest.Builder.setConstraints has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
+ChangedType: androidx.work.WorkRequest.Builder#setExpedited(androidx.work.OutOfQuotaPolicy):
+ Method androidx.work.WorkRequest.Builder.setExpedited has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
+ChangedType: androidx.work.WorkRequest.Builder#setInitialDelay(java.time.Duration):
+ Method androidx.work.WorkRequest.Builder.setInitialDelay has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
+ChangedType: androidx.work.WorkRequest.Builder#setInitialDelay(long, java.util.concurrent.TimeUnit):
+ Method androidx.work.WorkRequest.Builder.setInitialDelay has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
+ChangedType: androidx.work.WorkRequest.Builder#setInputData(androidx.work.Data):
+ Method androidx.work.WorkRequest.Builder.setInputData has changed return type from B (extends androidx.work.WorkRequest.Builder<?, ?>) to B (extends androidx.work.WorkRequest.Builder<B, ?>)
diff --git a/work/work-runtime/api/restricted_current.txt b/work/work-runtime/api/restricted_current.txt
index 6df5943..3d3cc10 100644
--- a/work/work-runtime/api/restricted_current.txt
+++ b/work/work-runtime/api/restricted_current.txt
@@ -208,13 +208,24 @@
}
public final class OneTimeWorkRequest extends androidx.work.WorkRequest {
- method public static androidx.work.OneTimeWorkRequest from(Class<? extends androidx.work.ListenableWorker>);
- method public static java.util.List<androidx.work.OneTimeWorkRequest!> from(java.util.List<java.lang.Class<? extends androidx.work.ListenableWorker>!>);
+ method public static androidx.work.OneTimeWorkRequest from(Class<? extends androidx.work.ListenableWorker> workerClass);
+ method public static java.util.List<androidx.work.OneTimeWorkRequest> from(java.util.List<? extends java.lang.Class<? extends androidx.work.ListenableWorker>> workerClasses);
+ field public static final androidx.work.OneTimeWorkRequest.Companion Companion;
}
public static final class OneTimeWorkRequest.Builder extends androidx.work.WorkRequest.Builder<androidx.work.OneTimeWorkRequest.Builder,androidx.work.OneTimeWorkRequest> {
- ctor public OneTimeWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker>);
- method public androidx.work.OneTimeWorkRequest.Builder setInputMerger(Class<? extends androidx.work.InputMerger>);
+ ctor public OneTimeWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker> workerClass);
+ method public androidx.work.OneTimeWorkRequest.Builder setInputMerger(Class<? extends androidx.work.InputMerger> inputMerger);
+ }
+
+ public static final class OneTimeWorkRequest.Companion {
+ method public androidx.work.OneTimeWorkRequest from(Class<? extends androidx.work.ListenableWorker> workerClass);
+ method public java.util.List<androidx.work.OneTimeWorkRequest> from(java.util.List<? extends java.lang.Class<? extends androidx.work.ListenableWorker>> workerClasses);
+ }
+
+ public final class OneTimeWorkRequestKt {
+ method public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.OneTimeWorkRequest.Builder! OneTimeWorkRequestBuilder();
+ method public static inline androidx.work.OneTimeWorkRequest.Builder setInputMerger(androidx.work.OneTimeWorkRequest.Builder, kotlin.reflect.KClass<? extends androidx.work.InputMerger> inputMerger);
}
public interface Operation {
@@ -247,15 +258,26 @@
}
public final class PeriodicWorkRequest extends androidx.work.WorkRequest {
+ field public static final androidx.work.PeriodicWorkRequest.Companion Companion;
field public static final long MIN_PERIODIC_FLEX_MILLIS = 300000L; // 0x493e0L
field public static final long MIN_PERIODIC_INTERVAL_MILLIS = 900000L; // 0xdbba0L
}
public static final class PeriodicWorkRequest.Builder extends androidx.work.WorkRequest.Builder<androidx.work.PeriodicWorkRequest.Builder,androidx.work.PeriodicWorkRequest> {
- ctor public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker>, long, java.util.concurrent.TimeUnit);
- ctor @RequiresApi(26) public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker>, java.time.Duration);
- ctor public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker>, long, java.util.concurrent.TimeUnit, long, java.util.concurrent.TimeUnit);
- ctor @RequiresApi(26) public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker>, java.time.Duration, java.time.Duration);
+ ctor public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker> workerClass, long repeatInterval, java.util.concurrent.TimeUnit repeatIntervalTimeUnit);
+ ctor @RequiresApi(26) public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker> workerClass, java.time.Duration repeatInterval);
+ ctor public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker> workerClass, long repeatInterval, java.util.concurrent.TimeUnit repeatIntervalTimeUnit, long flexInterval, java.util.concurrent.TimeUnit flexIntervalTimeUnit);
+ ctor @RequiresApi(26) public PeriodicWorkRequest.Builder(Class<? extends androidx.work.ListenableWorker> workerClass, java.time.Duration repeatInterval, java.time.Duration flexInterval);
+ }
+
+ public static final class PeriodicWorkRequest.Companion {
+ }
+
+ public final class PeriodicWorkRequestKt {
+ method public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(long repeatInterval, java.util.concurrent.TimeUnit repeatIntervalTimeUnit);
+ method @RequiresApi(26) public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(java.time.Duration repeatInterval);
+ method public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(long repeatInterval, java.util.concurrent.TimeUnit repeatIntervalTimeUnit, long flexTimeInterval, java.util.concurrent.TimeUnit flexTimeIntervalUnit);
+ method @RequiresApi(26) public static inline <reified W extends androidx.work.ListenableWorker> androidx.work.PeriodicWorkRequest.Builder! PeriodicWorkRequestBuilder(java.time.Duration repeatInterval, java.time.Duration flexTimeInterval);
}
public interface ProgressUpdater {
@@ -364,23 +386,28 @@
public abstract class WorkRequest {
method public java.util.UUID getId();
+ property public java.util.UUID id;
+ field public static final androidx.work.WorkRequest.Companion Companion;
field public static final long DEFAULT_BACKOFF_DELAY_MILLIS = 30000L; // 0x7530L
field public static final long MAX_BACKOFF_MILLIS = 18000000L; // 0x112a880L
field public static final long MIN_BACKOFF_MILLIS = 10000L; // 0x2710L
}
- public abstract static class WorkRequest.Builder<B extends androidx.work.WorkRequest.Builder<?, ?>, W extends androidx.work.WorkRequest> {
- method public final B addTag(String);
+ public abstract static class WorkRequest.Builder<B extends androidx.work.WorkRequest.Builder<B, ?>, W extends androidx.work.WorkRequest> {
+ method public final B addTag(String tag);
method public final W build();
- method public final B keepResultsForAtLeast(long, java.util.concurrent.TimeUnit);
- method @RequiresApi(26) public final B keepResultsForAtLeast(java.time.Duration);
- method public final B setBackoffCriteria(androidx.work.BackoffPolicy, long, java.util.concurrent.TimeUnit);
- method @RequiresApi(26) public final B setBackoffCriteria(androidx.work.BackoffPolicy, java.time.Duration);
- method public final B setConstraints(androidx.work.Constraints);
- method public B setExpedited(androidx.work.OutOfQuotaPolicy);
- method public B setInitialDelay(long, java.util.concurrent.TimeUnit);
- method @RequiresApi(26) public B setInitialDelay(java.time.Duration);
- method public final B setInputData(androidx.work.Data);
+ method public final B keepResultsForAtLeast(long duration, java.util.concurrent.TimeUnit timeUnit);
+ method @RequiresApi(26) public final B keepResultsForAtLeast(java.time.Duration duration);
+ method public final B setBackoffCriteria(androidx.work.BackoffPolicy backoffPolicy, long backoffDelay, java.util.concurrent.TimeUnit timeUnit);
+ method @RequiresApi(26) public final B setBackoffCriteria(androidx.work.BackoffPolicy backoffPolicy, java.time.Duration duration);
+ method public final B setConstraints(androidx.work.Constraints constraints);
+ method public B setExpedited(androidx.work.OutOfQuotaPolicy policy);
+ method public B setInitialDelay(long duration, java.util.concurrent.TimeUnit timeUnit);
+ method @RequiresApi(26) public B setInitialDelay(java.time.Duration duration);
+ method public final B setInputData(androidx.work.Data inputData);
+ }
+
+ public static final class WorkRequest.Companion {
}
public abstract class Worker extends androidx.work.ListenableWorker {
diff --git a/work/work-runtime/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java b/work/work-runtime/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java
index 2edd07d..52cc8fe 100644
--- a/work/work-runtime/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java
+++ b/work/work-runtime/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java
@@ -29,6 +29,7 @@
import static androidx.work.WorkInfo.State.RUNNING;
import static androidx.work.WorkInfo.State.SUCCEEDED;
import static androidx.work.impl.model.WorkSpec.SCHEDULE_NOT_REQUESTED_YET;
+import static androidx.work.impl.workers.ConstraintTrackingWorkerKt.ARGUMENT_CLASS_NAME;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
@@ -104,6 +105,7 @@
import androidx.work.impl.utils.PreferenceUtils;
import androidx.work.impl.utils.taskexecutor.InstantWorkTaskExecutor;
import androidx.work.impl.workers.ConstraintTrackingWorker;
+import androidx.work.impl.workers.ConstraintTrackingWorkerKt;
import androidx.work.worker.InfiniteTestWorker;
import androidx.work.worker.StopAwareWorker;
import androidx.work.worker.TestWorker;
@@ -1793,7 +1795,7 @@
WorkSpec workSpec = mDatabase.workSpecDao().getWorkSpec(work.getStringId());
assertThat(workSpec.workerClassName, is(ConstraintTrackingWorker.class.getName()));
assertThat(workSpec.input.getString(
- ConstraintTrackingWorker.ARGUMENT_CLASS_NAME),
+ ConstraintTrackingWorkerKt.ARGUMENT_CLASS_NAME),
is(TestWorker.class.getName()));
}
@@ -1811,8 +1813,7 @@
WorkSpec workSpec = mDatabase.workSpecDao().getWorkSpec(work.getStringId());
assertThat(workSpec.workerClassName, is(ConstraintTrackingWorker.class.getName()));
- assertThat(workSpec.input.getString(
- ConstraintTrackingWorker.ARGUMENT_CLASS_NAME),
+ assertThat(workSpec.input.getString(ARGUMENT_CLASS_NAME),
is(TestWorker.class.getName()));
}
@@ -1822,7 +1823,7 @@
public void testEnqueueApi23To25_withConstraintTrackingWorker_expectsOriginalWorker()
throws ExecutionException, InterruptedException {
Data data = new Data.Builder()
- .put(ConstraintTrackingWorker.ARGUMENT_CLASS_NAME, TestWorker.class.getName())
+ .put(ARGUMENT_CLASS_NAME, TestWorker.class.getName())
.build();
OneTimeWorkRequest work = new OneTimeWorkRequest.Builder(ConstraintTrackingWorker.class)
@@ -1835,8 +1836,7 @@
WorkSpec workSpec = mDatabase.workSpecDao().getWorkSpec(work.getStringId());
assertThat(workSpec.workerClassName, is(ConstraintTrackingWorker.class.getName()));
- assertThat(workSpec.input.getString(
- ConstraintTrackingWorker.ARGUMENT_CLASS_NAME),
+ assertThat(workSpec.input.getString(ARGUMENT_CLASS_NAME),
is(TestWorker.class.getName()));
}
diff --git a/work/work-runtime/src/androidTest/java/androidx/work/impl/workers/ConstraintTrackingWorkerTest.java b/work/work-runtime/src/androidTest/java/androidx/work/impl/workers/ConstraintTrackingWorkerTest.java
index d1ed219..eeb8176 100644
--- a/work/work-runtime/src/androidTest/java/androidx/work/impl/workers/ConstraintTrackingWorkerTest.java
+++ b/work/work-runtime/src/androidTest/java/androidx/work/impl/workers/ConstraintTrackingWorkerTest.java
@@ -16,6 +16,8 @@
package androidx.work.impl.workers;
+import static androidx.work.impl.workers.ConstraintTrackingWorkerKt.ARGUMENT_CLASS_NAME;
+
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
@@ -318,7 +320,7 @@
.build();
Data input = new Data.Builder()
- .putString(ConstraintTrackingWorker.ARGUMENT_CLASS_NAME, delegateName)
+ .putString(ARGUMENT_CLASS_NAME, delegateName)
.putBoolean(TEST_ARGUMENT_NAME, true)
.build();
@@ -350,7 +352,6 @@
is(CoreMatchers.<ListenableWorker>instanceOf(ConstraintTrackingWorker.class)));
// mWorker is already a spy
mWorker = (ConstraintTrackingWorker) worker;
- when(mWorker.getWorkDatabase()).thenReturn(mDatabase);
}
private WorkerWrapper.Builder createWorkerWrapperBuilder() {
diff --git a/work/work-runtime/src/main/java/androidx/work/BackoffPolicy.java b/work/work-runtime/src/main/java/androidx/work/BackoffPolicy.java
deleted file mode 100644
index c721565..0000000
--- a/work/work-runtime/src/main/java/androidx/work/BackoffPolicy.java
+++ /dev/null
@@ -1,40 +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;
-
-import java.util.concurrent.TimeUnit;
-
-/**
- * An enumeration of backoff policies when retrying work. These policies are used when you have a
- * return {@link ListenableWorker.Result#retry()} from a worker to determine the correct backoff
- * time. Backoff policies are set in
- * {@link WorkRequest.Builder#setBackoffCriteria(BackoffPolicy, long, TimeUnit)} or one of its
- * variants.
- */
-
-public enum BackoffPolicy {
-
- /**
- * Used to indicate that {@link WorkManager} should increase the backoff time exponentially
- */
- EXPONENTIAL,
-
- /**
- * Used to indicate that {@link WorkManager} should increase the backoff time linearly
- */
- LINEAR
-}
diff --git a/work/work-runtime/src/main/java/androidx/work/BackoffPolicy.kt b/work/work-runtime/src/main/java/androidx/work/BackoffPolicy.kt
new file mode 100644
index 0000000..e0539b6
--- /dev/null
+++ b/work/work-runtime/src/main/java/androidx/work/BackoffPolicy.kt
@@ -0,0 +1,33 @@
+/*
+ * 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
+
+/**
+ * An enumeration of backoff policies when retrying work. These policies are used when you have a
+ * return [ListenableWorker.Result.retry] from a worker to determine the correct backoff time.
+ * Backoff policies are set in [WorkRequest.Builder.setBackoffCriteria] or one of its variants.
+ */
+enum class BackoffPolicy {
+ /**
+ * Used to indicate that [WorkManager] should increase the backoff time exponentially
+ */
+ EXPONENTIAL,
+
+ /**
+ * Used to indicate that [WorkManager] should increase the backoff time linearly
+ */
+ LINEAR
+}
\ No newline at end of file
diff --git a/work/work-runtime/src/main/java/androidx/work/ExistingPeriodicWorkPolicy.java b/work/work-runtime/src/main/java/androidx/work/ExistingPeriodicWorkPolicy.kt
similarity index 89%
rename from work/work-runtime/src/main/java/androidx/work/ExistingPeriodicWorkPolicy.java
rename to work/work-runtime/src/main/java/androidx/work/ExistingPeriodicWorkPolicy.kt
index 3fc33f9..d0bc5e3 100644
--- a/work/work-runtime/src/main/java/androidx/work/ExistingPeriodicWorkPolicy.java
+++ b/work/work-runtime/src/main/java/androidx/work/ExistingPeriodicWorkPolicy.kt
@@ -13,16 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-package androidx.work;
+package androidx.work
/**
* An enumeration of the conflict resolution policies available to unique
- * {@link PeriodicWorkRequest}s in case of a collision.
+ * [PeriodicWorkRequest]s in case of a collision.
*/
-
-public enum ExistingPeriodicWorkPolicy {
-
+enum class ExistingPeriodicWorkPolicy {
/**
* If there is existing pending (uncompleted) work with the same unique name, cancel and delete
* it. Then, insert the newly-specified work.
@@ -34,4 +31,4 @@
* Otherwise, insert the newly-specified work.
*/
KEEP
-}
+}
\ No newline at end of file
diff --git a/work/work-runtime/src/main/java/androidx/work/ExistingWorkPolicy.java b/work/work-runtime/src/main/java/androidx/work/ExistingWorkPolicy.kt
similarity index 73%
rename from work/work-runtime/src/main/java/androidx/work/ExistingWorkPolicy.java
rename to work/work-runtime/src/main/java/androidx/work/ExistingWorkPolicy.kt
index 5161c30..455c0d5 100644
--- a/work/work-runtime/src/main/java/androidx/work/ExistingWorkPolicy.java
+++ b/work/work-runtime/src/main/java/androidx/work/ExistingWorkPolicy.kt
@@ -13,19 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-package androidx.work;
+package androidx.work
/**
* An enumeration of the conflict resolution policies available to unique
- * {@link OneTimeWorkRequest}s in case of a collision.
+ * [OneTimeWorkRequest]s in case of a collision.
*/
-
-public enum ExistingWorkPolicy {
-
+enum class ExistingWorkPolicy {
/**
* If there is existing pending (uncompleted) work with the same unique name, cancel and delete
- * it. Then, insert the newly-specified work.
+ * it. Then, insert the newly-specified work.
*/
REPLACE,
@@ -39,10 +36,10 @@
* If there is existing pending (uncompleted) work with the same unique name, append the
* newly-specified work as a child of all the leaves of that work sequence. Otherwise, insert
* the newly-specified work as the start of a new sequence.
- * <br/>
- * <b>Note:</b> When using APPEND with failed or cancelled prerequisites, newly enqueued work
+ *
+ * **Note:** When using APPEND with failed or cancelled prerequisites, newly enqueued work
* will also be marked as failed or cancelled respectively. Use
- * {@link ExistingWorkPolicy#APPEND_OR_REPLACE} to create a new chain of work.
+ * [ExistingWorkPolicy.APPEND_OR_REPLACE] to create a new chain of work.
*/
APPEND,
@@ -50,9 +47,9 @@
* If there is existing pending (uncompleted) work with the same unique name, append the
* newly-specified work as the child of all the leaves of that work sequence. Otherwise, insert
* the newly-specified work as the start of a new sequence.
- * <br/>
- * <b>Note:</b> If there are failed or cancelled prerequisites, these prerequisites are
- * <i>dropped</i> and the newly-specified work is the start of a new sequence.
+ *
+ * **Note:** If there are failed or cancelled prerequisites, these prerequisites are
+ * *dropped* and the newly-specified work is the start of a new sequence.
*/
- APPEND_OR_REPLACE,
-}
+ APPEND_OR_REPLACE
+}
\ No newline at end of file
diff --git a/work/work-runtime/src/main/java/androidx/work/NetworkType.java b/work/work-runtime/src/main/java/androidx/work/NetworkType.kt
similarity index 83%
rename from work/work-runtime/src/main/java/androidx/work/NetworkType.java
rename to work/work-runtime/src/main/java/androidx/work/NetworkType.kt
index 06d7e3a..ac00245 100644
--- a/work/work-runtime/src/main/java/androidx/work/NetworkType.java
+++ b/work/work-runtime/src/main/java/androidx/work/NetworkType.kt
@@ -13,17 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+package androidx.work
-package androidx.work;
-
-import androidx.annotation.RequiresApi;
+import androidx.annotation.RequiresApi
/**
- * An enumeration of various network types that can be used as {@link Constraints} for work.
+ * An enumeration of various network types that can be used as [Constraints] for work.
*/
-
-public enum NetworkType {
-
+enum class NetworkType {
/**
* A network is not required for this work.
*/
@@ -54,9 +51,9 @@
* generally metered, but are currently unmetered.
*
* Note: This capability can be changed at any time. When it is removed,
- * {@link ListenableWorker}s are responsible for stopping any data transfer that should not
+ * [ListenableWorker]s are responsible for stopping any data transfer that should not
* occur on a metered network.
*/
@RequiresApi(30)
TEMPORARILY_UNMETERED
-}
+}
\ No newline at end of file
diff --git a/work/work-runtime/src/main/java/androidx/work/OneTimeWorkRequest.java b/work/work-runtime/src/main/java/androidx/work/OneTimeWorkRequest.java
deleted file mode 100644
index d33851e..0000000
--- a/work/work-runtime/src/main/java/androidx/work/OneTimeWorkRequest.java
+++ /dev/null
@@ -1,118 +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;
-
-import android.os.Build;
-
-import androidx.annotation.NonNull;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A {@link WorkRequest} for non-repeating work.
- * <p>
- * OneTimeWorkRequests can be put in simple or complex graphs of work by using methods like
- * {@link WorkManager#beginWith(OneTimeWorkRequest)} or {@link WorkManager#beginWith(List)}.
- */
-
-public final class OneTimeWorkRequest extends WorkRequest {
-
- /**
- * Creates a {@link OneTimeWorkRequest} with defaults from a {@link ListenableWorker} class
- * name.
- *
- * @param workerClass An {@link ListenableWorker} class name
- * @return A {@link OneTimeWorkRequest} constructed by using defaults in the {@link Builder}
- */
- public static @NonNull OneTimeWorkRequest from(
- @NonNull Class<? extends ListenableWorker> workerClass) {
- return new OneTimeWorkRequest.Builder(workerClass).build();
- }
-
- /**
- * Creates a list of {@link OneTimeWorkRequest}s with defaults from an array of
- * {@link ListenableWorker} class names.
- *
- * @param workerClasses A list of {@link ListenableWorker} class names
- * @return A list of {@link OneTimeWorkRequest} constructed by using defaults in the {@link
- * Builder}
- */
- public static @NonNull List<OneTimeWorkRequest> from(
- @NonNull List<Class<? extends ListenableWorker>> workerClasses) {
- List<OneTimeWorkRequest> workList = new ArrayList<>(workerClasses.size());
- for (Class<? extends ListenableWorker> workerClass : workerClasses) {
- workList.add(new OneTimeWorkRequest.Builder(workerClass).build());
- }
- return workList;
- }
-
- OneTimeWorkRequest(Builder builder) {
- super(builder.mId, builder.mWorkSpec, builder.mTags);
- }
-
- /**
- * Builder for {@link OneTimeWorkRequest}s.
- */
- public static final class Builder extends WorkRequest.Builder<Builder, OneTimeWorkRequest> {
-
- /**
- * Creates a {@link OneTimeWorkRequest}.
- *
- * @param workerClass The {@link ListenableWorker} class to run for this work
- */
- public Builder(@NonNull Class<? extends ListenableWorker> workerClass) {
- super(workerClass);
- mWorkSpec.inputMergerClassName = OverwritingInputMerger.class.getName();
- }
-
- /**
- * Specifies the {@link InputMerger} class name for this {@link OneTimeWorkRequest}.
- * <p>
- * Before workers run, they receive input {@link Data} from their parent workers, as well as
- * anything specified directly to them via {@link WorkRequest.Builder#setInputData(Data)}.
- * An InputMerger takes all of these objects and converts them to a single merged
- * {@link Data} to be used as the worker input. The default InputMerger is
- * {@link OverwritingInputMerger}. This library also offers
- * {@link ArrayCreatingInputMerger}; you can also specify your own.
- *
- * @param inputMerger The class name of the {@link InputMerger} for this
- * {@link OneTimeWorkRequest}
- * @return The current {@link Builder}
- */
- public @NonNull Builder setInputMerger(@NonNull Class<? extends InputMerger> inputMerger) {
- mWorkSpec.inputMergerClassName = inputMerger.getName();
- return this;
- }
-
- @Override
- @NonNull OneTimeWorkRequest buildInternal() {
- if (mBackoffCriteriaSet
- && Build.VERSION.SDK_INT >= 23
- && mWorkSpec.constraints.requiresDeviceIdle()) {
- throw new IllegalArgumentException(
- "Cannot set backoff criteria on an idle mode job");
- }
- return new OneTimeWorkRequest(this);
- }
-
- @Override
- @NonNull Builder getThis() {
- return this;
- }
- }
-}
diff --git a/work/work-runtime/src/main/java/androidx/work/OneTimeWorkRequest.kt b/work/work-runtime/src/main/java/androidx/work/OneTimeWorkRequest.kt
new file mode 100644
index 0000000..f8f696a
--- /dev/null
+++ b/work/work-runtime/src/main/java/androidx/work/OneTimeWorkRequest.kt
@@ -0,0 +1,112 @@
+/*
+ * 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
+
+import android.os.Build
+import androidx.annotation.NonNull
+import kotlin.reflect.KClass
+
+/**
+ * A [WorkRequest] for non-repeating work.
+ *
+ * OneTimeWorkRequests can be put in simple or complex graphs of work by using methods like
+ * [WorkManager.beginWith] or [WorkManager.beginWith].
+ */
+class OneTimeWorkRequest internal constructor(builder: Builder) :
+ WorkRequest(builder.id, builder.workSpec, builder.tags) {
+ /**
+ * Builder for [OneTimeWorkRequest]s.
+ *
+ * @param workerClass The [ListenableWorker] class to run for this work
+ */
+ class Builder(workerClass: Class<out ListenableWorker>) :
+ WorkRequest.Builder<Builder, OneTimeWorkRequest>(workerClass) {
+
+ init {
+ workSpec.inputMergerClassName = OverwritingInputMerger::class.java.name
+ }
+
+ /**
+ * Specifies the [InputMerger] class name for this [OneTimeWorkRequest].
+ *
+ * Before workers run, they receive input [Data] from their parent workers, as well as
+ * anything specified directly to them via [WorkRequest.Builder.setInputData].
+ * An InputMerger takes all of these objects and converts them to a single merged
+ * [Data] to be used as the worker input. The default InputMerger is
+ * [OverwritingInputMerger]. This library also offers
+ * [ArrayCreatingInputMerger]; you can also specify your own.
+ *
+ * @param inputMerger The class name of the [InputMerger] for this
+ * [OneTimeWorkRequest]
+ * @return The current [Builder]
+ */
+ fun setInputMerger(inputMerger: Class<out InputMerger>): Builder {
+ workSpec.inputMergerClassName = inputMerger.name
+ return this
+ }
+
+ override fun buildInternal(): OneTimeWorkRequest {
+ require(
+ !(backoffCriteriaSet && Build.VERSION.SDK_INT >= 23 &&
+ workSpec.constraints.requiresDeviceIdle())
+ ) { "Cannot set backoff criteria on an idle mode job" }
+ return OneTimeWorkRequest(this)
+ }
+
+ override val thisObject: Builder
+ get() = this
+ }
+
+ companion object {
+ /**
+ * Creates a [OneTimeWorkRequest] with defaults from a [ListenableWorker] class
+ * name.
+ *
+ * @param workerClass An [ListenableWorker] class name
+ * @return A [OneTimeWorkRequest] constructed by using defaults in the [Builder]
+ */
+ @JvmStatic
+ fun from(workerClass: Class<out ListenableWorker>): OneTimeWorkRequest {
+ return Builder(workerClass).build()
+ }
+
+ /**
+ * Creates a list of [OneTimeWorkRequest]s with defaults from an array of
+ * [ListenableWorker] class names.
+ *
+ * @param workerClasses A list of [ListenableWorker] class names
+ * @return A list of [OneTimeWorkRequest] constructed by using defaults in the [ ]
+ */
+ @JvmStatic
+ fun from(workerClasses: List<Class<out ListenableWorker>>): List<OneTimeWorkRequest> {
+ return workerClasses.map { Builder(it).build() }
+ }
+ }
+}
+
+/**
+ * Creates a [OneTimeWorkRequest] with the given [ListenableWorker].
+ */
+public inline fun <reified W : ListenableWorker> OneTimeWorkRequestBuilder():
+ OneTimeWorkRequest.Builder = OneTimeWorkRequest.Builder(W::class.java)
+
+/**
+ * Sets an [InputMerger] on the [OneTimeWorkRequest.Builder].
+ */
+@Suppress("NOTHING_TO_INLINE")
+public inline fun OneTimeWorkRequest.Builder.setInputMerger(
+ @NonNull inputMerger: KClass<out InputMerger>
+): OneTimeWorkRequest.Builder = setInputMerger(inputMerger.java)
diff --git a/work/work-runtime/src/main/java/androidx/work/OutOfQuotaPolicy.java b/work/work-runtime/src/main/java/androidx/work/OutOfQuotaPolicy.kt
similarity index 92%
rename from work/work-runtime/src/main/java/androidx/work/OutOfQuotaPolicy.java
rename to work/work-runtime/src/main/java/androidx/work/OutOfQuotaPolicy.kt
index aaa7b25..0d8747a 100644
--- a/work/work-runtime/src/main/java/androidx/work/OutOfQuotaPolicy.java
+++ b/work/work-runtime/src/main/java/androidx/work/OutOfQuotaPolicy.kt
@@ -13,14 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-package androidx.work;
+package androidx.work
/**
* An enumeration of policies that help determine out of quota behavior for expedited jobs.
*/
-public enum OutOfQuotaPolicy {
-
+enum class OutOfQuotaPolicy {
/**
* When the app does not have any expedited job quota, the expedited work request will
* fallback to a regular work request.
@@ -31,5 +29,5 @@
* When the app does not have any expedited job quota, the expedited work request will
* be dropped and no work requests are enqueued.
*/
- DROP_WORK_REQUEST;
-}
+ DROP_WORK_REQUEST
+}
\ No newline at end of file
diff --git a/work/work-runtime/src/main/java/androidx/work/PeriodicWorkRequest.java b/work/work-runtime/src/main/java/androidx/work/PeriodicWorkRequest.java
deleted file mode 100644
index 0d1a219..0000000
--- a/work/work-runtime/src/main/java/androidx/work/PeriodicWorkRequest.java
+++ /dev/null
@@ -1,207 +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;
-
-import static androidx.work.impl.utils.DurationApi26Impl.toMillisCompat;
-
-import android.annotation.SuppressLint;
-import android.os.Build;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.RequiresApi;
-
-import java.time.Duration;
-import java.util.concurrent.TimeUnit;
-
-/**
- * A {@link WorkRequest} for repeating work. This work executes multiple times until it is
- * cancelled, with the first execution happening immediately or as soon as the given
- * {@link Constraints} are met. The next execution will happen during the period interval; note
- * that execution may be delayed because {@link WorkManager} is subject to OS battery optimizations,
- * such as doze mode.
- * <p>
- * You can control when the work executes in the period interval more exactly - see
- * {@link PeriodicWorkRequest.Builder} for documentation on {@code flexInterval}s.
- * <p>
- * Periodic work has a minimum interval of 15 minutes.
- * <p>
- * Periodic work is intended for use cases where you want a fairly consistent delay between
- * consecutive runs, and you are willing to accept inexactness due to battery optimizations and doze
- * mode. Please note that if your periodic work has constraints, it will not execute until the
- * constraints are met, even if the delay between periods has been met.
- * <p>
- * If you need to schedule work that happens exactly at a certain time or only during a certain time
- * window, you should consider using {@link OneTimeWorkRequest}s.
- * <p>
- * The normal lifecycle of a PeriodicWorkRequest is {@code ENQUEUED -> RUNNING -> ENQUEUED}. By
- * definition, periodic work cannot terminate in a succeeded or failed state, since it must recur.
- * It can only terminate if explicitly cancelled. However, in the case of retries, periodic work
- * will still back off according to
- * {@link PeriodicWorkRequest.Builder#setBackoffCriteria(BackoffPolicy, long, TimeUnit)}.
- * <p>
- * Periodic work cannot be part of a chain or graph of work.
- */
-
-public final class PeriodicWorkRequest extends WorkRequest {
-
- /**
- * The minimum interval duration for {@link PeriodicWorkRequest} (in milliseconds).
- */
- @SuppressLint("MinMaxConstant")
- public static final long MIN_PERIODIC_INTERVAL_MILLIS = 15 * 60 * 1000L; // 15 minutes.
- /**
- * The minimum flex duration for {@link PeriodicWorkRequest} (in milliseconds).
- */
- @SuppressLint("MinMaxConstant")
- public static final long MIN_PERIODIC_FLEX_MILLIS = 5 * 60 * 1000L; // 5 minutes.
-
- PeriodicWorkRequest(Builder builder) {
- super(builder.mId, builder.mWorkSpec, builder.mTags);
- }
-
- /**
- * Builder for {@link PeriodicWorkRequest}s.
- */
- public static final class Builder extends WorkRequest.Builder<Builder, PeriodicWorkRequest> {
-
- /**
- * Creates a {@link PeriodicWorkRequest} to run periodically once every interval period. The
- * {@link PeriodicWorkRequest} is guaranteed to run exactly one time during this interval
- * (subject to OS battery optimizations, such as doze mode). The repeat interval must
- * be greater than or equal to {@link PeriodicWorkRequest#MIN_PERIODIC_INTERVAL_MILLIS}. It
- * may run immediately, at the end of the period, or any time in between so long as the
- * other conditions are satisfied at the time. The run time of the
- * {@link PeriodicWorkRequest} can be restricted to a flex period within an interval (see
- * {@code #Builder(Class, long, TimeUnit, long, TimeUnit)}).
- *
- * @param workerClass The {@link ListenableWorker} class to run for this work
- * @param repeatInterval The repeat interval in {@code repeatIntervalTimeUnit} units
- * @param repeatIntervalTimeUnit The {@link TimeUnit} for {@code repeatInterval}
- */
- public Builder(
- @NonNull Class<? extends ListenableWorker> workerClass,
- long repeatInterval,
- @NonNull TimeUnit repeatIntervalTimeUnit) {
- super(workerClass);
- mWorkSpec.setPeriodic(repeatIntervalTimeUnit.toMillis(repeatInterval));
- }
-
- /**
- * Creates a {@link PeriodicWorkRequest} to run periodically once every interval period. The
- * {@link PeriodicWorkRequest} is guaranteed to run exactly one time during this interval
- * (subject to OS battery optimizations, such as doze mode). The repeat interval must
- * be greater than or equal to {@link PeriodicWorkRequest#MIN_PERIODIC_INTERVAL_MILLIS}. It
- * may run immediately, at the end of the period, or any time in between so long as the
- * other conditions are satisfied at the time. The run time of the
- * {@link PeriodicWorkRequest} can be restricted to a flex period within an interval (see
- * {@code #Builder(Class, Duration, Duration)}).
- *
- * @param workerClass The {@link ListenableWorker} class to run for this work
- * @param repeatInterval The repeat interval
- */
- @RequiresApi(26)
- public Builder(
- @NonNull Class<? extends ListenableWorker> workerClass,
- @NonNull Duration repeatInterval) {
- super(workerClass);
- mWorkSpec.setPeriodic(toMillisCompat(repeatInterval));
- }
-
- /**
- * Creates a {@link PeriodicWorkRequest} to run periodically once within the
- * <strong>flex period</strong> of every interval period. See diagram below. The flex
- * period begins at {@code repeatInterval - flexInterval} to the end of the interval.
- * The repeat interval must be greater than or equal to
- * {@link PeriodicWorkRequest#MIN_PERIODIC_INTERVAL_MILLIS} and the flex interval must
- * be greater than or equal to {@link PeriodicWorkRequest#MIN_PERIODIC_FLEX_MILLIS}.
- *
- * <p><pre>
- * [ before flex | flex ][ before flex | flex ]...
- * [ cannot run work | can run work ][ cannot run work | can run work ]...
- * \____________________________________/\____________________________________/...
- * interval 1 interval 2 ...(repeat)
- * </pre></p>
- *
- * @param workerClass The {@link ListenableWorker} class to run for this work
- * @param repeatInterval The repeat interval in {@code repeatIntervalTimeUnit} units
- * @param repeatIntervalTimeUnit The {@link TimeUnit} for {@code repeatInterval}
- * @param flexInterval The duration in {@code flexIntervalTimeUnit} units for which this
- * work repeats from the end of the {@code repeatInterval}
- * @param flexIntervalTimeUnit The {@link TimeUnit} for {@code flexInterval}
- */
- public Builder(
- @NonNull Class<? extends ListenableWorker> workerClass,
- long repeatInterval,
- @NonNull TimeUnit repeatIntervalTimeUnit,
- long flexInterval,
- @NonNull TimeUnit flexIntervalTimeUnit) {
- super(workerClass);
- mWorkSpec.setPeriodic(
- repeatIntervalTimeUnit.toMillis(repeatInterval),
- flexIntervalTimeUnit.toMillis(flexInterval));
- }
-
- /**
- * Creates a {@link PeriodicWorkRequest} to run periodically once within the
- * <strong>flex period</strong> of every interval period. See diagram below. The flex
- * period begins at {@code repeatInterval - flexInterval} to the end of the interval.
- * The repeat interval must be greater than or equal to
- * {@link PeriodicWorkRequest#MIN_PERIODIC_INTERVAL_MILLIS} and the flex interval must
- * be greater than or equal to {@link PeriodicWorkRequest#MIN_PERIODIC_FLEX_MILLIS}.
- *
- * <p><pre>
- * [ before flex | flex ][ before flex | flex ]...
- * [ cannot run work | can run work ][ cannot run work | can run work ]...
- * \____________________________________/\____________________________________/...
- * interval 1 interval 2 ...(repeat)
- * </pre></p>
- *
- * @param workerClass The {@link ListenableWorker} class to run for this work
- * @param repeatInterval The repeat interval
- * @param flexInterval The duration in for which this work repeats from the end of the
- * {@code repeatInterval}
- */
- @RequiresApi(26)
- public Builder(
- @NonNull Class<? extends ListenableWorker> workerClass,
- @NonNull Duration repeatInterval,
- @NonNull Duration flexInterval) {
- super(workerClass);
- mWorkSpec.setPeriodic(toMillisCompat(repeatInterval),
- toMillisCompat(flexInterval));
- }
-
- @Override
- @NonNull PeriodicWorkRequest buildInternal() {
- if (mBackoffCriteriaSet
- && Build.VERSION.SDK_INT >= 23
- && mWorkSpec.constraints.requiresDeviceIdle()) {
- throw new IllegalArgumentException(
- "Cannot set backoff criteria on an idle mode job");
- }
- if (mWorkSpec.expedited) {
- throw new IllegalArgumentException(
- "PeriodicWorkRequests cannot be expedited");
- }
- return new PeriodicWorkRequest(this);
- }
-
- @Override
- @NonNull Builder getThis() {
- return this;
- }
- }
-}
diff --git a/work/work-runtime/src/main/java/androidx/work/PeriodicWorkRequest.kt b/work/work-runtime/src/main/java/androidx/work/PeriodicWorkRequest.kt
new file mode 100644
index 0000000..f007495
--- /dev/null
+++ b/work/work-runtime/src/main/java/androidx/work/PeriodicWorkRequest.kt
@@ -0,0 +1,254 @@
+/*
+ * 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
+
+import android.annotation.SuppressLint
+import android.os.Build
+import androidx.annotation.RequiresApi
+import androidx.work.impl.utils.toMillisCompat
+import java.time.Duration
+import java.util.concurrent.TimeUnit
+
+/**
+ * A [WorkRequest] for repeating work. This work executes multiple times until it is
+ * cancelled, with the first execution happening immediately or as soon as the given
+ * [Constraints] are met. The next execution will happen during the period interval; note
+ * that execution may be delayed because [WorkManager] is subject to OS battery optimizations,
+ * such as doze mode.
+ *
+ * You can control when the work executes in the period interval more exactly - see
+ * [PeriodicWorkRequest.Builder] for documentation on `flexInterval`s.
+ *
+ * Periodic work has a minimum interval of 15 minutes.
+ *
+ * Periodic work is intended for use cases where you want a fairly consistent delay between
+ * consecutive runs, and you are willing to accept inexactness due to battery optimizations and doze
+ * mode. Please note that if your periodic work has constraints, it will not execute until the
+ * constraints are met, even if the delay between periods has been met.
+ *
+ * If you need to schedule work that happens exactly at a certain time or only during a certain time
+ * window, you should consider using [OneTimeWorkRequest]s.
+ *
+ * The normal lifecycle of a PeriodicWorkRequest is `ENQUEUED -> RUNNING -> ENQUEUED`. By
+ * definition, periodic work cannot terminate in a succeeded or failed state, since it must recur.
+ * It can only terminate if explicitly cancelled. However, in the case of retries, periodic work
+ * will still back off according to [PeriodicWorkRequest.Builder.setBackoffCriteria].
+ *
+ * Periodic work cannot be part of a chain or graph of work.
+ */
+class PeriodicWorkRequest internal constructor(
+ builder: Builder
+) : WorkRequest(builder.id, builder.workSpec, builder.tags) {
+ /**
+ * Builder for [PeriodicWorkRequest]s.
+ */
+ class Builder : WorkRequest.Builder<Builder, PeriodicWorkRequest> {
+ /**
+ * Creates a [PeriodicWorkRequest] to run periodically once every interval period. The
+ * [PeriodicWorkRequest] is guaranteed to run exactly one time during this interval
+ * (subject to OS battery optimizations, such as doze mode). The repeat interval must
+ * be greater than or equal to [PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS]. It
+ * may run immediately, at the end of the period, or any time in between so long as the
+ * other conditions are satisfied at the time. The run time of the
+ * [PeriodicWorkRequest] can be restricted to a flex period within an interval (see
+ * `#Builder(Class, long, TimeUnit, long, TimeUnit)`).
+ *
+ * @param workerClass The [ListenableWorker] class to run for this work
+ * @param repeatInterval The repeat interval in `repeatIntervalTimeUnit` units
+ * @param repeatIntervalTimeUnit The [TimeUnit] for `repeatInterval`
+ */
+ constructor(
+ workerClass: Class<out ListenableWorker?>,
+ repeatInterval: Long,
+ repeatIntervalTimeUnit: TimeUnit
+ ) : super(workerClass) {
+ workSpec.setPeriodic(repeatIntervalTimeUnit.toMillis(repeatInterval))
+ }
+
+ /**
+ * Creates a [PeriodicWorkRequest] to run periodically once every interval period. The
+ * [PeriodicWorkRequest] is guaranteed to run exactly one time during this interval
+ * (subject to OS battery optimizations, such as doze mode). The repeat interval must
+ * be greater than or equal to [PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS]. It
+ * may run immediately, at the end of the period, or any time in between so long as the
+ * other conditions are satisfied at the time. The run time of the
+ * [PeriodicWorkRequest] can be restricted to a flex period within an interval (see
+ * `#Builder(Class, Duration, Duration)`).
+ *
+ * @param workerClass The [ListenableWorker] class to run for this work
+ * @param repeatInterval The repeat interval
+ */
+ @RequiresApi(26)
+ constructor(
+ workerClass: Class<out ListenableWorker>,
+ repeatInterval: Duration
+ ) : super(workerClass) {
+ workSpec.setPeriodic(repeatInterval.toMillisCompat())
+ }
+
+ /**
+ * Creates a [PeriodicWorkRequest] to run periodically once within the
+ * **flex period** of every interval period. See diagram below. The flex
+ * period begins at `repeatInterval - flexInterval` to the end of the interval.
+ * The repeat interval must be greater than or equal to
+ * [PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS] and the flex interval must
+ * be greater than or equal to [PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS].
+ * ```
+ * [_____before flex_____|_____flex_____][_____before flex_____|_____flex_____]...
+ * [___cannot run work___|_can run work_][___cannot run work___|_can run work_]...
+ * \____________________________________/\____________________________________/...
+ * interval 1 interval 2 ...(repeat)
+ * ```
+ *
+ * @param workerClass The [ListenableWorker] class to run for this work
+ * @param repeatInterval The repeat interval in `repeatIntervalTimeUnit` units
+ * @param repeatIntervalTimeUnit The [TimeUnit] for `repeatInterval`
+ * @param flexInterval The duration in `flexIntervalTimeUnit` units for which this
+ * work repeats from the end of the `repeatInterval`
+ * @param flexIntervalTimeUnit The [TimeUnit] for `flexInterval`
+ */
+ constructor(
+ workerClass: Class<out ListenableWorker?>,
+ repeatInterval: Long,
+ repeatIntervalTimeUnit: TimeUnit,
+ flexInterval: Long,
+ flexIntervalTimeUnit: TimeUnit
+ ) : super(workerClass) {
+ workSpec.setPeriodic(
+ repeatIntervalTimeUnit.toMillis(repeatInterval),
+ flexIntervalTimeUnit.toMillis(flexInterval)
+ )
+ }
+
+ /**
+ * Creates a [PeriodicWorkRequest] to run periodically once within the
+ * **flex period** of every interval period. See diagram below. The flex
+ * period begins at `repeatInterval - flexInterval` to the end of the interval.
+ * The repeat interval must be greater than or equal to
+ * [PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS] and the flex interval must
+ * be greater than or equal to [PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS].
+ *
+ * ```
+ * [_____before flex_____|_____flex_____][_____before flex_____|_____flex_____]...
+ * [___cannot run work___|_can run work_][___cannot run work___|_can run work_]...
+ * \____________________________________/\____________________________________/...
+ * interval 1 interval 2 ...(repeat)
+ * ```
+ *
+ * @param workerClass The [ListenableWorker] class to run for this work
+ * @param repeatInterval The repeat interval
+ * @param flexInterval The duration in for which this work repeats from the end of the
+ * `repeatInterval`
+ */
+ @RequiresApi(26)
+ constructor(
+ workerClass: Class<out ListenableWorker?>,
+ repeatInterval: Duration,
+ flexInterval: Duration
+ ) : super(workerClass) {
+ workSpec.setPeriodic(repeatInterval.toMillisCompat(), flexInterval.toMillisCompat())
+ }
+
+ override fun buildInternal(): PeriodicWorkRequest {
+ require(
+ !(backoffCriteriaSet && Build.VERSION.SDK_INT >= 23 &&
+ workSpec.constraints.requiresDeviceIdle())
+ ) { "Cannot set backoff criteria on an idle mode job" }
+ require(!workSpec.expedited) { "PeriodicWorkRequests cannot be expedited" }
+ return PeriodicWorkRequest(this)
+ }
+
+ override val thisObject: Builder
+ get() = this
+ }
+
+ companion object {
+ /**
+ * The minimum interval duration for [PeriodicWorkRequest] (in milliseconds).
+ */
+ @SuppressLint("MinMaxConstant")
+ const val MIN_PERIODIC_INTERVAL_MILLIS = 15 * 60 * 1000L // 15 minutes.
+
+ /**
+ * The minimum flex duration for [PeriodicWorkRequest] (in milliseconds).
+ */
+ @SuppressLint("MinMaxConstant")
+ const val MIN_PERIODIC_FLEX_MILLIS = 5 * 60 * 1000L // 5 minutes.
+ }
+}
+
+/**
+ * Creates a [PeriodicWorkRequest.Builder] with a given [ListenableWorker].
+ *
+ * @param repeatInterval @see [androidx.work.PeriodicWorkRequest.Builder]
+ * @param repeatIntervalTimeUnit @see [androidx.work.PeriodicWorkRequest.Builder]
+ */
+public inline fun <reified W : ListenableWorker> PeriodicWorkRequestBuilder(
+ repeatInterval: Long,
+ repeatIntervalTimeUnit: TimeUnit
+): PeriodicWorkRequest.Builder {
+ return PeriodicWorkRequest.Builder(W::class.java, repeatInterval, repeatIntervalTimeUnit)
+}
+
+/**
+ * Creates a [PeriodicWorkRequest.Builder] with a given [ListenableWorker].
+ *
+ * @param repeatInterval @see [androidx.work.PeriodicWorkRequest.Builder]
+ */
+@RequiresApi(26)
+public inline fun <reified W : ListenableWorker> PeriodicWorkRequestBuilder(
+ repeatInterval: Duration
+): PeriodicWorkRequest.Builder {
+ return PeriodicWorkRequest.Builder(W::class.java, repeatInterval)
+}
+
+/**
+ * Creates a [PeriodicWorkRequest.Builder] with a given [ListenableWorker].
+ *
+ * @param repeatInterval @see [androidx.work.PeriodicWorkRequest.Builder]
+ * @param repeatIntervalTimeUnit @see [androidx.work.PeriodicWorkRequest.Builder]
+ * @param flexTimeInterval @see [androidx.work.PeriodicWorkRequest.Builder]
+ * @param flexTimeIntervalUnit @see [androidx.work.PeriodicWorkRequest.Builder]
+ */
+public inline fun <reified W : ListenableWorker> PeriodicWorkRequestBuilder(
+ repeatInterval: Long,
+ repeatIntervalTimeUnit: TimeUnit,
+ flexTimeInterval: Long,
+ flexTimeIntervalUnit: TimeUnit
+): PeriodicWorkRequest.Builder {
+
+ return PeriodicWorkRequest.Builder(
+ W::class.java,
+ repeatInterval,
+ repeatIntervalTimeUnit,
+ flexTimeInterval,
+ flexTimeIntervalUnit
+ )
+}
+
+/**
+ * Creates a [PeriodicWorkRequest.Builder] with a given [ListenableWorker].
+ *
+ * @param repeatInterval @see [androidx.work.PeriodicWorkRequest.Builder]
+ * @param flexTimeInterval @see [androidx.work.PeriodicWorkRequest.Builder]
+ */
+@RequiresApi(26)
+public inline fun <reified W : ListenableWorker> PeriodicWorkRequestBuilder(
+ repeatInterval: Duration,
+ flexTimeInterval: Duration
+): PeriodicWorkRequest.Builder {
+ return PeriodicWorkRequest.Builder(W::class.java, repeatInterval, flexTimeInterval)
+}
\ No newline at end of file
diff --git a/work/work-runtime/src/main/java/androidx/work/WorkRequest.java b/work/work-runtime/src/main/java/androidx/work/WorkRequest.java
deleted file mode 100644
index 6e9c7f5..0000000
--- a/work/work-runtime/src/main/java/androidx/work/WorkRequest.java
+++ /dev/null
@@ -1,403 +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;
-
-import android.annotation.SuppressLint;
-import android.os.Build;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.RequiresApi;
-import androidx.annotation.RestrictTo;
-import androidx.annotation.VisibleForTesting;
-import androidx.work.impl.model.WorkSpec;
-import androidx.work.impl.utils.DurationApi26Impl;
-
-import java.time.Duration;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.UUID;
-import java.util.concurrent.TimeUnit;
-
-/**
- * The base class for specifying parameters for work that should be enqueued in {@link WorkManager}.
- * There are two concrete implementations of this class: {@link OneTimeWorkRequest} and
- * {@link PeriodicWorkRequest}.
- */
-
-public abstract class WorkRequest {
-
- /**
- * The default initial backoff time (in milliseconds) for work that has to be retried.
- */
- public static final long DEFAULT_BACKOFF_DELAY_MILLIS = 30000L;
-
- /**
- * The maximum backoff time (in milliseconds) for work that has to be retried.
- */
- @SuppressLint("MinMaxConstant")
- public static final long MAX_BACKOFF_MILLIS = 5 * 60 * 60 * 1000; // 5 hours.
-
- /**
- * The minimum backoff time for work (in milliseconds) that has to be retried.
- */
- @SuppressLint("MinMaxConstant")
- public static final long MIN_BACKOFF_MILLIS = 10 * 1000; // 10 seconds.
-
- private @NonNull UUID mId;
- private @NonNull WorkSpec mWorkSpec;
- private @NonNull Set<String> mTags;
-
- /**
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- protected WorkRequest(@NonNull UUID id, @NonNull WorkSpec workSpec, @NonNull Set<String> tags) {
- mId = id;
- mWorkSpec = workSpec;
- mTags = tags;
- }
-
- /**
- * Gets the unique identifier associated with this unit of work.
- *
- * @return The identifier for this unit of work
- */
- public @NonNull UUID getId() {
- return mId;
- }
-
- /**
- * Gets the string for the unique identifier associated with this unit of work.
- *
- * @return The string identifier for this unit of work
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- public @NonNull String getStringId() {
- return mId.toString();
- }
-
- /**
- * Gets the {@link WorkSpec} associated with this unit of work.
- *
- * @return The {@link WorkSpec} for this unit of work
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- public @NonNull WorkSpec getWorkSpec() {
- return mWorkSpec;
- }
-
- /**
- * Gets the tags associated with this unit of work.
- *
- * @return The tags for this unit of work
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- public @NonNull Set<String> getTags() {
- return mTags;
- }
-
- /**
- * A builder for {@link WorkRequest}s. There are two concrete implementations of this class:
- * {@link OneTimeWorkRequest.Builder} and {@link PeriodicWorkRequest.Builder}.
- *
- * @param <B> The concrete implementation of this Builder
- * @param <W> The type of work object built by this Builder
- */
- public abstract static class Builder<B extends Builder<?, ?>, W extends WorkRequest> {
-
- boolean mBackoffCriteriaSet = false;
- UUID mId;
- WorkSpec mWorkSpec;
- Set<String> mTags = new HashSet<>();
- Class<? extends ListenableWorker> mWorkerClass;
-
- Builder(@NonNull Class<? extends ListenableWorker> workerClass) {
- mId = UUID.randomUUID();
- mWorkerClass = workerClass;
- mWorkSpec = new WorkSpec(mId.toString(), workerClass.getName());
- addTag(workerClass.getName());
- }
-
- /**
- * Sets the backoff policy and backoff delay for the work. The default values are
- * {@link BackoffPolicy#EXPONENTIAL} and
- * {@value WorkRequest#DEFAULT_BACKOFF_DELAY_MILLIS}, respectively. {@code backoffDelay}
- * will be clamped between {@link WorkRequest#MIN_BACKOFF_MILLIS} and
- * {@link WorkRequest#MAX_BACKOFF_MILLIS}.
- *
- * @param backoffPolicy The {@link BackoffPolicy} to use when increasing backoff time
- * @param backoffDelay Time to wait before retrying the work in {@code timeUnit} units
- * @param timeUnit The {@link TimeUnit} for {@code backoffDelay}
- * @return The current {@link Builder}
- */
- public final @NonNull B setBackoffCriteria(
- @NonNull BackoffPolicy backoffPolicy,
- long backoffDelay,
- @NonNull TimeUnit timeUnit) {
- mBackoffCriteriaSet = true;
- mWorkSpec.backoffPolicy = backoffPolicy;
- mWorkSpec.setBackoffDelayDuration(timeUnit.toMillis(backoffDelay));
- return getThis();
- }
-
- /**
- * Sets the backoff policy and backoff delay for the work. The default values are
- * {@link BackoffPolicy#EXPONENTIAL} and
- * {@value WorkRequest#DEFAULT_BACKOFF_DELAY_MILLIS}, respectively. {@code duration} will
- * be clamped between {@link WorkRequest#MIN_BACKOFF_MILLIS} and
- * {@link WorkRequest#MAX_BACKOFF_MILLIS}.
- *
- * @param backoffPolicy The {@link BackoffPolicy} to use when increasing backoff time
- * @param duration Time to wait before retrying the work
- * @return The current {@link Builder}
- */
- @RequiresApi(26)
- public final @NonNull B setBackoffCriteria(
- @NonNull BackoffPolicy backoffPolicy,
- @NonNull Duration duration) {
- mBackoffCriteriaSet = true;
- mWorkSpec.backoffPolicy = backoffPolicy;
- mWorkSpec.setBackoffDelayDuration(DurationApi26Impl.toMillisCompat(duration));
- return getThis();
- }
-
- /**
- * Adds constraints to the {@link WorkRequest}.
- *
- * @param constraints The constraints for the work
- * @return The current {@link Builder}
- */
- public final @NonNull B setConstraints(@NonNull Constraints constraints) {
- mWorkSpec.constraints = constraints;
- return getThis();
- }
-
- /**
- * Adds input {@link Data} to the work. If a worker has prerequisites in its chain, this
- * Data will be merged with the outputs of the prerequisites using an {@link InputMerger}.
- *
- * @param inputData key/value pairs that will be provided to the worker
- * @return The current {@link Builder}
- */
- public final @NonNull B setInputData(@NonNull Data inputData) {
- mWorkSpec.input = inputData;
- return getThis();
- }
-
- /**
- * Adds a tag for the work. You can query and cancel work by tags. Tags are particularly
- * useful for modules or libraries to find and operate on their own work.
- *
- * @param tag A tag for identifying the work in queries.
- * @return The current {@link Builder}
- */
- public final @NonNull B addTag(@NonNull String tag) {
- mTags.add(tag);
- return getThis();
- }
-
- /**
- * Specifies that the results of this work should be kept for at least the specified amount
- * of time. After this time has elapsed, the results <b>may</b> be pruned at the discretion
- * of WorkManager when there are no pending dependent jobs.
- * <p>
- * When the results of a work are pruned, it becomes impossible to query for its
- * {@link WorkInfo}.
- * <p>
- * Specifying a long duration here may adversely affect performance in terms of app storage
- * and database query time.
- *
- * @param duration The minimum duration of time (in {@code timeUnit} units) to keep the
- * results of this work
- * @param timeUnit The unit of time for {@code duration}
- * @return The current {@link Builder}
- */
- public final @NonNull B keepResultsForAtLeast(long duration, @NonNull TimeUnit timeUnit) {
- mWorkSpec.minimumRetentionDuration = timeUnit.toMillis(duration);
- return getThis();
- }
-
- /**
- * Specifies that the results of this work should be kept for at least the specified amount
- * of time. After this time has elapsed, the results <p>may</p> be pruned at the discretion
- * of WorkManager when this WorkRequest has reached a finished state (see
- * {@link WorkInfo.State#isFinished()}) and there are no pending dependent jobs.
- * <p>
- * When the results of a work are pruned, it becomes impossible to query for its
- * {@link WorkInfo}.
- * <p>
- * Specifying a long duration here may adversely affect performance in terms of app storage
- * and database query time.
- *
- * @param duration The minimum duration of time to keep the results of this work
- * @return The current {@link Builder}
- */
- @RequiresApi(26)
- public final @NonNull B keepResultsForAtLeast(@NonNull Duration duration) {
- mWorkSpec.minimumRetentionDuration = DurationApi26Impl.toMillisCompat(duration);
- return getThis();
- }
-
- /**
- * Sets an initial delay for the {@link WorkRequest}.
- *
- * @param duration The length of the delay in {@code timeUnit} units
- * @param timeUnit The units of time for {@code duration}
- * @return The current {@link Builder}
- * @throws IllegalArgumentException if the given initial delay will push the execution time
- * past {@code Long.MAX_VALUE} and cause an overflow
- */
- public @NonNull B setInitialDelay(long duration, @NonNull TimeUnit timeUnit) {
- mWorkSpec.initialDelay = timeUnit.toMillis(duration);
- if (Long.MAX_VALUE - System.currentTimeMillis() <= mWorkSpec.initialDelay) {
- throw new IllegalArgumentException("The given initial delay is too large and will"
- + " cause an overflow!");
- }
- return getThis();
- }
-
- /**
- * Sets an initial delay for the {@link WorkRequest}.
- *
- * @param duration The length of the delay
- * @return The current {@link Builder} *
- * @throws IllegalArgumentException if the given initial delay will push the execution time
- * past {@code Long.MAX_VALUE} and cause an overflow
- */
- @RequiresApi(26)
- public @NonNull B setInitialDelay(@NonNull Duration duration) {
- mWorkSpec.initialDelay = DurationApi26Impl.toMillisCompat(duration);
- if (Long.MAX_VALUE - System.currentTimeMillis() <= mWorkSpec.initialDelay) {
- throw new IllegalArgumentException("The given initial delay is too large and will"
- + " cause an overflow!");
- }
- return getThis();
- }
-
- /**
- * Marks the {@link WorkRequest} as important to the user. In this case, WorkManager
- * provides an additional signal to the OS that this work is important.
- *
- * @param policy The {@link OutOfQuotaPolicy} to be used.
- */
- @SuppressLint("MissingGetterMatchingBuilder")
- public @NonNull B setExpedited(@NonNull OutOfQuotaPolicy policy) {
- mWorkSpec.expedited = true;
- mWorkSpec.outOfQuotaPolicy = policy;
- return getThis();
- }
-
- /**
- * Builds a {@link WorkRequest} based on this {@link Builder}.
- *
- * @return A {@link WorkRequest} based on this {@link Builder}
- */
- public final @NonNull W build() {
- W returnValue = buildInternal();
- Constraints constraints = mWorkSpec.constraints;
- // Check for unsupported constraints.
- boolean hasUnsupportedConstraints =
- (Build.VERSION.SDK_INT >= 24 && constraints.hasContentUriTriggers())
- || constraints.requiresBatteryNotLow()
- || constraints.requiresCharging()
- || (Build.VERSION.SDK_INT >= 23 && constraints.requiresDeviceIdle());
-
- if (mWorkSpec.expedited) {
- if (hasUnsupportedConstraints) {
- throw new IllegalArgumentException(
- "Expedited jobs only support network and storage constraints");
- }
- if (mWorkSpec.initialDelay > 0) {
- throw new IllegalArgumentException("Expedited jobs cannot be delayed");
- }
- }
- // Create a new id and WorkSpec so this WorkRequest.Builder can be used multiple times.
- mId = UUID.randomUUID();
- mWorkSpec = new WorkSpec(mId.toString(), mWorkSpec);
- return returnValue;
- }
-
- abstract @NonNull W buildInternal();
-
- abstract @NonNull B getThis();
-
- /**
- * Sets the initial state for this work. Used in testing only.
- *
- * @param state The {@link WorkInfo.State} to set
- * @return The current {@link Builder}
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @VisibleForTesting
- public final @NonNull B setInitialState(@NonNull WorkInfo.State state) {
- mWorkSpec.state = state;
- return getThis();
- }
-
- /**
- * Sets the initial run attempt count for this work. Used in testing only.
- *
- * @param runAttemptCount The initial run attempt count
- * @return The current {@link Builder}
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @VisibleForTesting
- public final @NonNull B setInitialRunAttemptCount(int runAttemptCount) {
- mWorkSpec.runAttemptCount = runAttemptCount;
- return getThis();
- }
-
- /**
- * Sets the period start time for this work. Used in testing only.
- *
- * @param periodStartTime the period start time in {@code timeUnit} units
- * @param timeUnit The {@link TimeUnit} for {@code periodStartTime}
- * @return The current {@link Builder}
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @VisibleForTesting
- @NonNull
- public final B setLastEnqueueTime(
- long periodStartTime,
- @NonNull TimeUnit timeUnit) {
- mWorkSpec.lastEnqueueTime = timeUnit.toMillis(periodStartTime);
- return getThis();
- }
-
- /**
- * Sets when the scheduler actually schedules the worker.
- *
- * @param scheduleRequestedAt The time at which the scheduler scheduled a worker.
- * @param timeUnit The {@link TimeUnit} for {@code scheduleRequestedAt}
- * @return The current {@link Builder}
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @VisibleForTesting
- public final @NonNull B setScheduleRequestedAt(
- long scheduleRequestedAt,
- @NonNull TimeUnit timeUnit) {
- mWorkSpec.scheduleRequestedAt = timeUnit.toMillis(scheduleRequestedAt);
- return getThis();
- }
- }
-}
diff --git a/work/work-runtime/src/main/java/androidx/work/WorkRequest.kt b/work/work-runtime/src/main/java/androidx/work/WorkRequest.kt
new file mode 100644
index 0000000..21d240f
--- /dev/null
+++ b/work/work-runtime/src/main/java/androidx/work/WorkRequest.kt
@@ -0,0 +1,349 @@
+/*
+ * 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
+
+import android.annotation.SuppressLint
+import android.os.Build
+import androidx.annotation.RequiresApi
+import androidx.annotation.RestrictTo
+import androidx.annotation.VisibleForTesting
+import androidx.work.impl.utils.toMillisCompat
+import androidx.work.impl.model.WorkSpec
+import java.time.Duration
+import java.util.UUID
+import java.util.concurrent.TimeUnit
+
+/**
+ * The base class for specifying parameters for work that should be enqueued in [WorkManager].
+ * There are two concrete implementations of this class: [OneTimeWorkRequest] and
+ * [PeriodicWorkRequest].
+ */
+abstract class WorkRequest internal constructor(
+ /**
+ * The unique identifier associated with this unit of work.
+ */
+ open val id: UUID,
+ /**
+ * The [WorkSpec] associated with this unit of work.
+ *
+ * @hide
+ */
+ @get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ val workSpec: WorkSpec,
+ /**
+ * The tags associated with this unit of work.
+ *
+ */
+ @get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ val tags: Set<String>
+) {
+
+ /**
+ * Gets the string for the unique identifier associated with this unit of work.
+ *
+ * @return The string identifier for this unit of work
+ * @hide
+ */
+ @get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ val stringId: String
+ get() = id.toString()
+
+ /**
+ * A builder for [WorkRequest]s. There are two concrete implementations of this class:
+ * [OneTimeWorkRequest.Builder] and [PeriodicWorkRequest.Builder].
+ */
+ abstract class Builder<B : Builder<B, *>, W : WorkRequest> internal constructor(
+ internal val workerClass: Class<out ListenableWorker>
+ ) {
+ internal var backoffCriteriaSet = false
+ internal var id: UUID = UUID.randomUUID()
+ internal var workSpec: WorkSpec = WorkSpec(id.toString(), workerClass.name)
+ internal val tags: MutableSet<String> = mutableSetOf(workerClass.name)
+
+ /**
+ * Sets the backoff policy and backoff delay for the work. The default values are
+ * [BackoffPolicy.EXPONENTIAL] and
+ * {@value WorkRequest#DEFAULT_BACKOFF_DELAY_MILLIS}, respectively. `backoffDelay`
+ * will be clamped between [WorkRequest.MIN_BACKOFF_MILLIS] and
+ * [WorkRequest.MAX_BACKOFF_MILLIS].
+ *
+ * @param backoffPolicy The [BackoffPolicy] to use when increasing backoff time
+ * @param backoffDelay Time to wait before retrying the work in `timeUnit` units
+ * @param timeUnit The [TimeUnit] for `backoffDelay`
+ * @return The current [Builder]
+ */
+ fun setBackoffCriteria(
+ backoffPolicy: BackoffPolicy,
+ backoffDelay: Long,
+ timeUnit: TimeUnit
+ ): B {
+ backoffCriteriaSet = true
+ workSpec.backoffPolicy = backoffPolicy
+ workSpec.setBackoffDelayDuration(timeUnit.toMillis(backoffDelay))
+ return thisObject
+ }
+
+ /**
+ * Sets the backoff policy and backoff delay for the work. The default values are
+ * [BackoffPolicy.EXPONENTIAL] and
+ * {@value WorkRequest#DEFAULT_BACKOFF_DELAY_MILLIS}, respectively. `duration` will
+ * be clamped between [WorkRequest.MIN_BACKOFF_MILLIS] and
+ * [WorkRequest.MAX_BACKOFF_MILLIS].
+ *
+ * @param backoffPolicy The [BackoffPolicy] to use when increasing backoff time
+ * @param duration Time to wait before retrying the work
+ * @return The current [Builder]
+ */
+ @RequiresApi(26)
+ fun setBackoffCriteria(backoffPolicy: BackoffPolicy, duration: Duration): B {
+ backoffCriteriaSet = true
+ workSpec.backoffPolicy = backoffPolicy
+ workSpec.setBackoffDelayDuration(duration.toMillisCompat())
+ return thisObject
+ }
+
+ /**
+ * Adds constraints to the [WorkRequest].
+ *
+ * @param constraints The constraints for the work
+ * @return The current [Builder]
+ */
+ fun setConstraints(constraints: Constraints): B {
+ workSpec.constraints = constraints
+ return thisObject
+ }
+
+ /**
+ * Adds input [Data] to the work. If a worker has prerequisites in its chain, this
+ * Data will be merged with the outputs of the prerequisites using an [InputMerger].
+ *
+ * @param inputData key/value pairs that will be provided to the worker
+ * @return The current [Builder]
+ */
+ fun setInputData(inputData: Data): B {
+ workSpec.input = inputData
+ return thisObject
+ }
+
+ /**
+ * Adds a tag for the work. You can query and cancel work by tags. Tags are particularly
+ * useful for modules or libraries to find and operate on their own work.
+ *
+ * @param tag A tag for identifying the work in queries.
+ * @return The current [Builder]
+ */
+ fun addTag(tag: String): B {
+ tags.add(tag)
+ return thisObject
+ }
+
+ /**
+ * Specifies that the results of this work should be kept for at least the specified amount
+ * of time. After this time has elapsed, the results **may** be pruned at the discretion
+ * of WorkManager when there are no pending dependent jobs.
+ *
+ * When the results of a work are pruned, it becomes impossible to query for its
+ * [WorkInfo].
+ *
+ * Specifying a long duration here may adversely affect performance in terms of app storage
+ * and database query time.
+ *
+ * @param duration The minimum duration of time (in `timeUnit` units) to keep the
+ * results of this work
+ * @param timeUnit The unit of time for `duration`
+ * @return The current [Builder]
+ */
+ fun keepResultsForAtLeast(duration: Long, timeUnit: TimeUnit): B {
+ workSpec.minimumRetentionDuration = timeUnit.toMillis(duration)
+ return thisObject
+ }
+
+ /**
+ * Specifies that the results of this work should be kept for at least the specified amount
+ * of time. After this time has elapsed, the results may be pruned at the discretion
+ * of WorkManager when this WorkRequest has reached a finished state (see
+ * [WorkInfo.State.isFinished]) and there are no pending dependent jobs.
+ *
+ * When the results of a work are pruned, it becomes impossible to query for its
+ * [WorkInfo].
+ *
+ * Specifying a long duration here may adversely affect performance in terms of app storage
+ * and database query time.
+ *
+ * @param duration The minimum duration of time to keep the results of this work
+ * @return The current [Builder]
+ */
+ @RequiresApi(26)
+ fun keepResultsForAtLeast(duration: Duration): B {
+ workSpec.minimumRetentionDuration = duration.toMillisCompat()
+ return thisObject
+ }
+
+ /**
+ * Sets an initial delay for the [WorkRequest].
+ *
+ * @param duration The length of the delay in `timeUnit` units
+ * @param timeUnit The units of time for `duration`
+ * @return The current [Builder]
+ * @throws IllegalArgumentException if the given initial delay will push the execution time
+ * past `Long.MAX_VALUE` and cause an overflow
+ */
+ open fun setInitialDelay(duration: Long, timeUnit: TimeUnit): B {
+ workSpec.initialDelay = timeUnit.toMillis(duration)
+ require(Long.MAX_VALUE - System.currentTimeMillis() > workSpec.initialDelay) {
+ ("The given initial delay is too large and will cause an overflow!")
+ }
+ return thisObject
+ }
+
+ /**
+ * Sets an initial delay for the [WorkRequest].
+ *
+ * @param duration The length of the delay
+ * @return The current [Builder] *
+ * @throws IllegalArgumentException if the given initial delay will push the execution time
+ * past `Long.MAX_VALUE` and cause an overflow
+ */
+ @RequiresApi(26)
+ open fun setInitialDelay(duration: Duration): B {
+ workSpec.initialDelay = duration.toMillisCompat()
+ require(Long.MAX_VALUE - System.currentTimeMillis() > workSpec.initialDelay) {
+ "The given initial delay is too large and will cause an overflow!"
+ }
+ return thisObject
+ }
+
+ /**
+ * Marks the [WorkRequest] as important to the user. In this case, WorkManager
+ * provides an additional signal to the OS that this work is important.
+ *
+ * @param policy The [OutOfQuotaPolicy] to be used.
+ */
+ @SuppressLint("MissingGetterMatchingBuilder")
+ open fun setExpedited(policy: OutOfQuotaPolicy): B {
+ workSpec.expedited = true
+ workSpec.outOfQuotaPolicy = policy
+ return thisObject
+ }
+
+ /**
+ * Builds a [WorkRequest] based on this [Builder].
+ *
+ * @return A [WorkRequest] based on this [Builder]
+ */
+ fun build(): W {
+ val returnValue = buildInternal()
+ val constraints = workSpec.constraints
+ // Check for unsupported constraints.
+ val hasUnsupportedConstraints =
+ (Build.VERSION.SDK_INT >= 24 && constraints.hasContentUriTriggers() ||
+ constraints.requiresBatteryNotLow() ||
+ constraints.requiresCharging() ||
+ Build.VERSION.SDK_INT >= 23 && constraints.requiresDeviceIdle())
+ if (workSpec.expedited) {
+ require(!hasUnsupportedConstraints) {
+ "Expedited jobs only support network and storage constraints"
+ }
+ require(workSpec.initialDelay <= 0) { "Expedited jobs cannot be delayed" }
+ }
+ // Create a new id and WorkSpec so this WorkRequest.Builder can be used multiple times.
+ id = UUID.randomUUID()
+ workSpec = WorkSpec(id.toString(), workSpec)
+ return returnValue
+ }
+
+ internal abstract fun buildInternal(): W
+
+ internal abstract val thisObject: B
+
+ /**
+ * Sets the initial state for this work. Used in testing only.
+ *
+ * @param state The [WorkInfo.State] to set
+ * @return The current [Builder]
+ * @hide
+ */
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @VisibleForTesting
+ fun setInitialState(state: WorkInfo.State): B {
+ workSpec.state = state
+ return thisObject
+ }
+
+ /**
+ * Sets the initial run attempt count for this work. Used in testing only.
+ *
+ * @param runAttemptCount The initial run attempt count
+ * @return The current [Builder]
+ * @hide
+ */
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @VisibleForTesting
+ fun setInitialRunAttemptCount(runAttemptCount: Int): B {
+ workSpec.runAttemptCount = runAttemptCount
+ return thisObject
+ }
+
+ /**
+ * Sets the period start time for this work. Used in testing only.
+ *
+ * @param periodStartTime the period start time in `timeUnit` units
+ * @param timeUnit The [TimeUnit] for `periodStartTime`
+ * @return The current [Builder]
+ * @hide
+ */
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @VisibleForTesting
+ fun setLastEnqueueTime(periodStartTime: Long, timeUnit: TimeUnit): B {
+ workSpec.lastEnqueueTime = timeUnit.toMillis(periodStartTime)
+ return thisObject
+ }
+
+ /**
+ * Sets when the scheduler actually schedules the worker.
+ *
+ * @param scheduleRequestedAt The time at which the scheduler scheduled a worker.
+ * @param timeUnit The [TimeUnit] for `scheduleRequestedAt`
+ * @return The current [Builder]
+ * @hide
+ */
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @VisibleForTesting
+ fun setScheduleRequestedAt(scheduleRequestedAt: Long, timeUnit: TimeUnit): B {
+ workSpec.scheduleRequestedAt = timeUnit.toMillis(scheduleRequestedAt)
+ return thisObject
+ }
+ }
+
+ companion object {
+ /**
+ * The default initial backoff time (in milliseconds) for work that has to be retried.
+ */
+ const val DEFAULT_BACKOFF_DELAY_MILLIS = 30000L
+
+ /**
+ * The maximum backoff time (in milliseconds) for work that has to be retried.
+ */
+ @SuppressLint("MinMaxConstant")
+ const val MAX_BACKOFF_MILLIS = 5 * 60 * 60 * 1000L // 5 hours
+
+ /**
+ * The minimum backoff time for work (in milliseconds) that has to be retried.
+ */
+ @SuppressLint("MinMaxConstant")
+ const val MIN_BACKOFF_MILLIS = 10 * 1000L // 10 seconds.
+ }
+}
\ No newline at end of file
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/model/WorkSpec.kt b/work/work-runtime/src/main/java/androidx/work/impl/model/WorkSpec.kt
index 25e6d2e..fc6dbf2 100644
--- a/work/work-runtime/src/main/java/androidx/work/impl/model/WorkSpec.kt
+++ b/work/work-runtime/src/main/java/androidx/work/impl/model/WorkSpec.kt
@@ -29,8 +29,8 @@
import androidx.work.Data
import androidx.work.Logger
import androidx.work.OutOfQuotaPolicy
-import androidx.work.PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS
-import androidx.work.PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS
+import androidx.work.PeriodicWorkRequest.Companion.MIN_PERIODIC_FLEX_MILLIS
+import androidx.work.PeriodicWorkRequest.Companion.MIN_PERIODIC_INTERVAL_MILLIS
import androidx.work.WorkInfo
import androidx.work.WorkRequest
import java.util.UUID
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/utils/EnqueueRunnable.java b/work/work-runtime/src/main/java/androidx/work/impl/utils/EnqueueRunnable.java
index 5831aed..977793e 100644
--- a/work/work-runtime/src/main/java/androidx/work/impl/utils/EnqueueRunnable.java
+++ b/work/work-runtime/src/main/java/androidx/work/impl/utils/EnqueueRunnable.java
@@ -25,7 +25,7 @@
import static androidx.work.WorkInfo.State.FAILED;
import static androidx.work.WorkInfo.State.RUNNING;
import static androidx.work.WorkInfo.State.SUCCEEDED;
-import static androidx.work.impl.workers.ConstraintTrackingWorker.ARGUMENT_CLASS_NAME;
+import static androidx.work.impl.workers.ConstraintTrackingWorkerKt.ARGUMENT_CLASS_NAME;
import android.content.Context;
import android.os.Build;
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/utils/ProcessUtils.java b/work/work-runtime/src/main/java/androidx/work/impl/utils/ProcessUtils.java
deleted file mode 100644
index e8256dc..0000000
--- a/work/work-runtime/src/main/java/androidx/work/impl/utils/ProcessUtils.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright 2020 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 static android.content.Context.ACTIVITY_SERVICE;
-import static android.os.Build.VERSION.SDK_INT;
-
-import android.annotation.SuppressLint;
-import android.app.ActivityManager;
-import android.app.Application;
-import android.content.Context;
-import android.content.pm.ApplicationInfo;
-import android.os.Process;
-import android.text.TextUtils;
-
-import androidx.annotation.DoNotInline;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.annotation.RequiresApi;
-import androidx.annotation.RestrictTo;
-import androidx.work.Configuration;
-import androidx.work.Logger;
-import androidx.work.WorkManager;
-
-import java.lang.reflect.Method;
-import java.util.List;
-
-/**
- * @hide
- */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
-public class ProcessUtils {
- private static final String TAG = Logger.tagWithPrefix("ProcessUtils");
-
- private ProcessUtils() {
- // Does nothing
- }
-
- /**
- * @return {@code true} when {@link WorkManager} is running in the configured app process.
- */
- public static boolean isDefaultProcess(
- @NonNull Context context,
- @NonNull Configuration configuration) {
-
- String processName = getProcessName(context);
-
- if (!TextUtils.isEmpty(configuration.getDefaultProcessName())) {
- return TextUtils.equals(processName, configuration.getDefaultProcessName());
- } else {
- ApplicationInfo info = context.getApplicationInfo();
- return TextUtils.equals(processName, info.processName);
- }
- }
-
- /**
- * @return The name of the active process.
- */
- @Nullable
- @SuppressLint({"PrivateApi", "DiscouragedPrivateApi"})
- public static String getProcessName(@NonNull Context context) {
- if (SDK_INT >= 28) {
- return Api28Impl.getProcessName();
- }
-
- // Try using ActivityThread to determine the current process name.
- try {
- Class<?> activityThread = Class.forName(
- "android.app.ActivityThread",
- false,
- ProcessUtils.class.getClassLoader());
- final Object packageName;
- if (SDK_INT >= 18) {
- Method currentProcessName = activityThread.getDeclaredMethod("currentProcessName");
- currentProcessName.setAccessible(true);
- packageName = currentProcessName.invoke(null);
- } else {
- Method getActivityThread = activityThread.getDeclaredMethod(
- "currentActivityThread");
- getActivityThread.setAccessible(true);
- Method getProcessName = activityThread.getDeclaredMethod("getProcessName");
- getProcessName.setAccessible(true);
- packageName = getProcessName.invoke(getActivityThread.invoke(null));
- }
- if (packageName instanceof String) {
- return (String) packageName;
- }
- } catch (Throwable exception) {
- Logger.get().debug(TAG, "Unable to check ActivityThread for processName", exception);
- }
-
- // Fallback to the most expensive way
- int pid = Process.myPid();
- ActivityManager am =
- (ActivityManager) context.getSystemService(ACTIVITY_SERVICE);
-
- if (am != null) {
- List<ActivityManager.RunningAppProcessInfo> processes = am.getRunningAppProcesses();
- if (processes != null && !processes.isEmpty()) {
- for (ActivityManager.RunningAppProcessInfo process : processes) {
- if (process.pid == pid) {
- return process.processName;
- }
- }
- }
- }
-
- return null;
- }
-
- @RequiresApi(28)
- static class Api28Impl {
- private Api28Impl() {
- // This class is not instantiable.
- }
-
- @DoNotInline
- static String getProcessName() {
- return Application.getProcessName();
- }
- }
-}
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/utils/ProcessUtils.kt b/work/work-runtime/src/main/java/androidx/work/impl/utils/ProcessUtils.kt
new file mode 100644
index 0000000..135686d
--- /dev/null
+++ b/work/work-runtime/src/main/java/androidx/work/impl/utils/ProcessUtils.kt
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2020 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("ProcessUtils")
+
+package androidx.work.impl.utils
+
+import android.annotation.SuppressLint
+import android.app.ActivityManager
+import android.app.Application
+import android.content.Context
+import android.os.Build
+import android.os.Process
+import androidx.annotation.DoNotInline
+import androidx.annotation.RequiresApi
+import androidx.work.Configuration
+import androidx.work.Logger
+import androidx.work.WorkManager
+
+private val TAG = Logger.tagWithPrefix("ProcessUtils")
+
+/**
+ * @return `true` when `WorkManager` is running in the configured app process.
+ */
+fun isDefaultProcess(context: Context, configuration: Configuration): Boolean {
+ val processName = getProcessName(context)
+ return if (!configuration.defaultProcessName.isNullOrEmpty()) {
+ processName == configuration.defaultProcessName
+ } else {
+ processName == context.applicationInfo.processName
+ }
+}
+
+/**
+ * @return The name of the active process.
+ */
+@SuppressLint("PrivateApi", "DiscouragedPrivateApi")
+private fun getProcessName(context: Context): String? {
+ if (Build.VERSION.SDK_INT >= 28) return Api28Impl.processName
+
+ // Try using ActivityThread to determine the current process name.
+ try {
+ val activityThread = Class.forName(
+ "android.app.ActivityThread",
+ false,
+ WorkManager::class.java.classLoader
+ )
+ val packageName = if (Build.VERSION.SDK_INT >= 18) {
+ val currentProcessName = activityThread.getDeclaredMethod("currentProcessName")
+ currentProcessName.isAccessible = true
+ currentProcessName.invoke(null)!!
+ } else {
+ val getActivityThread = activityThread.getDeclaredMethod("currentActivityThread")
+ getActivityThread.isAccessible = true
+ val getProcessName = activityThread.getDeclaredMethod("getProcessName")
+ getProcessName.isAccessible = true
+ getProcessName.invoke(getActivityThread.invoke(null))!!
+ }
+ if (packageName is String) return packageName
+ } catch (exception: Throwable) {
+ Logger.get().debug(TAG, "Unable to check ActivityThread for processName", exception)
+ }
+
+ // Fallback to the most expensive way
+ val pid = Process.myPid()
+ val am = context.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager
+ return am.runningAppProcesses?.find { process -> process.pid == pid }?.processName
+}
+
+@RequiresApi(28)
+private object Api28Impl {
+ @get:DoNotInline
+ val processName: String
+ get() = Application.getProcessName()
+}
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/utils/WakeLocks.java b/work/work-runtime/src/main/java/androidx/work/impl/utils/WakeLocks.java
deleted file mode 100644
index 652cef9..0000000
--- a/work/work-runtime/src/main/java/androidx/work/impl/utils/WakeLocks.java
+++ /dev/null
@@ -1,98 +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 static android.os.PowerManager.PARTIAL_WAKE_LOCK;
-
-import android.content.Context;
-import android.os.PowerManager;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.RestrictTo;
-import androidx.work.Logger;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.WeakHashMap;
-
-/**
- * A common class for creating WakeLocks.
- *
- * @hide
- */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
-public class WakeLocks {
-
- private static final String TAG = Logger.tagWithPrefix("WakeLocks");
-
- private static final WeakHashMap<PowerManager.WakeLock, String> sWakeLocks =
- new WeakHashMap<>();
-
- /**
- * Creates and returns a new WakeLock.
- *
- * @param context The context from which to get the PowerManager
- * @param tag A descriptive tag for the WakeLock; this method will prefix "WorkManager: "
- * to it
- * @return A new {@link android.os.PowerManager.WakeLock}
- */
- public static PowerManager.WakeLock newWakeLock(
- @NonNull Context context,
- @NonNull String tag) {
- PowerManager powerManager = (PowerManager) context.getApplicationContext()
- .getSystemService(Context.POWER_SERVICE);
-
- String tagWithPrefix = "WorkManager: " + tag;
- PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PARTIAL_WAKE_LOCK, tagWithPrefix);
- // Wakelocks are created on the command processor thread, but we check if they are still
- // being held on the main thread.
- synchronized (sWakeLocks) {
- sWakeLocks.put(wakeLock, tagWithPrefix);
- }
- return wakeLock;
- }
-
- /**
- * Checks to see if there are any {@link PowerManager.WakeLock}s that
- * {@link androidx.work.impl.background.systemalarm.SystemAlarmService} holds when all the
- * pending commands have been drained in the command queue.
- */
- public static void checkWakeLocks() {
- // There is a small chance that while we are checking if all the commands in the queue are
- // drained and wake locks are no longer being held, a new command comes along and we end up
- // with a ConcurrentModificationException. The addition of commands happens on the command
- // processor thread and this check is done on the main thread.
-
- Map<PowerManager.WakeLock, String> wakeLocksCopy = new HashMap<>();
- synchronized (sWakeLocks) {
- // Copy the WakeLocks - otherwise we can get a ConcurrentModificationException if the
- // garbage collector kicks in and ends up removing something from the master copy while
- // we are iterating over it.
- wakeLocksCopy.putAll(sWakeLocks);
- }
-
- for (PowerManager.WakeLock wakeLock : wakeLocksCopy.keySet()) {
- if (wakeLock != null && wakeLock.isHeld()) {
- String message = "WakeLock held for " + wakeLocksCopy.get(wakeLock);
- Logger.get().warning(TAG, message);
- }
- }
- }
-
- private WakeLocks() {
- }
-}
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/utils/WakeLocks.kt b/work/work-runtime/src/main/java/androidx/work/impl/utils/WakeLocks.kt
new file mode 100644
index 0000000..169ccf1
--- /dev/null
+++ b/work/work-runtime/src/main/java/androidx/work/impl/utils/WakeLocks.kt
@@ -0,0 +1,72 @@
+/*
+ * 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("WakeLocks")
+
+package androidx.work.impl.utils
+
+import android.content.Context
+import android.os.PowerManager
+import androidx.work.Logger
+import java.util.WeakHashMap
+
+private val TAG = Logger.tagWithPrefix("WakeLocks")
+
+/**
+ * Creates and returns a new WakeLock.
+ *
+ * @param context The context from which to get the PowerManager
+ * @param tag A descriptive tag for the WakeLock; this method will prefix "WorkManager: " to it
+ * @return A new [android.os.PowerManager.WakeLock]
+ */
+internal fun newWakeLock(context: Context, tag: String): PowerManager.WakeLock {
+ val powerManager = context.applicationContext
+ .getSystemService(Context.POWER_SERVICE) as PowerManager
+ val tagWithPrefix = "WorkManager: $tag"
+ val wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, tagWithPrefix)
+ // Wakelocks are created on the command processor thread, but we check if they are still
+ // being held on the main thread.
+ synchronized(WakeLocksHolder) {
+ WakeLocksHolder.wakeLocks.put(wakeLock, tagWithPrefix)
+ }
+ return wakeLock
+}
+
+/**
+ * Checks to see if there are any [PowerManager.WakeLock]s that
+ * [androidx.work.impl.background.systemalarm.SystemAlarmService] holds when all the
+ * pending commands have been drained in the command queue.
+ */
+fun checkWakeLocks() {
+ // There is a small chance that while we are checking if all the commands in the queue are
+ // drained and wake locks are no longer being held, a new command comes along and we end up
+ // with a ConcurrentModificationException. The addition of commands happens on the command
+ // processor thread and this check is done on the main thread.
+ val wakeLocksCopy = mutableMapOf<PowerManager.WakeLock?, String>()
+ synchronized(WakeLocksHolder) {
+ // Copy the WakeLocks - otherwise we can get a ConcurrentModificationException if the
+ // garbage collector kicks in and ends up removing something from the master copy while
+ // we are iterating over it.
+ wakeLocksCopy.putAll(WakeLocksHolder.wakeLocks)
+ }
+
+ wakeLocksCopy.forEach { (wakeLock, tag) ->
+ if (wakeLock?.isHeld == true) Logger.get().warning(TAG, "WakeLock held for $tag")
+ }
+}
+
+private object WakeLocksHolder {
+ val wakeLocks = WeakHashMap<PowerManager.WakeLock, String>()
+}
\ No newline at end of file
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/workers/CombineContinuationsWorker.java b/work/work-runtime/src/main/java/androidx/work/impl/workers/CombineContinuationsWorker.java
deleted file mode 100644
index ef29c98..0000000
--- a/work/work-runtime/src/main/java/androidx/work/impl/workers/CombineContinuationsWorker.java
+++ /dev/null
@@ -1,43 +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.workers;
-
-import android.content.Context;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.RestrictTo;
-import androidx.work.Worker;
-import androidx.work.WorkerParameters;
-
-/**
- * A {@link Worker} that helps combine work continuations.
- *
- * @hide
- */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
-public class CombineContinuationsWorker extends Worker {
-
- public CombineContinuationsWorker(@NonNull Context context,
- @NonNull WorkerParameters workerParams) {
- super(context, workerParams);
- }
-
- @Override
- public @NonNull Result doWork() {
- return Result.success(getInputData());
- }
-}
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/workers/CombineContinuationsWorker.kt b/work/work-runtime/src/main/java/androidx/work/impl/workers/CombineContinuationsWorker.kt
new file mode 100644
index 0000000..484da27
--- /dev/null
+++ b/work/work-runtime/src/main/java/androidx/work/impl/workers/CombineContinuationsWorker.kt
@@ -0,0 +1,30 @@
+/*
+ * 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.workers
+
+import android.content.Context
+import androidx.work.Worker
+import androidx.work.WorkerParameters
+
+/**
+ * A [Worker] that helps combine work continuations.
+ */
+internal class CombineContinuationsWorker(
+ context: Context,
+ workerParams: WorkerParameters
+) : Worker(context, workerParams) {
+ override fun doWork() = Result.success(inputData)
+}
\ No newline at end of file
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/workers/ConstraintTrackingWorker.java b/work/work-runtime/src/main/java/androidx/work/impl/workers/ConstraintTrackingWorker.java
deleted file mode 100644
index 10c3d99..0000000
--- a/work/work-runtime/src/main/java/androidx/work/impl/workers/ConstraintTrackingWorker.java
+++ /dev/null
@@ -1,245 +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.workers;
-
-import android.content.Context;
-import android.text.TextUtils;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.annotation.RestrictTo;
-import androidx.annotation.VisibleForTesting;
-import androidx.work.ListenableWorker;
-import androidx.work.Logger;
-import androidx.work.Worker;
-import androidx.work.WorkerParameters;
-import androidx.work.impl.WorkDatabase;
-import androidx.work.impl.WorkManagerImpl;
-import androidx.work.impl.constraints.WorkConstraintsCallback;
-import androidx.work.impl.constraints.WorkConstraintsTrackerImpl;
-import androidx.work.impl.constraints.trackers.Trackers;
-import androidx.work.impl.model.WorkSpec;
-import androidx.work.impl.utils.futures.SettableFuture;
-import androidx.work.impl.utils.taskexecutor.TaskExecutor;
-
-import com.google.common.util.concurrent.ListenableFuture;
-
-import java.util.Collections;
-import java.util.List;
-
-/**
- * Is an implementation of a {@link Worker} that can delegate to a different {@link Worker}
- * when the constraints are met.
- *
- * @hide
- */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
-public class ConstraintTrackingWorker extends ListenableWorker implements WorkConstraintsCallback {
-
- private static final String TAG = Logger.tagWithPrefix("ConstraintTrkngWrkr");
-
- /**
- * The {@code className} of the {@link Worker} to delegate to.
- */
- public static final String ARGUMENT_CLASS_NAME =
- "androidx.work.impl.workers.ConstraintTrackingWorker.ARGUMENT_CLASS_NAME";
-
- private WorkerParameters mWorkerParameters;
-
- // These are package-private to avoid synthetic accessor.
- final Object mLock;
- // Marking this volatile as the delegated workers could switch threads.
- volatile boolean mAreConstraintsUnmet;
- SettableFuture<Result> mFuture;
-
- @Nullable private ListenableWorker mDelegate;
-
- public ConstraintTrackingWorker(@NonNull Context appContext,
- @NonNull WorkerParameters workerParams) {
- super(appContext, workerParams);
- mWorkerParameters = workerParams;
- mLock = new Object();
- mAreConstraintsUnmet = false;
- mFuture = SettableFuture.create();
- }
-
- @NonNull
- @Override
- public ListenableFuture<Result> startWork() {
- getBackgroundExecutor().execute(new Runnable() {
- @Override
- public void run() {
- setupAndRunConstraintTrackingWork();
- }
- });
- return mFuture;
- }
-
- // Package-private to avoid synthetic accessor.
- void setupAndRunConstraintTrackingWork() {
- String className = getInputData().getString(ARGUMENT_CLASS_NAME);
- if (TextUtils.isEmpty(className)) {
- Logger.get().error(TAG, "No worker to delegate to.");
- setFutureFailed();
- return;
- }
-
- mDelegate = getWorkerFactory().createWorkerWithDefaultFallback(
- getApplicationContext(),
- className,
- mWorkerParameters);
-
- if (mDelegate == null) {
- Logger.get().debug(TAG, "No worker to delegate to.");
- setFutureFailed();
- return;
- }
-
- WorkDatabase workDatabase = getWorkDatabase();
-
- // We need to know what the real constraints are for the delegate.
- WorkSpec workSpec = workDatabase.workSpecDao().getWorkSpec(getId().toString());
- if (workSpec == null) {
- setFutureFailed();
- return;
- }
- WorkConstraintsTrackerImpl workConstraintsTracker =
- new WorkConstraintsTrackerImpl(getTrackers(), this);
-
- // Start tracking
- workConstraintsTracker.replace(Collections.singletonList(workSpec));
-
- if (workConstraintsTracker.areAllConstraintsMet(getId().toString())) {
- Logger.get().debug(TAG, "Constraints met for delegate " + className);
-
- // Wrapping the call to mDelegate#doWork() in a try catch, because
- // changes in constraints can cause the worker to throw RuntimeExceptions, and
- // that should cause a retry.
- try {
- final ListenableFuture<Result> innerFuture = mDelegate.startWork();
- innerFuture.addListener(new Runnable() {
- @Override
- public void run() {
- synchronized (mLock) {
- if (mAreConstraintsUnmet) {
- setFutureRetry();
- } else {
- mFuture.setFuture(innerFuture);
- }
- }
- }
- }, getBackgroundExecutor());
- } catch (Throwable exception) {
- Logger.get().debug(TAG, String.format(
- "Delegated worker %s threw exception in startWork.", className),
- exception);
- synchronized (mLock) {
- if (mAreConstraintsUnmet) {
- Logger.get().debug(TAG, "Constraints were unmet, Retrying.");
- setFutureRetry();
- } else {
- setFutureFailed();
- }
- }
- }
- } else {
- Logger.get().debug(TAG, String.format(
- "Constraints not met for delegate %s. Requesting retry.", className));
- setFutureRetry();
- }
-
- }
-
- // Package-private to avoid synthetic accessor.
- void setFutureFailed() {
- mFuture.set(Result.failure());
- }
-
- // Package-private to avoid synthetic accessor.
- void setFutureRetry() {
- mFuture.set(Result.retry());
- }
-
- @Override
- public void onStopped() {
- super.onStopped();
- if (mDelegate != null && !mDelegate.isStopped()) {
- // Stop is the method that sets the stopped and cancelled bits and invokes onStopped.
- mDelegate.stop();
- }
- }
-
- /**
- * @return The instance of {@link WorkDatabase}
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @VisibleForTesting
- @NonNull
- public WorkDatabase getWorkDatabase() {
- return WorkManagerImpl.getInstance(getApplicationContext()).getWorkDatabase();
- }
-
- /**
- * @return The instance of {@link TaskExecutor}.
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @VisibleForTesting
- @NonNull
- @Override
- public TaskExecutor getTaskExecutor() {
- return WorkManagerImpl.getInstance(getApplicationContext()).getWorkTaskExecutor();
- }
-
- /**
- * @return The instance of {@link Trackers}.
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @VisibleForTesting
- @NonNull
- public Trackers getTrackers() {
- return WorkManagerImpl.getInstance(getApplicationContext()).getTrackers();
- }
-
- /**
- * @return The {@link Worker} used for delegated work
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @VisibleForTesting
- @Nullable
- public ListenableWorker getDelegate() {
- return mDelegate;
- }
-
- @Override
- public void onAllConstraintsMet(@NonNull List<String> workSpecIds) {
- // WorkConstraintTracker notifies on the main thread. So we don't want to trampoline
- // between the background thread and the main thread in this case.
- }
-
- @Override
- public void onAllConstraintsNotMet(@NonNull List<String> workSpecIds) {
- // If at any point, constraints are not met mark it so we can retry the work.
- Logger.get().debug(TAG, "Constraints changed for " + workSpecIds);
- synchronized (mLock) {
- mAreConstraintsUnmet = true;
- }
- }
-}
\ No newline at end of file
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/workers/ConstraintTrackingWorker.kt b/work/work-runtime/src/main/java/androidx/work/impl/workers/ConstraintTrackingWorker.kt
new file mode 100644
index 0000000..788346c
--- /dev/null
+++ b/work/work-runtime/src/main/java/androidx/work/impl/workers/ConstraintTrackingWorker.kt
@@ -0,0 +1,162 @@
+/*
+ * 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.workers
+
+import android.content.Context
+import androidx.annotation.RestrictTo
+import androidx.annotation.VisibleForTesting
+import androidx.work.ListenableWorker
+import androidx.work.ListenableWorker.Result
+import androidx.work.Logger
+import androidx.work.WorkerParameters
+import androidx.work.impl.WorkManagerImpl
+import androidx.work.impl.constraints.WorkConstraintsCallback
+import androidx.work.impl.constraints.WorkConstraintsTrackerImpl
+import androidx.work.impl.utils.futures.SettableFuture
+import com.google.common.util.concurrent.ListenableFuture
+
+/**
+ * Is an implementation of a [androidx.work.Worker] that can delegate to a different
+ * [androidx.work.Worker] when the constraints are met.
+ *
+ * @hide
+ */
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+class ConstraintTrackingWorker(
+ appContext: Context,
+ private val workerParameters: WorkerParameters
+) : ListenableWorker(appContext, workerParameters), WorkConstraintsCallback {
+
+ private val lock = Any()
+
+ // Marking this volatile as the delegated workers could switch threads.
+ @Volatile
+ private var areConstraintsUnmet: Boolean = false
+ private val future = SettableFuture.create<Result>()
+
+ /**
+ * @return The [androidx.work.Worker] used for delegated work
+ * @hide
+ */
+ @get:VisibleForTesting
+ @get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ var delegate: ListenableWorker? = null
+ private set
+
+ override fun startWork(): ListenableFuture<Result> {
+ backgroundExecutor.execute { setupAndRunConstraintTrackingWork() }
+ return future
+ }
+
+ private fun setupAndRunConstraintTrackingWork() {
+ if (future.isCancelled) return
+
+ val className = inputData.getString(ARGUMENT_CLASS_NAME)
+ val logger = Logger.get()
+ if (className.isNullOrEmpty()) {
+ logger.error(TAG, "No worker to delegate to.")
+ future.setFailed()
+ return
+ }
+ delegate = workerFactory.createWorkerWithDefaultFallback(
+ applicationContext, className, workerParameters
+ )
+ if (delegate == null) {
+ logger.debug(TAG, "No worker to delegate to.")
+ future.setFailed()
+ return
+ }
+
+ val workManagerImpl = WorkManagerImpl.getInstance(applicationContext)
+ // We need to know what the real constraints are for the delegate.
+ val workSpec = workManagerImpl.workDatabase.workSpecDao().getWorkSpec(id.toString())
+ if (workSpec == null) {
+ future.setFailed()
+ return
+ }
+ val workConstraintsTracker = WorkConstraintsTrackerImpl(workManagerImpl.trackers, this)
+
+ // Start tracking
+ workConstraintsTracker.replace(listOf(workSpec))
+ if (workConstraintsTracker.areAllConstraintsMet(id.toString())) {
+ logger.debug(TAG, "Constraints met for delegate $className")
+
+ // Wrapping the call to mDelegate#doWork() in a try catch, because
+ // changes in constraints can cause the worker to throw RuntimeExceptions, and
+ // that should cause a retry.
+ try {
+ val innerFuture = delegate!!.startWork()
+ innerFuture.addListener({
+ synchronized(lock) {
+ if (areConstraintsUnmet) {
+ future.setRetry()
+ } else {
+ future.setFuture(innerFuture)
+ }
+ }
+ }, backgroundExecutor)
+ } catch (exception: Throwable) {
+ logger.debug(
+ TAG, "Delegated worker $className threw exception in startWork.", exception
+ )
+ synchronized(lock) {
+ if (areConstraintsUnmet) {
+ logger.debug(TAG, "Constraints were unmet, Retrying.")
+ future.setRetry()
+ } else {
+ future.setFailed()
+ }
+ }
+ }
+ } else {
+ logger.debug(
+ TAG, "Constraints not met for delegate $className. Requesting retry."
+ )
+ future.setRetry()
+ }
+ }
+
+ override fun onStopped() {
+ super.onStopped()
+ val delegateInner = delegate
+ if (delegateInner != null && !delegateInner.isStopped) {
+ // Stop is the method that sets the stopped and cancelled bits and invokes onStopped.
+ delegateInner.stop()
+ }
+ }
+
+ override fun onAllConstraintsMet(workSpecIds: List<String>) {
+ // WorkConstraintTracker notifies on the main thread. So we don't want to trampoline
+ // between the background thread and the main thread in this case.
+ }
+
+ override fun onAllConstraintsNotMet(workSpecIds: List<String>) {
+ // If at any point, constraints are not met mark it so we can retry the work.
+ Logger.get().debug(TAG, "Constraints changed for $workSpecIds")
+ synchronized(lock) { areConstraintsUnmet = true }
+ }
+}
+
+private fun SettableFuture<Result>.setFailed() = set(Result.failure())
+private fun SettableFuture<Result>.setRetry() = set(Result.retry())
+
+private val TAG = Logger.tagWithPrefix("ConstraintTrkngWrkr")
+
+/**
+ * The `className` of the [androidx.work.Worker] to delegate to.
+ */
+internal const val ARGUMENT_CLASS_NAME =
+ "androidx.work.impl.workers.ConstraintTrackingWorker.ARGUMENT_CLASS_NAME"
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/workers/DiagnosticsWorker.java b/work/work-runtime/src/main/java/androidx/work/impl/workers/DiagnosticsWorker.java
deleted file mode 100644
index 3f20289..0000000
--- a/work/work-runtime/src/main/java/androidx/work/impl/workers/DiagnosticsWorker.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright 2020 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.workers;
-
-import static androidx.work.impl.Scheduler.MAX_GREEDY_SCHEDULER_LIMIT;
-
-import android.content.Context;
-import android.os.Build;
-import android.text.TextUtils;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.annotation.RestrictTo;
-import androidx.work.Logger;
-import androidx.work.Worker;
-import androidx.work.WorkerParameters;
-import androidx.work.impl.WorkDatabase;
-import androidx.work.impl.WorkManagerImpl;
-import androidx.work.impl.model.SystemIdInfo;
-import androidx.work.impl.model.SystemIdInfoDao;
-import androidx.work.impl.model.WorkNameDao;
-import androidx.work.impl.model.WorkSpec;
-import androidx.work.impl.model.WorkSpecDao;
-import androidx.work.impl.model.WorkTagDao;
-
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-
-/**
- * The {@link androidx.work.Worker} which dumps diagnostic information.
- *
- * @hide
- */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
-public class DiagnosticsWorker extends Worker {
-
- private static final String TAG = Logger.tagWithPrefix("DiagnosticsWrkr");
-
- public DiagnosticsWorker(@NonNull Context context, @NonNull WorkerParameters parameters) {
- super(context, parameters);
- }
-
- @NonNull
- @Override
- public Result doWork() {
- WorkManagerImpl workManager = WorkManagerImpl.getInstance(getApplicationContext());
- WorkDatabase database = workManager.getWorkDatabase();
- WorkSpecDao workSpecDao = database.workSpecDao();
- WorkNameDao workNameDao = database.workNameDao();
- WorkTagDao workTagDao = database.workTagDao();
- SystemIdInfoDao systemIdInfoDao = database.systemIdInfoDao();
- long startAt = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(1);
- List<WorkSpec> completed = workSpecDao.getRecentlyCompletedWork(startAt);
- List<WorkSpec> running = workSpecDao.getRunningWork();
- List<WorkSpec> enqueued = workSpecDao.getAllEligibleWorkSpecsForScheduling(
- MAX_GREEDY_SCHEDULER_LIMIT);
-
- if (completed != null && !completed.isEmpty()) {
- Logger.get().info(TAG, "Recently completed work:\n\n");
- Logger.get().info(TAG,
- workSpecRows(workNameDao, workTagDao, systemIdInfoDao, completed));
- }
- if (running != null && !running.isEmpty()) {
- Logger.get().info(TAG, "Running work:\n\n");
- Logger.get().info(TAG, workSpecRows(workNameDao, workTagDao, systemIdInfoDao, running));
- }
- if (enqueued != null && !enqueued.isEmpty()) {
- Logger.get().info(TAG, "Enqueued work:\n\n");
- Logger.get().info(TAG,
- workSpecRows(workNameDao, workTagDao, systemIdInfoDao, enqueued));
- }
- return Result.success();
- }
-
- @NonNull
- private static String workSpecRows(
- @NonNull WorkNameDao workNameDao,
- @NonNull WorkTagDao workTagDao,
- @NonNull SystemIdInfoDao systemIdInfoDao,
- @NonNull List<WorkSpec> workSpecs) {
-
- StringBuilder sb = new StringBuilder();
- String systemIdHeader = Build.VERSION.SDK_INT >= 23 ? "Job Id" : "Alarm Id";
- String header = String.format("\n Id \t Class Name\t %s\t State\t Unique Name\t Tags\t",
- systemIdHeader);
- sb.append(header);
- for (WorkSpec workSpec : workSpecs) {
- Integer systemId = null;
- SystemIdInfo info = systemIdInfoDao.getSystemIdInfo(workSpec.id);
- if (info != null) {
- systemId = info.systemId;
- }
- List<String> names = workNameDao.getNamesForWorkSpecId(workSpec.id);
- List<String> tags = workTagDao.getTagsForWorkSpecId(workSpec.id);
- sb.append(workSpecRow(
- workSpec,
- TextUtils.join(",", names),
- systemId,
- TextUtils.join(",", tags)
- ));
- }
- return sb.toString();
- }
-
- @NonNull
- private static String workSpecRow(
- @NonNull WorkSpec workSpec,
- @Nullable String name,
- @Nullable Integer systemId,
- @NonNull String tags) {
- return String.format(
- "\n%s\t %s\t %s\t %s\t %s\t %s\t",
- workSpec.id,
- workSpec.workerClassName,
- systemId,
- workSpec.state.name(),
- name,
- tags);
- }
-}
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/workers/DiagnosticsWorker.kt b/work/work-runtime/src/main/java/androidx/work/impl/workers/DiagnosticsWorker.kt
new file mode 100644
index 0000000..7755b70
--- /dev/null
+++ b/work/work-runtime/src/main/java/androidx/work/impl/workers/DiagnosticsWorker.kt
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2020 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.workers
+
+import android.content.Context
+import android.os.Build
+import androidx.work.Logger
+import androidx.work.Worker
+import androidx.work.WorkerParameters
+import androidx.work.impl.Scheduler
+import androidx.work.impl.WorkManagerImpl
+import androidx.work.impl.model.SystemIdInfoDao
+import androidx.work.impl.model.WorkNameDao
+import androidx.work.impl.model.WorkSpec
+import androidx.work.impl.model.WorkTagDao
+import java.util.concurrent.TimeUnit
+
+internal class DiagnosticsWorker(context: Context, parameters: WorkerParameters) :
+ Worker(context, parameters) {
+ override fun doWork(): Result {
+ val workManager = WorkManagerImpl.getInstance(applicationContext)
+ val database = workManager.workDatabase
+ val workSpecDao = database.workSpecDao()
+ val workNameDao = database.workNameDao()
+ val workTagDao = database.workTagDao()
+ val systemIdInfoDao = database.systemIdInfoDao()
+ val startAt = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(1)
+ val completed = workSpecDao.getRecentlyCompletedWork(startAt)
+ val running = workSpecDao.getRunningWork()
+ val enqueued = workSpecDao.getAllEligibleWorkSpecsForScheduling(
+ Scheduler.MAX_GREEDY_SCHEDULER_LIMIT
+ )
+ if (completed.isNotEmpty()) {
+ Logger.get().info(TAG, "Recently completed work:\n\n")
+ Logger.get().info(
+ TAG, workSpecRows(workNameDao, workTagDao, systemIdInfoDao, completed)
+ )
+ }
+ if (running.isNotEmpty()) {
+ Logger.get().info(TAG, "Running work:\n\n")
+ Logger.get().info(TAG, workSpecRows(workNameDao, workTagDao, systemIdInfoDao, running))
+ }
+ if (enqueued.isNotEmpty()) {
+ Logger.get().info(TAG, "Enqueued work:\n\n")
+ Logger.get().info(TAG, workSpecRows(workNameDao, workTagDao, systemIdInfoDao, enqueued))
+ }
+ return Result.success()
+ }
+}
+
+private val TAG = Logger.tagWithPrefix("DiagnosticsWrkr")
+
+private fun workSpecRows(
+ workNameDao: WorkNameDao,
+ workTagDao: WorkTagDao,
+ systemIdInfoDao: SystemIdInfoDao,
+ workSpecs: List<WorkSpec>
+) = buildString {
+ val systemIdHeader = if (Build.VERSION.SDK_INT >= 23) "Job Id" else "Alarm Id"
+ val header = "\n Id \t Class Name\t ${systemIdHeader}\t State\t Unique Name\t Tags\t"
+ append(header)
+ workSpecs.forEach { workSpec ->
+ val systemId = systemIdInfoDao.getSystemIdInfo(workSpec.id)?.systemId
+ val names = workNameDao.getNamesForWorkSpecId(workSpec.id).joinToString(",")
+ val tags = workTagDao.getTagsForWorkSpecId(workSpec.id).joinToString(",")
+ append(workSpecRow(workSpec, names, systemId, tags))
+ }
+}
+
+private fun workSpecRow(workSpec: WorkSpec, name: String, systemId: Int?, tags: String) =
+ "\n${workSpec.id}\t ${workSpec.workerClassName}\t $systemId\t " +
+ "${workSpec.state.name}\t $name\t $tags\t"
diff --git a/work/work-testing/api/api_lint.ignore b/work/work-testing/api/api_lint.ignore
index 21adcdf..a2d9fa8 100644
--- a/work/work-testing/api/api_lint.ignore
+++ b/work/work-testing/api/api_lint.ignore
@@ -5,6 +5,10 @@
Builder methods names should use setFoo() / addFoo() / clearFoo() style: method androidx.work.testing.TestListenableWorkerBuilder.from(android.content.Context,androidx.work.WorkRequest)
+InvalidNullability: androidx.work.testing.SynchronousExecutor#execute(Runnable) parameter #0:
+ Invalid nullability on parameter `command` in method `execute`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
+
+
MissingGetterMatchingBuilder: androidx.work.testing.TestListenableWorkerBuilder#setForegroundUpdater(androidx.work.ForegroundUpdater):
W does not declare a `getForegroundUpdater()` method matching method androidx.work.testing.TestListenableWorkerBuilder.setForegroundUpdater(androidx.work.ForegroundUpdater)
MissingGetterMatchingBuilder: androidx.work.testing.TestListenableWorkerBuilder#setProgressUpdater(androidx.work.ProgressUpdater):