Skip to content

Commit 22dbc7b

Browse files
authored
Remove behavior of stopping TransferService on transfers completed, since this could be unsafe (#2973)
1 parent f8c1f6f commit 22dbc7b

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

aws-android-sdk-s3/src/main/java/com/amazonaws/mobileconnectors/s3/transferutility/TransferStatusUpdater.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -244,23 +244,6 @@ public void run() {
244244
}
245245
}
246246
}
247-
248-
// If all transfers in local map are completed,
249-
// stop TransferService to clear foreground notification
250-
if (Build.VERSION.SDK_INT >= 26) {
251-
boolean stopTransferService = true;
252-
for (TransferRecord record : transfers.values()) {
253-
if (!TransferState.isFinalState(record.state)) {
254-
stopTransferService = false;
255-
LOGGER.info("Transfers still pending, keeping TransferService running.");
256-
break;
257-
}
258-
}
259-
if (stopTransferService) {
260-
LOGGER.info("All transfers in final state. Stopping TransferService");
261-
context.stopService(new Intent(context, TransferService.class));
262-
}
263-
}
264247
}
265248

266249
/**

0 commit comments

Comments
 (0)