-
Notifications
You must be signed in to change notification settings - Fork 171
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
Added crc to putfile #510
Added crc to putfile #510
Conversation
added getting n setters in Putfile, applied setter in RPCRequestFactory, CORRUPT_DATA to Result enum, added tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just some formatting comments
@@ -1003,7 +1004,8 @@ private void sendOnSystemRequestToUrl(OnSystemRequest msg) | |||
putFile.setCorrelationID(POLICIES_CORRELATION_ID); | |||
putFile.setSdlFileName("response_data"); | |||
putFile.setFileData(response.toString().getBytes("UTF-8")); | |||
updateBroadcastIntent(sendIntent, "DATA", "Data from cloud response: " + response.toString()); | |||
putFile.setCRC(response.toString().getBytes()); | |||
updateBroadcastIntent(sendIntent, "DATA", "Data from cloud response: " + response.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these dont need to be tabbed
public static final String KEY_LENGTH = "length"; | ||
|
||
public static final String KEY_LENGTH = "length"; | ||
public static final String KEY_CRC = "crc"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no tabs
/** | ||
* The data sent failed to pass CRC check in receiver end | ||
*/ | ||
CORRUPTED_DATA; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no tab
public static final String KEY_LENGTH = "length"; | ||
|
||
public static final String KEY_LENGTH = "length"; | ||
public static final String KEY_CRC = "crc"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no tabs
Do you need to also add the param for the other |
@@ -30,6 +30,7 @@ protected RPCMessage createMessage() { | |||
msg.setSystemFile(Test.GENERAL_BOOLEAN); | |||
msg.setOffset(Test.GENERAL_LONG); | |||
msg.setLength(Test.GENERAL_LONG); | |||
msg.setCRC(Test.GENERAL_LONG); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe another test where you use the setCRC(byte[] data) call?
Resolves #452 |
# Conflicts: # sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/ResultTests.java # sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PutFile.java # sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Result.java
Codecov Report
@@ Coverage Diff @@
## develop #510 +/- ##
============================================
+ Coverage 42.38% 42.4% +0.02%
- Complexity 2794 2800 +6
============================================
Files 362 362
Lines 16862 16884 +22
Branches 1724 1727 +3
============================================
+ Hits 7147 7160 +13
- Misses 9403 9411 +8
- Partials 312 313 +1
Continue to review full report at Codecov.
|
@askirk @bilal-alsharifi @joeygrover This is ready for re-review |
Tested working against Core PR |
added getting n setters in Putfile, applied setter in RPCRequestFactory and SDLProxyBase, CORRUPT_DATA to Result enum, added tests.