Skip to content

Commit 8fe43f1

Browse files
Julian KastRHenigan
authored andcommitted
Move adding a keyboard listener to only if its a present operation and the keyboard listener is not null
1 parent f818b87 commit 8fe43f1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public void onExecute() {
185185
choiceId = 1;
186186
reachedMaxIds = false;
187187
}
188-
addListeners();
188+
189189

190190
DebugTool.logInfo(TAG, "Choice Operation: Executing preload choices operation");
191191
// Enforce unique cells and remove cells that are already loaded
@@ -419,6 +419,10 @@ public void onResponse(int correlationId, RPCResponse response) {
419419
}
420420

421421
private void presentChoiceSet(final CompletionListener listener) {
422+
// add listeners if there is a keboard
423+
if (keyboardListener != null) {
424+
addListeners();
425+
}
422426
this.currentState = SDLPreloadPresentChoicesOperationState.PRESENTING_CHOICES;
423427
PerformInteraction pi = getPerformInteraction();
424428
pi.setOnRPCResponseListener(new OnRPCResponseListener() {

0 commit comments

Comments
 (0)