Enforce requirements

This commit is contained in:
Mario Danic 2017-02-21 20:12:01 +01:00 committed by AndyScherzinger
parent 38234af681
commit ab266f35c5
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
3 changed files with 3 additions and 0 deletions

View file

@ -75,6 +75,7 @@ public class AutoUploadJob extends Job {
); );
} }
return Result.SUCCESS; return Result.SUCCESS;
} }
} }

View file

@ -131,6 +131,7 @@ public class FileAlterationMagicListener implements FileAlterationListener {
JobRequest.NetworkType.ANY) JobRequest.NetworkType.ANY)
.setExtras(bundle) .setExtras(bundle)
.setPersisted(true) .setPersisted(true)
.setRequirementsEnforced(true)
.build() .build()
.schedule(); .schedule();

View file

@ -86,6 +86,7 @@ public class SyncedFolderObserverService extends Service {
@Override @Override
public void onDestroy() { public void onDestroy() {
super.onDestroy(); super.onDestroy();
for(FileAlterationObserver fileAlterationObserver : monitor.getObservers()) { for(FileAlterationObserver fileAlterationObserver : monitor.getObservers()) {
FileAlterationMagicObserver fileAlterationMagicObserver = (FileAlterationMagicObserver) FileAlterationMagicObserver fileAlterationMagicObserver = (FileAlterationMagicObserver)