提交 71c74996 编写于 作者: C cmj

see 10/14 log

上级 72b8c17c
......@@ -445,13 +445,13 @@ public class AppUtils {
*/
public static class AppInfo {
private String name;
private String name;
private Drawable icon;
private String packageName;
private String packagePath;
private String versionName;
private int versionCode;
private boolean isSystem;
private String packageName;
private String packagePath;
private String versionName;
private int versionCode;
private boolean isSystem;
public Drawable getIcon() {
return icon;
......
......@@ -22,15 +22,15 @@ public class ConstUtils {
/**
* KB与Byte的倍数
*/
public static final int KB = 1024;
public static final int KB = 1024;
/**
* MB与Byte的倍数
*/
public static final int MB = 1048576;
public static final int MB = 1048576;
/**
* GB与Byte的倍数
*/
public static final int GB = 1073741824;
public static final int GB = 1073741824;
public enum MemoryUnit {
BYTE,
......@@ -47,11 +47,11 @@ public class ConstUtils {
/**
* 秒与毫秒的倍数
*/
public static final int SEC = 1000;
public static final int SEC = 1000;
/**
* 分与毫秒的倍数
*/
public static final int MIN = 60000;
public static final int MIN = 60000;
/**
* 时与毫秒的倍数
*/
......@@ -59,7 +59,7 @@ public class ConstUtils {
/**
* 天与毫秒的倍数
*/
public static final int DAY = 86400000;
public static final int DAY = 86400000;
public enum TimeUnit {
MSEC,
......@@ -82,41 +82,41 @@ public class ConstUtils {
* <p>全球星:1349</p>
* <p>虚拟运营商:170</p>
*/
public static final String REGEX_MOBILE_EXACT = "^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|(147))\\d{8}$";
public static final String REGEX_MOBILE_EXACT = "^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|(147))\\d{8}$";
/**
* 正则:电话号码
*/
public static final String REGEX_TEL = "^0\\d{2,3}[- ]?\\d{7,8}";
public static final String REGEX_TEL = "^0\\d{2,3}[- ]?\\d{7,8}";
/**
* 正则:身份证号码15位
*/
public static final String REGEX_IDCARD15 = "^[1-9]\\d{7}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}$";
public static final String REGEX_IDCARD15 = "^[1-9]\\d{7}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}$";
/**
* 正则:身份证号码18位
*/
public static final String REGEX_IDCARD18 = "^[1-9]\\d{5}[1-9]\\d{3}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}([0-9Xx])$";
public static final String REGEX_IDCARD18 = "^[1-9]\\d{5}[1-9]\\d{3}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}([0-9Xx])$";
/**
* 正则:邮箱
*/
public static final String REGEX_EMAIL = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$";
public static final String REGEX_EMAIL = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$";
/**
* 正则:URL
*/
public static final String REGEX_URL = "http(s)?://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?";
public static final String REGEX_URL = "http(s)?://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?";
/**
* 正则:汉字
*/
public static final String REGEX_CHZ = "^[\\u4e00-\\u9fa5]+$";
public static final String REGEX_CHZ = "^[\\u4e00-\\u9fa5]+$";
/**
* 正则:用户名,取值范围为a-z,A-Z,0-9,"_",汉字,不能以"_"结尾,用户名必须是6-20位
*/
public static final String REGEX_USERNAME = "^[\\w\\u4e00-\\u9fa5]{6,20}(?<!_)$";
public static final String REGEX_USERNAME = "^[\\w\\u4e00-\\u9fa5]{6,20}(?<!_)$";
/**
* 正则:yyyy-MM-dd格式的日期校验,已考虑平闰年
*/
public static final String REGEX_DATE = "^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$";
public static final String REGEX_DATE = "^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$";
/**
* 正则:IP地址
*/
public static final String REGEX_IP = "((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){3}(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)";
public static final String REGEX_IP = "((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){3}(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)";
}
\ No newline at end of file
......@@ -26,11 +26,11 @@ import java.util.Locale;
public class CrashUtils implements Thread.UncaughtExceptionHandler {
private static CrashUtils mInstance = new CrashUtils();
private UncaughtExceptionHandler mHandler;
private boolean mInitialized;
private static String crashDir;
private String versionName;
private int versionCode;
private UncaughtExceptionHandler mHandler;
private boolean mInitialized;
private static String crashDir;
private String versionName;
private int versionCode;
private CrashUtils() {
}
......
......@@ -26,10 +26,10 @@ public class LogUtils {
throw new UnsupportedOperationException("u can't instantiate me...");
}
private static boolean logSwitch = true;
private static boolean logSwitch = true;
private static boolean log2FileSwitch = false;
private static char logFilter = 'v';
private static String tag = "TAG";
private static char logFilter = 'v';
private static String tag = "TAG";
private static String dir;
/**
......@@ -72,10 +72,10 @@ public class LogUtils {
public static class Builder {
private boolean logSwitch = true;
private boolean logSwitch = true;
private boolean log2FileSwitch = false;
private char logFilter = 'v';
private String tag = "TAG";
private char logFilter = 'v';
private String tag = "TAG";
public Builder setLogSwitch(boolean logSwitch) {
this.logSwitch = logSwitch;
......
......@@ -27,7 +27,7 @@ public class NetworkUtils {
private NetworkUtils() {
throw new UnsupportedOperationException("u can't instantiate me...");
}
public static final int NETWORK_WIFI = 1; // wifi network
public static final int NETWORK_4G = 4; // "4G" networks
public static final int NETWORK_3G = 3; // "3G" networks
......
......@@ -61,7 +61,8 @@ public class PhoneUtils {
/**
* 获取IMSI码
*<p>需添加权限 {@code <uses-permission android:name="android.permission.READ_PHONE_STATE"/>}</p>
* <p>需添加权限 {@code <uses-permission android:name="android.permission.READ_PHONE_STATE"/>}</p>
*
* @param context 上下文
* @return IMSI码
*/
......
......@@ -128,9 +128,9 @@ public class SDCardUtils {
private static class SDCardInfo {
boolean isExist;
long totalBlocks;
long freeBlocks;
long availableBlocks;
long totalBlocks;
long freeBlocks;
long availableBlocks;
long blockByteSize;
......
......@@ -15,7 +15,7 @@ import java.util.Map;
*/
public class SPUtils {
private SharedPreferences sp;
private SharedPreferences sp;
private SharedPreferences.Editor editor;
/**
......
......@@ -144,7 +144,7 @@ public class ShellUtils {
/**
* 结果码
**/
public int result;
public int result;
/**
* 成功信息
**/
......
......@@ -107,6 +107,7 @@ public class SizeUtils {
* }
* });
* </pre>
*
* @param view 视图
* @param listener 监听器
*/
......
......@@ -32,7 +32,7 @@ public class ThreadPoolUtils {
SingleThread,
}
private ExecutorService exec;
private ExecutorService exec;
private ScheduledExecutorService scheduleExec;
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册