Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2018-01-28 21:46:34 +01:00
parent af0a31d957
commit 098c4aacbf

View file

@ -300,7 +300,12 @@ public class SynchronizeFileOperation extends SyncOperation {
Intent i = new Intent(mContext, FileDownloader.class);
i.putExtra(FileDownloader.EXTRA_ACCOUNT, mAccount);
i.putExtra(FileDownloader.EXTRA_FILE, file);
mContext.startService(i);
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
mContext.startForegroundService(i);
} else {
mContext.startService(i);
}
mTransferWasRequested = true;
}