room/runtime/src/main/java/androidx/room/RoomDatabase.java
@NonNull
        public Builder<T> allowMainThreadQueries() {
            mAllowMainThreadQueries = true;
            return this;
        }
/**
         * Disables the main thread query check for Room.
         * <p>
         * Room ensures that Database is never accessed on the main thread because it may lock the
         * main thread and trigger an ANR. If you need to access the database from the main thread,
         * you should always use async alternatives or manually move the call to a background
         * thread.
         * <p>
         * You may want to turn this check off for testing.
         *
         * @return this
         */
Disables the main thread query check for Room.

Room ensures that Database is never accessed on the main thread because it may lock the
main thread and trigger an ANR. If you need to access the database from the main thread,
you should always use async alternatives or manually move the call to a background
thread.

You may want to turn this check off for testing.

@return this
Disables the main thread query check for Room . Room ensures that Database is never accessed on the main thread because it may lock the main thread and trigger an ANR . If you need to access the database from the main thread you should always use async alternatives or manually move the call to a background thread . You may want to turn this check off for testing . @return this
@NonNull
        public Builder<T> allowMainThreadQueries() {
            mAllowMainThreadQueries = true;
            return this;
        }
@ NonNull public Builder < T > allowMainThreadQueries ( ) { mAllowMainThreadQueries = true ; return this ; }
Disables the main thread query check for Room.
Disables the main thread query check for Room .