Skip to content

Commit

Permalink
Merge pull request #1747 from smartdevicelink/release/5.3.0_RC
Browse files Browse the repository at this point in the history
Release/5.3.0
  • Loading branch information
bilal-alsharifi authored Oct 27, 2021
2 parents c3553b7 + 7ccf3c2 commit 0bda034
Show file tree
Hide file tree
Showing 104 changed files with 6,972 additions and 3,893 deletions.
47 changes: 24 additions & 23 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,51 @@
# 5.2.0 Release Notes
# 5.3.0 Release Notes

## Summary:
||Version|
|--|--|
| **Protocol** | 5.4.0
| **RPC** | 7.1.0
| **Protocol** | 5.4.1
| **RPC** | 8.0.0
| **Tested Targeting** | Android 30


## Bug Fixes / Enhancements:

- [MenuManager sending secondary image with menuCells when menuCommandSecondaryImage is not supported.](https://github.com/smartdevicelink/sdl_java_suite/issues/1688)
## Features:

- [IllegalArgumentException when starting video stream with custom RPC MTU](https://github.com/smartdevicelink/sdl_java_suite/issues/1667)
- [[SDL 0293] Enable OEM exclusive apps support](https://github.com/smartdevicelink/sdl_java_suite/issues/1588)

- [Send voiceCommand with duplicate strings](https://github.com/smartdevicelink/sdl_java_suite/issues/1664)

- [Two voiceCommands contains the same string](https://github.com/smartdevicelink/sdl_java_suite/issues/1677)
## Bug Fixes / Enhancements:

- [java.lang.NegativeArraySizeException Crash at SdlPsm.java line 241 com.smartdevicelink.transport.SdlPsm.transitionOnInput](https://github.com/smartdevicelink/sdl_java_suite/issues/1678)
- [New TaskMaster release needs to be added to Java Suite Library ](https://github.com/smartdevicelink/sdl_java_suite/issues/1745)

- [Exception handling variances](https://github.com/smartdevicelink/sdl_java_suite/issues/1687)
- [File Manager will upload the same file multiple times](https://github.com/smartdevicelink/sdl_java_suite/issues/1736)

- [Allow SdlDeviceListener to start after BT connection](https://github.com/smartdevicelink/sdl_java_suite/pull/1685)
- [Fix description for `SeatControlCapabilities` and `RadioControlCapabilities`](https://github.com/smartdevicelink/sdl_java_suite/issues/1739)

- [voiceCommand that contains no string should be removed](https://github.com/smartdevicelink/sdl_java_suite/issues/1675)
- [AudioStreamManager and AlertManager have the same queue ID](https://github.com/smartdevicelink/sdl_java_suite/issues/1742)

- [Image returned as "not uploaded" in certain circumstances when it's already uploaded, leading to the image being unusable](https://github.com/smartdevicelink/sdl_java_suite/issues/1692)
- [java.lang.IndexOutOfBoundsException Crash: SdlRouterService.java line 3275 ](https://github.com/smartdevicelink/sdl_java_suite/issues/1741)

- [Primary Graphic not sent to SDL Core for Media Template ](https://github.com/smartdevicelink/sdl_java_suite/issues/1690)
- [Old devices with SDL 2.0 can't display text fields and SoftButtons](https://github.com/smartdevicelink/sdl_java_suite/issues/1729)

- [Race condition leads to NPE in TransportManager](https://github.com/smartdevicelink/sdl_java_suite/issues/1703)
- [Swapping de-duplicated menu items causes incorrect unique titles](https://github.com/smartdevicelink/sdl_java_suite/issues/1723)

- [Avoid deleting and setting identical voice commands](https://github.com/smartdevicelink/sdl_java_suite/issues/1676)
- [MenuCell title update issue](https://github.com/smartdevicelink/sdl_java_suite/issues/1651)

- [Sdl disconnection is not notified to the app](https://github.com/smartdevicelink/sdl_java_suite/issues/1697)
- [Refactor the Menu Manager to Use Queues ](https://github.com/smartdevicelink/sdl_java_suite/issues/1605)

- [PredefinedLayout.NON_MEDIA not found in templatesAvailable](https://github.com/smartdevicelink/sdl_java_suite/issues/1705)
- [Security queries are not implemented to spec](https://github.com/smartdevicelink/sdl_java_suite/issues/1720)

- [Lockscreen should show again after dismissal if a DD notification is received where DismissalEnabled is false](https://github.com/smartdevicelink/sdl_java_suite/issues/1695)
- [Choice Set Present followed directly by a Delete can have undefined behavior](https://github.com/smartdevicelink/sdl_java_suite/issues/1718)

- [Choice Cells and Menu Cells do not take which properties are available into account for uniqueness](https://github.com/smartdevicelink/sdl_java_suite/issues/1682)
- [Back-to-back choice sets can fail](https://github.com/smartdevicelink/sdl_java_suite/issues/1717)

- [BSON library should be updated to the latest version (1.2.5)](https://github.com/smartdevicelink/sdl_java_suite/issues/1712)
- [Github CI fails even though tests pass locally ](https://github.com/smartdevicelink/sdl_java_suite/issues/1731)

- [Handler instances using deprecated constructors ](https://github.com/smartdevicelink/sdl_java_suite/issues/1696)

- [[SDL 0236] Update mismatch in TireStatus structure](https://github.com/smartdevicelink/sdl_java_suite/issues/1089)

- [Choices not saved as preloaded if some choices fail](https://github.com/smartdevicelink/sdl_java_suite/issues/1715)

- [MenuManager should print warning when trying to send AddSubMenu with voice commands](https://github.com/smartdevicelink/sdl_java_suite/issues/1760)

- [Spelling/ Grammar Updates](https://github.com/smartdevicelink/sdl_java_suite/issues/1754)
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.2.0
5.3.0
4 changes: 2 additions & 2 deletions android/sdl_android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 30
versionCode 20
versionCode 21
versionName new File(projectDir.path, ('/../../VERSION')).text.trim()
buildConfigField "String", "VERSION_NAME", '\"' + versionName + '\"'
resValue "string", "SDL_LIB_VERSION", '\"' + versionName + '\"'
Expand Down Expand Up @@ -42,7 +42,7 @@ android {

dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
//api 'com.livio.taskmaster:taskmaster:0.4.0'
//api 'com.livio.taskmaster:taskmaster:0.6.0'
api 'com.smartdevicelink:bson_java_port:1.2.5'
api 'androidx.lifecycle:lifecycle-extensions:2.2.0'
api 'androidx.annotation:annotation:1.1.0'
Expand Down
2 changes: 1 addition & 1 deletion android/sdl_android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GROUP=com.smartdevicelink
POM_ARTIFACT_ID=sdl_android
VERSION_NAME=5.2.0
VERSION_NAME=5.3.0

POM_NAME=sdl_android
POM_PACKAGING=aar
Expand Down
Binary file removed android/sdl_android/libs/TaskMaster-0.5.jar
Binary file not shown.
Binary file added android/sdl_android/libs/Taskmaster-0.6.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,42 @@ public void run() {
});
}

/**
* Tests to make sure files are not being uploaded to head unit multiple times in a row
*/
@Test
public void testFileNotOnHmi() {
final ISdl internalInterface = createISdlMock();

doAnswer(onListFilesSuccess).when(internalInterface).sendRPC(any(ListFiles.class));
doAnswer(onPutFileSuccess).when(internalInterface).sendRPC(any(PutFile.class));

final SdlArtwork validFile2 = new SdlArtwork(TestValues.GENERAL_STRING + "2", FileType.GRAPHIC_JPEG, TestValues.GENERAL_STRING.getBytes(), false);

final List<SdlArtwork> list = Arrays.asList(validFile2, validFile2);

FileManagerConfig fileManagerConfig = new FileManagerConfig();

final FileManager fileManager = new FileManager(internalInterface, mTestContext, fileManagerConfig);
fileManager.start(new CompletionListener() {
@Override
public void onComplete(boolean success) {
fileManager.uploadArtworks(list, new MultipleFileCompletionListener() {
@Override
public void onComplete(final Map<String, String> errors) {
assertOnMainThread(new Runnable() {
@Override
public void run() {
verify(internalInterface, times(1)).sendRPC(any(PutFile.class));
}
});
}
});
}
});
}


/**
* Test custom overridden SdlFile equals method
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public void testClone() {
}

public static boolean equalTest(SdlArtwork original, SdlArtwork clone) {
if (original == null && clone == null) {
return true;
}

assertNotNull(original);
assertNotNull(clone);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import com.smartdevicelink.proxy.rpc.SetDisplayLayoutResponse;
import com.smartdevicelink.proxy.rpc.SoftButtonCapabilities;
import com.smartdevicelink.proxy.rpc.SystemCapability;
import com.smartdevicelink.proxy.rpc.TextField;
import com.smartdevicelink.proxy.rpc.VideoStreamingCapability;
import com.smartdevicelink.proxy.rpc.WindowCapability;
import com.smartdevicelink.proxy.rpc.WindowTypeCapabilities;
Expand All @@ -52,6 +53,7 @@
import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;
import com.smartdevicelink.proxy.rpc.enums.SystemCapabilityType;
import com.smartdevicelink.proxy.rpc.enums.SystemContext;
import com.smartdevicelink.proxy.rpc.enums.TextFieldName;
import com.smartdevicelink.proxy.rpc.enums.WindowType;
import com.smartdevicelink.proxy.rpc.listeners.OnMultipleRequestListener;
import com.smartdevicelink.proxy.rpc.listeners.OnRPCListener;
Expand Down Expand Up @@ -689,6 +691,35 @@ public void testGetAndAddListenerForDisplaysCapability() {
verify(internalInterface, times(0)).sendRPC(any(GetSystemCapability.class));
}

/**
* Test to verify that we can get null for templatesAvailable without hitting an NPE and
* test media field conversion for NON_MEDIA to NON-MEDIA for Sync bug.
*/
@Test
public void testMediaFieldConversion() {
SystemCapabilityManager systemCapabilityManager = new SystemCapabilityManager(new InternalSDLInterface());

RegisterAppInterfaceResponse raiResponse = new RegisterAppInterfaceResponse();
DisplayCapabilities displayCapabilities = new DisplayCapabilities();
displayCapabilities.setGraphicSupported(false);
TextField textField = new TextField();
textField.setName(TextFieldName.mainField1);
displayCapabilities.setTextFields(Collections.singletonList(textField));
raiResponse.setDisplayCapabilities(displayCapabilities);
raiResponse.setSuccess(true);
systemCapabilityManager.parseRAIResponse(raiResponse);

WindowCapability windowCapability = systemCapabilityManager.getDefaultMainWindowCapability();
assertNull(windowCapability.getTemplatesAvailable());

List<String> templates = new ArrayList<>();
templates.add("NON_MEDIA");
displayCapabilities.setTemplatesAvailable(templates);
systemCapabilityManager.parseRAIResponse(raiResponse);
windowCapability = systemCapabilityManager.getDefaultMainWindowCapability();
assertTrue(windowCapability.getTemplatesAvailable().contains("NON-MEDIA"));
}

@Test
public void testListConversion() {
SystemCapabilityManager systemCapabilityManager = createSampleManager();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,15 @@ public void testInstantiation() {
assertNull(screenManager.getTextField2Type());
assertNull(screenManager.getTextField3Type());
assertNull(screenManager.getTextField4Type());
assertNull(screenManager.getMenu());
assertTrue(screenManager.getMenu().isEmpty());
assertNull(screenManager.getVoiceCommands());
assertTrue(screenManager.getSoftButtonObjects().isEmpty());
assertNull(screenManager.getSoftButtonObjectByName("test"));
assertNull(screenManager.getSoftButtonObjectById(1));
assertEquals(screenManager.getDynamicMenuUpdatesMode(), DynamicMenuUpdatesMode.ON_WITH_COMPAT_MODE);
assertEquals(screenManager.getState(), BaseSubManager.READY);
assertNull(screenManager.getMenuConfiguration());
assertNull(screenManager.getMenuConfiguration().getMenuLayout());
assertNull(screenManager.getMenuConfiguration().getSubMenuLayout());
}

@Test
Expand Down Expand Up @@ -147,10 +148,9 @@ public void testSetMenuManagerFields() {
screenManager.setMenu(TestValues.GENERAL_MENUCELL_LIST);
screenManager.setMenuConfiguration(TestValues.GENERAL_MENU_CONFIGURATION);

assertEquals(screenManager.getMenu(), TestValues.GENERAL_MENUCELL_LIST);
assertEquals(screenManager.getDynamicMenuUpdatesMode(), DynamicMenuUpdatesMode.FORCE_ON);
// Should not set because of improper RAI response and improper HMI states
assertNull(screenManager.getMenuConfiguration());
assertEquals(screenManager.getMenu(), TestValues.GENERAL_MENUCELL_LIST);
assertEquals(screenManager.getMenuConfiguration(), TestValues.GENERAL_MENU_CONFIGURATION);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ public void testDispose() {

@Test
public void testOperationManagement() {
textAndGraphicManager.transactionQueue.pause();
textAndGraphicManager.isDirty = true;
textAndGraphicManager.updateOperation = null;
textAndGraphicManager.update(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void testSettersAndGetters() {
choiceCell.setVoiceCommands(TestValues.GENERAL_STRING_LIST);
choiceCell.setArtwork(artwork);
choiceCell.setSecondaryArtwork(artwork);
choiceCell.setUniqueText(TestValues.GENERAL_STRING);
choiceCell.setUniqueTextId(TestValues.GENERAL_INT);

// use getters and assert equality
assertEquals(choiceCell.getText(), TestValues.GENERAL_STRING);
Expand All @@ -71,7 +71,7 @@ public void testSettersAndGetters() {
assertEquals(choiceCell.getArtwork(), artwork);
assertEquals(choiceCell.getSecondaryArtwork(), artwork);
assertEquals(choiceCell.getChoiceId(), MAX_ID);
assertEquals(choiceCell.getUniqueText(), TestValues.GENERAL_STRING);
assertEquals(choiceCell.getUniqueTextId(), TestValues.GENERAL_INTEGER);
}

@Test
Expand Down Expand Up @@ -121,14 +121,27 @@ public void testCellEquality() {
choiceCell3.setSecondaryText(TestValues.GENERAL_STRING);
choiceCell3.setTertiaryText(TestValues.GENERAL_STRING);

//UniqueText should not be taken into consideration when checking equality
choiceCell.setUniqueText(TestValues.GENERAL_STRING);
choiceCell2.setUniqueText(TestValues.GENERAL_STRING);
choiceCell3.setUniqueText(TestValues.GENERAL_STRING);

// Make sure our overridden method works, even though these are different objects in memory
assertTrue(choiceCell.equals(choiceCell2));
assertFalse(choiceCell.equals(choiceCell3));

}

@Test
public void testGetUniqueCellText() {
ChoiceCell choiceCell = new ChoiceCell("Test");
ChoiceCell choiceCell2 = new ChoiceCell("Test");
choiceCell2.setUniqueTextId(2);
ChoiceCell choiceCell3 = new ChoiceCell("Test");
choiceCell3.setUniqueTextId(3);

assertEquals((int) choiceCell.getUniqueTextId(), 1);
assertEquals(choiceCell.getUniqueText(), "Test");

assertEquals((int) choiceCell2.getUniqueTextId(), 2);
assertEquals(choiceCell2.getUniqueText(), "Test (2)");

assertEquals((int) choiceCell3.getUniqueTextId(), 3);
assertEquals(choiceCell3.getUniqueText(), "Test (3)");
}
}
Loading

0 comments on commit 0bda034

Please sign in to comment.