Skip to content

Commit eb90da3

Browse files
HeniganHenigan
authored andcommitted
Align method signatures to other libs
1 parent 6a50d93 commit eb90da3

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PreloadPresentChoicesOperation.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ public void onExecute() {
195195
finishOperation(false);
196196
}
197197

198-
assignIdsToCells();
199-
makeCellsToUploadUnique();
198+
assignIdsToCells(this.cellsToUpload);
199+
makeCellsToUploadUnique(this.cellsToUpload);
200200

201201
if (this.choiceSet != null) {
202202
updateChoiceSet(this.choiceSet, this.loadedCells, new HashSet<>(this.cellsToUpload));
@@ -538,7 +538,7 @@ PerformInteraction getPerformInteraction() {
538538
return pi;
539539
}
540540

541-
private void assignIdsToCells() {
541+
private void assignIdsToCells(ArrayList<ChoiceCell> cells) {
542542
ArrayList<Integer> usedIds = new ArrayList<>();
543543
for (ChoiceCell cell : loadedCells) {
544544
usedIds.add(cell.getChoiceId());
@@ -547,9 +547,9 @@ private void assignIdsToCells() {
547547
ArrayList<Integer> sortedUsedIds = (ArrayList<Integer>) usedIds.clone();
548548

549549
//Loop through the cells we need ids for. Get and assign those ids
550-
for (int i = 0; i < this.cellsToUpload.size(); i++) {
550+
for (int i = 0; i < cells.size(); i++) {
551551
int cellId = nextChoiceIdBasedOnUsedIds(sortedUsedIds);
552-
this.cellsToUpload.get(i).setChoiceId(cellId);
552+
cells.get(i).setChoiceId(cellId);
553553

554554
//Insert the ids into the usedIds sorted array in the correct position
555555
for (int j = 0; j < sortedUsedIds.size(); j++) {
@@ -610,12 +610,12 @@ private int nextChoiceIdBasedOnUsedIds(ArrayList<Integer> usedIds) {
610610
}
611611

612612
// Choice Uniqueness
613-
void makeCellsToUploadUnique() {
614-
if (this.cellsToUpload.size() == 0) {
613+
void makeCellsToUploadUnique(ArrayList<ChoiceCell> cellsToUpload) {
614+
if (cellsToUpload.size() == 0) {
615615
return;
616616
}
617617

618-
ArrayList<ChoiceCell> strippedCellsToUpload = cloneChoiceCellList(this.cellsToUpload);
618+
ArrayList<ChoiceCell> strippedCellsToUpload = cloneChoiceCellList(cellsToUpload);
619619
ArrayList<ChoiceCell> strippedLoadedCells = cloneChoiceCellList(new ArrayList<>(loadedCells));
620620
boolean supportsChoiceUniqueness = !(sdlMsgVersion.getMajorVersion() < 7 || (sdlMsgVersion.getMajorVersion() == 7 && sdlMsgVersion.getMinorVersion() == 0));
621621
if (supportsChoiceUniqueness) {
@@ -624,7 +624,7 @@ void makeCellsToUploadUnique() {
624624
}
625625

626626
addUniqueNamesToCells(strippedCellsToUpload, strippedLoadedCells, supportsChoiceUniqueness);
627-
transferUniqueNamesFromCells(strippedCellsToUpload, this.cellsToUpload);
627+
transferUniqueNamesFromCells(strippedCellsToUpload, cellsToUpload);
628628
}
629629

630630
private void updateChoiceSet(ChoiceSet choiceSet, HashSet<ChoiceCell> loadedCells, HashSet<ChoiceCell> cellsToUpload) {

0 commit comments

Comments
 (0)