Estou recebendo este erro aqui quando tento realizar uma inclusão na lista, fiz os ajustes de Async já para remover/salvar/procurar aluno e telefone. O estranho que tem vezes que eu entro no app aparece a lista em branco, ai incluo um novo aluno, aparece a lista dos que já estavam salvos e não aparece o aluno novo incluído, e as vezes quando incluo crasha o app com o erro abaixo:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.students, PID: 8536
java.lang.IllegalStateException: Cannot access database on the main thread since it may potentially lock the UI for a long period of time.
at androidx.room.RoomDatabase.assertNotMainThread(RoomDatabase.java:261)
at androidx.room.RoomDatabase.beginTransaction(RoomDatabase.java:327)
at com.example.students.database.dao.TelephoneDAO_Impl.saveTelephone(TelephoneDAO_Impl.java:84)
at com.example.students.ui.activity.StudentsFormActivity.finishAndSaveFormEdited(StudentsFormActivity.java:112)
at com.example.students.ui.activity.StudentsFormActivity.onOptionsItemSelected(StudentsFormActivity.java:62)
at android.app.Activity.onMenuItemSelected(Activity.java:3543)
at androidx.fragment.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:352)
at androidx.appcompat.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:264)
at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
at androidx.appcompat.app.AppCompatDelegateImpl.onMenuItemSelected(AppCompatDelegateImpl.java:1185)
at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:834)
at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158)
at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:985)
at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:975)
at androidx.appcompat.widget.ActionMenuView.invokeItem(ActionMenuView.java:625)
at androidx.appcompat.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:151)
at android.view.View.performClick(View.java:6597)
at android.view.View.performClickInternal(View.java:6574)
at android.view.View.access$3100(View.java:778)
at android.view.View$PerformClick.run(View.java:25885)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)