-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
move MenuLayoutsAvailable to WindowCapability #3043
Conversation
return true; | ||
} else if (window_id == 0) { | ||
return true; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iCollin May be this way be better?
if (element.keyExists(strings::window_id)) {
if (helpers::Compare<int, EQ, ONE>(window_id, 0, element[strings::window_id].asInt())) {
return true;
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
window_id
0 matches only if the window_id
key does not exist on the element.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iCollin I see. Thank you. I missed curly braces...
for (auto element : *tmp_window_capabilities_arr) { | ||
if (!element.keyExists(strings::window_id) && element.keyExists(strings::menu_layouts_available)) { | ||
for (uint32_t i = 0; i < element[strings::menu_layouts_available].length(); ++i) { | ||
if (layout == static_cast<mobile_apis::MenuLayout::eType>(element[strings::menu_layouts_available][i].asUInt())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iCollin Swap comparables please
@iCollin Sorry , I have missed the part in the description that PR is NOT ready for review |
No worries, thanks for being proactive. PR is now ready for review, I have used the style script and made |
rvalue on left side is good practice
Fixes #2925
#2925 was closed with the expectation that this change would be made as part of the fix for #2918
This PR is ready for review.
Risk
This PR makes minor API changes.
Testing Plan
Manually, ATF #2268
Summary
Remove MenuLayoutsAvailable from HMI Capabilities
Add MenuLayoutsAvailable to WindowCapabilities
Changelog
Breaking Changes
CLA