手机管家 v6.0.0版本的 MD5 值为:bf0bca2cb03f766137fe9ecf7383a634
以下内容为反编译后的 ti.java 源代码,内容仅作参考
package tcs;
import android.telephony.PhoneNumberUtils;
import com.tencent.kingkong.database.SQLiteDatabase;
public class ti extends PhoneNumberUtils {
public static final int cfZ = 8;
public static final String[] cga = {"-", "+86", qs.bUw, qs.bUx, qs.bUp, qs.bUo, qs.bUq, qs.bUt, qs.bUs, qs.bUu};
public static String jP(String str) {
if (str != null && str.length() > 2) {
for (String str2 : cga) {
if (str.startsWith(str2)) {
return str.substring(str2.length());
}
}
return str;
}
return str;
}
public static boolean jQ(String str) {
if (!str.endsWith("*") || str.length() <= 4) {
return false;
}
String substring = str.substring(0, str.length() - 1);
for (String str2 : cga) {
if (substring.equals(str2)) {
return true;
}
}
return false;
}
public static boolean jR(String str) {
for (String str2 : cga) {
if (str.startsWith(str2)) {
return true;
}
}
return false;
}
public static String jS(String str) {
if (str != null) {
return stripSeparators(str).replace("-", SQLiteDatabase.KeyEmpty).replace(" ", SQLiteDatabase.KeyEmpty).trim();
}
return str;
}
public static String formatNumber(String str) {
return jP(jS(str));
}
public static boolean jT(String str) {
for (int length = str.length() - 1; length >= 0; length--) {
if (!isISODigit(str.charAt(length))) {
return false;
}
}
return true;
}
public static String jU(String str) {
return s(jV(jP(str)), 8);
}
public static String jV(String str) {
boolean z = false;
if (str == null) {
return null;
}
int length = str.length();
StringBuilder sb = new StringBuilder(length);
for (int i = 0; i < length; i++) {
char charAt = str.charAt(i);
if (charAt == '+') {
if (z) {
continue;
} else {
z = true;
}
}
if (isDialable(charAt)) {
sb.append(charAt);
} else if (isStartsPostDial(charAt)) {
break;
}
}
return sb.toString();
}
private static String s(String str, int i) {
if (str == null) {
return null;
}
StringBuilder sb = new StringBuilder(i);
int length = str.length();
for (int i2 = length - 1; i2 >= 0 && length - i2 <= i; i2--) {
sb.append(str.charAt(i2));
}
return sb.toString();
}
public static boolean B(String str, String str2) {
return C(jP(str), jP(str2));
}
public static boolean C(String str, String str2) {
int i;
int i2;
int i3;
int i4;
int i5;
boolean z;
int i6;
int i7;
boolean z2;
int i8;
int i9;
int i10;
if (str == null || str2 == null) {
return str == str2;
}
if (str.length() == 0 || str2.length() == 0) {
return false;
}
int jW = jW(str);
int jW2 = jW(str2);
int i11 = 0;
int i12 = 0;
int i13 = 0;
while (jW >= 0 && jW2 >= 0) {
char charAt = str.charAt(jW);
if (isDialable(charAt)) {
i5 = jW;
i4 = i12;
z = false;
} else {
i5 = jW - 1;
i4 = i12 + 1;
z = true;
}
char charAt2 = str2.charAt(jW2);
if (isDialable(charAt2)) {
boolean z3 = z;
i6 = jW2;
i7 = i11;
z2 = z3;
} else {
i6 = jW2 - 1;
i7 = i11 + 1;
z2 = true;
}
if (!z2) {
if (charAt2 != charAt && charAt != 'N' && charAt2 != 'N') {
i3 = i5;
i = i6;
i2 = i7;
break;
}
int i14 = i5 - 1;
i9 = i6 - 1;
i10 = i13 + 1;
i8 = i14;
} else {
int i15 = i13;
i8 = i5;
i9 = i6;
i10 = i15;
}
i11 = i7;
jW2 = i9;
int i16 = i10;
i12 = i4;
jW = i8;
i13 = i16;
}
i = jW2;
int i17 = i12;
i2 = i11;
i3 = jW;
i4 = i17;
if (i13 < 8) {
int length = str.length() - i4;
return length == str2.length() - i2 && length == i13;
}
if (i13 >= 8 && (i3 < 0 || i < 0)) {
return true;
}
if (t(str, i3 + 1) && t(str2, i + 1)) {
return true;
}
if (u(str, i3 + 1) && v(str2, i + 1)) {
return true;
}
return u(str2, i + 1) && v(str, i3 + 1);
}
private static int jW(String str) {
int length = str.length();
int G = G(str.indexOf(44), str.indexOf(59));
return G < 0 ? length - 1 : G - 1;
}
private static int G(int i, int i2) {
if (i >= 0 && i2 >= 0) {
return i < i2 ? i : i2;
}
if (i < 0) {
if (i2 >= 0) {
return i2;
}
return -1;
}
return i;
}
private static boolean t(String str, int i) {
boolean z = true;
char c = 0;
for (int i2 = 0; i2 < i; i2++) {
char charAt = str.charAt(i2);
switch (c) {
case 0:
if (charAt == '+') {
c = 1;
break;
} else if (charAt == '0') {
c = 2;
break;
} else {
if (g(charAt)) {
return false;
}
break;
}
case 1:
case 3:
default:
if (g(charAt)) {
return false;
}
break;
case 2:
if (charAt == '0') {
c = 3;
break;
} else if (charAt == '1') {
c = 4;
break;
} else {
if (g(charAt)) {
return false;
}
break;
}
case 4:
if (charAt == '1') {
c = 5;
break;
} else {
if (g(charAt)) {
return false;
}
break;
}
}
}
if (c != 1 && c != 3 && c != 5) {
z = false;
}
return z;
}
private static boolean u(String str, int i) {
boolean z = false;
for (int i2 = 0; i2 < i; i2++) {
char charAt = str.charAt(i2);
if (charAt == '0' && !z) {
z = true;
} else if (g(charAt)) {
return false;
}
}
return z;
}
private static boolean v(String str, int i) {
boolean z = true;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
char charAt = str.charAt(i3);
switch (i2) {
case 0:
if (charAt == '+') {
i2 = 1;
break;
} else if (charAt == '0') {
i2 = 2;
break;
} else {
if (g(charAt)) {
return false;
}
break;
}
case 1:
case 3:
case 5:
if (isISODigit(charAt)) {
i2 = 6;
break;
} else {
if (g(charAt)) {
return false;
}
break;
}
case 2:
if (charAt == '0') {
i2 = 3;
break;
} else if (charAt == '1') {
i2 = 4;
break;
} else {
if (g(charAt)) {
return false;
}
break;
}
case 4:
if (charAt == '1') {
i2 = 5;
break;
} else {
if (g(charAt)) {
return false;
}
break;
}
case 6:
case 7:
if (isISODigit(charAt)) {
i2++;
break;
} else {
if (g(charAt)) {
return false;
}
break;
}
default:
if (g(charAt)) {
return false;
}
break;
}
}
if (i2 != 6 && i2 != 7 && i2 != 8) {
z = false;
}
return z;
}
public static final boolean g(char c) {
return (c >= '0' && c <= '9') || c == '*' || c == '#' || c == '+' || c == 'N' || c == ';' || c == ',';
}
public static String[] jR(int i) {
switch (i) {
case 0:
return new String[]{qs.bUw, qs.bUp};
case 1:
return new String[]{qs.bUq, qs.bUo};
case 2:
return new String[]{qs.bUx, qs.bUv};
default:
return new String[]{qs.bUw, qs.bUp};
}
}
public static boolean co(String str) {
String formatNumber = formatNumber(str);
if (formatNumber == null || formatNumber.length() != 11 || "13800138000".equals(formatNumber)) {
return false;
}
return formatNumber.startsWith("13") || formatNumber.startsWith("15") || formatNumber.startsWith("18") || formatNumber.startsWith("17");
}
}