Skip to content

Commit b061abe

Browse files
authored
Merge pull request #411 from Countly/fix_views
fix: use concurrent hash map for view data cache
2 parents 405087f + c0fa32e commit b061abe

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* presentRating(Context, String, FeedbackCallback)
1717

1818
* Mitigated an issue where content communication was done twice.
19+
* Mitigated a concurrency issue while restarting stopped views.
1920

2021
## 24.7.4
2122
* Disabled caching for webviews.

sdk/src/main/java/ly/count/android/sdk/ModuleViews.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class ModuleViews extends ModuleBase implements ViewIdProvider {
3636

3737
Map<String, Object> automaticViewSegmentation = new HashMap<>();//automatic view segmentation
3838

39-
Map<String, ViewData> viewDataMap = new HashMap<>(); // map viewIDs to its viewData
39+
final Map<String, ViewData> viewDataMap = new ConcurrentHashMap<>(); // map viewIDs to its viewData
4040

4141
SafeIDGenerator safeViewIDGenerator;
4242

0 commit comments

Comments
 (0)