Skip to content

Commit 9a2f821

Browse files
committed
Refactor code
1 parent 1a80ef7 commit 9a2f821

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/android/UploadNotification.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ public ForegroundInfo getForegroundInfo() {
126126
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
127127
return new ForegroundInfo(notificationId, notificationBuilder.build(),
128128
ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC);
129-
} else {
130-
return new ForegroundInfo(notificationId, notificationBuilder.build());
131-
}
129+
}
130+
131+
return new ForegroundInfo(notificationId, notificationBuilder.build());
132132
}
133133
}

src/android/UploadTask.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,9 @@ public ForegroundInfo getForegroundInfo() {
408408
Log.d(TAG, "getForegroundInfo: Promoting to foreground service");
409409
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
410410
return uploadForegroundNotification.getForegroundInfo(getApplicationContext());
411-
} else {
412-
return uploadNotification.getForegroundInfo();
413-
}
411+
}
412+
413+
return uploadNotification.getForegroundInfo();
414414
}
415415

416416
private synchronized boolean hasNetworkConnection() {

0 commit comments

Comments
 (0)