Fix various restricted APIs scope.
Scope.LIBRARY_GROUP_PREFIX has been historically used to denote Room APIs that are used in code generation and end up being used in an app's package. These APIs should be treated as public APIs in terms of ABI compatibility but adding the annotation prevents users from directly using them.
These CL updates various incorrect scopes LIBRARY_GROUP to LIBRARY_GROUP_PREFIX.
Bug: 322167799
Bug: 361342658
Bug: 390443240
Test: Existing
Change-Id: I30868498d6171f5f964bbf3947f672733b8e3b82
diff --git a/room/room-runtime/api/restricted_current.txt b/room/room-runtime/api/restricted_current.txt
index bb0324f..232e51e 100644
--- a/room/room-runtime/api/restricted_current.txt
+++ b/room/room-runtime/api/restricted_current.txt
@@ -203,20 +203,29 @@
public abstract class RoomDatabase {
ctor public RoomDatabase();
method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public void assertNotMainThread();
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public void assertNotSuspendingTransaction();
method @Deprecated public void beginTransaction();
method @WorkerThread public abstract void clearAllTables();
method public void close();
method public androidx.sqlite.db.SupportSQLiteStatement compileStatement(String sql);
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public java.util.List<androidx.room.migration.Migration> createAutoMigrations(java.util.Map<kotlin.reflect.KClass<? extends androidx.room.migration.AutoMigrationSpec>,? extends androidx.room.migration.AutoMigrationSpec> autoMigrationSpecs);
method protected abstract androidx.room.InvalidationTracker createInvalidationTracker();
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) protected androidx.room.RoomOpenDelegateMarker createOpenDelegate();
method @Deprecated protected androidx.sqlite.db.SupportSQLiteOpenHelper createOpenHelper(androidx.room.DatabaseConfiguration config);
method @Deprecated public void endTransaction();
+ method @Deprecated @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) @kotlin.jvm.JvmSuppressWildcards public java.util.List<androidx.room.migration.Migration> getAutoMigrations(java.util.Map<java.lang.Class<? extends androidx.room.migration.AutoMigrationSpec>,androidx.room.migration.AutoMigrationSpec> autoMigrationSpecs);
method public androidx.room.InvalidationTracker getInvalidationTracker();
method @Deprecated @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) protected java.util.List<androidx.room.RoomDatabase.Callback>? getMCallbacks();
method @Deprecated @kotlin.jvm.Volatile protected androidx.sqlite.db.SupportSQLiteDatabase? getMDatabase();
method public androidx.sqlite.db.SupportSQLiteOpenHelper getOpenHelper();
method public java.util.concurrent.Executor getQueryExecutor();
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public java.util.Set<kotlin.reflect.KClass<? extends androidx.room.migration.AutoMigrationSpec>> getRequiredAutoMigrationSpecClasses();
+ method @Deprecated @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public java.util.Set<java.lang.Class<? extends androidx.room.migration.AutoMigrationSpec>> getRequiredAutoMigrationSpecs();
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) protected java.util.Map<kotlin.reflect.KClass<? extends java.lang.Object?>,java.util.List<kotlin.reflect.KClass<? extends java.lang.Object?>>> getRequiredTypeConverterClasses();
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) protected java.util.Map<java.lang.Class<? extends java.lang.Object?>,java.util.List<java.lang.Class<? extends java.lang.Object?>>> getRequiredTypeConverters();
method public java.util.concurrent.Executor getTransactionExecutor();
method @Deprecated public <T> T? getTypeConverter(Class<T> klass);
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public final <T> T getTypeConverter(kotlin.reflect.KClass<T> klass);
method public boolean inTransaction();
method @CallSuper public void init(androidx.room.DatabaseConfiguration configuration);
method @Deprecated protected void internalInitInvalidationTracker(androidx.sqlite.db.SupportSQLiteDatabase db);
@@ -326,6 +335,31 @@
method public static suspend <R> Object? withTransaction(androidx.room.RoomDatabase, kotlin.jvm.functions.Function1<? super kotlin.coroutines.Continuation<? super R>,? extends java.lang.Object?> block, kotlin.coroutines.Continuation<? super R>);
}
+ @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public abstract class RoomOpenDelegate implements androidx.room.RoomOpenDelegateMarker {
+ ctor public RoomOpenDelegate(int version, String identityHash, String legacyIdentityHash);
+ method public abstract void createAllTables(androidx.sqlite.SQLiteConnection connection);
+ method public abstract void dropAllTables(androidx.sqlite.SQLiteConnection connection);
+ method public final String getIdentityHash();
+ method public final String getLegacyIdentityHash();
+ method public final int getVersion();
+ method public abstract void onCreate(androidx.sqlite.SQLiteConnection connection);
+ method public abstract void onOpen(androidx.sqlite.SQLiteConnection connection);
+ method public abstract void onPostMigrate(androidx.sqlite.SQLiteConnection connection);
+ method public abstract void onPreMigrate(androidx.sqlite.SQLiteConnection connection);
+ method public abstract androidx.room.RoomOpenDelegate.ValidationResult onValidateSchema(androidx.sqlite.SQLiteConnection connection);
+ property public final String identityHash;
+ property public final String legacyIdentityHash;
+ property public final int version;
+ }
+
+ @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public static final class RoomOpenDelegate.ValidationResult {
+ ctor public RoomOpenDelegate.ValidationResult(boolean isValid, String? expectedFoundMsg);
+ property public final String? expectedFoundMsg;
+ property public final boolean isValid;
+ field public final String? expectedFoundMsg;
+ field public final boolean isValid;
+ }
+
public interface RoomOpenDelegateMarker {
}
diff --git a/room/room-runtime/src/androidMain/java/androidx/room/paging/LimitOffsetDataSource.java b/room/room-runtime/src/androidMain/java/androidx/room/paging/LimitOffsetDataSource.java
index 3cdc6c0..6e7b6a5 100644
--- a/room/room-runtime/src/androidMain/java/androidx/room/paging/LimitOffsetDataSource.java
+++ b/room/room-runtime/src/androidMain/java/androidx/room/paging/LimitOffsetDataSource.java
@@ -49,7 +49,7 @@
*
*/
@SuppressWarnings("deprecation")
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
public abstract class LimitOffsetDataSource<T> extends androidx.paging.PositionalDataSource<T> {
private final RoomSQLiteQuery mSourceQuery;
private final String mCountQuery;
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/CoroutinesRoom.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/CoroutinesRoom.android.kt
index 415065d..1544630 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/CoroutinesRoom.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/CoroutinesRoom.android.kt
@@ -29,7 +29,7 @@
import kotlinx.coroutines.withContext
/** A helper class for supporting Kotlin Coroutines in Room. */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
public class CoroutinesRoom private constructor() {
public companion object {
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/DatabaseConfiguration.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/DatabaseConfiguration.android.kt
index 5329a272..c800d84 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/DatabaseConfiguration.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/DatabaseConfiguration.android.kt
@@ -33,7 +33,7 @@
@Suppress("UNUSED_PARAMETER")
actual open class DatabaseConfiguration
@SuppressLint("LambdaLast")
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
constructor(
/* The context to use while connecting to the database. */
@JvmField val context: Context,
@@ -67,7 +67,7 @@
*
* @see [multiInstanceInvalidation]
*/
- @field:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @field:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
@JvmField
val multiInstanceInvalidationServiceIntent: Intent?,
@@ -130,7 +130,7 @@
* @param migrationNotRequiredFrom The collection of schema versions from which migrations
* aren't required.
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
@Deprecated("This constructor is deprecated.")
constructor(
context: Context,
@@ -188,7 +188,7 @@
* aren't required.
*/
@OptIn(ExperimentalRoomApi::class)
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
@Deprecated("This constructor is deprecated.")
constructor(
context: Context,
@@ -254,7 +254,7 @@
* @param copyFromFile The pre-packaged database file.
*/
@OptIn(ExperimentalRoomApi::class)
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
@Deprecated("This constructor is deprecated.")
constructor(
context: Context,
@@ -324,7 +324,7 @@
* database file will be copied from.
*/
@OptIn(ExperimentalRoomApi::class)
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
@Deprecated("This constructor is deprecated.")
constructor(
context: Context,
@@ -397,7 +397,7 @@
*/
@OptIn(ExperimentalRoomApi::class)
@SuppressLint("LambdaLast")
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
@Deprecated("This constructor is deprecated.")
constructor(
context: Context,
@@ -472,7 +472,7 @@
*/
@OptIn(ExperimentalRoomApi::class)
@SuppressLint("LambdaLast")
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
@Deprecated("This constructor is deprecated.")
constructor(
context: Context,
@@ -549,7 +549,7 @@
*/
@OptIn(ExperimentalRoomApi::class)
@SuppressLint("LambdaLast")
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
@Deprecated("This constructor is deprecated.")
constructor(
context: Context,
@@ -627,7 +627,7 @@
* @param autoMigrationSpecs The auto migration specs.
*/
@SuppressLint("LambdaLast")
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
@Deprecated("This constructor is deprecated.")
constructor(
context: Context,
@@ -674,7 +674,7 @@
queryCoroutineContext = null
)
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
@Deprecated("This constructor is deprecated.")
constructor(
context: Context,
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/EntityDeletionOrUpdateAdapter.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/EntityDeletionOrUpdateAdapter.android.kt
index 16ecdf8..a1a916e 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/EntityDeletionOrUpdateAdapter.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/EntityDeletionOrUpdateAdapter.android.kt
@@ -27,7 +27,7 @@
* @constructor Creates a DeletionOrUpdateAdapter that can delete or update the entity type T on the
* given database.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
@Deprecated("No longer used by generated code.", ReplaceWith("EntityDeleteOrUpdateAdapter"))
abstract class EntityDeletionOrUpdateAdapter<T>(database: RoomDatabase) :
SharedSQLiteStatement(database) {
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/EntityInsertionAdapter.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/EntityInsertionAdapter.android.kt
index aa1be1a..0774ade 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/EntityInsertionAdapter.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/EntityInsertionAdapter.android.kt
@@ -27,7 +27,7 @@
* @constructor Creates an InsertionAdapter that can insert the entity type T into the given
* database.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
@Deprecated("No longer used by generated code.", ReplaceWith("EntityInsertAdapter"))
abstract class EntityInsertionAdapter<T>(database: RoomDatabase) : SharedSQLiteStatement(database) {
/**
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/EntityUpsertionAdapter.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/EntityUpsertionAdapter.android.kt
index bc8c8f2..9d30a08 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/EntityUpsertionAdapter.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/EntityUpsertionAdapter.android.kt
@@ -42,7 +42,7 @@
* using the given insertionAdapter to perform insertion and updateAdapter to perform update when
* the insertion fails
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
@Deprecated("No longer used by generated code.", ReplaceWith("EntityUpsertAdapter"))
class EntityUpsertionAdapter<T>(
@Suppress("DEPRECATION") private val insertionAdapter: EntityInsertionAdapter<T>,
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/InvalidationTracker.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/InvalidationTracker.android.kt
index 9b5e5d8..0454358 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/InvalidationTracker.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/InvalidationTracker.android.kt
@@ -47,7 +47,7 @@
* new value.
*/
actual open class InvalidationTracker
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual constructor(
internal val database: RoomDatabase,
private val shadowTablesMap: Map<String, String>,
@@ -91,7 +91,7 @@
private val trackerLock = Any()
@Deprecated("No longer called by generated implementation")
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
constructor(
database: RoomDatabase,
vararg tableNames: String
@@ -290,7 +290,7 @@
* @param observer The observer to which InvalidationTracker will keep a weak reference.
*/
@WorkerThread
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
open fun addWeakObserver(observer: Observer) {
addObserver(WeakObserver(this, observer))
}
@@ -340,7 +340,7 @@
* @see refresh
*/
@WorkerThread
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
open fun refreshVersionsSync(): Unit = runBlocking {
implementation.refreshInvalidation(emptyArray(), onRefreshScheduled, onRefreshCompleted)
}
@@ -381,7 +381,7 @@
* @return A new LiveData that computes the given function when the given list of tables
* invalidates.
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
@Deprecated(
message = "Replaced with overload that takes 'inTransaction 'parameter.",
replaceWith = ReplaceWith("createLiveData(tableNames, false, computeFunction")
@@ -407,7 +407,7 @@
* @return A new LiveData that computes the given function when the given list of tables
* invalidates.
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
open fun <T> createLiveData(
tableNames: Array<out String>,
inTransaction: Boolean,
@@ -433,7 +433,7 @@
* @return A new LiveData that computes the given function when the given list of tables
* invalidates.
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun <T> createLiveData(
tableNames: Array<out String>,
inTransaction: Boolean,
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/RoomDatabase.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/RoomDatabase.android.kt
index c72e4e6..1152eef 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/RoomDatabase.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/RoomDatabase.android.kt
@@ -154,7 +154,7 @@
message = "This property is always null and will be removed in a future version.",
level = DeprecationLevel.ERROR
)
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
protected var mCallbacks: List<Callback>? = null
private var autoCloser: AutoCloser? = null
@@ -193,7 +193,7 @@
* @param T The type of the expected Type Converter subclass.
* @return An instance of T.
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
@Suppress("UNCHECKED_CAST")
actual fun <T : Any> getTypeConverter(klass: KClass<T>): T {
return typeConverters[klass] as T
@@ -320,7 +320,7 @@
* @return A list of migration instances each of which is a generated autoMigration
*/
@Deprecated("No longer implemented by generated")
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
@JvmSuppressWildcards // Suppress wildcards due to generated Java code
open fun getAutoMigrations(
autoMigrationSpecs: Map<Class<out AutoMigrationSpec>, AutoMigrationSpec>
@@ -328,7 +328,7 @@
return emptyList()
}
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual open fun createAutoMigrations(
autoMigrationSpecs: Map<KClass<out AutoMigrationSpec>, AutoMigrationSpec>
): List<Migration> {
@@ -386,7 +386,7 @@
* @return A new delegate to be used while opening the database
* @throws NotImplementedError by default
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
protected actual open fun createOpenDelegate(): RoomOpenDelegateMarker {
throw NotImplementedError()
}
@@ -424,7 +424,7 @@
*
* @return Creates a map that will include all required type converters for this database.
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
protected open fun getRequiredTypeConverters(): Map<Class<*>, List<Class<*>>> {
return emptyMap()
}
@@ -439,7 +439,7 @@
*
* @return A map that will include all required type converters for this database.
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
protected actual open fun getRequiredTypeConverterClasses(): Map<KClass<*>, List<KClass<*>>> {
// For backwards compatibility when newer runtime is used with older generated code,
// call the Java version this function.
@@ -460,12 +460,12 @@
* @return Creates a set that will include all required auto migration specs for this database.
*/
@Deprecated("No longer implemented by generated")
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
open fun getRequiredAutoMigrationSpecs(): Set<Class<out AutoMigrationSpec>> {
return emptySet()
}
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual open fun getRequiredAutoMigrationSpecClasses(): Set<KClass<out AutoMigrationSpec>> {
// For backwards compatibility when newer runtime is used with older generated code,
// call the Java version of this function.
@@ -565,7 +565,7 @@
}
/** Asserts that we are not on a suspending transaction. */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) // used in generated code
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
open fun assertNotSuspendingTransaction() {
check(!inCompatibilityMode() || inTransaction() || suspendingTransactionId.get() == null) {
"Cannot access database on a different coroutine" +
@@ -755,7 +755,7 @@
*
* @param connection The database connection.
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
protected actual fun internalInitInvalidationTracker(connection: SQLiteConnection) {
invalidationTracker.internalInit(connection)
}
@@ -1931,7 +1931,8 @@
/**
* Unfortunately, we cannot read this value so we are only setting it to the SQLite default.
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) const val MAX_BIND_PARAMETER_CNT = 999
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
+ const val MAX_BIND_PARAMETER_CNT = 999
}
}
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/RoomOpenHelper.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/RoomOpenHelper.android.kt
index 4ba4223..af2f515 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/RoomOpenHelper.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/RoomOpenHelper.android.kt
@@ -25,7 +25,7 @@
/** An open helper that holds a reference to the configuration until the database is opened. */
@Suppress("DEPRECATION") // Due to usage of RoomOpenHelper.Delegate
@Deprecated("Replaced by RoomConnectionManager and no longer used in generated code.")
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
open class RoomOpenHelper(
configuration: DatabaseConfiguration,
delegate: Delegate,
@@ -180,7 +180,7 @@
}
@Deprecated("Replaced by OpenDelegate and no longer used in generated code.")
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
abstract class Delegate(@JvmField val version: Int) {
abstract fun dropAllTables(db: SupportSQLiteDatabase)
@@ -227,7 +227,7 @@
}
@Deprecated("Replaced by OpenDelegate.ValidationResult and no longer used in generated code.")
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
open class ValidationResult(
@JvmField val isValid: Boolean,
@JvmField val expectedFoundMsg: String?
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/RoomSQLiteQuery.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/RoomSQLiteQuery.android.kt
index e88a1cd..f8b7203 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/RoomSQLiteQuery.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/RoomSQLiteQuery.android.kt
@@ -31,7 +31,7 @@
* Because it is relatively a big object, they are pooled and must be released after each use.
*/
@SuppressLint("WrongConstant")
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
class RoomSQLiteQuery private constructor(@field:VisibleForTesting val capacity: Int) :
SupportSQLiteQuery, SupportSQLiteProgram {
@Volatile private var query: String? = null
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/SharedSQLiteStatement.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/SharedSQLiteStatement.android.kt
index df05367..052c3aa 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/SharedSQLiteStatement.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/SharedSQLiteStatement.android.kt
@@ -31,7 +31,7 @@
* @constructor Creates an SQLite prepared statement that can be re-used across threads. If it is in
* use, it automatically creates a new one.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
abstract class SharedSQLiteStatement(private val database: RoomDatabase) {
private val lock = AtomicBoolean(false)
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/util/CursorUtil.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/util/CursorUtil.android.kt
index 8bb4ef8..34c07eb 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/util/CursorUtil.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/util/CursorUtil.android.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
@file:JvmName("CursorUtil")
-@file:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@file:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
package androidx.room.util
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/util/DBUtil.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/util/DBUtil.android.kt
index 7faeb6a..ec520d9 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/util/DBUtil.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/util/DBUtil.android.kt
@@ -42,7 +42,7 @@
import kotlinx.coroutines.withContext
/** Performs a database operation. */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual suspend fun <R> performSuspending(
db: RoomDatabase,
isReadOnly: Boolean,
@@ -57,7 +57,7 @@
}
/** Blocking version of [performSuspending] */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun <R> performBlocking(
db: RoomDatabase,
isReadOnly: Boolean,
@@ -80,7 +80,7 @@
* This function should only be invoked from generated code and is needed to support `@Transaction`
* delegates in Java and Kotlin. It is preferred to use the other 'perform' functions.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual suspend fun <R> performInTransactionSuspending(db: RoomDatabase, block: suspend () -> R): R =
if (db.inCompatibilityMode()) {
db.withTransactionContext {
@@ -138,7 +138,7 @@
* @return Result of the query.
*/
@Deprecated("This is only used in the generated code and shouldn't be called directly.")
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun query(db: RoomDatabase, sqLiteQuery: SupportSQLiteQuery, maybeCopy: Boolean): Cursor {
return query(db, sqLiteQuery, maybeCopy, null)
}
@@ -156,7 +156,7 @@
* @param signal The cancellation signal to be attached to the query.
* @return Result of the query.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun query(
db: RoomDatabase,
sqLiteQuery: SupportSQLiteQuery,
@@ -188,13 +188,13 @@
* @param db The database.
*/
@Deprecated("Replaced by dropFtsSyncTriggers(connection: SQLiteConnection)")
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun dropFtsSyncTriggers(db: SupportSQLiteDatabase) {
dropFtsSyncTriggers(SupportSQLiteConnection(db))
}
/** Checks for foreign key violations by executing a PRAGMA foreign_key_check. */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun foreignKeyCheck(db: SupportSQLiteDatabase, tableName: String) {
foreignKeyCheck(SupportSQLiteConnection(db), tableName)
}
@@ -208,7 +208,7 @@
* missing permissions.
* @see [User Version Number](https://www.sqlite.org/fileformat.html.user_version_number).
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
@Throws(IOException::class)
fun readVersion(databaseFile: File): Int {
FileInputStream(databaseFile).channel.use { input ->
@@ -230,12 +230,12 @@
* @return A new instance of CancellationSignal.
*/
@Deprecated("Use constructor", ReplaceWith("CancellationSignal()", "android.os.CancellationSignal"))
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun createCancellationSignal(): CancellationSignal {
return CancellationSignal()
}
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun toSQLiteConnection(db: SupportSQLiteDatabase): SQLiteConnection {
return SupportSQLiteConnection(db)
}
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/util/FileUtil.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/util/FileUtil.android.kt
index 89ca2d8..2caff1f 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/util/FileUtil.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/util/FileUtil.android.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
@file:JvmName("FileUtil")
-@file:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@file:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
package androidx.room.util
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/util/FtsTableInfo.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/util/FtsTableInfo.android.kt
index 5f12aa9..60a9f04 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/util/FtsTableInfo.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/util/FtsTableInfo.android.kt
@@ -21,7 +21,7 @@
import androidx.sqlite.db.SupportSQLiteDatabase
/** A data class that holds the information about an FTS table. */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual class FtsTableInfo(
/** The table name */
@JvmField actual val name: String,
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/util/RelationUtil.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/util/RelationUtil.android.kt
index 1ea7240..76af3114 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/util/RelationUtil.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/util/RelationUtil.android.kt
@@ -31,7 +31,7 @@
* @param isRelationCollection - True if [V] is a [Collection] which means it is non null.
* @param fetchBlock - A lambda for calling the generated _fetchRelationship function.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun <K : Any, V> recursiveFetchHashMap(
map: HashMap<K, V>,
isRelationCollection: Boolean,
@@ -71,7 +71,7 @@
}
/** Same as [recursiveFetchHashMap] but for [ArrayMap]. */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun <K : Any, V> recursiveFetchArrayMap(
map: ArrayMap<K, V>,
isRelationCollection: Boolean,
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/util/TableInfo.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/util/TableInfo.android.kt
index bc9b664..fdf5756 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/util/TableInfo.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/util/TableInfo.android.kt
@@ -31,7 +31,7 @@
*
* Even though SQLite column names are case insensitive, this class uses case sensitive matching.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual class TableInfo
actual constructor(
/** The table name. */
@@ -102,7 +102,7 @@
}
/** Holds the information about a database column. */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual class Column
actual constructor(
/** The column name. */
@@ -153,7 +153,7 @@
}
/** Holds the information about an SQLite foreign key */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual class ForeignKey
actual constructor(
@JvmField actual val referenceTable: String,
@@ -170,7 +170,7 @@
}
/** Holds the information about an SQLite index */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual class Index
actual constructor(
@JvmField actual val name: String,
diff --git a/room/room-runtime/src/androidMain/kotlin/androidx/room/util/ViewInfo.android.kt b/room/room-runtime/src/androidMain/kotlin/androidx/room/util/ViewInfo.android.kt
index 41fa707..b5e1448 100644
--- a/room/room-runtime/src/androidMain/kotlin/androidx/room/util/ViewInfo.android.kt
+++ b/room/room-runtime/src/androidMain/kotlin/androidx/room/util/ViewInfo.android.kt
@@ -27,7 +27,7 @@
*
* Even though SQLite column names are case insensitive, this class uses case sensitive matching.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual class ViewInfo
actual constructor(
/** The view name */
diff --git a/room/room-runtime/src/commonMain/kotlin/androidx/room/EntityDeleteOrUpdateAdapter.kt b/room/room-runtime/src/commonMain/kotlin/androidx/room/EntityDeleteOrUpdateAdapter.kt
index 871f7d5..01c0402 100644
--- a/room/room-runtime/src/commonMain/kotlin/androidx/room/EntityDeleteOrUpdateAdapter.kt
+++ b/room/room-runtime/src/commonMain/kotlin/androidx/room/EntityDeleteOrUpdateAdapter.kt
@@ -29,7 +29,7 @@
* @constructor Creates a DeletionOrUpdateAdapter that can delete or update the entity type T on the
* given database.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
abstract class EntityDeleteOrUpdateAdapter<T> {
/**
* Create the deletion or update query
diff --git a/room/room-runtime/src/commonMain/kotlin/androidx/room/EntityInsertAdapter.kt b/room/room-runtime/src/commonMain/kotlin/androidx/room/EntityInsertAdapter.kt
index e9d7bfe..743ee70 100644
--- a/room/room-runtime/src/commonMain/kotlin/androidx/room/EntityInsertAdapter.kt
+++ b/room/room-runtime/src/commonMain/kotlin/androidx/room/EntityInsertAdapter.kt
@@ -29,7 +29,7 @@
* @constructor Creates an InsertionAdapter that can insert the entity type T into the given
* database.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
abstract class EntityInsertAdapter<T> {
/**
* Create the query.
diff --git a/room/room-runtime/src/commonMain/kotlin/androidx/room/EntityUpsertAdapter.kt b/room/room-runtime/src/commonMain/kotlin/androidx/room/EntityUpsertAdapter.kt
index 3bbb3a9..9dd5110 100644
--- a/room/room-runtime/src/commonMain/kotlin/androidx/room/EntityUpsertAdapter.kt
+++ b/room/room-runtime/src/commonMain/kotlin/androidx/room/EntityUpsertAdapter.kt
@@ -29,7 +29,7 @@
* using the given insertionAdapter to perform insertion and updateAdapter to perform update when
* the insertion fails
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
class EntityUpsertAdapter<T>(
private val entityInsertAdapter: EntityInsertAdapter<T>,
private val updateAdapter: EntityDeleteOrUpdateAdapter<T>
diff --git a/room/room-runtime/src/commonMain/kotlin/androidx/room/InvalidationTracker.kt b/room/room-runtime/src/commonMain/kotlin/androidx/room/InvalidationTracker.kt
index 5730b60..f958350 100644
--- a/room/room-runtime/src/commonMain/kotlin/androidx/room/InvalidationTracker.kt
+++ b/room/room-runtime/src/commonMain/kotlin/androidx/room/InvalidationTracker.kt
@@ -46,7 +46,7 @@
* created from, then such table is considered 'invalidated' and the [Flow] will emit a new value.
*/
expect class InvalidationTracker
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
constructor(
database: RoomDatabase,
shadowTablesMap: Map<String, String>,
diff --git a/room/room-runtime/src/commonMain/kotlin/androidx/room/RoomDatabase.kt b/room/room-runtime/src/commonMain/kotlin/androidx/room/RoomDatabase.kt
index 1dbaafd..ae3a382 100644
--- a/room/room-runtime/src/commonMain/kotlin/androidx/room/RoomDatabase.kt
+++ b/room/room-runtime/src/commonMain/kotlin/androidx/room/RoomDatabase.kt
@@ -89,7 +89,7 @@
*
* @return A new delegate to be used while opening the database
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
protected open fun createOpenDelegate(): RoomOpenDelegateMarker
/**
@@ -113,7 +113,7 @@
* @return Creates a set that will include the classes of all required auto migration specs for
* this database.
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
open fun getRequiredAutoMigrationSpecClasses(): Set<KClass<out AutoMigrationSpec>>
/**
@@ -125,7 +125,7 @@
* @param autoMigrationSpecs the provided specs needed by certain migrations.
* @return A list of migration instances each of which is a generated 'auto migration'.
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
open fun createAutoMigrations(
autoMigrationSpecs: Map<KClass<out AutoMigrationSpec>, AutoMigrationSpec>
): List<Migration>
@@ -139,7 +139,8 @@
* @param T The type of the expected Type Converter subclass.
* @return An instance of T.
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) fun <T : Any> getTypeConverter(klass: KClass<T>): T
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
+ fun <T : Any> getTypeConverter(klass: KClass<T>): T
/**
* Adds a provided type converter to be used in the database DAOs.
@@ -159,7 +160,7 @@
*
* @return A map that will include all required type converters for this database.
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
protected open fun getRequiredTypeConverterClasses(): Map<KClass<*>, List<KClass<*>>>
/** Property delegate of [getRequiredTypeConverterClasses] for common ext functionality. */
@@ -171,7 +172,7 @@
*
* @param connection The database connection.
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
protected fun internalInitInvalidationTracker(connection: SQLiteConnection)
/**
diff --git a/room/room-runtime/src/commonMain/kotlin/androidx/room/RoomOpenDelegate.kt b/room/room-runtime/src/commonMain/kotlin/androidx/room/RoomOpenDelegate.kt
index 9c3d501..9fd2bf6 100644
--- a/room/room-runtime/src/commonMain/kotlin/androidx/room/RoomOpenDelegate.kt
+++ b/room/room-runtime/src/commonMain/kotlin/androidx/room/RoomOpenDelegate.kt
@@ -27,9 +27,9 @@
* implementation of a RoomDatabase with runtime.
*
* @see [RoomDatabase.createOpenDelegate]
- * @see [RoomConnectionManager.openDelegate]
+ * @see [BaseRoomConnectionManager.openDelegate]
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
abstract class RoomOpenDelegate(
val version: Int,
val identityHash: String,
@@ -49,7 +49,7 @@
abstract fun dropAllTables(connection: SQLiteConnection)
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
class ValidationResult(@JvmField val isValid: Boolean, @JvmField val expectedFoundMsg: String?)
}
diff --git a/room/room-runtime/src/commonMain/kotlin/androidx/room/coroutines/FlowBuilder.kt b/room/room-runtime/src/commonMain/kotlin/androidx/room/coroutines/FlowBuilder.kt
index 3fdf0d1..526454f 100644
--- a/room/room-runtime/src/commonMain/kotlin/androidx/room/coroutines/FlowBuilder.kt
+++ b/room/room-runtime/src/commonMain/kotlin/androidx/room/coroutines/FlowBuilder.kt
@@ -27,7 +27,7 @@
import kotlinx.coroutines.flow.conflate
import kotlinx.coroutines.flow.map
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun <R> createFlow(
db: RoomDatabase,
inTransaction: Boolean,
diff --git a/room/room-runtime/src/commonMain/kotlin/androidx/room/util/ByteArrayWrapper.kt b/room/room-runtime/src/commonMain/kotlin/androidx/room/util/ByteArrayWrapper.kt
index cdb18cb..f4a10bd 100644
--- a/room/room-runtime/src/commonMain/kotlin/androidx/room/util/ByteArrayWrapper.kt
+++ b/room/room-runtime/src/commonMain/kotlin/androidx/room/util/ByteArrayWrapper.kt
@@ -19,7 +19,7 @@
import kotlin.jvm.JvmField
/** A [ByteArray] wrapper that implements equals and hashCode to be used as a Map key.typ */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
class ByteArrayWrapper(@JvmField val array: ByteArray) {
override fun equals(other: Any?): Boolean {
if (this === other) return true
diff --git a/room/room-runtime/src/commonMain/kotlin/androidx/room/util/ConnectionUtil.kt b/room/room-runtime/src/commonMain/kotlin/androidx/room/util/ConnectionUtil.kt
index e9f7bc5..7a3512f 100644
--- a/room/room-runtime/src/commonMain/kotlin/androidx/room/util/ConnectionUtil.kt
+++ b/room/room-runtime/src/commonMain/kotlin/androidx/room/util/ConnectionUtil.kt
@@ -30,7 +30,7 @@
* See (official SQLite documentation)[http://www.sqlite.org/lang_corefunc.html#last_insert_rowid]
* for details.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun getLastInsertedRowId(connection: SQLiteConnection): Long {
if (getTotalChangedRows(connection) == 0) {
return -1
@@ -48,7 +48,7 @@
* See the (official SQLite documentation)[http://www.sqlite.org/lang_corefunc.html#changes] for
* details.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun getTotalChangedRows(connection: SQLiteConnection): Int {
return connection.prepare("SELECT changes()").use {
it.step()
diff --git a/room/room-runtime/src/commonMain/kotlin/androidx/room/util/DBUtil.kt b/room/room-runtime/src/commonMain/kotlin/androidx/room/util/DBUtil.kt
index b15c5f3..2c031c6 100644
--- a/room/room-runtime/src/commonMain/kotlin/androidx/room/util/DBUtil.kt
+++ b/room/room-runtime/src/commonMain/kotlin/androidx/room/util/DBUtil.kt
@@ -32,7 +32,7 @@
import kotlin.jvm.JvmName
/** Performs a database operation. */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
expect suspend fun <R> performSuspending(
db: RoomDatabase,
isReadOnly: Boolean,
@@ -82,7 +82,7 @@
* delegates in Java and Kotlin. It is preferred to use the other 'perform' functions.
*/
// TODO(b/309996304): Replace with proper suspending transaction API for common.
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
expect suspend fun <R> performInTransactionSuspending(db: RoomDatabase, block: suspend () -> R): R
/**
@@ -93,7 +93,7 @@
*
* @param connection The database connection.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun dropFtsSyncTriggers(connection: SQLiteConnection) {
val existingTriggers = buildList {
connection.prepare("SELECT name FROM sqlite_master WHERE type = 'trigger'").use {
@@ -111,7 +111,7 @@
}
/** Checks for foreign key violations by executing a PRAGMA foreign_key_check. */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun foreignKeyCheck(db: SQLiteConnection, tableName: String) {
db.prepare("PRAGMA foreign_key_check(`$tableName`)").use { stmt ->
if (stmt.step()) {
diff --git a/room/room-runtime/src/commonMain/kotlin/androidx/room/util/FtsTableInfo.kt b/room/room-runtime/src/commonMain/kotlin/androidx/room/util/FtsTableInfo.kt
index f6fffde..dcec8e2 100644
--- a/room/room-runtime/src/commonMain/kotlin/androidx/room/util/FtsTableInfo.kt
+++ b/room/room-runtime/src/commonMain/kotlin/androidx/room/util/FtsTableInfo.kt
@@ -21,7 +21,7 @@
import kotlin.jvm.JvmStatic
/** A data class that holds the information about an FTS table. */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
expect class FtsTableInfo {
/** The table name */
val name: String
diff --git a/room/room-runtime/src/commonMain/kotlin/androidx/room/util/RelationUtil.kt b/room/room-runtime/src/commonMain/kotlin/androidx/room/util/RelationUtil.kt
index 828c589..1b85296 100644
--- a/room/room-runtime/src/commonMain/kotlin/androidx/room/util/RelationUtil.kt
+++ b/room/room-runtime/src/commonMain/kotlin/androidx/room/util/RelationUtil.kt
@@ -32,7 +32,7 @@
* @param isRelationCollection - True if [V] is a [Collection] which means it is non null.
* @param fetchBlock - A lambda for calling the generated _fetchRelationship function.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun <K : Any, V> recursiveFetchMap(
map: MutableMap<K, V>,
isRelationCollection: Boolean,
@@ -72,7 +72,7 @@
}
/** Same as [recursiveFetchMap] but for [LongSparseArray]. */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun <V> recursiveFetchLongSparseArray(
map: LongSparseArray<V>,
isRelationCollection: Boolean,
diff --git a/room/room-runtime/src/commonMain/kotlin/androidx/room/util/StatementUtil.kt b/room/room-runtime/src/commonMain/kotlin/androidx/room/util/StatementUtil.kt
index 7272ad6..211017e 100644
--- a/room/room-runtime/src/commonMain/kotlin/androidx/room/util/StatementUtil.kt
+++ b/room/room-runtime/src/commonMain/kotlin/androidx/room/util/StatementUtil.kt
@@ -28,7 +28,7 @@
* Returns the zero-based index for the given column name, or throws [IllegalArgumentException] if
* the column doesn't exist.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun getColumnIndexOrThrow(stmt: SQLiteStatement, name: String): Int {
val index: Int = stmt.columnIndexOf(name)
if (index >= 0) {
@@ -56,7 +56,7 @@
}
/** Returns the zero-based index for the given column name, or -1 if the column doesn't exist. */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun getColumnIndex(stmt: SQLiteStatement, name: String): Int {
return stmt.columnIndexOf(name)
}
@@ -76,7 +76,7 @@
* @param mapping the cursor column indices of the columns at `columnNames`.
* @return the wrapped Cursor.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun wrapMappedColumns(
statement: SQLiteStatement,
columnNames: Array<String>,
diff --git a/room/room-runtime/src/commonMain/kotlin/androidx/room/util/StringUtil.kt b/room/room-runtime/src/commonMain/kotlin/androidx/room/util/StringUtil.kt
index cd65582..fedd164 100644
--- a/room/room-runtime/src/commonMain/kotlin/androidx/room/util/StringUtil.kt
+++ b/room/room-runtime/src/commonMain/kotlin/androidx/room/util/StringUtil.kt
@@ -15,7 +15,7 @@
*/
@file:JvmName("StringUtil")
-@file:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@file:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
package androidx.room.util
diff --git a/room/room-runtime/src/commonMain/kotlin/androidx/room/util/TableInfo.kt b/room/room-runtime/src/commonMain/kotlin/androidx/room/util/TableInfo.kt
index 2ac97ab..427f035 100644
--- a/room/room-runtime/src/commonMain/kotlin/androidx/room/util/TableInfo.kt
+++ b/room/room-runtime/src/commonMain/kotlin/androidx/room/util/TableInfo.kt
@@ -29,7 +29,7 @@
*
* Even though SQLite column names are case insensitive, this class uses case sensitive matching.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
expect class TableInfo(
name: String,
columns: Map<String, Column>,
@@ -75,7 +75,7 @@
}
/** Holds the information about a database column. */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
class Column(
name: String,
type: String,
@@ -117,7 +117,7 @@
}
/** Holds the information about an SQLite foreign key */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
class ForeignKey(
referenceTable: String,
onDelete: String,
@@ -139,7 +139,7 @@
}
/** Holds the information about an SQLite index */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
class Index(name: String, unique: Boolean, columns: List<String>, orders: List<String>) {
val name: String
diff --git a/room/room-runtime/src/commonMain/kotlin/androidx/room/util/ViewInfo.kt b/room/room-runtime/src/commonMain/kotlin/androidx/room/util/ViewInfo.kt
index 0f80341..a0486cd 100644
--- a/room/room-runtime/src/commonMain/kotlin/androidx/room/util/ViewInfo.kt
+++ b/room/room-runtime/src/commonMain/kotlin/androidx/room/util/ViewInfo.kt
@@ -26,7 +26,7 @@
*
* Even though SQLite column names are case insensitive, this class uses case sensitive matching.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
expect class ViewInfo(name: String, sql: String?) {
/** The view name */
val name: String
diff --git a/room/room-runtime/src/jvmAndroidMain/kotlin/androidx/room/util/KClassUtil.jvmAndroid.kt b/room/room-runtime/src/jvmAndroidMain/kotlin/androidx/room/util/KClassUtil.jvmAndroid.kt
index 5f7b12e..ec3aeaf 100644
--- a/room/room-runtime/src/jvmAndroidMain/kotlin/androidx/room/util/KClassUtil.jvmAndroid.kt
+++ b/room/room-runtime/src/jvmAndroidMain/kotlin/androidx/room/util/KClassUtil.jvmAndroid.kt
@@ -15,7 +15,7 @@
*/
@file:JvmName("KClassUtil")
-@file:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@file:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
package androidx.room.util
@@ -25,7 +25,7 @@
* Finds and instantiates via reflection the implementation class generated by Room of an
* `@Database` annotated type.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun <T, C> findAndInstantiateDatabaseImpl(klass: Class<C>, suffix: String = "_Impl"): T {
val fullPackage: String = klass.getPackage()?.name ?: ""
val name: String = klass.canonicalName!!
diff --git a/room/room-runtime/src/jvmAndroidMain/kotlin/androidx/room/util/UUIDUtil.jvmAndroid.kt b/room/room-runtime/src/jvmAndroidMain/kotlin/androidx/room/util/UUIDUtil.jvmAndroid.kt
index 8191d4e..3040ce9 100644
--- a/room/room-runtime/src/jvmAndroidMain/kotlin/androidx/room/util/UUIDUtil.jvmAndroid.kt
+++ b/room/room-runtime/src/jvmAndroidMain/kotlin/androidx/room/util/UUIDUtil.jvmAndroid.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
@file:JvmName("UUIDUtil")
-@file:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@file:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
package androidx.room.util
diff --git a/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/InvalidationTracker.jvmNative.kt b/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/InvalidationTracker.jvmNative.kt
index 64020fb..cffa497 100644
--- a/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/InvalidationTracker.jvmNative.kt
+++ b/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/InvalidationTracker.jvmNative.kt
@@ -31,7 +31,7 @@
* created from, then such table is considered 'invalidated' and the [Flow] will emit a new value.
*/
actual class InvalidationTracker
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual constructor(
private val database: RoomDatabase,
shadowTablesMap: Map<String, String>,
diff --git a/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/RoomDatabase.jvmNative.kt b/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/RoomDatabase.jvmNative.kt
index ba4a415..5d56a72 100644
--- a/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/RoomDatabase.jvmNative.kt
+++ b/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/RoomDatabase.jvmNative.kt
@@ -117,7 +117,7 @@
* @return A new delegate to be used while opening the database
* @throws NotImplementedError by default
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
protected actual open fun createOpenDelegate(): RoomOpenDelegateMarker {
throw NotImplementedError()
}
@@ -147,7 +147,7 @@
* this database.
* @throws NotImplementedError by default
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual open fun getRequiredAutoMigrationSpecClasses(): Set<KClass<out AutoMigrationSpec>> {
throw NotImplementedError()
}
@@ -162,7 +162,7 @@
* @return A list of migration instances each of which is a generated 'auto migration'.
* @throws NotImplementedError by default
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual open fun createAutoMigrations(
autoMigrationSpecs: Map<KClass<out AutoMigrationSpec>, AutoMigrationSpec>
): List<Migration> {
@@ -178,7 +178,7 @@
* @param T The type of the expected Type Converter subclass.
* @return An instance of T.
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
@Suppress("UNCHECKED_CAST")
actual fun <T : Any> getTypeConverter(klass: KClass<T>): T {
return typeConverters[klass] as T
@@ -204,7 +204,7 @@
*
* @return A map that will include all required type converters for this database.
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
protected actual open fun getRequiredTypeConverterClasses(): Map<KClass<*>, List<KClass<*>>> {
throw NotImplementedError()
}
@@ -219,7 +219,7 @@
*
* @param connection The database connection.
*/
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
protected actual fun internalInitInvalidationTracker(connection: SQLiteConnection) {
invalidationTracker.internalInit(connection)
}
diff --git a/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/DBUtil.jvmNative.kt b/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/DBUtil.jvmNative.kt
index a60784a..61e53f1 100644
--- a/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/DBUtil.jvmNative.kt
+++ b/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/DBUtil.jvmNative.kt
@@ -29,7 +29,7 @@
import kotlinx.coroutines.withContext
/** Performs a database operation. */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual suspend fun <R> performSuspending(
db: RoomDatabase,
isReadOnly: Boolean,
@@ -58,7 +58,7 @@
* This function should only be invoked from generated code and is needed to support `@Transaction`
* delegates in Java and Kotlin. It is preferred to use the other 'perform' functions.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual suspend fun <R> performInTransactionSuspending(db: RoomDatabase, block: suspend () -> R): R =
withContext(db.getCoroutineContext(inTransaction = true)) {
db.internalPerform(isReadOnly = false, inTransaction = true) { block.invoke() }
diff --git a/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/FtsTableInfo.jvmNative.kt b/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/FtsTableInfo.jvmNative.kt
index 8d60b9a..b315548 100644
--- a/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/FtsTableInfo.jvmNative.kt
+++ b/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/FtsTableInfo.jvmNative.kt
@@ -21,7 +21,7 @@
import kotlin.jvm.JvmStatic
/** A data class that holds the information about an FTS table. */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual class FtsTableInfo(
/** The table name */
@JvmField actual val name: String,
diff --git a/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/TableInfo.jvmNative.kt b/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/TableInfo.jvmNative.kt
index 7bfa4b1..5c5a8b7 100644
--- a/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/TableInfo.jvmNative.kt
+++ b/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/TableInfo.jvmNative.kt
@@ -30,7 +30,7 @@
*
* Even though SQLite column names are case insensitive, this class uses case sensitive matching.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual class TableInfo
actual constructor(
/** The table name. */
@@ -80,7 +80,7 @@
}
/** Holds the information about a database column. */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual class Column
actual constructor(
/** The column name. */
@@ -117,7 +117,7 @@
}
/** Holds the information about an SQLite foreign key */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual class ForeignKey
actual constructor(
actual val referenceTable: String,
@@ -134,7 +134,7 @@
}
/** Holds the information about an SQLite index */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual class Index
actual constructor(
actual val name: String,
diff --git a/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/ViewInfo.jvmNative.kt b/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/ViewInfo.jvmNative.kt
index 60e07e7..a31fac8 100644
--- a/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/ViewInfo.jvmNative.kt
+++ b/room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/ViewInfo.jvmNative.kt
@@ -26,7 +26,7 @@
*
* Even though SQLite column names are case insensitive, this class uses case sensitive matching.
*/
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
actual class ViewInfo
actual constructor(
/** The view name */
diff --git a/room/room-runtime/src/nativeMain/kotlin/androidx/room/util/KClassUtil.native.kt b/room/room-runtime/src/nativeMain/kotlin/androidx/room/util/KClassUtil.native.kt
index 3be16d4..0a3ccce 100644
--- a/room/room-runtime/src/nativeMain/kotlin/androidx/room/util/KClassUtil.native.kt
+++ b/room/room-runtime/src/nativeMain/kotlin/androidx/room/util/KClassUtil.native.kt
@@ -32,7 +32,7 @@
* annotated type.
*/
@OptIn(ExperimentalAssociatedObjects::class)
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) // used in generated code
fun <T : RoomDatabase> findDatabaseConstructorAndInitDatabaseImpl(klass: KClass<*>): T {
val constructor = klass.findAssociatedObject<ConstructedBy>() as? RoomDatabaseConstructor<*>
checkNotNull(constructor) {