소스 검색

intent may be null on service restart

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 7 년 전
부모
커밋
f78a187515
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/main/java/com/owncloud/android/files/services/FileDownloader.java

+ 1 - 1
src/main/java/com/owncloud/android/files/services/FileDownloader.java

@@ -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 {