[android] #5682 - Cloning events list to prevent synchronization issues

This commit is contained in:
Brad Leege
2016-07-14 16:03:40 -07:00
parent f2585b342c
commit 95e5d12235

View File

@@ -637,7 +637,9 @@ public class MapboxEventManager {
// =========
JSONArray jsonArray = new JSONArray();
for (Hashtable<String, Object> evt : events) {
Vector<Hashtable<String, Object>> eventsClone = (Vector<Hashtable<String, Object>>) events.clone();
for (Hashtable<String, Object> evt : eventsClone) {
JSONObject jsonObject = new JSONObject();
// Build the JSON but only if there's a value for it in the evt