Skip to content

Commit

Permalink
fix codeClimate errors
Browse files Browse the repository at this point in the history
  • Loading branch information
parveshneedhoo committed Sep 10, 2024
1 parent 50e40f8 commit 985829d
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/android/FileTransferBackground.java
Original file line number Diff line number Diff line change
Expand Up @@ -423,14 +423,10 @@ private void handleAck(final Data ackData) {
long uploadDuration = finishUploadTime - startUploadTime;

HashMap<String, Object> uploadData = new HashMap<>();
if (uploadDuration <= 0) {
uploadData.put("outputId", ackData.getString(UploadTask.KEY_OUTPUT_ID));
uploadData.put("response", response);
uploadData.put("statusCode", ackData.getInt(UploadTask.KEY_OUTPUT_STATUS_CODE, -1));
} else {
uploadData.put("outputId", ackData.getString(UploadTask.KEY_OUTPUT_ID));
uploadData.put("response", response);
uploadData.put("statusCode", ackData.getInt(UploadTask.KEY_OUTPUT_STATUS_CODE, -1));
uploadData.put("outputId", ackData.getString(UploadTask.KEY_OUTPUT_ID));
uploadData.put("response", response);
uploadData.put("statusCode", ackData.getInt(UploadTask.KEY_OUTPUT_STATUS_CODE, -1));
if (uploadDuration > 0) {
uploadData.put("uploadDuration", uploadDuration);
uploadData.put("finishUploadTime", finishUploadTime);
}
Expand Down

0 comments on commit 985829d

Please sign in to comment.