Merge "Adds links to Traversable demos." into androidx-main
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/VerifyDependencyVersionsTask.kt b/buildSrc/private/src/main/kotlin/androidx/build/VerifyDependencyVersionsTask.kt
index f3557a0..eb8d7dd 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/VerifyDependencyVersionsTask.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/VerifyDependencyVersionsTask.kt
@@ -214,6 +214,13 @@
// https://github.com/JetBrains/kotlin/blob/v1.9.10/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/resolvableMetadataConfiguration.kt#L102
if (name.endsWith("DependenciesMetadata")) return false
+ // don't verify test configurations of KMP projects
+ if (name.contains("JvmTest")) return false
+ if (name.contains("commonTest")) return false
+ if (name.contains("nativeTest")) return false
+ if (name.contains("TestCompilation")) return false
+ if (name.contains("TestCompile")) return false
+
return true
}
diff --git a/busytown/impl/build-studio-and-androidx.sh b/busytown/impl/build-studio-and-androidx.sh
index 41d3950..d37dd88 100755
--- a/busytown/impl/build-studio-and-androidx.sh
+++ b/busytown/impl/build-studio-and-androidx.sh
@@ -3,9 +3,6 @@
echo "Starting $0 at $(date)"
-echo 'Temporarily disabled while landing NDK version changes in manifest'
-exit 0
-
androidxArguments="$*"
SCRIPTS_DIR="$(cd $(dirname $0)/.. && pwd)"
diff --git a/datastore/datastore-core-okio/api/1.1.0-beta01.txt b/datastore/datastore-core-okio/api/1.1.0-beta01.txt
new file mode 100644
index 0000000..53d375d
--- /dev/null
+++ b/datastore/datastore-core-okio/api/1.1.0-beta01.txt
@@ -0,0 +1,21 @@
+// Signature format: 4.0
+package androidx.datastore.core.okio {
+
+ public interface OkioSerializer<T> {
+ method public T getDefaultValue();
+ method public suspend Object? readFrom(okio.BufferedSource source, kotlin.coroutines.Continuation<? super T>);
+ method public suspend Object? writeTo(T t, okio.BufferedSink sink, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ property public abstract T defaultValue;
+ }
+
+ public final class OkioStorage<T> implements androidx.datastore.core.Storage<T> {
+ ctor public OkioStorage(okio.FileSystem fileSystem, androidx.datastore.core.okio.OkioSerializer<T> serializer, optional kotlin.jvm.functions.Function2<? super okio.Path,? super okio.FileSystem,? extends androidx.datastore.core.InterProcessCoordinator> coordinatorProducer, kotlin.jvm.functions.Function0<okio.Path> producePath);
+ method public androidx.datastore.core.StorageConnection<T> createConnection();
+ }
+
+ public final class OkioStorageKt {
+ method public static androidx.datastore.core.InterProcessCoordinator createSingleProcessCoordinator(okio.Path path);
+ }
+
+}
+
diff --git a/datastore/datastore-core-okio/api/restricted_1.1.0-beta01.txt b/datastore/datastore-core-okio/api/restricted_1.1.0-beta01.txt
new file mode 100644
index 0000000..53d375d
--- /dev/null
+++ b/datastore/datastore-core-okio/api/restricted_1.1.0-beta01.txt
@@ -0,0 +1,21 @@
+// Signature format: 4.0
+package androidx.datastore.core.okio {
+
+ public interface OkioSerializer<T> {
+ method public T getDefaultValue();
+ method public suspend Object? readFrom(okio.BufferedSource source, kotlin.coroutines.Continuation<? super T>);
+ method public suspend Object? writeTo(T t, okio.BufferedSink sink, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ property public abstract T defaultValue;
+ }
+
+ public final class OkioStorage<T> implements androidx.datastore.core.Storage<T> {
+ ctor public OkioStorage(okio.FileSystem fileSystem, androidx.datastore.core.okio.OkioSerializer<T> serializer, optional kotlin.jvm.functions.Function2<? super okio.Path,? super okio.FileSystem,? extends androidx.datastore.core.InterProcessCoordinator> coordinatorProducer, kotlin.jvm.functions.Function0<okio.Path> producePath);
+ method public androidx.datastore.core.StorageConnection<T> createConnection();
+ }
+
+ public final class OkioStorageKt {
+ method public static androidx.datastore.core.InterProcessCoordinator createSingleProcessCoordinator(okio.Path path);
+ }
+
+}
+
diff --git a/datastore/datastore-core/api/1.1.0-beta01.txt b/datastore/datastore-core/api/1.1.0-beta01.txt
new file mode 100644
index 0000000..b8b292d
--- /dev/null
+++ b/datastore/datastore-core/api/1.1.0-beta01.txt
@@ -0,0 +1,115 @@
+// Signature format: 4.0
+package androidx.datastore.core {
+
+ public interface Closeable {
+ method public void close();
+ }
+
+ public final class CloseableKt {
+ method public static inline <T extends androidx.datastore.core.Closeable, R> R use(T, kotlin.jvm.functions.Function1<? super T,? extends R> block);
+ }
+
+ public final class CorruptionException extends java.io.IOException {
+ ctor public CorruptionException(String message, optional Throwable? cause);
+ }
+
+ public interface DataMigration<T> {
+ 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>);
+ property public abstract kotlinx.coroutines.flow.Flow<T> data;
+ }
+
+ public final class DataStoreFactory {
+ method public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Serializer<T> serializer, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<T>> migrations, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Serializer<T> serializer, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<T>> migrations, optional kotlinx.coroutines.CoroutineScope scope, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Serializer<T> serializer, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Serializer<T> serializer, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Storage<T> storage, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<T>> migrations, optional kotlinx.coroutines.CoroutineScope scope);
+ field public static final androidx.datastore.core.DataStoreFactory INSTANCE;
+ }
+
+ @SuppressCompatibility @kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.WARNING, message="This API is experimental and is likely to change in the future.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface ExperimentalMultiProcessDataStore {
+ }
+
+ public final class FileStorage<T> implements androidx.datastore.core.Storage<T> {
+ ctor public FileStorage(androidx.datastore.core.Serializer<T> serializer, optional kotlin.jvm.functions.Function1<? super java.io.File,? extends androidx.datastore.core.InterProcessCoordinator> coordinatorProducer, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method public androidx.datastore.core.StorageConnection<T> createConnection();
+ }
+
+ public interface InterProcessCoordinator {
+ method public kotlinx.coroutines.flow.Flow<kotlin.Unit> getUpdateNotifications();
+ method public suspend Object? getVersion(kotlin.coroutines.Continuation<? super java.lang.Integer>);
+ method public suspend Object? incrementAndGetVersion(kotlin.coroutines.Continuation<? super java.lang.Integer>);
+ method public suspend <T> Object? lock(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public suspend <T> Object? tryLock(kotlin.jvm.functions.Function2<? super java.lang.Boolean,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ property public abstract kotlinx.coroutines.flow.Flow<kotlin.Unit> updateNotifications;
+ }
+
+ public final class InterProcessCoordinator_jvmKt {
+ method public static androidx.datastore.core.InterProcessCoordinator createSingleProcessCoordinator(java.io.File file);
+ }
+
+ public final class MultiProcessCoordinatorKt {
+ method public static androidx.datastore.core.InterProcessCoordinator createMultiProcessCoordinator(kotlin.coroutines.CoroutineContext context, java.io.File file);
+ }
+
+ public final class MultiProcessDataStoreFactory {
+ method @SuppressCompatibility @androidx.datastore.core.ExperimentalMultiProcessDataStore public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Serializer<T> serializer, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<T>> migrations, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method @SuppressCompatibility @androidx.datastore.core.ExperimentalMultiProcessDataStore public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Serializer<T> serializer, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<T>> migrations, optional kotlinx.coroutines.CoroutineScope scope, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method @SuppressCompatibility @androidx.datastore.core.ExperimentalMultiProcessDataStore public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Serializer<T> serializer, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method @SuppressCompatibility @androidx.datastore.core.ExperimentalMultiProcessDataStore public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Serializer<T> serializer, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method @SuppressCompatibility @androidx.datastore.core.ExperimentalMultiProcessDataStore public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Storage<T> storage);
+ method @SuppressCompatibility @androidx.datastore.core.ExperimentalMultiProcessDataStore public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Storage<T> storage, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler);
+ method @SuppressCompatibility @androidx.datastore.core.ExperimentalMultiProcessDataStore public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Storage<T> storage, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<T>> migrations);
+ method @SuppressCompatibility @androidx.datastore.core.ExperimentalMultiProcessDataStore public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Storage<T> storage, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<T>> migrations, optional kotlinx.coroutines.CoroutineScope scope);
+ field public static final androidx.datastore.core.MultiProcessDataStoreFactory INSTANCE;
+ }
+
+ public interface ReadScope<T> extends androidx.datastore.core.Closeable {
+ method public suspend Object? readData(kotlin.coroutines.Continuation<? super T>);
+ }
+
+ public interface Serializer<T> {
+ method public T getDefaultValue();
+ 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;
+ }
+
+ public interface Storage<T> {
+ method public androidx.datastore.core.StorageConnection<T> createConnection();
+ }
+
+ public interface StorageConnection<T> extends androidx.datastore.core.Closeable {
+ method public androidx.datastore.core.InterProcessCoordinator getCoordinator();
+ method public suspend <R> Object? readScope(kotlin.jvm.functions.Function3<? super androidx.datastore.core.ReadScope<T>,? super java.lang.Boolean,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
+ method public suspend Object? writeScope(kotlin.jvm.functions.Function2<? super androidx.datastore.core.WriteScope<T>,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ property public abstract androidx.datastore.core.InterProcessCoordinator coordinator;
+ }
+
+ public final class StorageConnectionKt {
+ method public static suspend <T> Object? readData(androidx.datastore.core.StorageConnection<T>, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? writeData(androidx.datastore.core.StorageConnection<T>, T value, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ }
+
+ public interface WriteScope<T> extends androidx.datastore.core.ReadScope<T> {
+ method public suspend Object? writeData(T value, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ }
+
+}
+
+package androidx.datastore.core.handlers {
+
+ 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>) throws java.io.IOException;
+ }
+
+}
+
diff --git a/datastore/datastore-core/api/res-1.1.0-beta01.txt b/datastore/datastore-core/api/res-1.1.0-beta01.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/datastore/datastore-core/api/res-1.1.0-beta01.txt
diff --git a/datastore/datastore-core/api/restricted_1.1.0-beta01.txt b/datastore/datastore-core/api/restricted_1.1.0-beta01.txt
new file mode 100644
index 0000000..b8b292d
--- /dev/null
+++ b/datastore/datastore-core/api/restricted_1.1.0-beta01.txt
@@ -0,0 +1,115 @@
+// Signature format: 4.0
+package androidx.datastore.core {
+
+ public interface Closeable {
+ method public void close();
+ }
+
+ public final class CloseableKt {
+ method public static inline <T extends androidx.datastore.core.Closeable, R> R use(T, kotlin.jvm.functions.Function1<? super T,? extends R> block);
+ }
+
+ public final class CorruptionException extends java.io.IOException {
+ ctor public CorruptionException(String message, optional Throwable? cause);
+ }
+
+ public interface DataMigration<T> {
+ 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>);
+ property public abstract kotlinx.coroutines.flow.Flow<T> data;
+ }
+
+ public final class DataStoreFactory {
+ method public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Serializer<T> serializer, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<T>> migrations, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Serializer<T> serializer, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<T>> migrations, optional kotlinx.coroutines.CoroutineScope scope, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Serializer<T> serializer, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Serializer<T> serializer, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Storage<T> storage, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<T>> migrations, optional kotlinx.coroutines.CoroutineScope scope);
+ field public static final androidx.datastore.core.DataStoreFactory INSTANCE;
+ }
+
+ @SuppressCompatibility @kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.WARNING, message="This API is experimental and is likely to change in the future.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface ExperimentalMultiProcessDataStore {
+ }
+
+ public final class FileStorage<T> implements androidx.datastore.core.Storage<T> {
+ ctor public FileStorage(androidx.datastore.core.Serializer<T> serializer, optional kotlin.jvm.functions.Function1<? super java.io.File,? extends androidx.datastore.core.InterProcessCoordinator> coordinatorProducer, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method public androidx.datastore.core.StorageConnection<T> createConnection();
+ }
+
+ public interface InterProcessCoordinator {
+ method public kotlinx.coroutines.flow.Flow<kotlin.Unit> getUpdateNotifications();
+ method public suspend Object? getVersion(kotlin.coroutines.Continuation<? super java.lang.Integer>);
+ method public suspend Object? incrementAndGetVersion(kotlin.coroutines.Continuation<? super java.lang.Integer>);
+ method public suspend <T> Object? lock(kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ method public suspend <T> Object? tryLock(kotlin.jvm.functions.Function2<? super java.lang.Boolean,? super kotlin.coroutines.Continuation<? super T>,?> block, kotlin.coroutines.Continuation<? super T>);
+ property public abstract kotlinx.coroutines.flow.Flow<kotlin.Unit> updateNotifications;
+ }
+
+ public final class InterProcessCoordinator_jvmKt {
+ method public static androidx.datastore.core.InterProcessCoordinator createSingleProcessCoordinator(java.io.File file);
+ }
+
+ public final class MultiProcessCoordinatorKt {
+ method public static androidx.datastore.core.InterProcessCoordinator createMultiProcessCoordinator(kotlin.coroutines.CoroutineContext context, java.io.File file);
+ }
+
+ public final class MultiProcessDataStoreFactory {
+ method @SuppressCompatibility @androidx.datastore.core.ExperimentalMultiProcessDataStore public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Serializer<T> serializer, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<T>> migrations, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method @SuppressCompatibility @androidx.datastore.core.ExperimentalMultiProcessDataStore public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Serializer<T> serializer, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<T>> migrations, optional kotlinx.coroutines.CoroutineScope scope, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method @SuppressCompatibility @androidx.datastore.core.ExperimentalMultiProcessDataStore public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Serializer<T> serializer, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method @SuppressCompatibility @androidx.datastore.core.ExperimentalMultiProcessDataStore public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Serializer<T> serializer, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method @SuppressCompatibility @androidx.datastore.core.ExperimentalMultiProcessDataStore public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Storage<T> storage);
+ method @SuppressCompatibility @androidx.datastore.core.ExperimentalMultiProcessDataStore public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Storage<T> storage, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler);
+ method @SuppressCompatibility @androidx.datastore.core.ExperimentalMultiProcessDataStore public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Storage<T> storage, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<T>> migrations);
+ method @SuppressCompatibility @androidx.datastore.core.ExperimentalMultiProcessDataStore public <T> androidx.datastore.core.DataStore<T> create(androidx.datastore.core.Storage<T> storage, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<T>> migrations, optional kotlinx.coroutines.CoroutineScope scope);
+ field public static final androidx.datastore.core.MultiProcessDataStoreFactory INSTANCE;
+ }
+
+ public interface ReadScope<T> extends androidx.datastore.core.Closeable {
+ method public suspend Object? readData(kotlin.coroutines.Continuation<? super T>);
+ }
+
+ public interface Serializer<T> {
+ method public T getDefaultValue();
+ 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;
+ }
+
+ public interface Storage<T> {
+ method public androidx.datastore.core.StorageConnection<T> createConnection();
+ }
+
+ public interface StorageConnection<T> extends androidx.datastore.core.Closeable {
+ method public androidx.datastore.core.InterProcessCoordinator getCoordinator();
+ method public suspend <R> Object? readScope(kotlin.jvm.functions.Function3<? super androidx.datastore.core.ReadScope<T>,? super java.lang.Boolean,? super kotlin.coroutines.Continuation<? super R>,?> block, kotlin.coroutines.Continuation<? super R>);
+ method public suspend Object? writeScope(kotlin.jvm.functions.Function2<? super androidx.datastore.core.WriteScope<T>,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,?> block, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ property public abstract androidx.datastore.core.InterProcessCoordinator coordinator;
+ }
+
+ public final class StorageConnectionKt {
+ method public static suspend <T> Object? readData(androidx.datastore.core.StorageConnection<T>, kotlin.coroutines.Continuation<? super T>);
+ method public static suspend <T> Object? writeData(androidx.datastore.core.StorageConnection<T>, T value, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ }
+
+ public interface WriteScope<T> extends androidx.datastore.core.ReadScope<T> {
+ method public suspend Object? writeData(T value, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ }
+
+}
+
+package androidx.datastore.core.handlers {
+
+ 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>) throws java.io.IOException;
+ }
+
+}
+
diff --git a/datastore/datastore-preferences-core/api/1.1.0-beta01.txt b/datastore/datastore-preferences-core/api/1.1.0-beta01.txt
new file mode 100644
index 0000000..a2e5dcc
--- /dev/null
+++ b/datastore/datastore-preferences-core/api/1.1.0-beta01.txt
@@ -0,0 +1,74 @@
+// Signature format: 4.0
+package androidx.datastore.preferences.core {
+
+ public final class MutablePreferences extends androidx.datastore.preferences.core.Preferences {
+ method public java.util.Map<androidx.datastore.preferences.core.Preferences.Key<?>,java.lang.Object> asMap();
+ method public void clear();
+ method public operator <T> boolean contains(androidx.datastore.preferences.core.Preferences.Key<T> key);
+ method public operator <T> T? get(androidx.datastore.preferences.core.Preferences.Key<T> key);
+ method public operator void minusAssign(androidx.datastore.preferences.core.Preferences.Key<?> key);
+ method public operator void plusAssign(androidx.datastore.preferences.core.Preferences prefs);
+ method public operator void plusAssign(androidx.datastore.preferences.core.Preferences.Pair<?> pair);
+ method public void putAll(androidx.datastore.preferences.core.Preferences.Pair<?>... pairs);
+ method public <T> T remove(androidx.datastore.preferences.core.Preferences.Key<T> key);
+ method public operator <T> void set(androidx.datastore.preferences.core.Preferences.Key<T> key, T value);
+ }
+
+ public final class PreferenceDataStoreFactory {
+ method public androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences> create(optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<androidx.datastore.preferences.core.Preferences>> migrations, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method public androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences> create(optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<androidx.datastore.preferences.core.Preferences>> migrations, optional kotlinx.coroutines.CoroutineScope scope, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method public androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences> create(optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences>? corruptionHandler, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method public androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences> create(androidx.datastore.core.Storage<androidx.datastore.preferences.core.Preferences> storage, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<androidx.datastore.preferences.core.Preferences>> migrations, optional kotlinx.coroutines.CoroutineScope scope);
+ method public androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences> create(kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method public androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences> createWithPath(optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<androidx.datastore.preferences.core.Preferences>> migrations, optional kotlinx.coroutines.CoroutineScope scope, kotlin.jvm.functions.Function0<okio.Path> produceFile);
+ field public static final androidx.datastore.preferences.core.PreferenceDataStoreFactory INSTANCE;
+ }
+
+ public abstract class Preferences {
+ method public abstract java.util.Map<androidx.datastore.preferences.core.Preferences.Key<?>,java.lang.Object> asMap();
+ method public abstract operator <T> boolean contains(androidx.datastore.preferences.core.Preferences.Key<T> key);
+ method public abstract operator <T> T? get(androidx.datastore.preferences.core.Preferences.Key<T> key);
+ method public final androidx.datastore.preferences.core.MutablePreferences toMutablePreferences();
+ method public final androidx.datastore.preferences.core.Preferences toPreferences();
+ }
+
+ public static final class Preferences.Key<T> {
+ method public String getName();
+ method public infix androidx.datastore.preferences.core.Preferences.Pair<T> to(T value);
+ property public final String name;
+ }
+
+ public static final class Preferences.Pair<T> {
+ }
+
+ public final class PreferencesFactory {
+ method public static androidx.datastore.preferences.core.Preferences create(androidx.datastore.preferences.core.Preferences.Pair<?>... pairs);
+ method public static androidx.datastore.preferences.core.Preferences createEmpty();
+ method public static androidx.datastore.preferences.core.MutablePreferences createMutable(androidx.datastore.preferences.core.Preferences.Pair<?>... pairs);
+ }
+
+ public final class PreferencesKeys {
+ method public static androidx.datastore.preferences.core.Preferences.Key<java.lang.Boolean> booleanKey(String name);
+ method public static androidx.datastore.preferences.core.Preferences.Key<byte[]> byteArrayKey(String name);
+ method public static androidx.datastore.preferences.core.Preferences.Key<java.lang.Double> doubleKey(String name);
+ method public static androidx.datastore.preferences.core.Preferences.Key<java.lang.Float> floatKey(String name);
+ method public static androidx.datastore.preferences.core.Preferences.Key<java.lang.Integer> intKey(String name);
+ method public static androidx.datastore.preferences.core.Preferences.Key<java.lang.Long> longKey(String name);
+ method public static androidx.datastore.preferences.core.Preferences.Key<java.lang.String> stringKey(String name);
+ method public static androidx.datastore.preferences.core.Preferences.Key<java.util.Set<java.lang.String>> stringSetKey(String name);
+ }
+
+ 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>);
+ }
+
+ public final class PreferencesSerializer implements androidx.datastore.core.okio.OkioSerializer<androidx.datastore.preferences.core.Preferences> {
+ method public androidx.datastore.preferences.core.Preferences getDefaultValue();
+ method @kotlin.jvm.Throws(exceptionClasses={IOException::class, CorruptionException::class}) public suspend Object? readFrom(okio.BufferedSource source, kotlin.coroutines.Continuation<? super androidx.datastore.preferences.core.Preferences>) throws androidx.datastore.core.CorruptionException, java.io.IOException;
+ method @kotlin.jvm.Throws(exceptionClasses={IOException::class, CorruptionException::class}) public suspend Object? writeTo(androidx.datastore.preferences.core.Preferences t, okio.BufferedSink sink, kotlin.coroutines.Continuation<? super kotlin.Unit>) throws androidx.datastore.core.CorruptionException, java.io.IOException;
+ property public androidx.datastore.preferences.core.Preferences defaultValue;
+ field public static final androidx.datastore.preferences.core.PreferencesSerializer INSTANCE;
+ }
+
+}
+
diff --git a/datastore/datastore-preferences-core/api/restricted_1.1.0-beta01.txt b/datastore/datastore-preferences-core/api/restricted_1.1.0-beta01.txt
new file mode 100644
index 0000000..a2e5dcc
--- /dev/null
+++ b/datastore/datastore-preferences-core/api/restricted_1.1.0-beta01.txt
@@ -0,0 +1,74 @@
+// Signature format: 4.0
+package androidx.datastore.preferences.core {
+
+ public final class MutablePreferences extends androidx.datastore.preferences.core.Preferences {
+ method public java.util.Map<androidx.datastore.preferences.core.Preferences.Key<?>,java.lang.Object> asMap();
+ method public void clear();
+ method public operator <T> boolean contains(androidx.datastore.preferences.core.Preferences.Key<T> key);
+ method public operator <T> T? get(androidx.datastore.preferences.core.Preferences.Key<T> key);
+ method public operator void minusAssign(androidx.datastore.preferences.core.Preferences.Key<?> key);
+ method public operator void plusAssign(androidx.datastore.preferences.core.Preferences prefs);
+ method public operator void plusAssign(androidx.datastore.preferences.core.Preferences.Pair<?> pair);
+ method public void putAll(androidx.datastore.preferences.core.Preferences.Pair<?>... pairs);
+ method public <T> T remove(androidx.datastore.preferences.core.Preferences.Key<T> key);
+ method public operator <T> void set(androidx.datastore.preferences.core.Preferences.Key<T> key, T value);
+ }
+
+ public final class PreferenceDataStoreFactory {
+ method public androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences> create(optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<androidx.datastore.preferences.core.Preferences>> migrations, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method public androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences> create(optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<androidx.datastore.preferences.core.Preferences>> migrations, optional kotlinx.coroutines.CoroutineScope scope, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method public androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences> create(optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences>? corruptionHandler, kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method public androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences> create(androidx.datastore.core.Storage<androidx.datastore.preferences.core.Preferences> storage, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<androidx.datastore.preferences.core.Preferences>> migrations, optional kotlinx.coroutines.CoroutineScope scope);
+ method public androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences> create(kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
+ method public androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences> createWithPath(optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences>? corruptionHandler, optional java.util.List<? extends androidx.datastore.core.DataMigration<androidx.datastore.preferences.core.Preferences>> migrations, optional kotlinx.coroutines.CoroutineScope scope, kotlin.jvm.functions.Function0<okio.Path> produceFile);
+ field public static final androidx.datastore.preferences.core.PreferenceDataStoreFactory INSTANCE;
+ }
+
+ public abstract class Preferences {
+ method public abstract java.util.Map<androidx.datastore.preferences.core.Preferences.Key<?>,java.lang.Object> asMap();
+ method public abstract operator <T> boolean contains(androidx.datastore.preferences.core.Preferences.Key<T> key);
+ method public abstract operator <T> T? get(androidx.datastore.preferences.core.Preferences.Key<T> key);
+ method public final androidx.datastore.preferences.core.MutablePreferences toMutablePreferences();
+ method public final androidx.datastore.preferences.core.Preferences toPreferences();
+ }
+
+ public static final class Preferences.Key<T> {
+ method public String getName();
+ method public infix androidx.datastore.preferences.core.Preferences.Pair<T> to(T value);
+ property public final String name;
+ }
+
+ public static final class Preferences.Pair<T> {
+ }
+
+ public final class PreferencesFactory {
+ method public static androidx.datastore.preferences.core.Preferences create(androidx.datastore.preferences.core.Preferences.Pair<?>... pairs);
+ method public static androidx.datastore.preferences.core.Preferences createEmpty();
+ method public static androidx.datastore.preferences.core.MutablePreferences createMutable(androidx.datastore.preferences.core.Preferences.Pair<?>... pairs);
+ }
+
+ public final class PreferencesKeys {
+ method public static androidx.datastore.preferences.core.Preferences.Key<java.lang.Boolean> booleanKey(String name);
+ method public static androidx.datastore.preferences.core.Preferences.Key<byte[]> byteArrayKey(String name);
+ method public static androidx.datastore.preferences.core.Preferences.Key<java.lang.Double> doubleKey(String name);
+ method public static androidx.datastore.preferences.core.Preferences.Key<java.lang.Float> floatKey(String name);
+ method public static androidx.datastore.preferences.core.Preferences.Key<java.lang.Integer> intKey(String name);
+ method public static androidx.datastore.preferences.core.Preferences.Key<java.lang.Long> longKey(String name);
+ method public static androidx.datastore.preferences.core.Preferences.Key<java.lang.String> stringKey(String name);
+ method public static androidx.datastore.preferences.core.Preferences.Key<java.util.Set<java.lang.String>> stringSetKey(String name);
+ }
+
+ 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>);
+ }
+
+ public final class PreferencesSerializer implements androidx.datastore.core.okio.OkioSerializer<androidx.datastore.preferences.core.Preferences> {
+ method public androidx.datastore.preferences.core.Preferences getDefaultValue();
+ method @kotlin.jvm.Throws(exceptionClasses={IOException::class, CorruptionException::class}) public suspend Object? readFrom(okio.BufferedSource source, kotlin.coroutines.Continuation<? super androidx.datastore.preferences.core.Preferences>) throws androidx.datastore.core.CorruptionException, java.io.IOException;
+ method @kotlin.jvm.Throws(exceptionClasses={IOException::class, CorruptionException::class}) public suspend Object? writeTo(androidx.datastore.preferences.core.Preferences t, okio.BufferedSink sink, kotlin.coroutines.Continuation<? super kotlin.Unit>) throws androidx.datastore.core.CorruptionException, java.io.IOException;
+ property public androidx.datastore.preferences.core.Preferences defaultValue;
+ field public static final androidx.datastore.preferences.core.PreferencesSerializer INSTANCE;
+ }
+
+}
+
diff --git a/datastore/datastore-preferences-rxjava2/api/1.1.0-beta01.txt b/datastore/datastore-preferences-rxjava2/api/1.1.0-beta01.txt
new file mode 100644
index 0000000..4a1028c
--- /dev/null
+++ b/datastore/datastore-preferences-rxjava2/api/1.1.0-beta01.txt
@@ -0,0 +1,19 @@
+// Signature format: 4.0
+package androidx.datastore.preferences.rxjava2 {
+
+ public final class RxPreferenceDataStoreBuilder {
+ ctor public RxPreferenceDataStoreBuilder(android.content.Context context, String name);
+ ctor public RxPreferenceDataStoreBuilder(java.util.concurrent.Callable<java.io.File> produceFile);
+ method public androidx.datastore.preferences.rxjava2.RxPreferenceDataStoreBuilder addDataMigration(androidx.datastore.core.DataMigration<androidx.datastore.preferences.core.Preferences> dataMigration);
+ method public androidx.datastore.preferences.rxjava2.RxPreferenceDataStoreBuilder addRxDataMigration(androidx.datastore.rxjava2.RxDataMigration<androidx.datastore.preferences.core.Preferences> rxDataMigration);
+ method public androidx.datastore.rxjava2.RxDataStore<androidx.datastore.preferences.core.Preferences> build();
+ method public androidx.datastore.preferences.rxjava2.RxPreferenceDataStoreBuilder setCorruptionHandler(androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences> corruptionHandler);
+ method public androidx.datastore.preferences.rxjava2.RxPreferenceDataStoreBuilder setIoScheduler(io.reactivex.Scheduler ioScheduler);
+ }
+
+ public final class RxPreferenceDataStoreDelegateKt {
+ method public static kotlin.properties.ReadOnlyProperty<android.content.Context,androidx.datastore.rxjava2.RxDataStore<androidx.datastore.preferences.core.Preferences>> rxPreferencesDataStore(String name, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences>? corruptionHandler, optional kotlin.jvm.functions.Function1<? super android.content.Context,? extends java.util.List<? extends androidx.datastore.core.DataMigration<androidx.datastore.preferences.core.Preferences>>> produceMigrations, optional io.reactivex.Scheduler scheduler);
+ }
+
+}
+
diff --git a/datastore/datastore-preferences-rxjava2/api/res-1.1.0-beta01.txt b/datastore/datastore-preferences-rxjava2/api/res-1.1.0-beta01.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/datastore/datastore-preferences-rxjava2/api/res-1.1.0-beta01.txt
diff --git a/datastore/datastore-preferences-rxjava2/api/restricted_1.1.0-beta01.txt b/datastore/datastore-preferences-rxjava2/api/restricted_1.1.0-beta01.txt
new file mode 100644
index 0000000..4a1028c
--- /dev/null
+++ b/datastore/datastore-preferences-rxjava2/api/restricted_1.1.0-beta01.txt
@@ -0,0 +1,19 @@
+// Signature format: 4.0
+package androidx.datastore.preferences.rxjava2 {
+
+ public final class RxPreferenceDataStoreBuilder {
+ ctor public RxPreferenceDataStoreBuilder(android.content.Context context, String name);
+ ctor public RxPreferenceDataStoreBuilder(java.util.concurrent.Callable<java.io.File> produceFile);
+ method public androidx.datastore.preferences.rxjava2.RxPreferenceDataStoreBuilder addDataMigration(androidx.datastore.core.DataMigration<androidx.datastore.preferences.core.Preferences> dataMigration);
+ method public androidx.datastore.preferences.rxjava2.RxPreferenceDataStoreBuilder addRxDataMigration(androidx.datastore.rxjava2.RxDataMigration<androidx.datastore.preferences.core.Preferences> rxDataMigration);
+ method public androidx.datastore.rxjava2.RxDataStore<androidx.datastore.preferences.core.Preferences> build();
+ method public androidx.datastore.preferences.rxjava2.RxPreferenceDataStoreBuilder setCorruptionHandler(androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences> corruptionHandler);
+ method public androidx.datastore.preferences.rxjava2.RxPreferenceDataStoreBuilder setIoScheduler(io.reactivex.Scheduler ioScheduler);
+ }
+
+ public final class RxPreferenceDataStoreDelegateKt {
+ method public static kotlin.properties.ReadOnlyProperty<android.content.Context,androidx.datastore.rxjava2.RxDataStore<androidx.datastore.preferences.core.Preferences>> rxPreferencesDataStore(String name, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences>? corruptionHandler, optional kotlin.jvm.functions.Function1<? super android.content.Context,? extends java.util.List<? extends androidx.datastore.core.DataMigration<androidx.datastore.preferences.core.Preferences>>> produceMigrations, optional io.reactivex.Scheduler scheduler);
+ }
+
+}
+
diff --git a/datastore/datastore-preferences-rxjava3/api/1.1.0-beta01.txt b/datastore/datastore-preferences-rxjava3/api/1.1.0-beta01.txt
new file mode 100644
index 0000000..b11bf51
--- /dev/null
+++ b/datastore/datastore-preferences-rxjava3/api/1.1.0-beta01.txt
@@ -0,0 +1,19 @@
+// Signature format: 4.0
+package androidx.datastore.preferences.rxjava3 {
+
+ public final class RxPreferenceDataStoreBuilder {
+ ctor public RxPreferenceDataStoreBuilder(android.content.Context context, String name);
+ ctor public RxPreferenceDataStoreBuilder(java.util.concurrent.Callable<java.io.File> produceFile);
+ method public androidx.datastore.preferences.rxjava3.RxPreferenceDataStoreBuilder addDataMigration(androidx.datastore.core.DataMigration<androidx.datastore.preferences.core.Preferences> dataMigration);
+ method public androidx.datastore.preferences.rxjava3.RxPreferenceDataStoreBuilder addRxDataMigration(androidx.datastore.rxjava3.RxDataMigration<androidx.datastore.preferences.core.Preferences> rxDataMigration);
+ method public androidx.datastore.rxjava3.RxDataStore<androidx.datastore.preferences.core.Preferences> build();
+ method public androidx.datastore.preferences.rxjava3.RxPreferenceDataStoreBuilder setCorruptionHandler(androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences> corruptionHandler);
+ method public androidx.datastore.preferences.rxjava3.RxPreferenceDataStoreBuilder setIoScheduler(io.reactivex.rxjava3.core.Scheduler ioScheduler);
+ }
+
+ public final class RxPreferenceDataStoreDelegateKt {
+ method public static kotlin.properties.ReadOnlyProperty<android.content.Context,androidx.datastore.rxjava3.RxDataStore<androidx.datastore.preferences.core.Preferences>> rxPreferencesDataStore(String name, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences>? corruptionHandler, optional kotlin.jvm.functions.Function1<? super android.content.Context,? extends java.util.List<? extends androidx.datastore.core.DataMigration<androidx.datastore.preferences.core.Preferences>>> produceMigrations, optional io.reactivex.rxjava3.core.Scheduler scheduler);
+ }
+
+}
+
diff --git a/datastore/datastore-preferences-rxjava3/api/res-1.1.0-beta01.txt b/datastore/datastore-preferences-rxjava3/api/res-1.1.0-beta01.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/datastore/datastore-preferences-rxjava3/api/res-1.1.0-beta01.txt
diff --git a/datastore/datastore-preferences-rxjava3/api/restricted_1.1.0-beta01.txt b/datastore/datastore-preferences-rxjava3/api/restricted_1.1.0-beta01.txt
new file mode 100644
index 0000000..b11bf51
--- /dev/null
+++ b/datastore/datastore-preferences-rxjava3/api/restricted_1.1.0-beta01.txt
@@ -0,0 +1,19 @@
+// Signature format: 4.0
+package androidx.datastore.preferences.rxjava3 {
+
+ public final class RxPreferenceDataStoreBuilder {
+ ctor public RxPreferenceDataStoreBuilder(android.content.Context context, String name);
+ ctor public RxPreferenceDataStoreBuilder(java.util.concurrent.Callable<java.io.File> produceFile);
+ method public androidx.datastore.preferences.rxjava3.RxPreferenceDataStoreBuilder addDataMigration(androidx.datastore.core.DataMigration<androidx.datastore.preferences.core.Preferences> dataMigration);
+ method public androidx.datastore.preferences.rxjava3.RxPreferenceDataStoreBuilder addRxDataMigration(androidx.datastore.rxjava3.RxDataMigration<androidx.datastore.preferences.core.Preferences> rxDataMigration);
+ method public androidx.datastore.rxjava3.RxDataStore<androidx.datastore.preferences.core.Preferences> build();
+ method public androidx.datastore.preferences.rxjava3.RxPreferenceDataStoreBuilder setCorruptionHandler(androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences> corruptionHandler);
+ method public androidx.datastore.preferences.rxjava3.RxPreferenceDataStoreBuilder setIoScheduler(io.reactivex.rxjava3.core.Scheduler ioScheduler);
+ }
+
+ public final class RxPreferenceDataStoreDelegateKt {
+ method public static kotlin.properties.ReadOnlyProperty<android.content.Context,androidx.datastore.rxjava3.RxDataStore<androidx.datastore.preferences.core.Preferences>> rxPreferencesDataStore(String name, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences>? corruptionHandler, optional kotlin.jvm.functions.Function1<? super android.content.Context,? extends java.util.List<? extends androidx.datastore.core.DataMigration<androidx.datastore.preferences.core.Preferences>>> produceMigrations, optional io.reactivex.rxjava3.core.Scheduler scheduler);
+ }
+
+}
+
diff --git a/datastore/datastore-preferences/api/1.1.0-beta01.txt b/datastore/datastore-preferences/api/1.1.0-beta01.txt
new file mode 100644
index 0000000..3ee7f63
--- /dev/null
+++ b/datastore/datastore-preferences/api/1.1.0-beta01.txt
@@ -0,0 +1,20 @@
+// Signature format: 4.0
+package androidx.datastore.preferences {
+
+ public final class PreferenceDataStoreDelegateKt {
+ method public static kotlin.properties.ReadOnlyProperty<android.content.Context,androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences>> preferencesDataStore(String name, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences>? corruptionHandler, optional kotlin.jvm.functions.Function1<? super android.content.Context,? extends java.util.List<? extends androidx.datastore.core.DataMigration<androidx.datastore.preferences.core.Preferences>>> produceMigrations, optional kotlinx.coroutines.CoroutineScope scope);
+ }
+
+ public final class PreferenceDataStoreFile {
+ method public static java.io.File preferencesDataStoreFile(android.content.Context, String name);
+ }
+
+ public final class SharedPreferencesMigrationKt {
+ method public static androidx.datastore.migrations.SharedPreferencesMigration<androidx.datastore.preferences.core.Preferences> SharedPreferencesMigration(android.content.Context context, String sharedPreferencesName);
+ method public static androidx.datastore.migrations.SharedPreferencesMigration<androidx.datastore.preferences.core.Preferences> SharedPreferencesMigration(android.content.Context context, String sharedPreferencesName, optional java.util.Set<java.lang.String> keysToMigrate);
+ method public static androidx.datastore.migrations.SharedPreferencesMigration<androidx.datastore.preferences.core.Preferences> SharedPreferencesMigration(kotlin.jvm.functions.Function0<? extends android.content.SharedPreferences> produceSharedPreferences);
+ method public static androidx.datastore.migrations.SharedPreferencesMigration<androidx.datastore.preferences.core.Preferences> SharedPreferencesMigration(kotlin.jvm.functions.Function0<? extends android.content.SharedPreferences> produceSharedPreferences, optional java.util.Set<java.lang.String> keysToMigrate);
+ }
+
+}
+
diff --git a/datastore/datastore-preferences/api/res-1.1.0-beta01.txt b/datastore/datastore-preferences/api/res-1.1.0-beta01.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/datastore/datastore-preferences/api/res-1.1.0-beta01.txt
diff --git a/datastore/datastore-preferences/api/restricted_1.1.0-beta01.txt b/datastore/datastore-preferences/api/restricted_1.1.0-beta01.txt
new file mode 100644
index 0000000..3ee7f63
--- /dev/null
+++ b/datastore/datastore-preferences/api/restricted_1.1.0-beta01.txt
@@ -0,0 +1,20 @@
+// Signature format: 4.0
+package androidx.datastore.preferences {
+
+ public final class PreferenceDataStoreDelegateKt {
+ method public static kotlin.properties.ReadOnlyProperty<android.content.Context,androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences>> preferencesDataStore(String name, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.core.Preferences>? corruptionHandler, optional kotlin.jvm.functions.Function1<? super android.content.Context,? extends java.util.List<? extends androidx.datastore.core.DataMigration<androidx.datastore.preferences.core.Preferences>>> produceMigrations, optional kotlinx.coroutines.CoroutineScope scope);
+ }
+
+ public final class PreferenceDataStoreFile {
+ method public static java.io.File preferencesDataStoreFile(android.content.Context, String name);
+ }
+
+ public final class SharedPreferencesMigrationKt {
+ method public static androidx.datastore.migrations.SharedPreferencesMigration<androidx.datastore.preferences.core.Preferences> SharedPreferencesMigration(android.content.Context context, String sharedPreferencesName);
+ method public static androidx.datastore.migrations.SharedPreferencesMigration<androidx.datastore.preferences.core.Preferences> SharedPreferencesMigration(android.content.Context context, String sharedPreferencesName, optional java.util.Set<java.lang.String> keysToMigrate);
+ method public static androidx.datastore.migrations.SharedPreferencesMigration<androidx.datastore.preferences.core.Preferences> SharedPreferencesMigration(kotlin.jvm.functions.Function0<? extends android.content.SharedPreferences> produceSharedPreferences);
+ method public static androidx.datastore.migrations.SharedPreferencesMigration<androidx.datastore.preferences.core.Preferences> SharedPreferencesMigration(kotlin.jvm.functions.Function0<? extends android.content.SharedPreferences> produceSharedPreferences, optional java.util.Set<java.lang.String> keysToMigrate);
+ }
+
+}
+
diff --git a/datastore/datastore-rxjava2/api/1.1.0-beta01.txt b/datastore/datastore-rxjava2/api/1.1.0-beta01.txt
new file mode 100644
index 0000000..a05559f
--- /dev/null
+++ b/datastore/datastore-rxjava2/api/1.1.0-beta01.txt
@@ -0,0 +1,48 @@
+// Signature format: 4.0
+package androidx.datastore.rxjava2 {
+
+ public interface RxDataMigration<T> {
+ method public io.reactivex.Completable cleanUp();
+ method public io.reactivex.Single<T!> migrate(T?);
+ method public io.reactivex.Single<java.lang.Boolean!> shouldMigrate(T?);
+ }
+
+ public final class RxDataStore<T> implements io.reactivex.disposables.Disposable {
+ method @SuppressCompatibility @kotlinx.coroutines.ExperimentalCoroutinesApi public io.reactivex.Flowable<T> data();
+ method public void dispose();
+ method public boolean isDisposed();
+ method public io.reactivex.Completable shutdownComplete();
+ method @SuppressCompatibility @kotlinx.coroutines.ExperimentalCoroutinesApi public io.reactivex.Single<T> updateDataAsync(io.reactivex.functions.Function<T,io.reactivex.Single<T>> transform);
+ field public static final androidx.datastore.rxjava2.RxDataStore.Companion Companion;
+ }
+
+ public static final class RxDataStore.Companion {
+ }
+
+ public final class RxDataStoreBuilder<T> {
+ ctor public RxDataStoreBuilder(android.content.Context context, String fileName, androidx.datastore.core.Serializer<T> serializer);
+ ctor public RxDataStoreBuilder(java.util.concurrent.Callable<java.io.File> produceFile, androidx.datastore.core.Serializer<T> serializer);
+ method public androidx.datastore.rxjava2.RxDataStoreBuilder<T> addDataMigration(androidx.datastore.core.DataMigration<T> dataMigration);
+ method public androidx.datastore.rxjava2.RxDataStoreBuilder<T> addRxDataMigration(androidx.datastore.rxjava2.RxDataMigration<T> rxDataMigration);
+ method public androidx.datastore.rxjava2.RxDataStore<T> build();
+ method public androidx.datastore.rxjava2.RxDataStoreBuilder<T> setCorruptionHandler(androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T> corruptionHandler);
+ method public androidx.datastore.rxjava2.RxDataStoreBuilder<T> setIoScheduler(io.reactivex.Scheduler ioScheduler);
+ }
+
+ public final class RxDataStoreDelegateKt {
+ method public static <T> kotlin.properties.ReadOnlyProperty<android.content.Context,androidx.datastore.rxjava2.RxDataStore<T>> rxDataStore(String fileName, androidx.datastore.core.Serializer<T> serializer, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional kotlin.jvm.functions.Function1<? super android.content.Context,? extends java.util.List<? extends androidx.datastore.core.DataMigration<T>>> produceMigrations, optional io.reactivex.Scheduler scheduler);
+ }
+
+ @kotlin.jvm.JvmDefaultWithCompatibility public interface RxSharedPreferencesMigration<T> {
+ method public io.reactivex.Single<T> migrate(androidx.datastore.migrations.SharedPreferencesView sharedPreferencesView, T currentData);
+ method public default io.reactivex.Single<java.lang.Boolean> shouldMigrate(T currentData);
+ }
+
+ public final class RxSharedPreferencesMigrationBuilder<T> {
+ ctor public RxSharedPreferencesMigrationBuilder(android.content.Context context, String sharedPreferencesName, androidx.datastore.rxjava2.RxSharedPreferencesMigration<T> rxSharedPreferencesMigration);
+ method public androidx.datastore.core.DataMigration<T> build();
+ method public androidx.datastore.rxjava2.RxSharedPreferencesMigrationBuilder<T> setKeysToMigrate(java.lang.String... keys);
+ }
+
+}
+
diff --git a/datastore/datastore-rxjava2/api/res-1.1.0-beta01.txt b/datastore/datastore-rxjava2/api/res-1.1.0-beta01.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/datastore/datastore-rxjava2/api/res-1.1.0-beta01.txt
diff --git a/datastore/datastore-rxjava2/api/restricted_1.1.0-beta01.txt b/datastore/datastore-rxjava2/api/restricted_1.1.0-beta01.txt
new file mode 100644
index 0000000..a05559f
--- /dev/null
+++ b/datastore/datastore-rxjava2/api/restricted_1.1.0-beta01.txt
@@ -0,0 +1,48 @@
+// Signature format: 4.0
+package androidx.datastore.rxjava2 {
+
+ public interface RxDataMigration<T> {
+ method public io.reactivex.Completable cleanUp();
+ method public io.reactivex.Single<T!> migrate(T?);
+ method public io.reactivex.Single<java.lang.Boolean!> shouldMigrate(T?);
+ }
+
+ public final class RxDataStore<T> implements io.reactivex.disposables.Disposable {
+ method @SuppressCompatibility @kotlinx.coroutines.ExperimentalCoroutinesApi public io.reactivex.Flowable<T> data();
+ method public void dispose();
+ method public boolean isDisposed();
+ method public io.reactivex.Completable shutdownComplete();
+ method @SuppressCompatibility @kotlinx.coroutines.ExperimentalCoroutinesApi public io.reactivex.Single<T> updateDataAsync(io.reactivex.functions.Function<T,io.reactivex.Single<T>> transform);
+ field public static final androidx.datastore.rxjava2.RxDataStore.Companion Companion;
+ }
+
+ public static final class RxDataStore.Companion {
+ }
+
+ public final class RxDataStoreBuilder<T> {
+ ctor public RxDataStoreBuilder(android.content.Context context, String fileName, androidx.datastore.core.Serializer<T> serializer);
+ ctor public RxDataStoreBuilder(java.util.concurrent.Callable<java.io.File> produceFile, androidx.datastore.core.Serializer<T> serializer);
+ method public androidx.datastore.rxjava2.RxDataStoreBuilder<T> addDataMigration(androidx.datastore.core.DataMigration<T> dataMigration);
+ method public androidx.datastore.rxjava2.RxDataStoreBuilder<T> addRxDataMigration(androidx.datastore.rxjava2.RxDataMigration<T> rxDataMigration);
+ method public androidx.datastore.rxjava2.RxDataStore<T> build();
+ method public androidx.datastore.rxjava2.RxDataStoreBuilder<T> setCorruptionHandler(androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T> corruptionHandler);
+ method public androidx.datastore.rxjava2.RxDataStoreBuilder<T> setIoScheduler(io.reactivex.Scheduler ioScheduler);
+ }
+
+ public final class RxDataStoreDelegateKt {
+ method public static <T> kotlin.properties.ReadOnlyProperty<android.content.Context,androidx.datastore.rxjava2.RxDataStore<T>> rxDataStore(String fileName, androidx.datastore.core.Serializer<T> serializer, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional kotlin.jvm.functions.Function1<? super android.content.Context,? extends java.util.List<? extends androidx.datastore.core.DataMigration<T>>> produceMigrations, optional io.reactivex.Scheduler scheduler);
+ }
+
+ @kotlin.jvm.JvmDefaultWithCompatibility public interface RxSharedPreferencesMigration<T> {
+ method public io.reactivex.Single<T> migrate(androidx.datastore.migrations.SharedPreferencesView sharedPreferencesView, T currentData);
+ method public default io.reactivex.Single<java.lang.Boolean> shouldMigrate(T currentData);
+ }
+
+ public final class RxSharedPreferencesMigrationBuilder<T> {
+ ctor public RxSharedPreferencesMigrationBuilder(android.content.Context context, String sharedPreferencesName, androidx.datastore.rxjava2.RxSharedPreferencesMigration<T> rxSharedPreferencesMigration);
+ method public androidx.datastore.core.DataMigration<T> build();
+ method public androidx.datastore.rxjava2.RxSharedPreferencesMigrationBuilder<T> setKeysToMigrate(java.lang.String... keys);
+ }
+
+}
+
diff --git a/datastore/datastore-rxjava3/api/1.1.0-beta01.txt b/datastore/datastore-rxjava3/api/1.1.0-beta01.txt
new file mode 100644
index 0000000..14b5e2c
--- /dev/null
+++ b/datastore/datastore-rxjava3/api/1.1.0-beta01.txt
@@ -0,0 +1,48 @@
+// Signature format: 4.0
+package androidx.datastore.rxjava3 {
+
+ public interface RxDataMigration<T> {
+ method public io.reactivex.rxjava3.core.Completable cleanUp();
+ method public io.reactivex.rxjava3.core.Single<T!> migrate(T?);
+ method public io.reactivex.rxjava3.core.Single<java.lang.Boolean!> shouldMigrate(T?);
+ }
+
+ public final class RxDataStore<T> implements io.reactivex.rxjava3.disposables.Disposable {
+ method @SuppressCompatibility @kotlinx.coroutines.ExperimentalCoroutinesApi public io.reactivex.rxjava3.core.Flowable<T> data();
+ method public void dispose();
+ method public boolean isDisposed();
+ method public io.reactivex.rxjava3.core.Completable shutdownComplete();
+ method @SuppressCompatibility @kotlinx.coroutines.ExperimentalCoroutinesApi public io.reactivex.rxjava3.core.Single<T> updateDataAsync(io.reactivex.rxjava3.functions.Function<T,io.reactivex.rxjava3.core.Single<T>> transform);
+ field public static final androidx.datastore.rxjava3.RxDataStore.Companion Companion;
+ }
+
+ public static final class RxDataStore.Companion {
+ }
+
+ public final class RxDataStoreBuilder<T> {
+ ctor public RxDataStoreBuilder(android.content.Context context, String fileName, androidx.datastore.core.Serializer<T> serializer);
+ ctor public RxDataStoreBuilder(java.util.concurrent.Callable<java.io.File> produceFile, androidx.datastore.core.Serializer<T> serializer);
+ method public androidx.datastore.rxjava3.RxDataStoreBuilder<T> addDataMigration(androidx.datastore.core.DataMigration<T> dataMigration);
+ method public androidx.datastore.rxjava3.RxDataStoreBuilder<T> addRxDataMigration(androidx.datastore.rxjava3.RxDataMigration<T> rxDataMigration);
+ method public androidx.datastore.rxjava3.RxDataStore<T> build();
+ method public androidx.datastore.rxjava3.RxDataStoreBuilder<T> setCorruptionHandler(androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T> corruptionHandler);
+ method public androidx.datastore.rxjava3.RxDataStoreBuilder<T> setIoScheduler(io.reactivex.rxjava3.core.Scheduler ioScheduler);
+ }
+
+ public final class RxDataStoreDelegateKt {
+ method public static <T> kotlin.properties.ReadOnlyProperty<android.content.Context,androidx.datastore.rxjava3.RxDataStore<T>> rxDataStore(String fileName, androidx.datastore.core.Serializer<T> serializer, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional kotlin.jvm.functions.Function1<? super android.content.Context,? extends java.util.List<? extends androidx.datastore.core.DataMigration<T>>> produceMigrations, optional io.reactivex.rxjava3.core.Scheduler scheduler);
+ }
+
+ @kotlin.jvm.JvmDefaultWithCompatibility public interface RxSharedPreferencesMigration<T> {
+ method public io.reactivex.rxjava3.core.Single<T> migrate(androidx.datastore.migrations.SharedPreferencesView sharedPreferencesView, T currentData);
+ method public default io.reactivex.rxjava3.core.Single<java.lang.Boolean> shouldMigrate(T currentData);
+ }
+
+ public final class RxSharedPreferencesMigrationBuilder<T> {
+ ctor public RxSharedPreferencesMigrationBuilder(android.content.Context context, String sharedPreferencesName, androidx.datastore.rxjava3.RxSharedPreferencesMigration<T> rxSharedPreferencesMigration);
+ method public androidx.datastore.core.DataMigration<T> build();
+ method public androidx.datastore.rxjava3.RxSharedPreferencesMigrationBuilder<T> setKeysToMigrate(java.lang.String... keys);
+ }
+
+}
+
diff --git a/datastore/datastore-rxjava3/api/res-1.1.0-beta01.txt b/datastore/datastore-rxjava3/api/res-1.1.0-beta01.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/datastore/datastore-rxjava3/api/res-1.1.0-beta01.txt
diff --git a/datastore/datastore-rxjava3/api/restricted_1.1.0-beta01.txt b/datastore/datastore-rxjava3/api/restricted_1.1.0-beta01.txt
new file mode 100644
index 0000000..14b5e2c
--- /dev/null
+++ b/datastore/datastore-rxjava3/api/restricted_1.1.0-beta01.txt
@@ -0,0 +1,48 @@
+// Signature format: 4.0
+package androidx.datastore.rxjava3 {
+
+ public interface RxDataMigration<T> {
+ method public io.reactivex.rxjava3.core.Completable cleanUp();
+ method public io.reactivex.rxjava3.core.Single<T!> migrate(T?);
+ method public io.reactivex.rxjava3.core.Single<java.lang.Boolean!> shouldMigrate(T?);
+ }
+
+ public final class RxDataStore<T> implements io.reactivex.rxjava3.disposables.Disposable {
+ method @SuppressCompatibility @kotlinx.coroutines.ExperimentalCoroutinesApi public io.reactivex.rxjava3.core.Flowable<T> data();
+ method public void dispose();
+ method public boolean isDisposed();
+ method public io.reactivex.rxjava3.core.Completable shutdownComplete();
+ method @SuppressCompatibility @kotlinx.coroutines.ExperimentalCoroutinesApi public io.reactivex.rxjava3.core.Single<T> updateDataAsync(io.reactivex.rxjava3.functions.Function<T,io.reactivex.rxjava3.core.Single<T>> transform);
+ field public static final androidx.datastore.rxjava3.RxDataStore.Companion Companion;
+ }
+
+ public static final class RxDataStore.Companion {
+ }
+
+ public final class RxDataStoreBuilder<T> {
+ ctor public RxDataStoreBuilder(android.content.Context context, String fileName, androidx.datastore.core.Serializer<T> serializer);
+ ctor public RxDataStoreBuilder(java.util.concurrent.Callable<java.io.File> produceFile, androidx.datastore.core.Serializer<T> serializer);
+ method public androidx.datastore.rxjava3.RxDataStoreBuilder<T> addDataMigration(androidx.datastore.core.DataMigration<T> dataMigration);
+ method public androidx.datastore.rxjava3.RxDataStoreBuilder<T> addRxDataMigration(androidx.datastore.rxjava3.RxDataMigration<T> rxDataMigration);
+ method public androidx.datastore.rxjava3.RxDataStore<T> build();
+ method public androidx.datastore.rxjava3.RxDataStoreBuilder<T> setCorruptionHandler(androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T> corruptionHandler);
+ method public androidx.datastore.rxjava3.RxDataStoreBuilder<T> setIoScheduler(io.reactivex.rxjava3.core.Scheduler ioScheduler);
+ }
+
+ public final class RxDataStoreDelegateKt {
+ method public static <T> kotlin.properties.ReadOnlyProperty<android.content.Context,androidx.datastore.rxjava3.RxDataStore<T>> rxDataStore(String fileName, androidx.datastore.core.Serializer<T> serializer, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional kotlin.jvm.functions.Function1<? super android.content.Context,? extends java.util.List<? extends androidx.datastore.core.DataMigration<T>>> produceMigrations, optional io.reactivex.rxjava3.core.Scheduler scheduler);
+ }
+
+ @kotlin.jvm.JvmDefaultWithCompatibility public interface RxSharedPreferencesMigration<T> {
+ method public io.reactivex.rxjava3.core.Single<T> migrate(androidx.datastore.migrations.SharedPreferencesView sharedPreferencesView, T currentData);
+ method public default io.reactivex.rxjava3.core.Single<java.lang.Boolean> shouldMigrate(T currentData);
+ }
+
+ public final class RxSharedPreferencesMigrationBuilder<T> {
+ ctor public RxSharedPreferencesMigrationBuilder(android.content.Context context, String sharedPreferencesName, androidx.datastore.rxjava3.RxSharedPreferencesMigration<T> rxSharedPreferencesMigration);
+ method public androidx.datastore.core.DataMigration<T> build();
+ method public androidx.datastore.rxjava3.RxSharedPreferencesMigrationBuilder<T> setKeysToMigrate(java.lang.String... keys);
+ }
+
+}
+
diff --git a/datastore/datastore/api/1.1.0-beta01.txt b/datastore/datastore/api/1.1.0-beta01.txt
new file mode 100644
index 0000000..288a16d1
--- /dev/null
+++ b/datastore/datastore/api/1.1.0-beta01.txt
@@ -0,0 +1,40 @@
+// Signature format: 4.0
+package androidx.datastore {
+
+ public final class DataStoreDelegateKt {
+ method public static <T> kotlin.properties.ReadOnlyProperty<android.content.Context,androidx.datastore.core.DataStore<T>> dataStore(String fileName, androidx.datastore.core.Serializer<T> serializer, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional kotlin.jvm.functions.Function1<? super android.content.Context,? extends java.util.List<? extends androidx.datastore.core.DataMigration<T>>> produceMigrations, optional kotlinx.coroutines.CoroutineScope scope);
+ }
+
+ public final class DataStoreFile {
+ method public static java.io.File dataStoreFile(android.content.Context, String fileName);
+ }
+
+}
+
+package androidx.datastore.migrations {
+
+ public final class SharedPreferencesMigration<T> implements androidx.datastore.core.DataMigration<T> {
+ 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);
+ ctor public SharedPreferencesMigration(kotlin.jvm.functions.Function0<? extends android.content.SharedPreferences> produceSharedPreferences, 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(kotlin.jvm.functions.Function0<? extends android.content.SharedPreferences> produceSharedPreferences, 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(kotlin.jvm.functions.Function0<? extends android.content.SharedPreferences> produceSharedPreferences, 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>) 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 SharedPreferencesView {
+ method public operator boolean contains(String key);
+ method public java.util.Map<java.lang.String,java.lang.Object> getAll();
+ method public boolean getBoolean(String key, boolean defValue);
+ method public float getFloat(String key, float defValue);
+ method public int getInt(String key, int defValue);
+ method public long getLong(String key, long defValue);
+ method public String? getString(String key, optional String? defValue);
+ method public java.util.Set<java.lang.String>? getStringSet(String key, optional java.util.Set<java.lang.String>? defValues);
+ }
+
+}
+
diff --git a/datastore/datastore/api/res-1.1.0-beta01.txt b/datastore/datastore/api/res-1.1.0-beta01.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/datastore/datastore/api/res-1.1.0-beta01.txt
diff --git a/datastore/datastore/api/restricted_1.1.0-beta01.txt b/datastore/datastore/api/restricted_1.1.0-beta01.txt
new file mode 100644
index 0000000..288a16d1
--- /dev/null
+++ b/datastore/datastore/api/restricted_1.1.0-beta01.txt
@@ -0,0 +1,40 @@
+// Signature format: 4.0
+package androidx.datastore {
+
+ public final class DataStoreDelegateKt {
+ method public static <T> kotlin.properties.ReadOnlyProperty<android.content.Context,androidx.datastore.core.DataStore<T>> dataStore(String fileName, androidx.datastore.core.Serializer<T> serializer, optional androidx.datastore.core.handlers.ReplaceFileCorruptionHandler<T>? corruptionHandler, optional kotlin.jvm.functions.Function1<? super android.content.Context,? extends java.util.List<? extends androidx.datastore.core.DataMigration<T>>> produceMigrations, optional kotlinx.coroutines.CoroutineScope scope);
+ }
+
+ public final class DataStoreFile {
+ method public static java.io.File dataStoreFile(android.content.Context, String fileName);
+ }
+
+}
+
+package androidx.datastore.migrations {
+
+ public final class SharedPreferencesMigration<T> implements androidx.datastore.core.DataMigration<T> {
+ 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);
+ ctor public SharedPreferencesMigration(kotlin.jvm.functions.Function0<? extends android.content.SharedPreferences> produceSharedPreferences, 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(kotlin.jvm.functions.Function0<? extends android.content.SharedPreferences> produceSharedPreferences, 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(kotlin.jvm.functions.Function0<? extends android.content.SharedPreferences> produceSharedPreferences, 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>) 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 SharedPreferencesView {
+ method public operator boolean contains(String key);
+ method public java.util.Map<java.lang.String,java.lang.Object> getAll();
+ method public boolean getBoolean(String key, boolean defValue);
+ method public float getFloat(String key, float defValue);
+ method public int getInt(String key, int defValue);
+ method public long getLong(String key, long defValue);
+ method public String? getString(String key, optional String? defValue);
+ method public java.util.Set<java.lang.String>? getStringSet(String key, optional java.util.Set<java.lang.String>? defValues);
+ }
+
+}
+
diff --git a/libraryversions.toml b/libraryversions.toml
index 9b6a6ce..ad7e5bc 100644
--- a/libraryversions.toml
+++ b/libraryversions.toml
@@ -51,7 +51,7 @@
CURSORADAPTER = "1.1.0-alpha01"
CUSTOMVIEW = "1.2.0-alpha03"
CUSTOMVIEW_POOLINGCONTAINER = "1.1.0-alpha01"
-DATASTORE = "1.1.0-alpha06"
+DATASTORE = "1.1.0-beta01"
DOCUMENTFILE = "1.1.0-alpha02"
DRAGANDDROP = "1.1.0-alpha01"
DRAWERLAYOUT = "1.3.0-alpha01"
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/CoroutineResultBinder.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/CoroutineResultBinder.kt
index 4838434..55ae7bd 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/CoroutineResultBinder.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/CoroutineResultBinder.kt
@@ -18,7 +18,6 @@
import androidx.room.compiler.codegen.CodeLanguage
import androidx.room.compiler.codegen.XCodeBlock
-import androidx.room.compiler.codegen.XCodeBlock.Builder.Companion.addLocalVal
import androidx.room.compiler.codegen.XMemberName.Companion.companionMember
import androidx.room.compiler.codegen.XMemberName.Companion.packageMember
import androidx.room.compiler.codegen.XPropertySpec
@@ -46,11 +45,13 @@
scope: CodeGenScope
) {
val cancellationSignalVar = scope.getTmpVar("_cancellationSignal")
- scope.builder.addLocalVal(
- cancellationSignalVar,
- AndroidTypeNames.CANCELLATION_SIGNAL.copy(nullable = true),
- "%M()",
- RoomTypeNames.DB_UTIL.packageMember("createCancellationSignal")
+ scope.builder.addLocalVariable(
+ name = cancellationSignalVar,
+ typeName = AndroidTypeNames.CANCELLATION_SIGNAL,
+ assignExpr = XCodeBlock.ofNewInstance(
+ scope.language,
+ AndroidTypeNames.CANCELLATION_SIGNAL,
+ ),
)
val callableImpl = CallableTypeSpecBuilder(scope.language, typeArg.asTypeName()) {
diff --git a/room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaListenableFutureQueryResultBinder.kt b/room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaListenableFutureQueryResultBinder.kt
index 3182b09..cc89a4e 100644
--- a/room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaListenableFutureQueryResultBinder.kt
+++ b/room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaListenableFutureQueryResultBinder.kt
@@ -17,13 +17,11 @@
package androidx.room.solver.query.result
import androidx.room.compiler.codegen.XCodeBlock
-import androidx.room.compiler.codegen.XMemberName.Companion.packageMember
import androidx.room.compiler.codegen.XPropertySpec
import androidx.room.compiler.processing.XType
import androidx.room.ext.AndroidTypeNames
import androidx.room.ext.CallableTypeSpecBuilder
import androidx.room.ext.RoomGuavaTypeNames
-import androidx.room.ext.RoomTypeNames
import androidx.room.solver.CodeGenScope
/**
@@ -47,11 +45,10 @@
scope.builder.apply {
addLocalVariable(
name = cancellationSignalVar,
- typeName = AndroidTypeNames.CANCELLATION_SIGNAL.copy(nullable = true),
- assignExpr = XCodeBlock.of(
+ typeName = AndroidTypeNames.CANCELLATION_SIGNAL,
+ assignExpr = XCodeBlock.ofNewInstance(
language,
- "%M()",
- RoomTypeNames.DB_UTIL.packageMember("createCancellationSignal")
+ AndroidTypeNames.CANCELLATION_SIGNAL,
)
)
}
diff --git a/room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java b/room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
index c492afa..1d1f41f 100644
--- a/room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
+++ b/room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
@@ -596,7 +596,7 @@
public ListenableFuture<List<Child1>> getChild1ListListenableFuture() {
final String _sql = "SELECT * FROM Child1";
final RoomSQLiteQuery _statement = RoomSQLiteQuery.acquire(_sql, 0);
- final CancellationSignal _cancellationSignal = DBUtil.createCancellationSignal();
+ final CancellationSignal _cancellationSignal = new CancellationSignal();
return GuavaRoom.createListenableFuture(__db, false, new Callable<List<Child1>>() {
@Override
public List<Child1> call() throws Exception {
diff --git a/room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java b/room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
index 848ac31..3688bea 100644
--- a/room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
+++ b/room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
@@ -528,7 +528,7 @@
public ListenableFuture<List<Child1>> getChild1ListListenableFuture() {
final String _sql = "SELECT * FROM Child1";
final RoomSQLiteQuery _statement = RoomSQLiteQuery.acquire(_sql, 0);
- final CancellationSignal _cancellationSignal = DBUtil.createCancellationSignal();
+ final CancellationSignal _cancellationSignal = new CancellationSignal();
return GuavaRoom.createListenableFuture(__db, false, new Callable<List<Child1>>() {
@Override
public List<Child1> call() throws Exception {
diff --git a/room/room-compiler/src/test/test-data/kotlinCodeGen/coroutineResultBinder.kt b/room/room-compiler/src/test/test-data/kotlinCodeGen/coroutineResultBinder.kt
index ef15633..1e0d3ae 100644
--- a/room/room-compiler/src/test/test-data/kotlinCodeGen/coroutineResultBinder.kt
+++ b/room/room-compiler/src/test/test-data/kotlinCodeGen/coroutineResultBinder.kt
@@ -4,7 +4,6 @@
import androidx.room.RoomDatabase
import androidx.room.RoomSQLiteQuery
import androidx.room.RoomSQLiteQuery.Companion.acquire
-import androidx.room.util.createCancellationSignal
import androidx.room.util.getColumnIndexOrThrow
import androidx.room.util.query
import java.lang.Class
@@ -29,7 +28,7 @@
public override suspend fun getEntity(): MyEntity {
val _sql: String = "SELECT * FROM MyEntity"
val _statement: RoomSQLiteQuery = acquire(_sql, 0)
- val _cancellationSignal: CancellationSignal? = createCancellationSignal()
+ val _cancellationSignal: CancellationSignal = CancellationSignal()
return execute(__db, false, _cancellationSignal, object : Callable<MyEntity> {
public override fun call(): MyEntity {
val _cursor: Cursor = query(__db, _statement, false, null)
diff --git a/room/room-compiler/src/test/test-data/kotlinCodeGen/coroutines.kt b/room/room-compiler/src/test/test-data/kotlinCodeGen/coroutines.kt
index e09976c..f4e2f87 100644
--- a/room/room-compiler/src/test/test-data/kotlinCodeGen/coroutines.kt
+++ b/room/room-compiler/src/test/test-data/kotlinCodeGen/coroutines.kt
@@ -6,7 +6,6 @@
import androidx.room.RoomSQLiteQuery
import androidx.room.RoomSQLiteQuery.Companion.acquire
import androidx.room.util.appendPlaceholders
-import androidx.room.util.createCancellationSignal
import androidx.room.util.getColumnIndexOrThrow
import androidx.room.util.newStringBuilder
import androidx.room.util.query
@@ -144,7 +143,7 @@
}
_argIndex++
}
- val _cancellationSignal: CancellationSignal? = createCancellationSignal()
+ val _cancellationSignal: CancellationSignal = CancellationSignal()
return execute(__db, false, _cancellationSignal, object : Callable<List<MyEntity>> {
public override fun call(): List<MyEntity> {
val _cursor: Cursor = query(__db, _statement, false, null)
diff --git a/room/room-compiler/src/test/test-data/kotlinCodeGen/guavaCallable.kt b/room/room-compiler/src/test/test-data/kotlinCodeGen/guavaCallable.kt
index 70371f9..3cc1cd6 100644
--- a/room/room-compiler/src/test/test-data/kotlinCodeGen/guavaCallable.kt
+++ b/room/room-compiler/src/test/test-data/kotlinCodeGen/guavaCallable.kt
@@ -8,7 +8,6 @@
import androidx.room.RoomSQLiteQuery.Companion.acquire
import androidx.room.guava.GuavaRoom
import androidx.room.util.appendPlaceholders
-import androidx.room.util.createCancellationSignal
import androidx.room.util.getColumnIndexOrThrow
import androidx.room.util.newStringBuilder
import androidx.room.util.query
@@ -166,7 +165,7 @@
}
_argIndex++
}
- val _cancellationSignal: CancellationSignal? = createCancellationSignal()
+ val _cancellationSignal: CancellationSignal = CancellationSignal()
return GuavaRoom.createListenableFuture(__db, false, object : Callable<MyEntity> {
public override fun call(): MyEntity {
val _cursor: Cursor = query(__db, _statement, false, _cancellationSignal)
@@ -210,7 +209,7 @@
}
_argIndex++
}
- val _cancellationSignal: CancellationSignal? = createCancellationSignal()
+ val _cancellationSignal: CancellationSignal = CancellationSignal()
return GuavaRoom.createListenableFuture(__db, false, object : Callable<MyEntity?> {
public override fun call(): MyEntity? {
val _cursor: Cursor = query(__db, _statement, false, _cancellationSignal)
diff --git a/room/room-guava/lint-baseline.xml b/room/room-guava/lint-baseline.xml
index 5dc0618b..1b59c55 100644
--- a/room/room-guava/lint-baseline.xml
+++ b/room/room-guava/lint-baseline.xml
@@ -2,33 +2,6 @@
<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
<issue
- id="RestrictedApiAndroidX"
- message="Api16Impl.cancel can only be called from within the same library group (referenced groupId=`androidx.sqlite` from groupId=`androidx.room`)"
- errorLine1=" SupportSQLiteCompat.Api16Impl.cancel(cancellationSignal);"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/room/guava/GuavaRoom.java"/>
- </issue>
-
- <issue
- id="RestrictedApiAndroidX"
- message="Api16Impl.cancel can only be called from within the same library group (referenced groupId=`androidx.sqlite` from groupId=`androidx.room`)"
- errorLine1=" SupportSQLiteCompat.Api16Impl.cancel(cancellationSignal);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/guava/GuavaRoom.java"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (cancellationSignal != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/guava/GuavaRoom.java"/>
- </issue>
-
- <issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" public static <T> ListenableFuture<T> createListenableFuture("
diff --git a/room/room-guava/src/main/java/androidx/room/guava/GuavaRoom.java b/room/room-guava/src/main/java/androidx/room/guava/GuavaRoom.java
index 31f7e76..7713e05 100644
--- a/room/room-guava/src/main/java/androidx/room/guava/GuavaRoom.java
+++ b/room/room-guava/src/main/java/androidx/room/guava/GuavaRoom.java
@@ -16,7 +16,6 @@
package androidx.room.guava;
import android.annotation.SuppressLint;
-import android.os.Build;
import android.os.CancellationSignal;
import androidx.annotation.NonNull;
@@ -26,7 +25,6 @@
import androidx.concurrent.futures.ResolvableFuture;
import androidx.room.RoomDatabase;
import androidx.room.RoomSQLiteQuery;
-import androidx.sqlite.db.SupportSQLiteCompat;
import androidx.sqlite.db.SupportSQLiteQuery;
import com.google.common.util.concurrent.ListenableFuture;
@@ -139,12 +137,12 @@
final @Nullable CancellationSignal cancellationSignal) {
final ListenableFuture<T> future = createListenableFuture(executor, callable);
- if (cancellationSignal != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
+ if (cancellationSignal != null) {
future.addListener(new Runnable() {
@Override
public void run() {
if (future.isCancelled()) {
- SupportSQLiteCompat.Api16Impl.cancel(cancellationSignal);
+ cancellationSignal.cancel();
}
}
}, sDirectExecutor);
diff --git a/room/room-ktx/lint-baseline.xml b/room/room-ktx/lint-baseline.xml
index 56671f7..4970594 100644
--- a/room/room-ktx/lint-baseline.xml
+++ b/room/room-ktx/lint-baseline.xml
@@ -37,22 +37,4 @@
file="src/main/java/androidx/room/CoroutinesRoom.kt"/>
</issue>
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/CoroutinesRoom.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/CoroutinesRoom.kt"/>
- </issue>
-
</issues>
diff --git a/room/room-ktx/src/main/java/androidx/room/CoroutinesRoom.kt b/room/room-ktx/src/main/java/androidx/room/CoroutinesRoom.kt
index cb6dc58..02a88a2 100644
--- a/room/room-ktx/src/main/java/androidx/room/CoroutinesRoom.kt
+++ b/room/room-ktx/src/main/java/androidx/room/CoroutinesRoom.kt
@@ -16,10 +16,8 @@
package androidx.room
-import android.os.Build
import android.os.CancellationSignal
import androidx.annotation.RestrictTo
-import androidx.sqlite.db.SupportSQLiteCompat
import java.util.concurrent.Callable
import kotlin.coroutines.coroutineContext
import kotlin.coroutines.resume
@@ -91,11 +89,7 @@
}
}
continuation.invokeOnCancellation {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
- if (cancellationSignal != null) {
- SupportSQLiteCompat.Api16Impl.cancel(cancellationSignal)
- }
- }
+ cancellationSignal?.cancel()
job.cancel()
}
}
diff --git a/room/room-paging-guava/src/main/java/androidx/room/paging/guava/LimitOffsetListenableFuturePagingSource.kt b/room/room-paging-guava/src/main/java/androidx/room/paging/guava/LimitOffsetListenableFuturePagingSource.kt
index 57dfd91..dfe67b5 100644
--- a/room/room-paging-guava/src/main/java/androidx/room/paging/guava/LimitOffsetListenableFuturePagingSource.kt
+++ b/room/room-paging-guava/src/main/java/androidx/room/paging/guava/LimitOffsetListenableFuturePagingSource.kt
@@ -17,6 +17,7 @@
package androidx.room.paging.guava
import android.database.Cursor
+import android.os.CancellationSignal
import androidx.annotation.NonNull
import androidx.annotation.RestrictTo
import androidx.annotation.VisibleForTesting
@@ -31,7 +32,6 @@
import androidx.room.paging.util.getClippedRefreshKey
import androidx.room.paging.util.queryDatabase
import androidx.room.paging.util.queryItemCount
-import androidx.room.util.createCancellationSignal
import androidx.sqlite.db.SupportSQLiteQuery
import com.google.common.util.concurrent.Futures
import com.google.common.util.concurrent.ListenableFuture
@@ -93,7 +93,7 @@
* it returned has been canceled before it has completed.
*/
private fun initialLoad(params: LoadParams<Int>): ListenableFuture<LoadResult<Int, Value>> {
- val cancellationSignal = createCancellationSignal()
+ val cancellationSignal = CancellationSignal()
val loadCallable = Callable<LoadResult<Int, Value>> {
db.runInTransaction(
Callable {
@@ -126,7 +126,7 @@
params: LoadParams<Int>,
tempCount: Int
): ListenableFuture<LoadResult<Int, Value>> {
- val cancellationSignal = createCancellationSignal()
+ val cancellationSignal = CancellationSignal()
val loadCallable = Callable<LoadResult<Int, Value>> {
val result = queryDatabase(
params, sourceQuery, db, tempCount, cancellationSignal, ::convertRows
diff --git a/room/room-runtime/api/restricted_current.txt b/room/room-runtime/api/restricted_current.txt
index 2b5d170..018c4e3 100644
--- a/room/room-runtime/api/restricted_current.txt
+++ b/room/room-runtime/api/restricted_current.txt
@@ -321,7 +321,7 @@
}
@RestrictTo({androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX}) public final class DBUtil {
- method public static android.os.CancellationSignal? createCancellationSignal();
+ method @Deprecated public static android.os.CancellationSignal createCancellationSignal();
method public static void dropFtsSyncTriggers(androidx.sqlite.db.SupportSQLiteDatabase db);
method public static void foreignKeyCheck(androidx.sqlite.db.SupportSQLiteDatabase db, String tableName);
method @Deprecated public static android.database.Cursor query(androidx.room.RoomDatabase db, androidx.sqlite.db.SupportSQLiteQuery sqLiteQuery, boolean maybeCopy);
diff --git a/room/room-runtime/lint-baseline.xml b/room/room-runtime/lint-baseline.xml
index d9c8463..56845b1d9 100644
--- a/room/room-runtime/lint-baseline.xml
+++ b/room/room-runtime/lint-baseline.xml
@@ -463,15 +463,6 @@
<issue
id="ObsoleteSdkInt"
message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.KITKAT)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/AutoClosingRoomOpenHelper.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
errorLine1=" if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -481,15 +472,6 @@
<issue
id="ObsoleteSdkInt"
message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/util/DBUtil.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN &&"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -498,60 +480,6 @@
<issue
id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" val wal = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/RoomDatabase.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" return if (signal != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/RoomDatabase.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" return if (signal != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/RoomDatabase.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN &&"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/RoomDatabase.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/RoomDatabase.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= 19) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/room/RoomDatabase.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
message="Unnecessary; SDK_INT is always >= 16"
errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
diff --git a/room/room-runtime/src/androidTest/java/androidx/room/util/DBUtilTest.java b/room/room-runtime/src/androidTest/java/androidx/room/util/DBUtilTest.java
index 4c74976..015b4d0 100644
--- a/room/room-runtime/src/androidTest/java/androidx/room/util/DBUtilTest.java
+++ b/room/room-runtime/src/androidTest/java/androidx/room/util/DBUtilTest.java
@@ -16,20 +16,16 @@
package androidx.room.util;
-import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertTrue;
import android.database.AbstractWindowedCursor;
import android.database.Cursor;
-import android.os.CancellationSignal;
import androidx.sqlite.db.SupportSQLiteDatabase;
import androidx.sqlite.db.SupportSQLiteOpenHelper;
import androidx.sqlite.db.framework.FrameworkSQLiteOpenHelperFactory;
import androidx.test.core.app.ApplicationProvider;
import androidx.test.ext.junit.runners.AndroidJUnit4;
-import androidx.test.filters.SdkSuppress;
import androidx.test.filters.SmallTest;
import org.junit.Test;
@@ -76,11 +72,4 @@
}).build()
).getWritableDatabase();
}
-
- @Test
- @SdkSuppress(minSdkVersion = 16)
- public void createCancellationSignal() {
- CancellationSignal signal = DBUtil.createCancellationSignal();
- assertThat(signal, notNullValue());
- }
}
diff --git a/room/room-runtime/src/main/java/androidx/room/AutoClosingRoomOpenHelper.kt b/room/room-runtime/src/main/java/androidx/room/AutoClosingRoomOpenHelper.kt
index 387fd5c..0b47d27 100644
--- a/room/room-runtime/src/main/java/androidx/room/AutoClosingRoomOpenHelper.kt
+++ b/room/room-runtime/src/main/java/androidx/room/AutoClosingRoomOpenHelper.kt
@@ -428,9 +428,8 @@
SupportSQLiteCompat.Api29Impl.setNotificationUris(delegate, cr, uris)
}
- @RequiresApi(api = Build.VERSION_CODES.KITKAT)
override fun getNotificationUri(): Uri {
- return SupportSQLiteCompat.Api19Impl.getNotificationUri(delegate)
+ return delegate.notificationUri
}
@RequiresApi(api = Build.VERSION_CODES.Q)
diff --git a/room/room-runtime/src/main/java/androidx/room/RoomDatabase.kt b/room/room-runtime/src/main/java/androidx/room/RoomDatabase.kt
index bc86569..c382488 100644
--- a/room/room-runtime/src/main/java/androidx/room/RoomDatabase.kt
+++ b/room/room-runtime/src/main/java/androidx/room/RoomDatabase.kt
@@ -20,7 +20,6 @@
import android.content.Context
import android.content.Intent
import android.database.Cursor
-import android.os.Build
import android.os.CancellationSignal
import android.os.Looper
import android.util.Log
@@ -33,7 +32,6 @@
import androidx.room.migration.AutoMigrationSpec
import androidx.room.migration.Migration
import androidx.sqlite.db.SimpleSQLiteQuery
-import androidx.sqlite.db.SupportSQLiteCompat
import androidx.sqlite.db.SupportSQLiteDatabase
import androidx.sqlite.db.SupportSQLiteOpenHelper
import androidx.sqlite.db.SupportSQLiteQuery
@@ -233,13 +231,9 @@
invalidationTracker.setAutoCloser(it.autoCloser)
}
- val wal = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
- val enabled = configuration.journalMode == JournalMode.WRITE_AHEAD_LOGGING
- openHelper.setWriteAheadLoggingEnabled(enabled)
- enabled
- } else {
- false
- }
+ val wal = configuration.journalMode == JournalMode.WRITE_AHEAD_LOGGING
+ openHelper.setWriteAheadLoggingEnabled(wal)
+
mCallbacks = configuration.callbacks
internalQueryExecutor = configuration.queryExecutor
internalTransactionExecutor = TransactionExecutor(configuration.transactionExecutor)
@@ -478,7 +472,7 @@
open fun query(query: SupportSQLiteQuery, signal: CancellationSignal? = null): Cursor {
assertNotMainThread()
assertNotSuspendingTransaction()
- return if (signal != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
+ return if (signal != null) {
openHelper.writableDatabase.query(query, signal)
} else {
openHelper.writableDatabase.query(query)
@@ -521,9 +515,7 @@
assertNotMainThread()
val database = openHelper.writableDatabase
invalidationTracker.syncTriggers(database)
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN &&
- database.isWriteAheadLoggingEnabled
- ) {
+ if (database.isWriteAheadLoggingEnabled) {
database.beginTransactionNonExclusive()
} else {
database.beginTransaction()
@@ -664,22 +656,13 @@
if (this != AUTOMATIC) {
return this
}
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
- val manager =
- context.getSystemService(Context.ACTIVITY_SERVICE) as? ActivityManager
- if (manager != null && !isLowRamDevice(manager)) {
- return WRITE_AHEAD_LOGGING
- }
+ val manager =
+ context.getSystemService(Context.ACTIVITY_SERVICE) as? ActivityManager
+ if (manager != null && !manager.isLowRamDevice) {
+ return WRITE_AHEAD_LOGGING
}
return TRUNCATE
}
-
- private fun isLowRamDevice(activityManager: ActivityManager) =
- if (Build.VERSION.SDK_INT >= 19) {
- SupportSQLiteCompat.Api19Impl.isLowRamDevice(activityManager)
- } else {
- false
- }
}
/**
diff --git a/room/room-runtime/src/main/java/androidx/room/util/DBUtil.kt b/room/room-runtime/src/main/java/androidx/room/util/DBUtil.kt
index 99a5d96..526a99a 100644
--- a/room/room-runtime/src/main/java/androidx/room/util/DBUtil.kt
+++ b/room/room-runtime/src/main/java/androidx/room/util/DBUtil.kt
@@ -25,7 +25,6 @@
import android.os.CancellationSignal
import androidx.annotation.RestrictTo
import androidx.room.RoomDatabase
-import androidx.sqlite.db.SupportSQLiteCompat
import androidx.sqlite.db.SupportSQLiteDatabase
import androidx.sqlite.db.SupportSQLiteQuery
import java.io.File
@@ -153,17 +152,13 @@
}
/**
- * CancellationSignal is only available from API 16 on. This function will create a new
- * instance of the Cancellation signal only if the current API > 16.
+ * This function will create a new instance of [CancellationSignal].
*
- * @return A new instance of CancellationSignal or null.
+ * @return A new instance of CancellationSignal.
*/
-fun createCancellationSignal(): CancellationSignal? {
- return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
- SupportSQLiteCompat.Api16Impl.createCancellationSignal()
- } else {
- null
- }
+@Deprecated("Use constructor", ReplaceWith("CancellationSignal()", "android.os.CancellationSignal"))
+fun createCancellationSignal(): CancellationSignal {
+ return CancellationSignal()
}
/**
diff --git a/sqlite/sqlite-framework/lint-baseline.xml b/sqlite/sqlite-framework/lint-baseline.xml
index 2f7cd12..6802bd6 100644
--- a/sqlite/sqlite-framework/lint-baseline.xml
+++ b/sqlite/sqlite-framework/lint-baseline.xml
@@ -10,58 +10,4 @@
file="src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelper.kt"/>
</issue>
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @get:RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelper.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelper.kt"/>
- </issue>
-
</issues>
diff --git a/sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.kt b/sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.kt
index 886f90b..38c542e 100644
--- a/sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.kt
+++ b/sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.kt
@@ -30,7 +30,6 @@
import androidx.annotation.DoNotInline
import androidx.annotation.RequiresApi
import androidx.sqlite.db.SimpleSQLiteQuery
-import androidx.sqlite.db.SupportSQLiteCompat
import androidx.sqlite.db.SupportSQLiteDatabase
import androidx.sqlite.db.SupportSQLiteQuery
import androidx.sqlite.db.SupportSQLiteStatement
@@ -157,14 +156,11 @@
cursorFactory, query.sql, EMPTY_STRING_ARRAY, null)
}
- @RequiresApi(16)
override fun query(
query: SupportSQLiteQuery,
cancellationSignal: CancellationSignal?
): Cursor {
- return SupportSQLiteCompat.Api16Impl.rawQueryWithFactory(delegate, query.sql,
- EMPTY_STRING_ARRAY, null, cancellationSignal!!
- ) { _: SQLiteDatabase?,
+ return delegate.rawQueryWithFactory({ _: SQLiteDatabase?,
masterQuery: SQLiteCursorDriver?,
editTable: String?,
sqLiteQuery: SQLiteQuery? ->
@@ -174,7 +170,7 @@
)
)
SQLiteCursor(masterQuery, editTable, sqLiteQuery)
- }
+ }, query.sql, EMPTY_STRING_ARRAY, null, cancellationSignal!!)
}
@Throws(SQLException::class)
@@ -272,23 +268,20 @@
delegate.setMaxSqlCacheSize(cacheSize)
}
- @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
override fun setForeignKeyConstraintsEnabled(enabled: Boolean) {
- SupportSQLiteCompat.Api16Impl.setForeignKeyConstraintsEnabled(delegate, enabled)
+ delegate.setForeignKeyConstraintsEnabled(enabled)
}
override fun enableWriteAheadLogging(): Boolean {
return delegate.enableWriteAheadLogging()
}
- @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
override fun disableWriteAheadLogging() {
- SupportSQLiteCompat.Api16Impl.disableWriteAheadLogging(delegate)
+ delegate.disableWriteAheadLogging()
}
- @get:RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
override val isWriteAheadLoggingEnabled: Boolean
- get() = SupportSQLiteCompat.Api16Impl.isWriteAheadLoggingEnabled(delegate)
+ get() = delegate.isWriteAheadLoggingEnabled
override val attachedDbs: List<Pair<String, String>>?
get() = delegate.attachedDbs
diff --git a/sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelper.kt b/sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelper.kt
index 21ea6a0..9ed47c09 100644
--- a/sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelper.kt
+++ b/sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelper.kt
@@ -22,7 +22,6 @@
import android.database.sqlite.SQLiteOpenHelper
import android.os.Build
import android.util.Log
-import androidx.annotation.RequiresApi
import androidx.sqlite.db.SupportSQLiteCompat
import androidx.sqlite.db.SupportSQLiteDatabase
import androidx.sqlite.db.SupportSQLiteOpenHelper
@@ -68,12 +67,7 @@
allowDataLossOnRecovery = allowDataLossOnRecovery
)
}
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
- SupportSQLiteCompat.Api16Impl.setWriteAheadLoggingEnabled(
- openHelper,
- writeAheadLoggingEnabled
- )
- }
+ openHelper.setWriteAheadLoggingEnabled(writeAheadLoggingEnabled)
return@lazy openHelper
}
@@ -91,11 +85,10 @@
override val databaseName: String?
get() = name
- @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
override fun setWriteAheadLoggingEnabled(enabled: Boolean) {
if (lazyDelegate.isInitialized()) {
// Use 'delegate', it is already initialized
- SupportSQLiteCompat.Api16Impl.setWriteAheadLoggingEnabled(delegate, enabled)
+ delegate.setWriteAheadLoggingEnabled(enabled)
}
writeAheadLoggingEnabled = enabled
}
diff --git a/sqlite/sqlite/api/current.txt b/sqlite/sqlite/api/current.txt
index 3e4733c..d51ced3 100644
--- a/sqlite/sqlite/api/current.txt
+++ b/sqlite/sqlite/api/current.txt
@@ -24,7 +24,7 @@
method public void beginTransactionWithListenerNonExclusive(android.database.sqlite.SQLiteTransactionListener transactionListener);
method public androidx.sqlite.db.SupportSQLiteStatement compileStatement(String sql);
method public int delete(String table, String? whereClause, Object![]? whereArgs);
- method @RequiresApi(api=android.os.Build.VERSION_CODES.JELLY_BEAN) public void disableWriteAheadLogging();
+ method public void disableWriteAheadLogging();
method public boolean enableWriteAheadLogging();
method public void endTransaction();
method public default void execPerConnectionSQL(String sql, Object![]? bindArgs);
@@ -42,13 +42,13 @@
method public default boolean isExecPerConnectionSQLSupported();
method public boolean isOpen();
method public boolean isReadOnly();
- method @RequiresApi(api=android.os.Build.VERSION_CODES.JELLY_BEAN) public boolean isWriteAheadLoggingEnabled();
+ method public boolean isWriteAheadLoggingEnabled();
method public boolean needUpgrade(int newVersion);
method public android.database.Cursor query(androidx.sqlite.db.SupportSQLiteQuery query);
- method @RequiresApi(api=android.os.Build.VERSION_CODES.JELLY_BEAN) public android.database.Cursor query(androidx.sqlite.db.SupportSQLiteQuery query, android.os.CancellationSignal? cancellationSignal);
+ method public android.database.Cursor query(androidx.sqlite.db.SupportSQLiteQuery query, android.os.CancellationSignal? cancellationSignal);
method public android.database.Cursor query(String query);
method public android.database.Cursor query(String query, Object![] bindArgs);
- method @RequiresApi(api=android.os.Build.VERSION_CODES.JELLY_BEAN) public void setForeignKeyConstraintsEnabled(boolean enabled);
+ method public void setForeignKeyConstraintsEnabled(boolean enabled);
method public void setLocale(java.util.Locale locale);
method public void setMaxSqlCacheSize(int cacheSize);
method public long setMaximumSize(long numBytes);
@@ -64,7 +64,7 @@
property public default boolean isExecPerConnectionSQLSupported;
property public abstract boolean isOpen;
property public abstract boolean isReadOnly;
- property @RequiresApi(api=android.os.Build.VERSION_CODES.JELLY_BEAN) public abstract boolean isWriteAheadLoggingEnabled;
+ property public abstract boolean isWriteAheadLoggingEnabled;
property public abstract long maximumSize;
property public abstract long pageSize;
property public abstract String? path;
@@ -76,7 +76,7 @@
method public String? getDatabaseName();
method public androidx.sqlite.db.SupportSQLiteDatabase getReadableDatabase();
method public androidx.sqlite.db.SupportSQLiteDatabase getWritableDatabase();
- method @RequiresApi(api=android.os.Build.VERSION_CODES.JELLY_BEAN) public void setWriteAheadLoggingEnabled(boolean enabled);
+ method public void setWriteAheadLoggingEnabled(boolean enabled);
property public abstract String? databaseName;
property public abstract androidx.sqlite.db.SupportSQLiteDatabase readableDatabase;
property public abstract androidx.sqlite.db.SupportSQLiteDatabase writableDatabase;
diff --git a/sqlite/sqlite/api/restricted_current.txt b/sqlite/sqlite/api/restricted_current.txt
index 3e4733c..d51ced3 100644
--- a/sqlite/sqlite/api/restricted_current.txt
+++ b/sqlite/sqlite/api/restricted_current.txt
@@ -24,7 +24,7 @@
method public void beginTransactionWithListenerNonExclusive(android.database.sqlite.SQLiteTransactionListener transactionListener);
method public androidx.sqlite.db.SupportSQLiteStatement compileStatement(String sql);
method public int delete(String table, String? whereClause, Object![]? whereArgs);
- method @RequiresApi(api=android.os.Build.VERSION_CODES.JELLY_BEAN) public void disableWriteAheadLogging();
+ method public void disableWriteAheadLogging();
method public boolean enableWriteAheadLogging();
method public void endTransaction();
method public default void execPerConnectionSQL(String sql, Object![]? bindArgs);
@@ -42,13 +42,13 @@
method public default boolean isExecPerConnectionSQLSupported();
method public boolean isOpen();
method public boolean isReadOnly();
- method @RequiresApi(api=android.os.Build.VERSION_CODES.JELLY_BEAN) public boolean isWriteAheadLoggingEnabled();
+ method public boolean isWriteAheadLoggingEnabled();
method public boolean needUpgrade(int newVersion);
method public android.database.Cursor query(androidx.sqlite.db.SupportSQLiteQuery query);
- method @RequiresApi(api=android.os.Build.VERSION_CODES.JELLY_BEAN) public android.database.Cursor query(androidx.sqlite.db.SupportSQLiteQuery query, android.os.CancellationSignal? cancellationSignal);
+ method public android.database.Cursor query(androidx.sqlite.db.SupportSQLiteQuery query, android.os.CancellationSignal? cancellationSignal);
method public android.database.Cursor query(String query);
method public android.database.Cursor query(String query, Object![] bindArgs);
- method @RequiresApi(api=android.os.Build.VERSION_CODES.JELLY_BEAN) public void setForeignKeyConstraintsEnabled(boolean enabled);
+ method public void setForeignKeyConstraintsEnabled(boolean enabled);
method public void setLocale(java.util.Locale locale);
method public void setMaxSqlCacheSize(int cacheSize);
method public long setMaximumSize(long numBytes);
@@ -64,7 +64,7 @@
property public default boolean isExecPerConnectionSQLSupported;
property public abstract boolean isOpen;
property public abstract boolean isReadOnly;
- property @RequiresApi(api=android.os.Build.VERSION_CODES.JELLY_BEAN) public abstract boolean isWriteAheadLoggingEnabled;
+ property public abstract boolean isWriteAheadLoggingEnabled;
property public abstract long maximumSize;
property public abstract long pageSize;
property public abstract String? path;
@@ -76,7 +76,7 @@
method public String? getDatabaseName();
method public androidx.sqlite.db.SupportSQLiteDatabase getReadableDatabase();
method public androidx.sqlite.db.SupportSQLiteDatabase getWritableDatabase();
- method @RequiresApi(api=android.os.Build.VERSION_CODES.JELLY_BEAN) public void setWriteAheadLoggingEnabled(boolean enabled);
+ method public void setWriteAheadLoggingEnabled(boolean enabled);
property public abstract String? databaseName;
property public abstract androidx.sqlite.db.SupportSQLiteDatabase readableDatabase;
property public abstract androidx.sqlite.db.SupportSQLiteDatabase writableDatabase;
diff --git a/sqlite/sqlite/lint-baseline.xml b/sqlite/sqlite/lint-baseline.xml
deleted file mode 100644
index ca86ac7..0000000
--- a/sqlite/sqlite/lint-baseline.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 8.3.0-alpha04" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0-alpha04)" variant="all" version="8.3.0-alpha04">
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(16)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/sqlite/db/SupportSQLiteCompat.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" @RequiresApi(19)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/sqlite/db/SupportSQLiteCompat.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/sqlite/db/SupportSQLiteDatabase.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/sqlite/db/SupportSQLiteDatabase.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/sqlite/db/SupportSQLiteDatabase.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @get:RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/sqlite/db/SupportSQLiteDatabase.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 16"
- errorLine1=" @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/sqlite/db/SupportSQLiteOpenHelper.kt"/>
- </issue>
-
- <issue
- id="ObsoleteSdkInt"
- message="Unnecessary; SDK_INT is always >= 19"
- errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/sqlite/db/SupportSQLiteOpenHelper.kt"/>
- </issue>
-
-</issues>
diff --git a/sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteCompat.kt b/sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteCompat.kt
index 36c2f87..4b875af 100644
--- a/sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteCompat.kt
+++ b/sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteCompat.kt
@@ -15,16 +15,11 @@
*/
package androidx.sqlite.db
-import android.app.ActivityManager
import android.content.ContentResolver
import android.content.Context
import android.database.Cursor
-import android.database.sqlite.SQLiteDatabase
-import android.database.sqlite.SQLiteDatabase.CursorFactory
-import android.database.sqlite.SQLiteOpenHelper
import android.net.Uri
import android.os.Bundle
-import android.os.CancellationSignal
import androidx.annotation.RequiresApi
import androidx.annotation.RestrictTo
import java.io.File
@@ -36,181 +31,6 @@
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
class SupportSQLiteCompat private constructor() {
/**
- * Class for accessing functions that require SDK version 16 and higher.
- *
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @RequiresApi(16)
- object Api16Impl {
- /**
- * Cancels the operation and signals the cancellation listener. If the operation has not yet
- * started, then it will be canceled as soon as it does.
- *
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @JvmStatic
- fun cancel(cancellationSignal: CancellationSignal) {
- cancellationSignal.cancel()
- }
-
- /**
- * Creates a cancellation signal, initially not canceled.
- *
- * @return a new cancellation signal
- *
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @JvmStatic
- fun createCancellationSignal(): CancellationSignal {
- return CancellationSignal()
- }
-
- /**
- * Deletes a database including its journal file and other auxiliary files
- * that may have been created by the database engine.
- *
- * @param file The database file path.
- * @return True if the database was successfully deleted.
- *
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @JvmStatic
- fun deleteDatabase(file: File): Boolean {
- return SQLiteDatabase.deleteDatabase(file)
- }
-
- /**
- * Runs the provided SQL and returns a cursor over the result set.
- *
- * @param sql the SQL query. The SQL string must not be ; terminated
- * @param selectionArgs You may include ?s in where clause in the query,
- * which will be replaced by the values from selectionArgs. The
- * values will be bound as Strings.
- * @param editTable the name of the first table, which is editable
- * @param cancellationSignal A signal to cancel the operation in progress, or null if none.
- * If the operation is canceled, then [OperationCanceledException] will be thrown
- * when the query is executed.
- * @param cursorFactory the cursor factory to use, or null for the default factory
- * @return A [Cursor] object, which is positioned before the first entry. Note that
- * [Cursor]s are not synchronized, see the documentation for more details.
- *
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @JvmStatic
- fun rawQueryWithFactory(
- sQLiteDatabase: SQLiteDatabase,
- sql: String,
- selectionArgs: Array<out String?>,
- editTable: String?,
- cancellationSignal: CancellationSignal,
- cursorFactory: CursorFactory
- ): Cursor {
- return sQLiteDatabase.rawQueryWithFactory(
- cursorFactory, sql, selectionArgs, editTable,
- cancellationSignal
- )
- }
-
- /**
- * Sets whether foreign key constraints are enabled for the database.
- *
- * @param enable True to enable foreign key constraints, false to disable them.
- *
- * @throws [IllegalStateException] if the are transactions is in progress
- * when this method is called.
- *
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @JvmStatic
- fun setForeignKeyConstraintsEnabled(
- sQLiteDatabase: SQLiteDatabase,
- enable: Boolean
- ) {
- sQLiteDatabase.setForeignKeyConstraintsEnabled(enable)
- }
-
- /**
- * This method disables the features enabled by
- * [SQLiteDatabase.enableWriteAheadLogging].
- *
- * @throws - if there are transactions in progress at the
- * time this method is called. WAL mode can only be changed when there are no
- * transactions in progress.
- *
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @JvmStatic
- fun disableWriteAheadLogging(sQLiteDatabase: SQLiteDatabase) {
- sQLiteDatabase.disableWriteAheadLogging()
- }
-
- /**
- * Returns true if [SQLiteDatabase.enableWriteAheadLogging] logging has been enabled for
- * this database.
- *
- * For details, see [SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING].
- *
- * @return True if write-ahead logging has been enabled for this database.
- *
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @JvmStatic
- fun isWriteAheadLoggingEnabled(sQLiteDatabase: SQLiteDatabase): Boolean {
- return sQLiteDatabase.isWriteAheadLoggingEnabled
- }
-
- /**
- * Sets [SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING] flag if `enabled` is `true`, unsets
- * otherwise.
- *
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @JvmStatic
- fun setWriteAheadLoggingEnabled(
- sQLiteOpenHelper: SQLiteOpenHelper,
- enabled: Boolean
- ) {
- sQLiteOpenHelper.setWriteAheadLoggingEnabled(enabled)
- }
- }
-
- /**
- * Helper for accessing functions that require SDK version 19 and higher.
- *
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @RequiresApi(19)
- object Api19Impl {
- /**
- * Return the URI at which notifications of changes in this Cursor's data
- * will be delivered.
- *
- * @return Returns a URI that can be used with [ContentResolver.registerContentObserver] to
- * find out about changes to this Cursor's data. May be null if no notification URI has been
- * set.
- *
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @JvmStatic
- fun getNotificationUri(cursor: Cursor): Uri {
- return cursor.notificationUri
- }
-
- /**
- * Returns true if this is a low-RAM device. Exactly whether a device is low-RAM
- * is ultimately up to the device configuration, but currently it generally means
- * something with 1GB or less of RAM. This is mostly intended to be used by apps
- * to determine whether they should turn off certain features that require more RAM.
- *
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @JvmStatic
- fun isLowRamDevice(activityManager: ActivityManager): Boolean {
- return activityManager.isLowRamDevice
- }
- }
-
- /**
* Helper for accessing functions that require SDK version 21 and higher.
*
*/
diff --git a/sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteDatabase.kt b/sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteDatabase.kt
index d2fa862..a8e324e 100644
--- a/sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteDatabase.kt
+++ b/sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteDatabase.kt
@@ -19,10 +19,8 @@
import android.database.Cursor
import android.database.SQLException
import android.database.sqlite.SQLiteTransactionListener
-import android.os.Build
import android.os.CancellationSignal
import android.util.Pair
-import androidx.annotation.RequiresApi
import java.io.Closeable
import java.util.Locale
@@ -314,7 +312,6 @@
* @return A [Cursor] object, which is positioned before the first entry. Note that
* [Cursor]s are not synchronized, see the documentation for more details.
*/
- @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
fun query(
query: SupportSQLiteQuery,
cancellationSignal: CancellationSignal?
@@ -494,7 +491,6 @@
* @throws IllegalStateException if the are transactions is in progress
* when this method is called.
*/
- @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
fun setForeignKeyConstraintsEnabled(enabled: Boolean)
/**
@@ -574,13 +570,11 @@
* time this method is called. WAL mode can only be changed when there are no transactions in
* progress.
*/
- @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
fun disableWriteAheadLogging()
/**
* Is true if write-ahead logging has been enabled for this database.
*/
- @get:RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
val isWriteAheadLoggingEnabled: Boolean
/**
diff --git a/sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteOpenHelper.kt b/sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteOpenHelper.kt
index 070dd70..d664342 100644
--- a/sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteOpenHelper.kt
+++ b/sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteOpenHelper.kt
@@ -16,12 +16,10 @@
package androidx.sqlite.db
import android.content.Context
+import android.database.sqlite.SQLiteDatabase
import android.database.sqlite.SQLiteException
-import android.os.Build
import android.util.Log
import android.util.Pair
-import androidx.annotation.RequiresApi
-import androidx.sqlite.db.SupportSQLiteCompat.Api16Impl.deleteDatabase
import androidx.sqlite.db.SupportSQLiteOpenHelper.Callback
import androidx.sqlite.db.SupportSQLiteOpenHelper.Factory
import java.io.Closeable
@@ -52,7 +50,6 @@
* @param enabled True if write-ahead logging should be enabled, false if it
* should be disabled.
*/
- @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
fun setWriteAheadLoggingEnabled(enabled: Boolean)
/**
@@ -254,18 +251,7 @@
}
Log.w(TAG, "deleting the database file: $fileName")
try {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
- deleteDatabase(File(fileName))
- } else {
- try {
- val deleted = File(fileName).delete()
- if (!deleted) {
- Log.e(TAG, "Could not delete the database file $fileName")
- }
- } catch (error: Exception) {
- Log.e(TAG, "error while deleting corrupted database file", error)
- }
- }
+ SQLiteDatabase.deleteDatabase(File(fileName))
} catch (e: Exception) {
/* print warning and ignore exception */
Log.w(TAG, "delete failed: ", e)