diff options
author | Bilal Alsharifi <bilal.alsharifi@gmail.com> | 2019-08-22 17:13:27 -0400 |
---|---|---|
committer | Bilal Alsharifi <bilal.alsharifi@gmail.com> | 2019-08-22 17:13:27 -0400 |
commit | 644b47c83994b930be71a1a736516adc4960d2d7 (patch) | |
tree | 9bb266cd43145950b268fa92f16bddd6a96a9354 | |
parent | ce74d073af5803e45adc83487af5ad6fa431d50a (diff) | |
download | sdl_android-644b47c83994b930be71a1a736516adc4960d2d7.tar.gz |
Handle some missing onError logic in operations
2 files changed, 25 insertions, 1 deletions
diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentChoiceSetOperation.java b/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentChoiceSetOperation.java index 3ca7af286..af69c0926 100644 --- a/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentChoiceSetOperation.java +++ b/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentChoiceSetOperation.java @@ -163,8 +163,10 @@ class PresentChoiceSetOperation extends AsynchronousOperation { @Override public void onError(int correlationId, Result resultCode, String info) { + if (listener != null){ + listener.onComplete(false); + } DebugTool.logError("Error Setting keyboard properties in present keyboard operation - choice manager - " + info); - super.onError(correlationId, resultCode, info); } }); if (internalInterface.get() != null){ @@ -198,6 +200,16 @@ class PresentChoiceSetOperation extends AsynchronousOperation { finishOperation(); } + + @Override + public void onError(int correlationId, Result resultCode, String info) { + DebugTool.logError("Presenting Choice set failed: " + resultCode + ", " + info); + + if (choiceSetSelectionListener != null){ + choiceSetSelectionListener.onError(resultCode + ", " + info); + } + finishOperation(); + } }); if (internalInterface.get() != null){ internalInterface.get().sendRPC(pi); @@ -218,6 +230,12 @@ class PresentChoiceSetOperation extends AsynchronousOperation { DebugTool.logInfo("Successfully reset choice keyboard properties to original config"); PresentChoiceSetOperation.super.finishOperation(); } + + @Override + public void onError(int correlationId, Result resultCode, String info) { + DebugTool.logError("Failed to reset choice keyboard properties to original config " + resultCode + ", " + info); + PresentChoiceSetOperation.super.finishOperation(); + } }); if (internalInterface.get() != null) { diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentKeyboardOperation.java b/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentKeyboardOperation.java index ee5552fbe..5089d0c92 100644 --- a/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentKeyboardOperation.java +++ b/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentKeyboardOperation.java @@ -244,6 +244,12 @@ class PresentKeyboardOperation extends AsynchronousOperation { DebugTool.logInfo("Successfully reset choice keyboard properties to original config"); PresentKeyboardOperation.super.finishOperation(); } + + @Override + public void onError(int correlationId, Result resultCode, String info) { + DebugTool.logError("Failed to reset choice keyboard properties to original config " + resultCode + ", " + info); + PresentKeyboardOperation.super.finishOperation(); + } }); if (internalInterface.get() != null) { |