Update add/remove observer methods documentation to clarify threading
Test: n/a
Bug: 153948821
Relnote: Update add/remove observer methods documentation to clarify threading
Change-Id: Ifd1d988bf88ca54415aca08e82ed9e45a654a02c
diff --git a/room/runtime/src/main/java/androidx/room/InvalidationTracker.java b/room/runtime/src/main/java/androidx/room/InvalidationTracker.java
index 980aba5..45d819e 100644
--- a/room/runtime/src/main/java/androidx/room/InvalidationTracker.java
+++ b/room/runtime/src/main/java/androidx/room/InvalidationTracker.java
@@ -249,6 +249,9 @@
* <p>
* If one of the tables in the Observer does not exist in the database, this method throws an
* {@link IllegalArgumentException}.
+ * <p>
+ * This method should be called on a background/worker thread as it performs database
+ * operations.
*
* @param observer The observer which listens the database for changes.
*/
@@ -322,6 +325,9 @@
/**
* Removes the observer from the observers list.
+ * <p>
+ * This method should be called on a background/worker thread as it performs database
+ * operations.
*
* @param observer The observer to remove.
*/