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
098b1098
Commit
098b1098
authored
Aug 13, 2020
by
Mohit
Browse files
Fix bug when eDrive doesn't detect user account on os update in Nougat
parent
ff32392c
Pipeline
#67621
passed with stage
in 2 minutes and 29 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
app/src/main/java/foundation/e/drive/receivers/BootCompleteReceiver.java
View file @
098b1098
...
...
@@ -23,12 +23,10 @@ public class BootCompleteReceiver extends BroadcastReceiver {
Log
.
i
(
TAG
,
"onReceive"
);
String
intentAction
=
intent
.
getAction
();
SharedPreferences
prefs
=
context
.
getSharedPreferences
(
AppConstants
.
SHARED_PREFERENCE_NAME
,
Context
.
MODE_PRIVATE
);
if
(
intentAction
==
null
)
{
Log
.
e
(
TAG
,
"intent Action is null"
);
}
else
if
(
intent
.
getAction
().
equals
(
Intent
.
ACTION_BOOT_COMPLETED
))
{
SharedPreferences
prefs
=
context
.
getSharedPreferences
(
AppConstants
.
SHARED_PREFERENCE_NAME
,
Context
.
MODE_PRIVATE
);
if
(
prefs
.
getString
(
AccountManager
.
KEY_ACCOUNT_NAME
,
null
)
!=
null
)
{
//If user account is registered
prefs
.
edit
().
putBoolean
(
AppConstants
.
KEY_OMS_IS_WORKING
,
false
).
commit
();
...
...
@@ -37,13 +35,12 @@ public class BootCompleteReceiver extends BroadcastReceiver {
//scanner job isn't registered then register it
JobUtils
.
scheduleScannerJob
(
context
);
}
}
}
else
{
Account
mAccount
=
CommonUtils
.
getAccount
(
context
.
getString
(
R
.
string
.
eelo_account_type
),
AccountManager
.
get
(
context
));
if
(
mAccount
!=
null
)
{
String
accountName
=
mAccount
.
name
;
String
accountType
=
mAccount
.
type
;
...
...
@@ -60,4 +57,5 @@ public class BootCompleteReceiver extends BroadcastReceiver {
}
}
}
}
}
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