Skip to content

Commit 1aba526

Browse files
authored
Merge pull request #1547 from smartdevicelink/bugfix/issue_1545
Match Deprecations to RPC Spec
2 parents 3e692e7 + b00f690 commit 1aba526

File tree

7 files changed

+19
-4
lines changed

7 files changed

+19
-4
lines changed

android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/GlobalPropertyTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void testValidEnums() {
3232
GlobalProperty enumMenuIcon = GlobalProperty.valueForString(example);
3333
example = "KEYBOARDPROPERTIES";
3434
GlobalProperty enumKeyboardProperties = GlobalProperty.valueForString(example);
35-
example = "USERLOCATION";
35+
example = "USER_LOCATION";
3636
GlobalProperty enumUserLocation = GlobalProperty.valueForString(example);
3737

3838
assertNotNull("HELPPROMPT returned null", enumHelpPrompt);
@@ -42,7 +42,7 @@ public void testValidEnums() {
4242
assertNotNull("MENUNAME returned null", enumMenuName);
4343
assertNotNull("MENUICON returned null", enumMenuIcon);
4444
assertNotNull("KEYBOARDPROPERTIES returned null", enumKeyboardProperties);
45-
assertNotNull("USERLOCATION returned null", enumUserLocation);
45+
assertNotNull("USER_LOCATION returned null", enumUserLocation);
4646
}
4747

4848
/**
@@ -86,6 +86,7 @@ public void testListEnum() {
8686
enumTestList.add(GlobalProperty.MENUICON);
8787
enumTestList.add(GlobalProperty.KEYBOARDPROPERTIES);
8888
enumTestList.add(GlobalProperty.USERLOCATION);
89+
enumTestList.add(GlobalProperty.USER_LOCATION);
8990

9091
assertTrue("Enum value list does not match enum class list",
9192
enumValueList.containsAll(enumTestList) && enumTestList.containsAll(enumValueList));

base/src/main/java/com/smartdevicelink/managers/screen/TextAndGraphicUpdateOperation.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ public void onResponse(int correlationId, RPCResponse response) {
161161

162162
}
163163

164+
@SuppressWarnings("deprecation")
164165
private void sendSetDisplayLayoutWithTemplateConfiguration(TemplateConfiguration configuration, final CompletionListener listener) {
165166
final SetDisplayLayout setLayout = new SetDisplayLayout().setDisplayLayout(configuration.getTemplate()).setDayColorScheme(configuration.getDayColorScheme()).setNightColorScheme(configuration.getNightColorScheme());
166167
setLayout.setOnRPCResponseListener(new OnRPCResponseListener() {
@@ -527,6 +528,7 @@ Show assembleLayout(Show show) {
527528
return show;
528529
}
529530

531+
@SuppressWarnings("deprecation")
530532
private void updateCurrentScreenDataFromSetDisplayLayout(SetDisplayLayout setDisplayLayout) {
531533
currentScreenData.setTemplateConfiguration(new TemplateConfiguration().setTemplate(setDisplayLayout.getDisplayLayout()).setDayColorScheme(setDisplayLayout.getDayColorScheme()).setNightColorScheme(setDisplayLayout.getNightColorScheme()));
532534
if (currentScreenDataUpdateListener != null) {

base/src/main/java/com/smartdevicelink/proxy/rpc/SeatControlData.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
* Seat control data corresponds to "SEAT" ModuleType.
4444
*/
4545
public class SeatControlData extends RPCStruct {
46+
@Deprecated
4647
public static final String KEY_ID = "id";
4748
public static final String KEY_HEATING_ENABLED = "heatingEnabled";
4849
public static final String KEY_COOLING_ENABLED = "coolingEnabled";
@@ -81,6 +82,7 @@ public SeatControlData(Hashtable<String, Object> hash) {
8182
*
8283
* @param id type of SupportedSeat.
8384
*/
85+
@Deprecated
8486
public SeatControlData(@NonNull SupportedSeat id) {
8587
this();
8688
setId(id);
@@ -91,6 +93,7 @@ public SeatControlData(@NonNull SupportedSeat id) {
9193
*
9294
* @param id
9395
*/
96+
@Deprecated
9497
public SeatControlData setId(@NonNull SupportedSeat id) {
9598
setValue(KEY_ID, id);
9699
return this;
@@ -101,6 +104,7 @@ public SeatControlData setId(@NonNull SupportedSeat id) {
101104
*
102105
* @return SupportedSeat.
103106
*/
107+
@Deprecated
104108
public SupportedSeat getId() {
105109
return (SupportedSeat) getObject(SupportedSeat.class, KEY_ID);
106110
}

base/src/main/java/com/smartdevicelink/proxy/rpc/SetDisplayLayout.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@
9393
* <p> REJECTED</p>
9494
*
9595
* @since SmartDeviceLink 2.0
96+
* @deprecated in SmartDeviceLink 6.0
9697
*/
98+
@Deprecated
9799
public class SetDisplayLayout extends RPCRequest {
98100
public static final String KEY_DISPLAY_LAYOUT = "displayLayout";
99101
public static final String KEY_DAY_COLOR_SCHEME = "dayColorScheme";

base/src/main/java/com/smartdevicelink/proxy/rpc/SetDisplayLayoutResponse.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@
4545
* Set Display Layout Response is sent, when SetDisplayLayout has been called
4646
*
4747
* @since SmartDeviceLink 2.0
48+
* @deprecated in SmartDeviceLink 6.0
4849
*/
50+
@Deprecated
4951
public class SetDisplayLayoutResponse extends RPCResponse {
5052
public static final String KEY_BUTTON_CAPABILITIES = "buttonCapabilities";
5153
public static final String KEY_DISPLAY_CAPABILITIES = "displayCapabilities";

base/src/main/java/com/smartdevicelink/proxy/rpc/enums/DisplayType.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@
3535
* The type of the display.
3636
*
3737
* @since SmartDeviceLink 1.0
38+
* @deprecated in SmartDeviceLink 5.0
3839
*/
39-
40+
@Deprecated
4041
public enum DisplayType {
4142
/**
4243
* Center Information Display.

base/src/main/java/com/smartdevicelink/proxy/rpc/enums/GlobalProperty.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,13 @@ public enum GlobalProperty {
7171

7272
KEYBOARDPROPERTIES,
7373

74+
@Deprecated
75+
USERLOCATION,
76+
7477
/**
7578
* The user seat location of setGlobalProperties
7679
*/
77-
USERLOCATION;
80+
USER_LOCATION;
7881

7982
/**
8083
* Convert String to GlobalProperty

0 commit comments

Comments
 (0)