Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
eDrive
Commits
cf3c3b4e
Commit
cf3c3b4e
authored
Sep 27, 2021
by
narinder Rana
Browse files
onScreen off on sync to file list
parent
d2be2713
Pipeline
#137682
passed with stage
in 2 minutes and 28 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/foundation/e/drive/receivers/ScreenOffReceiver.java
View file @
cf3c3b4e
...
...
@@ -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(
Initializ
erService.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
(
FileObserv
erService
.
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();
...
...
app/src/main/java/foundation/e/drive/services/FileObserverService.java
View file @
cf3c3b4e
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment