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
1f10d3ff
Commit
1f10d3ff
authored
Dec 12, 2019
by
vince-bourgmayer
Browse files
use method from commonUtils to set the UEH
parent
dbcfd22f
Pipeline
#33939
passed with stage
in 2 minutes and 28 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
app/src/main/java/foundation/e/drive/services/InitializerService.java
View file @
1f10d3ff
...
...
@@ -66,11 +66,7 @@ public class InitializerService extends Service implements OnRemoteOperationList
public
int
onStartCommand
(
Intent
intent
,
int
flags
,
int
startId
)
{
Log
.
i
(
TAG
,
"onStartCommand(...)"
);
if
(
Thread
.
getDefaultUncaughtExceptionHandler
().
getClass
().
getSimpleName
().
equals
(
ServiceExceptionHandler
.
class
.
getSimpleName
())){
Log
.
d
(
"ObserverService"
,
"ServiceExceptionHandler already set!"
);
}
else
{
Thread
.
setDefaultUncaughtExceptionHandler
(
new
ServiceExceptionHandler
(
this
));
}
CommonUtils
.
setServiceUnCaughtExceptionHandler
(
this
);
//Get account
SharedPreferences
prefs
=
this
.
getSharedPreferences
(
AppConstants
.
SHARED_PREFERENCE_NAME
,
Context
.
MODE_PRIVATE
);
...
...
app/src/main/java/foundation/e/drive/services/ObserverService.java
View file @
1f10d3ff
...
...
@@ -80,11 +80,8 @@ public class ObserverService extends Service implements OnRemoteOperationListene
public
int
onStartCommand
(
Intent
intent
,
int
flags
,
int
startId
)
{
Log
.
i
(
TAG
,
"onStartCommand("
+
startId
+
")"
);
if
(
Thread
.
getDefaultUncaughtExceptionHandler
().
getClass
().
getSimpleName
().
equals
(
ServiceExceptionHandler
.
class
.
getSimpleName
())){
Log
.
d
(
"ObserverService"
,
"ServiceExceptionHandler already set!"
);
}
else
{
Thread
.
setDefaultUncaughtExceptionHandler
(
new
ServiceExceptionHandler
(
this
));
}
CommonUtils
.
setServiceUnCaughtExceptionHandler
(
this
);
SharedPreferences
prefs
=
this
.
getSharedPreferences
(
AppConstants
.
SHARED_PREFERENCE_NAME
,
Context
.
MODE_PRIVATE
);
String
accountName
=
prefs
.
getString
(
AccountManager
.
KEY_ACCOUNT_NAME
,
""
);
String
accountType
=
prefs
.
getString
(
AccountManager
.
KEY_ACCOUNT_TYPE
,
""
);
...
...
app/src/main/java/foundation/e/drive/services/OperationManagerService.java
View file @
1f10d3ff
...
...
@@ -227,11 +227,9 @@ public class OperationManagerService extends Service implements OnRemoteOperatio
@Override
public
int
onStartCommand
(
Intent
intent
,
int
flags
,
int
startId
)
{
Log
.
i
(
TAG
,
"onStartCommand()"
);
if
(
Thread
.
getDefaultUncaughtExceptionHandler
().
getClass
().
getSimpleName
().
equals
(
ServiceExceptionHandler
.
class
.
getSimpleName
())){
Log
.
d
(
"ObserverService"
,
"ServiceExceptionHandler already set!"
);
}
else
{
Thread
.
setDefaultUncaughtExceptionHandler
(
new
ServiceExceptionHandler
(
this
));
}
CommonUtils
.
setServiceUnCaughtExceptionHandler
(
this
);
Bundle
extras
=
intent
.
getExtras
();
Log
.
d
(
TAG
,
"OperationManagerService recieved "
+(
extras
==
null
?
"null extras"
:
extras
.
size
()+
" operations to perform"
)
);
...
...
@@ -284,11 +282,9 @@ public class OperationManagerService extends Service implements OnRemoteOperatio
}
else
{
Log
.
w
(
TAG
,
"Intent's extras is null."
);
}
return
super
.
onStartCommand
(
intent
,
flags
,
startId
);
}
@Nullable
@Override
public
IBinder
onBind
(
Intent
intent
)
{
...
...
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