Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
7b2edb1
Add NPE check in BaseChoiceSetManager
Mar 24, 2021
5f448b0
Merge branch 'develop' into bugfix/issue_1647
Apr 19, 2021
e1f9c02
Merge pull request #1648 from smartdevicelink/bugfix/issue_1647
Apr 20, 2021
3b19a1c
add removceDuplicate helper method to VoiceCommand (#1665)
Apr 22, 2021
a0f080a
Merge branch 'master' into develop
Apr 30, 2021
2b18229
Make sure mOutputQueue capacity is never < 1 (#1680)
May 4, 2021
a7eba52
Add method to BaseVoiceCommandManager to check for uniqueness
May 5, 2021
449eebd
Add unit test to support unique strings for voiceCommands
May 5, 2021
19498a9
BaseChoiceSetManager, Strip away unsupported textFields from choices
May 7, 2021
6df490d
Revert "BaseChoiceSetManager, Strip away unsupported textFields from …
May 7, 2021
4aa6a62
Merge pull request #1681 from smartdevicelink/bugfix/issue_1677
bilal-alsharifi May 10, 2021
89cb67f
Add ability to retrieve BT device from BT transprt
joeygrover May 11, 2021
70eb051
Add ability to use SDL listener if BT device==null
joeygrover May 11, 2021
820c8a1
Update SDL BR to start SDLlistener when BT==null
joeygrover May 11, 2021
d8c09da
Improve packet state machine (#1683)
joeygrover May 17, 2021
2599121
Move exception reporting to debugtool
joeygrover May 20, 2021
d3f526c
Merge pull request #1685 from smartdevicelink/feature/allow_device_li…
bilal-alsharifi May 20, 2021
ad5fc1e
Merge pull request #1689 from smartdevicelink/bugfix/issue_1687
bilal-alsharifi May 20, 2021
44ec539
Fix to avoid deleting and setting identical voice commands, Updates i…
May 21, 2021
063b650
Make VoiceCommandChangesListener package privet for unit Test, and fi…
May 21, 2021
97ec0c3
Update custom hashCode method to match IOS
May 21, 2021
d5da8a0
Add unit test for voiceCommands
May 21, 2021
76cbf36
Update voiceCommand listeners from previous uploads
May 24, 2021
f2b533b
Merge branch 'develop' into bugfix/issue_1676
May 24, 2021
7882136
Add unit test for deleting voiceCommands
May 24, 2021
be4e58b
Fix for voice command that contains no string should be removed (#1686)
JulianKast May 25, 2021
7f84950
Merge branch 'develop' into bugfix/issue_1676
May 25, 2021
6a6a45e
Add clone method to VoiceCommand and update the handling of comparing…
May 25, 2021
a7c391d
Fix deleting voiceCommand logic
May 25, 2021
74b62a9
Fix errors found in unit test dealing with null check and fix unit te…
May 25, 2021
106e3c8
Remove unused logic in unit test
May 25, 2021
0c3b2af
Update LCM to workaround Sync 3 bug with media capabilities (#1694)
bilal-alsharifi May 25, 2021
889058f
Fix issue in hasUploadedFile() (#1693)
bilal-alsharifi May 25, 2021
3ba1159
Add onClose callbacks after LCM clean() calls
joeygrover May 26, 2021
08737a9
Move legacy mode modifications to single points (#1704)
joeygrover Jun 2, 2021
611d350
Merge pull request #1691 from smartdevicelink/bugfix/issue_1676
bilal-alsharifi Jun 2, 2021
f0f1693
Merge pull request #1698 from smartdevicelink/bugfix/issue_1697
bilal-alsharifi Jun 2, 2021
965f9e4
Add check for secondary Image Field for menuCells
Jun 3, 2021
9e73aee
Fix PredefinedLayout.NON_MEDIA not found in templatesAvailable (#1706)
JulianKast Jun 4, 2021
a5e4dc9
Add Image fields to WindowCapability for menuManagerTest
Jun 4, 2021
c996133
Remove/rearrange unit test code
Jun 4, 2021
6522cd5
Fix Choice Cells and Menu Cells do not take which properties are avai…
JulianKast Jun 4, 2021
e6836ba
Make lockscreen show again after dismissal if a DD notification is re…
bilal-alsharifi Jun 7, 2021
28074af
Merge pull request #1708 from smartdevicelink/bugfix/issue_1688
bilal-alsharifi Jun 8, 2021
f5ca05a
Update version
bilal-alsharifi Jun 8, 2021
424b234
Update version in gradle.properties
bilal-alsharifi Jun 8, 2021
2ac4eae
Update BSON to 1.2.5_RC
bilal-alsharifi Jun 8, 2021
6c55685
Fix potential NPE in LCM (#1710)
bilal-alsharifi Jun 28, 2021
77587b0
Update BSON to the latest stable version 1.2.5 (#1713)
bilal-alsharifi Jun 28, 2021
8b7c97b
Add a way to manually trigger the Github CI (#1711)
bilal-alsharifi Jun 29, 2021
d6f3ea0
Update Release notes
Jun 29, 2021
405d9a4
update version name
Jun 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: GitHub CI

on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]

jobs:
test:
Expand Down
38 changes: 33 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 5.1.1 Release Notes
# 5.2.0 Release Notes

## Summary:
||Version|
Expand All @@ -8,13 +8,41 @@
| **Tested Targeting** | Android 30


## Bug Fixes:
## Bug Fixes / Enhancements:

- [Add null checks and synch around session in LCM](https://github.com/smartdevicelink/sdl_java_suite/pull/1659)
- [MenuManager sending secondary image with menuCells when menuCommandSecondaryImage is not supported.](https://github.com/smartdevicelink/sdl_java_suite/issues/1688)

- [Add NPE check in BaseChoiceSetManager](https://github.com/smartdevicelink/sdl_java_suite/pull/1648)
- [IllegalArgumentException when starting video stream with custom RPC MTU](https://github.com/smartdevicelink/sdl_java_suite/issues/1667)

- [Attempt to fix unreproducible ClassCastException](https://github.com/smartdevicelink/sdl_java_suite/pull/1660)
- [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)

- [java.lang.NegativeArraySizeException Crash at SdlPsm.java line 241 com.smartdevicelink.transport.SdlPsm.transitionOnInput](https://github.com/smartdevicelink/sdl_java_suite/issues/1678)

- [Exception handling variances](https://github.com/smartdevicelink/sdl_java_suite/issues/1687)

- [Allow SdlDeviceListener to start after BT connection](https://github.com/smartdevicelink/sdl_java_suite/pull/1685)

- [voiceCommand that contains no string should be removed](https://github.com/smartdevicelink/sdl_java_suite/issues/1675)

- [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)

- [Primary Graphic not sent to SDL Core for Media Template ](https://github.com/smartdevicelink/sdl_java_suite/issues/1690)

- [Race condition leads to NPE in TransportManager](https://github.com/smartdevicelink/sdl_java_suite/issues/1703)

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

- [Sdl disconnection is not notified to the app](https://github.com/smartdevicelink/sdl_java_suite/issues/1697)

- [PredefinedLayout.NON_MEDIA not found in templatesAvailable](https://github.com/smartdevicelink/sdl_java_suite/issues/1705)

- [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 Cells and Menu Cells do not take which properties are available into account for uniqueness](https://github.com/smartdevicelink/sdl_java_suite/issues/1682)

- [BSON library should be updated to the latest version (1.2.5)](https://github.com/smartdevicelink/sdl_java_suite/issues/1712)



Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.1.1
5.2.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 19
versionCode 20
versionName new File(projectDir.path, ('/../../VERSION')).text.trim()
buildConfigField "String", "VERSION_NAME", '\"' + versionName + '\"'
resValue "string", "SDL_LIB_VERSION", '\"' + versionName + '\"'
Expand Down Expand Up @@ -43,7 +43,7 @@ android {
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
//api 'com.livio.taskmaster:taskmaster:0.4.0'
api 'com.smartdevicelink:bson_java_port:1.2.4'
api 'com.smartdevicelink:bson_java_port:1.2.5'
api 'androidx.lifecycle:lifecycle-extensions:2.2.0'
api 'androidx.annotation:annotation:1.1.0'
annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.2.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.1.1
VERSION_NAME=5.2.0

POM_NAME=sdl_android
POM_PACKAGING=aar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.smartdevicelink.proxy.rpc.GetSystemCapability;
import com.smartdevicelink.proxy.rpc.GetSystemCapabilityResponse;
import com.smartdevicelink.proxy.rpc.HMICapabilities;
import com.smartdevicelink.proxy.rpc.ImageField;
import com.smartdevicelink.proxy.rpc.OnHMIStatus;
import com.smartdevicelink.proxy.rpc.OnSystemCapabilityUpdated;
import com.smartdevicelink.proxy.rpc.PhoneCapability;
Expand All @@ -37,10 +38,13 @@
import com.smartdevicelink.proxy.rpc.enums.AppServiceType;
import com.smartdevicelink.proxy.rpc.enums.AudioStreamingState;
import com.smartdevicelink.proxy.rpc.enums.DisplayType;
import com.smartdevicelink.proxy.rpc.enums.FileType;
import com.smartdevicelink.proxy.rpc.enums.HMILevel;
import com.smartdevicelink.proxy.rpc.enums.HmiZoneCapabilities;
import com.smartdevicelink.proxy.rpc.enums.ImageFieldName;
import com.smartdevicelink.proxy.rpc.enums.ImageType;
import com.smartdevicelink.proxy.rpc.enums.MediaClockFormat;
import com.smartdevicelink.proxy.rpc.enums.PredefinedLayout;
import com.smartdevicelink.proxy.rpc.enums.PredefinedWindows;
import com.smartdevicelink.proxy.rpc.enums.PrerecordedSpeech;
import com.smartdevicelink.proxy.rpc.enums.Result;
Expand Down Expand Up @@ -938,6 +942,31 @@ public void testManagerBeforeDisplayUpdate() {
assertNull(systemCapabilityManager.getWindowCapability(PredefinedWindows.PRIMARY_WIDGET.getValue()));
}

/**
* Test that when we receive template "NON_MEDIA" it gets converted to "NON-MEDIA"
*/
@Test
public void testSyncNonMediaBug() {
InternalSDLInterface iSDL = new InternalSDLInterface();
SystemCapabilityManager systemCapabilityManager = createSampleManager(iSDL);
OnRPCListener dlRpcListener = iSDL.rpcListeners.get(FunctionID.SET_DISPLAY_LAYOUT.getId()).get(0);

DisplayCapabilities displayCapabilities = new DisplayCapabilities();
displayCapabilities.setGraphicSupported(true);
List<String> templatesAvailable = new ArrayList<>();
templatesAvailable.add("NON_MEDIA");
templatesAvailable.add("MEDIA");
displayCapabilities.setTemplatesAvailable(templatesAvailable);

SetDisplayLayoutResponse newLayout = new SetDisplayLayoutResponse();
newLayout.setDisplayCapabilities(displayCapabilities);
newLayout.setSuccess(true);
newLayout.setResultCode(Result.SUCCESS);
dlRpcListener.onReceived(newLayout);

assertTrue(systemCapabilityManager.getDefaultMainWindowCapability().getTemplatesAvailable().contains("NON-MEDIA"));
}

private class InternalSDLInterface implements ISdl {
private final Object RPC_LISTENER_LOCK = new Object();
SparseArray<CopyOnWriteArrayList<OnRPCListener>> rpcListeners = new SparseArray<>();
Expand Down Expand Up @@ -1075,4 +1104,33 @@ public PermissionManager getPermissionManager() {
return null;
}
}

@Test
public void testFixingIncorrectCapabilities() {
SetDisplayLayoutResponse setDisplayLayoutResponse;

DisplayCapabilities RegisterAppInterFaceCapabilities = new DisplayCapabilities()
.setImageFields(Collections.singletonList(new ImageField(ImageFieldName.graphic, Collections.singletonList(FileType.GRAPHIC_PNG))));

DisplayCapabilities setDisplayLayoutCapabilities = new DisplayCapabilities()
.setImageFields(new ArrayList<ImageField>());

LifecycleManager lcm = new LifecycleManager(new BaseLifecycleManager.AppConfig(), null, null);
lcm.initialMediaCapabilities = RegisterAppInterFaceCapabilities;


// Test switching to MEDIA template - Capabilities in setDisplayLayoutResponse should be replaced with the ones from RAIR
lcm.lastDisplayLayoutRequestTemplate = PredefinedLayout.MEDIA.toString();
setDisplayLayoutResponse = new SetDisplayLayoutResponse()
.setDisplayCapabilities(setDisplayLayoutCapabilities);
lcm.fixIncorrectDisplayCapabilities(setDisplayLayoutResponse);
assertEquals(RegisterAppInterFaceCapabilities, setDisplayLayoutResponse.getDisplayCapabilities());

// Test switching to non-MEDIA template - Capabilities in setDisplayLayoutResponse should not be altered
lcm.lastDisplayLayoutRequestTemplate = PredefinedLayout.TEXT_WITH_GRAPHIC.toString();
setDisplayLayoutResponse = new SetDisplayLayoutResponse()
.setDisplayCapabilities(setDisplayLayoutCapabilities);
lcm.fixIncorrectDisplayCapabilities(setDisplayLayoutResponse);
assertEquals(setDisplayLayoutCapabilities, setDisplayLayoutResponse.getDisplayCapabilities());
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.smartdevicelink.managers.lockscreen;

import android.content.Context;
import android.content.Intent;
import android.os.Looper;

import androidx.test.ext.junit.runners.AndroidJUnit4;

Expand Down Expand Up @@ -170,4 +172,34 @@ public void testLockScreenDismissibleWithEnableFalseAndDismissibilityTrue() {
assertTrue(lockScreenManager.isLockscreenDismissible);
}

@Test
public void testShowingLockscreenAfterDismissibleFalse() {
if (Looper.myLooper() == null) {
Looper.prepare();
}
lockScreenManager.enableDismissGesture = true;
lockScreenManager.displayMode = LockScreenConfig.DISPLAY_MODE_ALWAYS;

// Send first notification (DD=OFF, Dismissible=true)
OnDriverDistraction onDriverDistraction = new OnDriverDistraction();
onDriverDistraction.setLockscreenDismissibility(true);
onDriverDistraction.setState(DriverDistractionState.DD_OFF);
onDDListener.onNotified(onDriverDistraction);

// Dismiss lock screen activity
lockScreenManager.mLockscreenDismissedReceiver.onReceive(null, new Intent(SDLLockScreenActivity.KEY_LOCKSCREEN_DISMISSED, null));

// Lock screen should be set to auto dismiss in future
assertTrue(lockScreenManager.mLockScreenShouldBeAutoDismissed);

// Send second notification (DD=On, Dismissible=false)
onDriverDistraction = new OnDriverDistraction();
onDriverDistraction.setLockscreenDismissibility(false);
onDriverDistraction.setState(DriverDistractionState.DD_ON);
onDDListener.onNotified(onDriverDistraction);

// Lock screen should be set to NOT auto dismiss in future
assertFalse(lockScreenManager.mLockScreenShouldBeAutoDismissed);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,23 @@
import com.smartdevicelink.managers.BaseSubManager;
import com.smartdevicelink.managers.ISdl;
import com.smartdevicelink.managers.file.FileManager;
import com.smartdevicelink.proxy.rpc.ImageField;
import com.smartdevicelink.proxy.rpc.KeyboardCapabilities;
import com.smartdevicelink.proxy.rpc.KeyboardLayoutCapability;
import com.smartdevicelink.proxy.rpc.KeyboardProperties;
import com.smartdevicelink.proxy.rpc.SdlMsgVersion;
import com.smartdevicelink.proxy.rpc.TextField;
import com.smartdevicelink.proxy.rpc.WindowCapability;
import com.smartdevicelink.proxy.rpc.enums.HMILevel;
import com.smartdevicelink.proxy.rpc.enums.ImageFieldName;
import com.smartdevicelink.proxy.rpc.enums.KeyboardInputMask;
import com.smartdevicelink.proxy.rpc.enums.KeyboardLayout;
import com.smartdevicelink.proxy.rpc.enums.KeypressMode;
import com.smartdevicelink.proxy.rpc.enums.Language;
import com.smartdevicelink.proxy.rpc.enums.SystemContext;
import com.smartdevicelink.proxy.rpc.enums.TextFieldName;
import com.smartdevicelink.proxy.rpc.enums.TriggerSource;
import com.smartdevicelink.test.TestValues;

import org.junit.After;
import org.junit.Before;
Expand Down Expand Up @@ -231,7 +236,8 @@ public void testAddUniqueNamesToCells() {
ChoiceCell cell4 = new ChoiceCell("McDonalds", "4 mile away", null, null, null, null);
ChoiceCell cell5 = new ChoiceCell("Starbucks", "5 mile away", null, null, null, null);
ChoiceCell cell6 = new ChoiceCell("Meijer", "6 mile away", null, null, null, null);
LinkedHashSet<ChoiceCell> cellList = new LinkedHashSet<>();
List<ChoiceCell> cellList = new ArrayList<>();

cellList.add(cell1);
cellList.add(cell2);
cellList.add(cell3);
Expand Down Expand Up @@ -468,4 +474,51 @@ public void testDismissingQueuedKeyboard() {
verify(testKeyboardOp, times(0)).dismissKeyboard();
verify(testKeyboardOp2, times(1)).dismissKeyboard();
}

@Test
public void testUniquenessForAvailableFields() {
WindowCapability windowCapability = new WindowCapability();
TextField secondaryText = new TextField();
secondaryText.setName(TextFieldName.secondaryText);
TextField tertiaryText = new TextField();
tertiaryText.setName(TextFieldName.tertiaryText);

List<TextField> textFields = new ArrayList<>();
textFields.add(secondaryText);
textFields.add(tertiaryText);
windowCapability.setTextFields(textFields);

ImageField choiceImage = new ImageField();
choiceImage.setName(ImageFieldName.choiceImage);
ImageField choiceSecondaryImage = new ImageField();
choiceSecondaryImage.setName(ImageFieldName.choiceSecondaryImage);
List<ImageField> imageFieldList = new ArrayList<>();
imageFieldList.add(choiceImage);
imageFieldList.add(choiceSecondaryImage);
windowCapability.setImageFields(imageFieldList);

csm.defaultMainWindowCapability = windowCapability;

ChoiceCell cell1 = new ChoiceCell("Item 1", "null", "tertiaryText", null, TestValues.GENERAL_ARTWORK, TestValues.GENERAL_ARTWORK);
ChoiceCell cell2 = new ChoiceCell("Item 1", "null2", "tertiaryText2", null, null, null);
List<ChoiceCell> choiceCellList = new ArrayList<>();
choiceCellList.add(cell1);
choiceCellList.add(cell2);

List<ChoiceCell> removedProperties = csm.removeUnusedProperties(choiceCellList);
assertNotNull(removedProperties.get(0).getSecondaryText());

textFields.remove(secondaryText);
textFields.remove(tertiaryText);
imageFieldList.remove(choiceImage);
imageFieldList.remove(choiceSecondaryImage);

removedProperties = csm.removeUnusedProperties(choiceCellList);
csm.addUniqueNamesBasedOnStrippedCells(removedProperties, choiceCellList);
assertEquals(choiceCellList.get(1).getUniqueText(), "Item 1 (2)");


}


}
Loading