summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBilal Alsharifi <bilal.alsharifi@gmail.com>2019-08-22 17:13:27 -0400
committerBilal Alsharifi <bilal.alsharifi@gmail.com>2019-08-22 17:13:27 -0400
commit644b47c83994b930be71a1a736516adc4960d2d7 (patch)
tree9bb266cd43145950b268fa92f16bddd6a96a9354
parentce74d073af5803e45adc83487af5ad6fa431d50a (diff)
downloadsdl_android-644b47c83994b930be71a1a736516adc4960d2d7.tar.gz
Handle some missing onError logic in operations
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentChoiceSetOperation.java20
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentKeyboardOperation.java6
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) {