diff options
author | Henigan <rheniga1@MGC12Z921DLVCG.fbpld77.ford.com> | 2021-10-06 10:57:03 -0400 |
---|---|---|
committer | Henigan <rheniga1@MGC12Z921DLVCG.fbpld77.ford.com> | 2021-10-06 10:57:03 -0400 |
commit | cd4131baaa96aae98a1d4bcb623113e07f5d2a07 (patch) | |
tree | 168b3fe8267d52c310ba32a309b9fd65e7da4195 | |
parent | 60230823b341eb9e2e95f2c0649a322c7d5b9db1 (diff) | |
download | sdl_android-cd4131baaa96aae98a1d4bcb623113e07f5d2a07.tar.gz |
Align to JavaScript Behaviorbugfix/issue_1748
-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()); |