Commit ca9f4d26 by sikang

修改默认登录方式

parent dbbce67b
......@@ -36,7 +36,6 @@ import zendesk.support.Support;
* 配置 BaseLibrary
*/
public class LibConfig {
private static boolean useDefaulLoginMode = true;//请求出现登录时是否使用默认的响应方式(跳转登录界面)
/**
* BuildConfig 数据
*/
......@@ -219,15 +218,4 @@ public class LibConfig {
});
}
/**
* 清除默认的登录失效响应
*/
public static void clearDefaultLoginMode() {
useDefaulLoginMode = false;
}
public static boolean isDefaultLoginMode() {
return useDefaulLoginMode;
}
}
......@@ -62,7 +62,7 @@ public class LoginManager {
//广播通知
EventBus.getDefault().post(ActionEnum.LOGIN_INVALID);
if (LibConfig.isDefaultLoginMode()) {
if (!TextUtils.isEmpty(LibConfig.LOGIN_ACTIVITY_ACTION)) {
//跳转登录界面
if (isActionSupport(LibConfig.getContext(), LibConfig.LOGIN_ACTIVITY_ACTION)) {
new ActivityJumper.Builder(LibConfig.getContext(), LibConfig.LOGIN_ACTIVITY_ACTION)
......
......@@ -60,7 +60,7 @@ public class AppInfoUtils {
@SuppressLint("MissingPermission")
public static String getPhoneNumber(Context context) {
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
String[] permissions = new String[]{Manifest.permission.READ_SMS, Manifest.permission.READ_PHONE_NUMBERS, Manifest.permission.READ_PHONE_STATE};
String[] permissions = new String[]{Manifest.permission.READ_SMS,Manifest.permission.READ_PHONE_STATE};
if (telephonyManager != null && PermissionsHelper.isGranted(context, permissions)) {
return telephonyManager.getLine1Number();
} else {
......
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