I have a method in my Interface that retrieves all records from my Room Database as a LiveData List. My method is as follows:

```
 @Query("SELECT *FROM task_table ORDER BY taskId DESC")
    fun getAll():LiveData<List<Task>>

```

I have the following code in my ViewModel class:

```
val tasks:LiveData<List<Task>> = taskDao.getAll()

```

Also I've got an Observer setup in my Fragment as follows:

```
//After some other code and code to create an instance of the ViewModel
viewModel.tasks.observe(viewLifecycleOwner, Observer {
            it?.let {
                adapter.data = it
            }
        })

```

I'm a bit confused with LiveData. When I add a new record to my Room Database, my LiveData<List> updates on it's own without me having to call the

getAll() method. When you have LiveData, does the Android OS updates this List when you add/delete/update a record in the Database? Thanks.