Merge pull request #2802 from nextcloud/intentMaybeNull

intent may be null on service restart
This commit is contained in:
Andy Scherzinger 2018-07-12 18:11:30 +02:00 committed by GitHub
commit 90c8f89832
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -178,7 +178,7 @@ public class FileDownloader extends Service
startForeground(FOREGROUND_SERVICE_ID, mNotification);
if (!intent.hasExtra(EXTRA_ACCOUNT) || !intent.hasExtra(EXTRA_FILE)) {
if (intent == null || !intent.hasExtra(EXTRA_ACCOUNT) || !intent.hasExtra(EXTRA_FILE)) {
Log_OC.e(TAG, "Not enough information provided in intent");
return START_NOT_STICKY;
} else {