[modular] Fix bug where ongoing activity is not dispatched properly to
multiple watchers. It only sends to the first watcher.
MF-141 #done
TESTED: built, there's no scenario where ongoing activity has multiple
watchers.
Change-Id: Ie548ce2c185d72e34d3005eb8bb6cecc478ef110
diff --git a/bin/sessionmgr/story_runner/story_provider_impl.cc b/bin/sessionmgr/story_runner/story_provider_impl.cc
index 8b732c6..0e68aa4 100644
--- a/bin/sessionmgr/story_runner/story_provider_impl.cc
+++ b/bin/sessionmgr/story_runner/story_provider_impl.cc
@@ -502,7 +502,7 @@
fidl::StringPtr story_id,
fidl::VectorPtr<fuchsia::modular::OngoingActivityType> ongoing_activities) {
for (const auto& i : activity_watchers_.ptrs()) {
- (*i)->OnStoryActivityChange(story_id, std::move(ongoing_activities));
+ (*i)->OnStoryActivityChange(story_id, ongoing_activities.Clone());
}
}