summaryrefslogtreecommitdiff
path: root/src/com/android/car/messenger/impl/datamodels/UserAccountLiveData.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/car/messenger/impl/datamodels/UserAccountLiveData.java')
-rw-r--r--src/com/android/car/messenger/impl/datamodels/UserAccountLiveData.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/car/messenger/impl/datamodels/UserAccountLiveData.java b/src/com/android/car/messenger/impl/datamodels/UserAccountLiveData.java
index 8defc5f..1a95a2f 100644
--- a/src/com/android/car/messenger/impl/datamodels/UserAccountLiveData.java
+++ b/src/com/android/car/messenger/impl/datamodels/UserAccountLiveData.java
@@ -79,6 +79,16 @@ public class UserAccountLiveData extends LiveData<UserAccountChangeList> {
loadValue();
}
+ /**
+ * Refresh the user accounts. Updates listeners if a change is found. Useful to call when
+ * something occurs that indicates a change in accounts, such as empty messages. This is useful
+ * as there are occasions when the subscription on change listener is not called after a
+ * subscription is deleted.
+ */
+ public void refresh() {
+ loadValue();
+ }
+
/** Gets the instance of {@link UserAccountLiveData} */
@NonNull
public static UserAccountLiveData getInstance() {