Skip to content
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

Merged
merged 5 commits into from
Sep 24, 2019

Conversation

iCollin
Copy link
Collaborator

@iCollin iCollin commented Sep 20, 2019

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
  • menuLayoutsAvailable now has a new location in the hmi_capabilities.json

CLA

return true;
} else if (window_id == 0) {
return true;
}
Copy link
Contributor

@AByzhynar AByzhynar Sep 20, 2019

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;
  }
}

Copy link
Collaborator Author

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.

Copy link
Contributor

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())) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iCollin Swap comparables please

@AByzhynar
Copy link
Contributor

@iCollin Sorry , I have missed the part in the description that PR is NOT ready for review

style script + make is_supported function const
@iCollin
Copy link
Collaborator Author

iCollin commented Sep 23, 2019

@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 menu_layout_supported a const function.

@iCollin iCollin merged commit c71d357 into develop Sep 24, 2019
@iCollin iCollin deleted the feature/move_menulayoutsavailable branch September 24, 2019 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants