蓝牙长度不控制
This commit is contained in:
parent
ab483dba59
commit
ac180003cb
|
|
@ -91,17 +91,8 @@ public class CheckWifiUtil {
|
||||||
|
|
||||||
L.i("jjia-----1---"+ssidLen);
|
L.i("jjia-----1---"+ssidLen);
|
||||||
L.i("jjia-----2---"+ssidLength);
|
L.i("jjia-----2---"+ssidLength);
|
||||||
if (isBlue){ // 蓝牙
|
L.i("jjia-----3---"+(ssidLength==ssidLen));
|
||||||
if (ssidLength > 45){
|
if (!isBlue){ // 蓝牙
|
||||||
if (ssidLength == ssidLen){
|
|
||||||
ToastUtil.show(activity.getApplicationContext(), "路由器名称长度不能超过45个字符");
|
|
||||||
return false;
|
|
||||||
}else {
|
|
||||||
ToastUtil.show(activity.getApplicationContext(), "路由器名称长度不能超过15个汉字");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
if (ssidLength > 20){
|
if (ssidLength > 20){
|
||||||
if (ssidLength == ssidLen){
|
if (ssidLength == ssidLen){
|
||||||
ToastUtil.show(activity.getApplicationContext(), "路由器名称长度不能超过20个字符");
|
ToastUtil.show(activity.getApplicationContext(), "路由器名称长度不能超过20个字符");
|
||||||
|
|
@ -111,19 +102,7 @@ public class CheckWifiUtil {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (isBlue){ // 蓝牙
|
|
||||||
if (pwdLength > 30){
|
|
||||||
if (pwdLength == pwdLen){
|
|
||||||
ToastUtil.show(activity.getApplicationContext(), "路由器密码长度不能超过30个字符");
|
|
||||||
return false;
|
|
||||||
}else {
|
|
||||||
ToastUtil.show(activity.getApplicationContext(), "路由器密码长度不能超过6个汉字");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
if (pwdLength > 20){
|
if (pwdLength > 20){
|
||||||
if (pwdLength == pwdLen){
|
if (pwdLength == pwdLen){
|
||||||
ToastUtil.show(activity.getApplicationContext(), "路由器密码长度不能超过20个字符");
|
ToastUtil.show(activity.getApplicationContext(), "路由器密码长度不能超过20个字符");
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@ package com.ifish.utils;
|
||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.ifish.activity.BuildConfig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName: LogCat
|
* @ClassName: LogCat
|
||||||
* @Description: 打印工具栏
|
* @Description: 打印工具栏
|
||||||
|
|
@ -18,12 +20,21 @@ import android.util.Log;
|
||||||
public class L {
|
public class L {
|
||||||
private static String TAG="iFish7";
|
private static String TAG="iFish7";
|
||||||
public static void i(String msg) {
|
public static void i(String msg) {
|
||||||
Log.i(TAG, msg);
|
if (BuildConfig.DEBUG){
|
||||||
|
Log.i(TAG, msg);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public static void d(String msg) {
|
public static void d(String msg) {
|
||||||
Log.d(TAG, msg);
|
|
||||||
|
if (BuildConfig.DEBUG){
|
||||||
|
Log.d(TAG, msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static void e(String msg) {
|
public static void e(String msg) {
|
||||||
Log.e(TAG, msg);
|
|
||||||
|
if (BuildConfig.DEBUG){
|
||||||
|
Log.e(TAG, msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue