Skip to content

Commit 4b32aad

Browse files
Merge pull request #1406 from smartdevicelink/release/4.12-RC
4.12.0 Release Candidate
2 parents 9946777 + 4a3ad3d commit 4b32aad

File tree

551 files changed

+17567
-14194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

551 files changed

+17567
-14194
lines changed

.github/workflows/android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
script: ./android/gradlew -p ./android :sdl_android:connectedCheck
2626

2727
- name: Hello Sdl Android Tests
28-
run: ./android/gradlew -p ./android :hello_sdl_android:build
28+
run: ./android/gradlew -p ./android/hello_sdl_android test
2929

3030
- name: Sdl JavaSE Tests
3131
run: ./javaSE/gradlew -p ./javaSE test

CHANGELOG.md

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,58 @@
1-
# 4.11.1 Release Notes
1+
# 4.12.0 Release Notes
22

33
### Summary:
44
||Version|
55
|--|--|
6-
|**Protocol** |5.2.0
7-
| **RPC** |6.0.0
8-
| **Tested Targeting** |Android 29
6+
| **Protocol** | 5.2.0
7+
| **RPC** | 6.0.0
8+
| **Tested Targeting** | Android 29
99

10-
## Hotfix
10+
## Features
11+
- [[SDL 0230] SPP resource management for Android](https://github.com/smartdevicelink/sdl_java_suite/issues/1132)
1112

12-
- [Samsung devices not properly managing notification channels](https://github.com/smartdevicelink/sdl_java_suite/issues/1351)
13+
- [[SDL 0279] Screen Manager Subscribe Buttons](https://github.com/smartdevicelink/sdl_java_suite/issues/1280)
14+
15+
- [[SDL 0289] Support for Set Language Separately](https://github.com/smartdevicelink/sdl_java_suite/issues/1313)
16+
17+
- [Add a way to set the resumption hash in the managers layer](https://github.com/smartdevicelink/sdl_java_suite/issues/1400)
18+
19+
- [Change lock screen logo and ensure correct contrast](https://github.com/smartdevicelink/sdl_java_suite/issues/1342)
20+
21+
22+
## Enhancements
23+
- [[SDL 0306] Use Taskmaster To Handle Queuing Operations in Managers](https://github.com/smartdevicelink/sdl_java_suite/issues/1368)
24+
25+
- [[SDL 0301] SDL Device Listener](https://github.com/smartdevicelink/sdl_java_suite/issues/1348)
26+
27+
- [Sdl Android should use the new LifecycleManager](https://github.com/smartdevicelink/sdl_java_suite/issues/1365)
28+
29+
- [Deprecate onError for OnRPCResponseListener](https://github.com/smartdevicelink/sdl_java_suite/pull/1404)
30+
31+
- [Add ForegroundServiceType Parameter to HelloSdl Project](https://github.com/smartdevicelink/sdl_java_suite/issues/1374)
32+
33+
- [Update javadocs for PermissionManager.addListener](https://github.com/smartdevicelink/sdl_java_suite/pull/1364)
34+
35+
- [PermissionManager Should send callback when subscribing to listener](https://github.com/smartdevicelink/sdl_java_suite/issues/1353)
36+
37+
- [Move textFields / imageFields == null checking from ScreenManager to SystemCapabilityManager](https://github.com/smartdevicelink/sdl_java_suite/issues/1335)
38+
39+
- [Change Http to Https](https://github.com/smartdevicelink/sdl_java_suite/issues/1333)
40+
41+
- [Move src/java/main/android folder](https://github.com/smartdevicelink/sdl_java_suite/issues/1377)
42+
43+
- [Classes that need to be removed in next major release should be deprecated ](https://github.com/smartdevicelink/sdl_java_suite/issues/1362)
44+
45+
- [OnSdlChoiceChosen contains duplicate class definitions](https://github.com/smartdevicelink/sdl_java_suite/issues/14)
46+
47+
- [The name of setter and getter in OnButtonPress are ambiguous](https://github.com/smartdevicelink/sdl_java_suite/issues/547)
48+
49+
50+
## Bug Fixes
51+
52+
- [presentChoiceSet failed with "INVALID_ID, null"](https://github.com/smartdevicelink/sdl_java_suite/issues/1336)
53+
54+
- [ Android app will not receive the notification of HU when the language is switched on the HU side.](https://github.com/smartdevicelink/sdl_java_suite/issues/1372)
55+
56+
- [If an empty array is set for voice commands on the SDLMenuCell the AddCommand is rejected](https://github.com/smartdevicelink/sdl_java_suite/issues/1341)
57+
58+
- [Disconnecting a cloud app doesn't free the port](https://github.com/smartdevicelink/sdl_java_suite/issues/1339)

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.11.1
1+
4.12.0-RC

android/hello_sdl_android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 28
4+
compileSdkVersion 29
55
defaultConfig {
66
applicationId "com.sdl.hellosdlandroid"
77
minSdkVersion 14

android/hello_sdl_android/src/main/AndroidManifest.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,15 @@
3939
android:resource="@xml/accessory_filter" />
4040
</activity>
4141

42-
<service android:name="com.sdl.hellosdlandroid.SdlService" >
42+
<service
43+
android:name="com.sdl.hellosdlandroid.SdlService"
44+
android:foregroundServiceType="connectedDevice">
4345
</service>
4446
<service
4547
android:name=".SdlRouterService"
4648
android:exported="true"
47-
android:process="com.smartdevicelink.router">
49+
android:process="com.smartdevicelink.router"
50+
android:foregroundServiceType="connectedDevice">
4851
<intent-filter>
4952
<action android:name="com.smartdevicelink.router.service"/>
5053
</intent-filter>

android/hello_sdl_android/src/main/java/com/sdl/hellosdlandroid/SdlReceiver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
import android.content.Context;
44
import android.content.Intent;
55
import android.os.Build;
6-
import android.util.Log;
76

87
import com.smartdevicelink.transport.SdlBroadcastReceiver;
98
import com.smartdevicelink.transport.SdlRouterService;
9+
import com.smartdevicelink.util.DebugTool;
1010

1111
public class SdlReceiver extends SdlBroadcastReceiver {
1212
private static final String TAG = "SdlBroadcastReciever";
1313

1414
@Override
1515
public void onSdlEnabled(Context context, Intent intent) {
16-
Log.d(TAG, "SDL Enabled");
16+
DebugTool.logInfo(TAG, "SDL Enabled");
1717
intent.setClass(context, SdlService.class);
1818

1919
// SdlService needs to be foregrounded in Android O and above

android/hello_sdl_android/src/main/java/com/sdl/hellosdlandroid/SdlService.java

Lines changed: 64 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import android.util.Log;
1313

1414
import com.smartdevicelink.managers.CompletionListener;
15+
import com.smartdevicelink.managers.screen.OnButtonListener;
1516
import com.smartdevicelink.managers.SdlManager;
1617
import com.smartdevicelink.managers.SdlManagerListener;
1718
import com.smartdevicelink.managers.file.filetypes.SdlArtwork;
@@ -27,9 +28,12 @@
2728
import com.smartdevicelink.proxy.RPCNotification;
2829
import com.smartdevicelink.proxy.TTSChunkFactory;
2930
import com.smartdevicelink.proxy.rpc.Alert;
31+
import com.smartdevicelink.proxy.rpc.OnButtonEvent;
32+
import com.smartdevicelink.proxy.rpc.OnButtonPress;
3033
import com.smartdevicelink.proxy.rpc.OnHMIStatus;
3134
import com.smartdevicelink.proxy.rpc.Speak;
3235
import com.smartdevicelink.proxy.rpc.enums.AppHMIType;
36+
import com.smartdevicelink.proxy.rpc.enums.ButtonName;
3337
import com.smartdevicelink.proxy.rpc.enums.FileType;
3438
import com.smartdevicelink.proxy.rpc.enums.HMILevel;
3539
import com.smartdevicelink.proxy.rpc.enums.InteractionMode;
@@ -183,6 +187,7 @@ public void onNotified(RPCNotification notification) {
183187
performWelcomeSpeak();
184188
performWelcomeShow();
185189
preloadChoices();
190+
subscribeToButtons();
186191
}
187192
}
188193
});
@@ -198,20 +203,44 @@ public void onError(String info, Exception e) {
198203
}
199204

200205
@Override
201-
public LifecycleConfigurationUpdate managerShouldUpdateLifecycle(Language language){
202-
String appName;
206+
public LifecycleConfigurationUpdate managerShouldUpdateLifecycle(Language language) {
207+
return null;
208+
}
209+
210+
@Override
211+
public LifecycleConfigurationUpdate managerShouldUpdateLifecycle(Language language, Language hmiLanguage) {
212+
boolean isNeedUpdate = false;
213+
String appName = APP_NAME;
214+
String ttsName = APP_NAME;
203215
switch (language) {
204216
case ES_MX:
217+
isNeedUpdate = true;
218+
ttsName = APP_NAME_ES;
219+
break;
220+
case FR_CA:
221+
isNeedUpdate = true;
222+
ttsName = APP_NAME_FR;
223+
break;
224+
default:
225+
break;
226+
}
227+
switch (hmiLanguage) {
228+
case ES_MX:
229+
isNeedUpdate = true;
205230
appName = APP_NAME_ES;
206231
break;
207232
case FR_CA:
233+
isNeedUpdate = true;
208234
appName = APP_NAME_FR;
209235
break;
210236
default:
211-
return null;
237+
break;
238+
}
239+
if (isNeedUpdate) {
240+
return new LifecycleConfigurationUpdate(appName, null, TTSChunkFactory.createSimpleTTSChunks(ttsName), null);
241+
} else {
242+
return null;
212243
}
213-
214-
return new LifecycleConfigurationUpdate(appName,null,TTSChunkFactory.createSimpleTTSChunks(appName), null);
215244
}
216245
};
217246

@@ -346,6 +375,36 @@ public void onComplete(boolean success) {
346375
});
347376
}
348377

378+
/**
379+
* Attempts to Subscribe to all preset buttons
380+
*/
381+
private void subscribeToButtons() {
382+
ButtonName[] buttonNames = {ButtonName.PLAY_PAUSE, ButtonName.SEEKLEFT, ButtonName.SEEKRIGHT, ButtonName.AC_MAX, ButtonName.AC, ButtonName.RECIRCULATE,
383+
ButtonName.FAN_UP, ButtonName.FAN_DOWN, ButtonName.TEMP_UP, ButtonName.TEMP_DOWN, ButtonName.FAN_DOWN, ButtonName.DEFROST_MAX, ButtonName.DEFROST_REAR, ButtonName.DEFROST,
384+
ButtonName.UPPER_VENT, ButtonName.LOWER_VENT, ButtonName.VOLUME_UP, ButtonName.VOLUME_DOWN, ButtonName.EJECT, ButtonName.SOURCE, ButtonName.SHUFFLE, ButtonName.REPEAT};
385+
386+
OnButtonListener onButtonListener = new OnButtonListener() {
387+
@Override
388+
public void onPress(ButtonName buttonName, OnButtonPress buttonPress) {
389+
sdlManager.getScreenManager().setTextField1(buttonName + " pressed");
390+
}
391+
392+
@Override
393+
public void onEvent(ButtonName buttonName, OnButtonEvent buttonEvent) {
394+
sdlManager.getScreenManager().setTextField2(buttonName + " " + buttonEvent.getButtonEventMode());
395+
}
396+
397+
@Override
398+
public void onError(String info) {
399+
Log.i(TAG, "onError: " + info);
400+
}
401+
};
402+
403+
for (ButtonName buttonName : buttonNames) {
404+
sdlManager.getScreenManager().addButtonListener(buttonName, onButtonListener);
405+
}
406+
}
407+
349408
/**
350409
* Will show a sample test message on screen as well as speak a sample test message
351410
*/

android/sdl_android/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ android {
77
defaultConfig {
88
minSdkVersion 8
99
targetSdkVersion 29
10-
versionCode 13
10+
versionCode 14
1111
versionName new File(projectDir.path, ('/../../VERSION')).text.trim()
1212
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1313
resValue "string", "SDL_LIB_VERSION", '\"' + versionName + '\"'
@@ -56,6 +56,7 @@ task buildWindowSymLinks(type:Exec){
5656
dependencies {
5757
api fileTree(dir: 'libs', include: ['*.jar'])
5858
api 'com.smartdevicelink:bson_java_port:1.2.0'
59+
api 'com.livio.taskmaster:taskmaster:0.3.0'
5960
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
6061
exclude group: 'com.android.support', module: 'support-annotations'
6162
})

android/sdl_android/src/androidTest/java/com/smartdevicelink/AndroidTestCase2.java

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)