projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed crash when the device is turned while the warning dialog about server certifica...
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
files
/
services
/
FileObserverService.java
diff --git
a/src/com/owncloud/android/files/services/FileObserverService.java
b/src/com/owncloud/android/files/services/FileObserverService.java
index
a8fb702
..
4d6dd02
100644
(file)
--- a/
src/com/owncloud/android/files/services/FileObserverService.java
+++ b/
src/com/owncloud/android/files/services/FileObserverService.java
@@
-48,6
+48,13
@@
public class FileObserverService extends Service {
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
+ // this occurs when system tries to restart
+ // service, so we need to reinitialize observers
+ if (intent == null) {
+ initializeObservedList();
+ return Service.START_STICKY;
+ }
+
if (!intent.hasExtra(KEY_FILE_CMD)) {
Log.e(TAG, "No KEY_FILE_CMD argument given");
return Service.START_STICKY;
if (!intent.hasExtra(KEY_FILE_CMD)) {
Log.e(TAG, "No KEY_FILE_CMD argument given");
return Service.START_STICKY;