summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Kast <julian@livio.com>2021-11-30 12:01:47 -0500
committerRHeniz <heniganr1@gmail.com>2021-12-06 10:22:54 -0500
commit8fe43f1f20681d47e2edd2321289f21cf9cc911c (patch)
treef5ffdce4914e82b98188aefd0c7b067726a0208e
parentf818b87df76916042a80b7e0041e2e47964ffbf3 (diff)
downloadsdl_android-8fe43f1f20681d47e2edd2321289f21cf9cc911c.tar.gz
Move adding a keyboard listener to only if its a present operation and the keyboard listener is not null
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PreloadPresentChoicesOperation.java6
1 files changed, 5 insertions, 1 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 d46bd3d6a..92cb3838b 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
@@ -185,7 +185,7 @@ class PreloadPresentChoicesOperation extends Task {
choiceId = 1;
reachedMaxIds = false;
}
- addListeners();
+
DebugTool.logInfo(TAG, "Choice Operation: Executing preload choices operation");
// Enforce unique cells and remove cells that are already loaded
@@ -419,6 +419,10 @@ class PreloadPresentChoicesOperation extends Task {
}
private void presentChoiceSet(final CompletionListener listener) {
+ // add listeners if there is a keboard
+ if (keyboardListener != null) {
+ addListeners();
+ }
this.currentState = SDLPreloadPresentChoicesOperationState.PRESENTING_CHOICES;
PerformInteraction pi = getPerformInteraction();
pi.setOnRPCResponseListener(new OnRPCResponseListener() {