diff options
Diffstat (limited to 'base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PreloadPresentChoicesOperation.java')
-rw-r--r-- | base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PreloadPresentChoicesOperation.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PreloadPresentChoicesOperation.java b/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PreloadPresentChoicesOperation.java index 4c9d5a3b5..8c6ebca6f 100644 --- a/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PreloadPresentChoicesOperation.java +++ b/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PreloadPresentChoicesOperation.java @@ -629,9 +629,13 @@ class PreloadPresentChoicesOperation extends Task { private void updateChoiceSet(ChoiceSet choiceSet, HashSet<ChoiceCell> loadedCells, HashSet<ChoiceCell> cellsToUpload) { ArrayList<ChoiceCell> choiceSetCells = new ArrayList<>(); + ArrayList<ChoiceCell> loadedCellsList = new ArrayList<>(loadedCells); + ArrayList<ChoiceCell> CellsToUploadList = new ArrayList<>(cellsToUpload); for (ChoiceCell cell : choiceSet.getChoices()) { - if (loadedCells.contains(cell) || cellsToUpload.contains(cell)) { - choiceSetCells.add(cell); + if (loadedCells.contains(cell)) { + choiceSetCells.add(loadedCellsList.get(loadedCellsList.indexOf(cell))); + } else if (cellsToUpload.contains(cell)) { + choiceSetCells.add(CellsToUploadList.get(CellsToUploadList.indexOf(cell))); } } this.choiceSet.setChoices((List<ChoiceCell>) choiceSetCells.clone()); |