Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Deprecations #744

Merged
merged 5 commits into from
Sep 26, 2017
Merged

Conversation

joeljfischer
Copy link
Contributor

Fixes #679

This PR is ready for review.

Risk

This PR makes major API changes.

Testing Plan

Tests have been updated

Summary

This PR removes deprecated code (and also fixes a bug in SDLConfiguration)

Changelog

Breaking Changes
  • Numerous deprecated methods have been removed

CLA

@joeljfischer joeljfischer added the best practice Not a defect but something that should be improved anyway label Sep 20, 2017
@joeljfischer joeljfischer added this to the 5.0.0 milestone Sep 20, 2017
@joeljfischer joeljfischer self-assigned this Sep 20, 2017
@codecov-io
Copy link

codecov-io commented Sep 20, 2017

Codecov Report

❗ No coverage uploaded for pull request base (release/5.0.0@968f628). Click here to learn what that means.
The diff coverage is 7.14%.

@@               Coverage Diff               @@
##             release/5.0.0    #744   +/-   ##
===============================================
  Coverage                 ?   4.96%           
===============================================
  Files                    ?     318           
  Lines                    ?    7248           
  Branches                 ?     655           
===============================================
  Hits                     ?     360           
  Misses                   ?    6862           
  Partials                 ?      26

@@ -59,6 +59,7 @@ - (instancetype)initWithLifecycle:(SDLLifecycleConfiguration *)lifecycleConfig l
_lifecycleConfig = lifecycleConfig;
_lockScreenConfig = lockScreenConfig ?: [SDLLockScreenConfiguration enabledConfiguration];
_loggingConfig = logConfig ?: [SDLLogConfiguration defaultConfiguration];
_streamingMediaConfig = streamingMediaConfig;

if (_streamingMediaConfig != nil) {
NSAssert(!([_lifecycleConfig.appType isEqualToEnum:SDLAppHMITypeNavigation] || [_lifecycleConfig.appType isEqualToEnum:SDLAppHMITypeProjection]), @"You should only set a streaming media configuration if your app is a NAVIGATION or PROJECTION HMI type");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assert statement is getting called when app type is set to Navigation. Since assert statements only get called if they are false, the ! should be removed from the conditional statement.

@@ -17,11 +17,6 @@ NS_ASSUME_NONNULL_BEGIN
- (void)handleProtocolEndServiceNAKMessage:(SDLProtocolMessage *)endServiceNAK;

// Older protocol handlers
- (void)handleProtocolStartSessionACK:(SDLServiceType)serviceType sessionID:(Byte)sessionID version:(Byte)version __deprecated_msg("use handleProtocolStartSessionACKMessage: instead");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The handleProtocolStartSessionACK protocol handler is still being used in the SDLProxy class. The SDLProxy class needs to implement the handleProtocolStartServiceACKMessageprotocol handler, otherwise setup will not complete. This is why setup is not finishing when the protocol string is com.smartdevicelink.prot2.

Copy link
Contributor

@NicoleYarroch NicoleYarroch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found a couple of bugs.

- (void)handleProtocolStartSessionACK:(SDLProtocolHeader *)header __deprecated_msg("use handleProtocolStartSessionACKMessage: instead");
- (void)handleProtocolStartSessionNACK:(SDLServiceType)serviceType __deprecated_msg("use handleProtocolStartSessionNAKMessage: instead");
- (void)handleProtocolEndSessionACK:(SDLServiceType)serviceType __deprecated_msg("use handleProtocolEndSessionACKMessage: instead");
- (void)handleProtocolEndSessionNACK:(SDLServiceType)serviceType __deprecated_msg("use handleProtocolEndSessionNAKMessage: instead");
- (void)handleHeartbeatForSession:(Byte)session;
Copy link
Contributor

@NicoleYarroch NicoleYarroch Sep 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handleProtocolStartSessionACK, handleProtocolStartSessionNACK, handleProtocolEndSessionACK, and handleProtocolEndSessionNACK are all being used in the SDLStreamingMediaLifecycleManager. This means that video is not streaming because setup does not finish.

# Conflicts:
#	SmartDeviceLink/SDLAbstractProtocol.h
#	SmartDeviceLink/SDLAbstractProtocol.m
#	SmartDeviceLink/SDLStreamingMediaLifecycleManager.m
@joeljfischer
Copy link
Contributor Author

@NicoleYarroch Fixed and merged base back in

@joeljfischer joeljfischer merged commit 100ccd0 into release/5.0.0 Sep 26, 2017
@joeljfischer joeljfischer deleted the bugfix/issue_679_remove_deprecations branch September 26, 2017 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
best practice Not a defect but something that should be improved anyway
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants