Commit 083ab6f8 authored by vince-bourgmayer's avatar vince-bourgmayer
Browse files

register ScreenOffReciever at end of initializer

parent 945f3372
Pipeline #16535 canceled with stage
......@@ -13,6 +13,7 @@ import android.accounts.AccountManager;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Environment;
......@@ -32,6 +33,7 @@ import java.util.List;
import foundation.e.drive.models.SyncedFolder;
import foundation.e.drive.operations.CreateInitialFolderRemoteOperation;
import foundation.e.drive.receivers.ScreenOffReceiver;
import foundation.e.drive.utils.AppConstants;
import foundation.e.drive.utils.CommonUtils;
import foundation.e.drive.utils.IGetOCClient;
......@@ -282,7 +284,12 @@ public class InitializerService extends Service implements OnRemoteOperationList
.apply();
//all folder have been created
//JobUtils.scheduleScannerJob(this);
IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_ON);
filter.addAction(Intent.ACTION_SCREEN_OFF);
getApplicationContext().registerReceiver(ScreenOffReceiver.getInstance(), filter);
//Register screenOffReciever
Intent intent = new Intent(this, ObserverService.class);
startService(intent);
//JobUtils.stopScheduledJob(appContext, JobUtils.InitializerJobId);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment