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
android_packages_apps_SetupWizard
Commits
90822288
Commit
90822288
authored
Sep 03, 2018
by
Nihar Thakkar
Browse files
Use Account Manager callback
parent
6e8ca52d
Changes
1
Show whitespace changes
Inline
Side-by-side
src/com/cyanogenmod/setupwizard/EAccountManagerActivity.java
View file @
90822288
...
...
@@ -28,7 +28,6 @@ public class EAccountManagerActivity extends SubBaseActivity {
public
static
final
String
TAG
=
EAccountManagerActivity
.
class
.
getSimpleName
();
private
static
boolean
isInit
=
false
;
private
AccountManager
accountManager
=
null
;
@Override
...
...
@@ -63,12 +62,15 @@ public class EAccountManagerActivity extends SubBaseActivity {
}
private
void
launchAccountManagerSetup
()
{
isInit
=
true
;
try
{
accountManager
=
AccountManager
.
get
(
this
);
accountManager
.
addAccount
(
"bitfire.at.davdroid.eelo"
,
null
,
null
,
null
,
this
,
null
,
null
);
accountManager
.
addAccount
(
"bitfire.at.davdroid.eelo"
,
null
,
null
,
null
,
this
,
new
AccountManagerCallback
<
Bundle
>()
{
@Override
public
void
run
(
AccountManagerFuture
<
Bundle
>
future
)
{
// An eelo account has been added, continue to the next screen
onNavigateNext
();
}
},
null
);
}
catch
(
Exception
e
)
{}
finally
{}
...
...
@@ -78,26 +80,4 @@ public class EAccountManagerActivity extends SubBaseActivity {
protected
int
getSubactivityNextTransition
()
{
return
TRANSITION_ID_SLIDE
;
}
@Override
protected
void
onResume
()
{
super
.
onResume
();
if
(
isInit
==
false
)
return
;
try
{
Account
[]
accounts
=
accountManager
.
getAccounts
();
if
(
accounts
!=
null
)
{
// An eelo account has been created, goto the next screen
onNavigateNext
();
}
}
catch
(
Exception
e
)
{
onNavigateNext
();
}
finally
{}
}
}
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