diff options
author | Henigan <rheniga1@MGC12Z921DLVCG.fbpld77.ford.com> | 2020-12-09 10:22:01 -0500 |
---|---|---|
committer | Henigan <rheniga1@MGC12Z921DLVCG.fbpld77.ford.com> | 2020-12-09 10:22:01 -0500 |
commit | 467b9eec38896bff8176c9971d28211d2fadf7a2 (patch) | |
tree | 0495fc2bd2be05a4ff4af11469458a1e0536f98e | |
parent | 65cea2d23fdbe8742f46a11ce1bf39c66b885d5a (diff) | |
download | sdl_android-feature/issue_1549.tar.gz |
iOS Alignmentfeature/issue_1549
2 files changed, 9 insertions, 9 deletions
diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseVoiceCommandManager.java b/base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseVoiceCommandManager.java index 782c80d80..3e5fa6dbe 100644 --- a/base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseVoiceCommandManager.java +++ b/base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseVoiceCommandManager.java @@ -148,7 +148,7 @@ abstract class BaseVoiceCommandManager extends BaseSubManager { DebugTool.logError(TAG, "The failed Add and Delete Commands: " + errorObject); } currentVoiceCommands = newCurrentVoiceCommands; - updatePendingOperations(); + updatePendingOperations(newCurrentVoiceCommands); updateOperation = null; } }); @@ -170,13 +170,13 @@ abstract class BaseVoiceCommandManager extends BaseSubManager { } } - private void updatePendingOperations() { + private void updatePendingOperations(List<VoiceCommand> newCurrentVoiceCommands) { for (Task operation : transactionQueue.getTasksAsList()) { if (operation.getState() == Task.IN_PROGRESS) { continue; } VoiceCommandUpdateOperation vcOperation = (VoiceCommandUpdateOperation) operation; - vcOperation.oldVoiceCommands = currentVoiceCommands; + vcOperation.oldVoiceCommands = newCurrentVoiceCommands; } } diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/menu/VoiceCommandUpdateOperation.java b/base/src/main/java/com/smartdevicelink/managers/screen/menu/VoiceCommandUpdateOperation.java index bc33161b1..b755abd7d 100644 --- a/base/src/main/java/com/smartdevicelink/managers/screen/menu/VoiceCommandUpdateOperation.java +++ b/base/src/main/java/com/smartdevicelink/managers/screen/menu/VoiceCommandUpdateOperation.java @@ -125,7 +125,7 @@ class VoiceCommandUpdateOperation extends Task { if (foundDeleteCommand == null) { return; } - removeCurrentVoiceCommandForCorrelatingDeleteCommand(foundDeleteCommand); + removeCurrentVoiceCommand(foundDeleteCommand.getCmdID()); } } }); @@ -143,9 +143,9 @@ class VoiceCommandUpdateOperation extends Task { return deleteCommandList; } - private void removeCurrentVoiceCommandForCorrelatingDeleteCommand(DeleteCommand deleteCommand) { + private void removeCurrentVoiceCommand(Integer commandId) { for (VoiceCommand voiceCommand : oldVoiceCommands) { - if (deleteCommand.getCmdID() == voiceCommand.getCommandId()) { + if (commandId == voiceCommand.getCommandId()) { currentVoiceCommands.remove(voiceCommand); return; } @@ -198,7 +198,7 @@ class VoiceCommandUpdateOperation extends Task { if (foundAddCommand == null) { return; } - VoiceCommand foundVoiceCommand = pendingVoiceCommandForCorrelatingAddCommand(foundAddCommand); + VoiceCommand foundVoiceCommand = pendingVoiceCommand(foundAddCommand.getCmdID()); if (foundVoiceCommand != null) { currentVoiceCommands.add(foundVoiceCommand); } @@ -219,9 +219,9 @@ class VoiceCommandUpdateOperation extends Task { return addCommandList; } - private VoiceCommand pendingVoiceCommandForCorrelatingAddCommand(AddCommand addCommand) { + private VoiceCommand pendingVoiceCommand(Integer commandId) { for (VoiceCommand voiceCommand : pendingVoiceCommands) { - if (addCommand.getCmdID() == voiceCommand.getCommandId()) { + if (commandId == voiceCommand.getCommandId()) { return voiceCommand; } } |