smartdevicelink/sdl_java_suite

Swapping de-duplicated menu items causes incorrect unique titles

Closed this issue · 0 comments

Bug Report

In certain circumstances, the menu manager will not create a correct unique title for menu cells.

Reproduction Steps
  1. Disable secondary text
  2. Connect to a v7.0+ Core
  3. Create a menu like the following:
MenuSelectionListener listener = null;
MenuCell cell1 = new MenuCell("A", "SecondaryText", null, null, null, null, listener);
MenuCell cell2 = new MenuCell("A", null, null, null, null, null, listener);
MenuCell cell3 = new MenuCell("C", null, null, null, null, null, new MenuSelectionListener() {
    @Override
    public void onTriggered(TriggerSource trigger) {
        sdlManager.getScreenManager().setMenu(Arrays.asList(cell2, cell1));
    }
});

sdlManager.getScreenManager().setMenu(Arrays.asList(cell1, cell2, cell3));
  1. Enter the menu and press "C"
  2. Go back to the menu.
Expected Behavior

It should display A and A(2) again (or perhaps A(2) and A?)

Observed Behavior

It displays A and A

OS & Version Information
  • Android Version: N/A
  • SDL Android Version: 5.2
  • Testing Against: Manticore