Skip to content

Commit c6b963b

Browse files
Rename operationQueue to transactionQueue
1 parent aa57a6e commit c6b963b

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/choiceset/ChoiceSetManagerTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public void setUp() throws Exception{
8585
assertNotNull(csm.fileManager);
8686
assertNotNull(csm.preloadedChoices);
8787
assertNotNull(csm.pendingPreloadChoices);
88-
assertNotNull(csm.operationQueue);
88+
assertNotNull(csm.transactionQueue);
8989
assertNotNull(csm.hmiListener);
9090
assertNotNull(csm.onDisplayCapabilityListener);
9191
assertNull(csm.pendingPresentOperation);
@@ -102,7 +102,7 @@ public void tearDown() throws Exception {
102102
assertNull(csm.pendingPresentationSet);
103103
assertNull(csm.pendingPresentOperation);
104104

105-
assertEquals(csm.operationQueue.getTasksAsList().size(), 0);
105+
assertEquals(csm.transactionQueue.getTasksAsList().size(), 0);
106106
assertEquals(csm.nextChoiceId, 1);
107107

108108
assertFalse(csm.isVROptional);

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ abstract class BaseChoiceSetManager extends BaseSubManager {
8989
ChoiceSet pendingPresentationSet;
9090

9191
// We will pass operations into this to be completed
92-
Queue operationQueue;
92+
Queue transactionQueue;
9393
Task pendingPresentOperation;
9494

9595
PresentKeyboardOperation currentlyPresentedKeyboardOperation;
@@ -104,8 +104,8 @@ abstract class BaseChoiceSetManager extends BaseSubManager {
104104
super(internalInterface);
105105

106106
// prepare operations queue
107-
operationQueue = internalInterface.getTaskmaster().createQueue("ChoiceSetManagerQueue", 1, false);
108-
operationQueue.pause(); // pause until HMI ready
107+
transactionQueue = internalInterface.getTaskmaster().createQueue("ChoiceSetManagerQueue", 1, false);
108+
transactionQueue.pause(); // pause until HMI ready
109109

110110
// capabilities
111111
currentSystemContext = SystemContext.SYSCTXT_MAIN;
@@ -135,7 +135,7 @@ public void start(CompletionListener listener){
135135
public void dispose(){
136136

137137
// cancel the operations
138-
operationQueue.close();
138+
transactionQueue.close();
139139

140140
currentHMILevel = null;
141141
currentSystemContext = null;
@@ -173,10 +173,10 @@ public void onError(String error) {
173173
// checking VR will always be first in the queue.
174174
// If pre-load operations were added while this was in progress
175175
// clear it from the queue onError.
176-
operationQueue.clear();
176+
transactionQueue.clear();
177177
}
178178
});
179-
operationQueue.add(checkChoiceVR, false);
179+
transactionQueue.add(checkChoiceVR, false);
180180
}
181181

182182
/**
@@ -225,7 +225,7 @@ public void onComplete(boolean success) {
225225
}
226226
});
227227

228-
operationQueue.add(preloadChoicesOperation, false);
228+
transactionQueue.add(preloadChoicesOperation, false);
229229
} else {
230230
DebugTool.logError("File Manager was null in preload choice operation");
231231
}
@@ -259,7 +259,7 @@ public void deleteChoices(@NonNull List<ChoiceCell> choices){
259259

260260
// Remove cells from pending and delete choices
261261
pendingPresentationChoices.removeAll(cellsToBeRemovedFromPending);
262-
for (Task operation : operationQueue.getTasksAsList()){
262+
for (Task operation : transactionQueue.getTasksAsList()){
263263
if (!(operation instanceof PreloadChoicesOperation)){ continue; }
264264
((PreloadChoicesOperation) operation).removeChoicesFromUpload(cellsToBeRemovedFromPending);
265265
}
@@ -281,7 +281,7 @@ public void onComplete(boolean success) {
281281
preloadedChoices.removeAll(cellsToBeDeleted);
282282
}
283283
});
284-
operationQueue.add(deleteChoicesOperation, false);
284+
transactionQueue.add(deleteChoicesOperation, false);
285285
}
286286

287287
/**
@@ -355,7 +355,7 @@ public void onError(String error) {
355355
presentOp = new PresentChoiceSetOperation(internalInterface, pendingPresentationSet, mode, keyboardConfiguration, keyboardListener, privateChoiceListener, nextCancelId++);
356356
}
357357

358-
operationQueue.add(presentOp, false);
358+
transactionQueue.add(presentOp, false);
359359
pendingPresentOperation = presentOp;
360360
}
361361

@@ -396,7 +396,7 @@ public Integer presentKeyboard(@NonNull String initialText, @Nullable KeyboardPr
396396
Integer keyboardCancelID = nextCancelId++;
397397
PresentKeyboardOperation keyboardOp = new PresentKeyboardOperation(internalInterface, keyboardConfiguration, initialText, customKeyboardConfig, listener, keyboardCancelID);
398398
currentlyPresentedKeyboardOperation = keyboardOp;
399-
operationQueue.add(keyboardOp, false);
399+
transactionQueue.add(keyboardOp, false);
400400
pendingPresentOperation = keyboardOp;
401401
return keyboardCancelID;
402402
}
@@ -421,7 +421,7 @@ public void dismissKeyboard(@NonNull Integer cancelID) {
421421
}
422422

423423
// Next, attempt to cancel keyboard operations that have not yet started
424-
for (Task operation : operationQueue.getTasksAsList()){
424+
for (Task operation : transactionQueue.getTasksAsList()){
425425
if (!(operation instanceof PresentKeyboardOperation)){ continue; }
426426

427427
PresentKeyboardOperation pendingOp = (PresentKeyboardOperation) operation;
@@ -551,21 +551,21 @@ public void onNotified(RPCNotification notification) {
551551
currentHMILevel = onHMIStatus.getHmiLevel();
552552

553553
if (currentHMILevel == HMILevel.HMI_NONE){
554-
operationQueue.pause();
554+
transactionQueue.pause();
555555
}
556556

557557
if (oldHMILevel == HMILevel.HMI_NONE && currentHMILevel != HMILevel.HMI_NONE){
558-
operationQueue.resume();
558+
transactionQueue.resume();
559559
}
560560

561561
currentSystemContext = onHMIStatus.getSystemContext();
562562

563563
if (currentSystemContext == SystemContext.SYSCTXT_HMI_OBSCURED || currentSystemContext == SystemContext.SYSCTXT_ALERT){
564-
operationQueue.pause();
564+
transactionQueue.pause();
565565
}
566566

567567
if (currentSystemContext == SystemContext.SYSCTXT_MAIN && currentHMILevel != HMILevel.HMI_NONE){
568-
operationQueue.resume();
568+
transactionQueue.resume();
569569
}
570570

571571
}

0 commit comments

Comments
 (0)