diff options
author | Bilal Alsharifi <599206+bilal-alsharifi@users.noreply.github.com> | 2021-01-14 16:07:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-14 16:07:04 -0500 |
commit | 6831235ba5e8c8df8ac6c66cfd86b4f31d845dab (patch) | |
tree | c2178db00e4eb63f2682d886dde0c051c4941515 | |
parent | 4ce13c570c7bdf08ea2a09d5bd2e9b89895d854c (diff) | |
download | sdl_android-6831235ba5e8c8df8ac6c66cfd86b4f31d845dab.tar.gz |
Fix SoftButton delay (#1601)
* Fix SoftButton delay
* Use getCurrentMainField1() instead of using the var directly
-rw-r--r-- | base/src/main/java/com/smartdevicelink/managers/screen/BaseSoftButtonManager.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/BaseSoftButtonManager.java b/base/src/main/java/com/smartdevicelink/managers/screen/BaseSoftButtonManager.java index 10d24c765..c2c9cc52e 100644 --- a/base/src/main/java/com/smartdevicelink/managers/screen/BaseSoftButtonManager.java +++ b/base/src/main/java/com/smartdevicelink/managers/screen/BaseSoftButtonManager.java @@ -152,7 +152,7 @@ abstract class BaseSoftButtonManager extends BaseSubManager { // Auto-send an updated Show if we have new capabilities if (softButtonObjects != null && !softButtonObjects.isEmpty() && softButtonCapabilities != null && !softButtonCapabilitiesEquals(oldSoftButtonCapabilities, softButtonCapabilities)) { - SoftButtonReplaceOperation operation = new SoftButtonReplaceOperation(internalInterface, fileManager, softButtonCapabilities, softButtonObjects, currentMainField1); + SoftButtonReplaceOperation operation = new SoftButtonReplaceOperation(internalInterface, fileManager, softButtonCapabilities, softButtonObjects, getCurrentMainField1()); transactionQueue.add(operation, false); } } @@ -311,7 +311,7 @@ abstract class BaseSoftButtonManager extends BaseSubManager { this.softButtonObjects = softButtonObjects; // We only need to pass the first softButtonCapabilities in the array due to the fact that all soft button capabilities are the same (i.e. there is no way to assign a softButtonCapabilities to a specific soft button). - SoftButtonReplaceOperation operation = new SoftButtonReplaceOperation(internalInterface, fileManager.get(), softButtonCapabilities, softButtonObjects, currentMainField1); + SoftButtonReplaceOperation operation = new SoftButtonReplaceOperation(internalInterface, fileManager.get(), softButtonCapabilities, softButtonObjects, getCurrentMainField1()); if (batchUpdates) { batchQueue.clear(); @@ -384,7 +384,7 @@ abstract class BaseSoftButtonManager extends BaseSubManager { } private void transitionSoftButton() { - SoftButtonTransitionOperation operation = new SoftButtonTransitionOperation(internalInterface, softButtonObjects, currentMainField1); + SoftButtonTransitionOperation operation = new SoftButtonTransitionOperation(internalInterface, softButtonObjects, getCurrentMainField1()); if (batchUpdates) { for (Task task : batchQueue) { @@ -467,10 +467,10 @@ abstract class BaseSoftButtonManager extends BaseSubManager { for (Task task : transactionQueue.getTasksAsList()) { if (task instanceof SoftButtonReplaceOperation) { SoftButtonReplaceOperation operation = (SoftButtonReplaceOperation) task; - operation.setCurrentMainField1(currentMainField1); + operation.setCurrentMainField1(getCurrentMainField1()); } else if (task instanceof SoftButtonTransitionOperation) { SoftButtonTransitionOperation operation = (SoftButtonTransitionOperation) task; - operation.setCurrentMainField1(currentMainField1); + operation.setCurrentMainField1(getCurrentMainField1()); } } } |