Commit 82317520 by sikang

bug fix

parent 13c7d6b2
......@@ -75,7 +75,9 @@ public class DataBaseHelper {
String name = cursor.getString(1);
data = new String[]{name, number};
}
cursor.close();
if(cursor!=null) {
cursor.close();
}
}
return data;
}
......
......@@ -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(null);
result.onLoginError(new 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));
}
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment