Commit cf3c3b4e authored by narinder Rana's avatar narinder Rana
Browse files

onScreen off on sync to file list

parent d2be2713
Pipeline #137682 passed with stage
in 2 minutes and 28 seconds
......@@ -14,6 +14,7 @@ import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import foundation.e.drive.services.FileObserverService;
import foundation.e.drive.services.InitializerService;
import foundation.e.drive.services.ObserverService;
import foundation.e.drive.utils.CommonUtils;
......@@ -42,17 +43,17 @@ public class ScreenOffReceiver extends BroadcastReceiver {
public void onReceive(Context context, Intent intent) {
Log.i(TAG, "onReceive");
// if(InitializerService.files.size()!=0){
// try {
// Intent observersServiceIntent = new Intent(context, foundation.e.drive.services.ObserverService.class);
// Bundle mBundle = new Bundle();
// mBundle.putBoolean("isFileObserverService", true);
// observersServiceIntent.putExtras(mBundle);
// context.startService(observersServiceIntent);
// }catch (Exception exception){
// exception.printStackTrace();
// }
// }
if(FileObserverService.files.size()!=0){
try {
Intent observersServiceIntent = new Intent(context, foundation.e.drive.services.ObserverService.class);
Bundle mBundle = new Bundle();
mBundle.putBoolean("isFileObserverService", true);
observersServiceIntent.putExtras(mBundle);
context.startService(observersServiceIntent);
}catch (Exception exception){
exception.printStackTrace();
}
}
/*String intentAction = intent.getAction();
......
......@@ -31,7 +31,7 @@ public class FileObserverService extends Service {
private final static String TAG = FileObserverService.class.getSimpleName();
RecursiveFileObserver mFileObserver = null;
private int observerFlag=-1;
List<File> files=new ArrayList<>();
public static List<File> files=new ArrayList<>();
@Override
......
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