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
ab9e75ce
Commit
ab9e75ce
authored
Nov 22, 2021
by
narinder Rana
Browse files
to manage OperationManagerService
parent
766cd306
Pipeline
#147568
passed with stage
in 3 minutes and 43 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/foundation/e/drive/services/ObserverService.java
View file @
ab9e75ce
...
@@ -137,13 +137,6 @@ public class ObserverService extends Service implements OnRemoteOperationListene
...
@@ -137,13 +137,6 @@ public class ObserverService extends Service implements OnRemoteOperationListene
//check OperationManagerService isn't working
//check OperationManagerService isn't working
if
(
prefs
.
getBoolean
(
AppConstants
.
KEY_OMS_IS_WORKING
,
false
))
{
if
(
prefs
.
getBoolean
(
AppConstants
.
KEY_OMS_IS_WORKING
,
false
))
{
Log
.
w
(
TAG
,
"OperationManagerService is still performing some operation"
);
Log
.
w
(
TAG
,
"OperationManagerService is still performing some operation"
);
getApplicationContext
().
stopService
(
new
Intent
(
getApplicationContext
(),
OperationManagerService
.
class
));
startOperationManagerService
();
//return super.onStartCommand(intent, flags, startId);
}
}
//Check a minimum delay has been respected between two start.
//Check a minimum delay has been respected between two start.
...
@@ -345,8 +338,14 @@ public class ObserverService extends Service implements OnRemoteOperationListene
...
@@ -345,8 +338,14 @@ public class ObserverService extends Service implements OnRemoteOperationListene
//After everything has been scanned. Send Intent to OperationmanagerService with data in bundle
//After everything has been scanned. Send Intent to OperationmanagerService with data in bundle
if
(
operationsForIntent
!=
null
&&
!
operationsForIntent
.
isEmpty
())
{
if
(
operationsForIntent
!=
null
&&
!
operationsForIntent
.
isEmpty
())
{
Intent
OMSIntent
=
new
Intent
(
this
,
OperationManagerService
.
class
);
for
(
Map
.
Entry
<
Integer
,
Parcelable
>
entry
:
operationsForIntent
.
entrySet
())
{
OMSIntent
.
putExtra
(
entry
.
getKey
()
+
""
,
entry
.
getValue
());
}
OMSIntent
.
putExtra
(
"account"
,
mAccount
);
startService
(
OMSIntent
);
startOperationManagerService
();
}
else
{
}
else
{
...
@@ -363,15 +362,7 @@ public class ObserverService extends Service implements OnRemoteOperationListene
...
@@ -363,15 +362,7 @@ public class ObserverService extends Service implements OnRemoteOperationListene
}
}
}
}
private
void
startOperationManagerService
()
{
Intent
OMSIntent
=
new
Intent
(
this
,
OperationManagerService
.
class
);
for
(
Map
.
Entry
<
Integer
,
Parcelable
>
entry
:
operationsForIntent
.
entrySet
())
{
OMSIntent
.
putExtra
(
entry
.
getKey
()
+
""
,
entry
.
getValue
());
}
OMSIntent
.
putExtra
(
"account"
,
mAccount
);
startService
(
OMSIntent
);
}
/**
/**
* Method to get Id of SyncedFolder to scan
* Method to get Id of SyncedFolder to scan
...
...
Write
Preview
Markdown
is supported
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