summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBilal Alsharifi <bilal.alsharifi@gmail.com>2021-08-30 10:39:01 -0400
committerBilal Alsharifi <bilal.alsharifi@gmail.com>2021-08-30 10:39:01 -0400
commite027b8670e4cf0563d08531296704266a0865215 (patch)
tree67b9f68aeacd0d0f8e25adba55f05182aa6c5117
parentc26675575f68b844cd467ae051efb466bb067406 (diff)
downloadsdl_android-e027b8670e4cf0563d08531296704266a0865215.tar.gz
Fix issue in MenuCell.hashCode() sub cells value
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/screen/menu/MenuCell.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/menu/MenuCell.java b/base/src/main/java/com/smartdevicelink/managers/screen/menu/MenuCell.java
index e4c8ac47b..eaf91ae76 100644
--- a/base/src/main/java/com/smartdevicelink/managers/screen/menu/MenuCell.java
+++ b/base/src/main/java/com/smartdevicelink/managers/screen/menu/MenuCell.java
@@ -450,12 +450,12 @@ public class MenuCell implements Cloneable {
public int hashCode() {
int result = 1;
result += ((getTitle() == null) ? 0 : Integer.rotateLeft(getTitle().hashCode(), 1));
- result += ((getIcon() == null) ? 0 : Integer.rotateLeft(getIcon().hashCode(), 2));
- result += ((getVoiceCommands() == null || getVoiceCommands().isEmpty()) ? 0 : Integer.rotateLeft(getVoiceCommands().hashCode(), 3));
- result += ((getSubCells() == null) ? 0 : Integer.rotateLeft(getSubCells().hashCode(), 4));
+ result += ((getIcon() == null || getIcon().getName() == null) ? 0 : Integer.rotateLeft(getIcon().getName().hashCode(), 2));
+ result += ((getVoiceCommands() == null) ? 0 : Integer.rotateLeft(getVoiceCommands().hashCode(), 3));
+ result += ((getSubCells() == null) ? 0 : Integer.rotateLeft(1, 4));
result += ((getSecondaryText() == null) ? 0 : Integer.rotateLeft(getSecondaryText().hashCode(), 5));
result += ((getTertiaryText() == null) ? 0 : Integer.rotateLeft(getTertiaryText().hashCode(), 6));
- result += ((getSecondaryArtwork() == null) ? 0 : Integer.rotateLeft(getSecondaryArtwork().hashCode(), 7));
+ result += ((getSecondaryArtwork() == null || getSecondaryArtwork().getName() == null) ? 0 : Integer.rotateLeft(getSecondaryArtwork().getName().hashCode(), 7));
result += ((getSubMenuLayout() == null) ? 0 : Integer.rotateLeft(getSubMenuLayout().hashCode(), 8));
return result;
}