Crash occurs when floating download button is clicked
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.youtubedl, PID: 21758 java.lang.IllegalStateException: Cannot access database on the main thread since it may potentially lock the UI for a long period of time. at android.arch.persistence.room.RoomDatabase.assertNotMainThread(RoomDatabase.java:204) at android.arch.persistence.room.RoomDatabase.beginTransaction(RoomDatabase.java:251) at com.youtubedl.data.local.room.dao.ProgressDao_Impl.insertProgressInfo(ProgressDao_Impl.java:84) at com.youtubedl.data.local.ProgressLocalDataSource.saveProgressInfo(ProgressLocalDataSource.kt:24) at com.youtubedl.data.repository.ProgressRepositoryImpl.saveProgressInfo(ProgressRepository.kt:32) at com.youtubedl.ui.main.progress.ProgressViewModel.downloadVideo(ProgressViewModel.kt:74) at com.youtubedl.ui.main.progress.ProgressFragment$handleDownloadVideoEvent$1.onChanged(ProgressFragment.kt:71) at com.youtubedl.ui.main.progress.ProgressFragment$handleDownloadVideoEvent$1.onChanged(ProgressFragment.kt:24) at com.youtubedl.util.SingleLiveEvent$observe$1.onChanged(SingleLiveEvent.kt:28) at android.arch.lifecycle.LiveData.considerNotify(LiveData.java:109) at android.arch.lifecycle.LiveData.dispatchingValue(LiveData.java:126) at android.arch.lifecycle.LiveData.setValue(LiveData.java:282) at android.arch.lifecycle.MutableLiveData.setValue(MutableLiveData.java:33) at com.youtubedl.util.SingleLiveEvent.setValue(SingleLiveEvent.kt:36) at com.youtubedl.ui.main.home.BrowserFragment$handleDownloadVideoEvent$1$1$1.onDownloadVideo(BrowserFragment.kt:138) at com.youtubedl.databinding.DialogDownloadVideoBindingImpl._internalCallbackOnClick(DialogDownloadVideoBindingImpl.java:151) at com.youtubedl.generated.callback.OnClickListener.onClick(OnClickListener.java:11) at android.view.View.performClick(View.java:5246) at android.widget.TextView.performClick(TextView.java:10618) at android.view.View$PerformClick.run(View.java:21256) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:7007) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)