Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
82317520
Commit
82317520
authored
Feb 12, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
13c7d6b2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
src/main/java/tech/starwin/database/DataBaseHelper.java
+2
-0
src/main/java/tech/starwin/utils/LoginManager.java
+6
-3
No files found.
src/main/java/tech/starwin/database/DataBaseHelper.java
View file @
82317520
...
...
@@ -75,8 +75,10 @@ public class DataBaseHelper {
String
name
=
cursor
.
getString
(
1
);
data
=
new
String
[]{
name
,
number
};
}
if
(
cursor
!=
null
)
{
cursor
.
close
();
}
}
return
data
;
}
...
...
src/main/java/tech/starwin/utils/LoginManager.java
View file @
82317520
...
...
@@ -22,8 +22,10 @@ import java.util.List;
import
tech.starwin.LibConfig
;
import
tech.starwin.R
;
import
tech.starwin.constants.ActionEnum
;
import
com.common.bean.TokenInfoBean
;
import
com.common.bean.UserBean
;
import
tech.starwin.utils.context_utils.EasyActivityResult
;
import
tech.starwin.utils.format_utils.StringFormat
;
...
...
@@ -100,10 +102,10 @@ public class LoginManager {
new
EasyActivityResult
(
activity
).
startForResult
(
intent
,
0
,
new
EasyActivityResult
.
OnResultListener
()
{
@Override
public
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
data
)
{
if
(
requestCode
==
0
)
{
// confirm that this response matches your request
if
(
requestCode
==
0
&&
data
!=
null
)
{
// confirm that this response matches your request
AccountKitLoginResult
loginResult
=
data
.
getParcelableExtra
(
AccountKitLoginResult
.
RESULT_KEY
);
if
(
loginResult
==
null
)
{
result
.
onLoginError
(
n
ull
);
result
.
onLoginError
(
n
ew
AccountKitError
(
AccountKitError
.
Type
.
INITIALIZATION_ERROR
)
);
}
else
if
(
loginResult
.
getError
()
!=
null
)
{
result
.
onLoginError
(
loginResult
.
getError
());
}
else
if
(
loginResult
.
wasCancelled
())
{
...
...
@@ -111,7 +113,8 @@ public class LoginManager {
}
else
{
result
.
onLoginSuccess
(
loginResult
);
}
}
else
{
result
.
onLoginError
(
new
AccountKitError
(
AccountKitError
.
Type
.
INITIALIZATION_ERROR
));
}
}
});
...
...
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