华润售电云 v2.2.7版本的 MD5 值为:93c9468f6a7b82a4ae05a1eac91dbd03
以下内容为反编译后的 C0063ac.java 源代码,内容仅作参考
package com.iflytek.thirdparty;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.SystemClock;
import android.telephony.TelephonyManager;
import android.telephony.cdma.CdmaCellLocation;
import android.telephony.gsm.GsmCellLocation;
import android.text.TextUtils;
import com.iflytek.cloud.ErrorCode;
import com.iflytek.cloud.Setting;
import com.iflytek.cloud.SpeechConstant;
import com.iflytek.cloud.SpeechError;
import com.iflytek.cloud.SpeechUtility;
import com.iflytek.cloud.Version;
import com.igexin.assist.sdk.AssistPushConsts;
import com.igexin.sdk.PushConsts;
public class C0063ac {
private static String a = "xiaoyan";
private static String b;
public static String a() {
return SpeechUtility.getUtility().getParameter("appid");
}
public static String a(Context context) {
if (context == null) {
return "null";
}
C0061aa a2 = G.a(context);
String str = a2.e("os.imsi") + "|" + a2.e("os.imei");
if (str.length() < 10) {
str = a2.e("net.mac");
}
if (TextUtils.isEmpty(str) || str.length() <= 0) {
return null;
}
return str;
}
public static String a(Context context, AbstractHandlerC0098v abstractHandlerC0098v) throws SpeechError {
if (context != null) {
C0061aa clone = abstractHandlerC0098v.v().clone();
b = clone.b(SpeechConstant.NET_TYPE, b);
a(context, clone);
clone.a("timeout", PushConsts.SEND_MESSAGE_ERROR, false);
clone.a("auth", "1", false);
clone.a("msc.ver", Version.getVersion());
clone.a("mac", G.a(context).e("net.mac"), false);
clone.a("dvc", a(context), false);
clone.a("unique_id", S.a(context));
clone.a("msc.lat", "" + H.a(context).b("msc.lat"), false);
clone.a("msc.lng", "" + H.a(context).b("msc.lng"), false);
clone.a(G.b(context));
a(clone);
b(context, clone);
clone.a(C0062ab.c);
return clone.toString();
}
throw new SpeechError((int) ErrorCode.ERROR_INVALID_PARAM);
}
public static String a(Context context, String str, AbstractHandlerC0098v abstractHandlerC0098v) {
String str2;
C0061aa clone = abstractHandlerC0098v.v().clone();
clone.c(SpeechConstant.CLOUD_GRAMMAR);
a(context, clone);
b(context, clone);
clone.a(SpeechConstant.LANGUAGE, "zh_cn", false);
clone.a(SpeechConstant.RESULT_TYPE, "json", false);
clone.a("rse", abstractHandlerC0098v.r(), false);
clone.a(SpeechConstant.TEXT_ENCODING, abstractHandlerC0098v.q(), false);
clone.a("ssm", "1", false);
clone.a("msc.skin", AssistPushConsts.PUSHMESSAGE_ACTION_MULTI_BRAND_RECEIVE_NONE, false);
clone.a(SpeechConstant.SUBJECT, TextUtils.isEmpty(str) ? "iat" : "asr", false);
int s = abstractHandlerC0098v.s();
clone.a("auf=audio/L16;rate", Integer.toString(s), false);
clone.a("aue", s == 16000 ? "speex-wb" : "speex", false);
if (abstractHandlerC0098v.m()) {
clone.a(SpeechConstant.VAD_BOS, "5000", false);
str2 = "1800";
} else {
clone.a(SpeechConstant.VAD_BOS, "4000", false);
str2 = "700";
}
clone.a(SpeechConstant.VAD_EOS, str2, false);
clone.a(C0062ab.c);
return clone.toString();
}
public static void a(Context context, C0061aa c0061aa) {
NetworkInfo activeNetworkInfo;
String f;
String str = SpeechConstant.NET_TYPE;
if (TextUtils.isEmpty(c0061aa.e(SpeechConstant.NET_TYPE)) && !TextUtils.isEmpty(b)) {
f = b;
} else if (context == null || (activeNetworkInfo = ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo()) == null) {
c0061aa.a(SpeechConstant.NET_TYPE, "none", false);
return;
} else {
c0061aa.a(SpeechConstant.NET_TYPE, Q.a(activeNetworkInfo), false);
f = C0061aa.f(Q.b(activeNetworkInfo));
str = "net_subtype";
}
c0061aa.a(str, f, false);
}
private static void a(C0061aa c0061aa) {
if (c0061aa == null || Setting.getLogLevel() == Setting.LOG_LEVEL.none) {
return;
}
String logPath = Setting.getLogPath();
if (TextUtils.isEmpty(logPath)) {
logPath = "/sdcard/msc/msc.log";
}
int i = -1;
if (Setting.getLogLevel() == Setting.LOG_LEVEL.detail) {
i = 31;
} else if (Setting.getLogLevel() == Setting.LOG_LEVEL.normal) {
i = 15;
} else if (Setting.getLogLevel() == Setting.LOG_LEVEL.low) {
i = 7;
}
M.b(logPath);
c0061aa.a("log", logPath);
c0061aa.a("lvl", "" + i);
c0061aa.a("output", "1", false);
}
public static boolean a(String str) {
if (TextUtils.isEmpty(str)) {
return false;
}
return str.contains("sms") || str.contains("iat");
}
public static String b(Context context, AbstractHandlerC0098v abstractHandlerC0098v) {
C0061aa clone = abstractHandlerC0098v.v().clone();
a(context, clone);
b(context, clone);
clone.a(SpeechConstant.RESULT_TYPE, "json");
clone.a("rse", abstractHandlerC0098v.r());
clone.a(SpeechConstant.TEXT_ENCODING, abstractHandlerC0098v.q());
clone.a("ssm", "1", false);
clone.a(SpeechConstant.SUBJECT, SpeechConstant.ENG_IVP, false);
int s = abstractHandlerC0098v.s();
clone.a("auf=audio/L16;rate", Integer.toString(s), false);
clone.a("aue", s == 16000 ? "speex-wb;10" : "speex", false);
clone.a(SpeechConstant.VAD_BOS, "3000", false);
clone.a(SpeechConstant.VAD_EOS, "700", false);
clone.a(C0062ab.c);
return clone.toString();
}
public static String b(Context context, String str, AbstractHandlerC0098v abstractHandlerC0098v) {
if (str.equals("oneshot")) {
return a(context, abstractHandlerC0098v.v().e(SpeechConstant.CLOUD_GRAMMAR), abstractHandlerC0098v);
}
C0061aa clone = abstractHandlerC0098v.v().clone();
int a2 = clone.a(SpeechConstant.IVW_NET_MODE, 0);
if (a2 != 0 && (2 == a2 || 1 == a2 || Q.a(context))) {
clone.a(SpeechConstant.IVW_NET_MODE, "1", true);
} else {
clone.a(SpeechConstant.IVW_NET_MODE, AssistPushConsts.PUSHMESSAGE_ACTION_MULTI_BRAND_RECEIVE_NONE, true);
}
clone.a(C0062ab.c);
return clone.toString();
}
public static void b(Context context, C0061aa c0061aa) {
TelephonyManager telephonyManager;
int phoneType;
int i;
int parseInt;
int parseInt2;
int cid;
int lac;
int i2;
long elapsedRealtime = SystemClock.elapsedRealtime();
if (context != null && H.b(context)) {
try {
telephonyManager = (TelephonyManager) context.getSystemService("phone");
phoneType = telephonyManager.getPhoneType();
String networkOperator = telephonyManager.getNetworkOperator();
i = 0;
parseInt = Integer.parseInt(networkOperator.substring(0, 3));
parseInt2 = Integer.parseInt(networkOperator.substring(3));
} catch (Exception unused) {
X.a("get mmlc failed");
}
if (phoneType == 1) {
GsmCellLocation gsmCellLocation = (GsmCellLocation) telephonyManager.getCellLocation();
cid = gsmCellLocation.getCid();
lac = gsmCellLocation.getLac();
} else if (phoneType != 2) {
i2 = 0;
c0061aa.a("mmlc", parseInt + "|" + parseInt2 + "|" + i + "|" + i2);
X.c("MCC = " + parseInt + "\t MNC = " + parseInt2 + "\t phoneType = " + phoneType + "\t LAC = " + i + "\t CID = " + i2);
X.c("get mmlc time cost:" + (SystemClock.elapsedRealtime() - elapsedRealtime));
} else {
CdmaCellLocation cdmaCellLocation = (CdmaCellLocation) telephonyManager.getCellLocation();
cid = cdmaCellLocation.getBaseStationId();
lac = cdmaCellLocation.getNetworkId();
}
int i3 = cid;
i = lac;
i2 = i3;
c0061aa.a("mmlc", parseInt + "|" + parseInt2 + "|" + i + "|" + i2);
X.c("MCC = " + parseInt + "\t MNC = " + parseInt2 + "\t phoneType = " + phoneType + "\t LAC = " + i + "\t CID = " + i2);
X.c("get mmlc time cost:" + (SystemClock.elapsedRealtime() - elapsedRealtime));
}
}
private static void b(C0061aa c0061aa) {
String str;
String parameter = SpeechUtility.getUtility().getParameter("ver_tts");
if (c0061aa.g("speed_increase")) {
return;
}
int a2 = c0061aa.a(SpeechConstant.SPEED, 50);
if (a2 <= 100) {
c0061aa.a(SpeechConstant.SPEED, "" + a2);
str = "1";
} else if (100 < a2 && a2 <= 150 && (TextUtils.isEmpty(parameter) || parameter.contains("5.5."))) {
c0061aa.a(SpeechConstant.SPEED, "" + (a2 - 50));
str = AssistPushConsts.PUSHMESSAGE_ACTION_MULTI_BRAND_RECEIVE_HW;
} else if (100 >= a2 || a2 > 200) {
return;
} else {
c0061aa.a(SpeechConstant.SPEED, "" + (a2 - 100));
str = AssistPushConsts.PUSHMESSAGE_ACTION_MULTI_BRAND_RECEIVE_MZ;
}
c0061aa.a("speed_increase", str);
}
public static String c(Context context, C0061aa c0061aa) {
C0061aa clone = c0061aa.clone();
clone.a("appid", SpeechUtility.getUtility().getParameter("appid"));
clone.a(G.b(context));
clone.a("dvc", a(context), false);
clone.a("aue", "raw", false);
clone.a(C0062ab.c);
return clone.toString();
}
public static String c(Context context, AbstractHandlerC0098v abstractHandlerC0098v) {
C0061aa clone = abstractHandlerC0098v.v().clone();
a(context, clone);
b(context, clone);
clone.a("ssm", "1", false);
clone.a(SpeechConstant.RESULT_TYPE, "json", false);
clone.a("rse", abstractHandlerC0098v.r(), false);
clone.a(SpeechConstant.TEXT_ENCODING, abstractHandlerC0098v.q(), false);
clone.a(C0062ab.c);
return clone.toString();
}
public static String c(Context context, String str, AbstractHandlerC0098v abstractHandlerC0098v) {
C0061aa clone = abstractHandlerC0098v.v().clone();
a(context, clone);
b(context, clone);
clone.a("sub", "mfv", false);
clone.a("prot_ver", "50", false);
clone.a("mver", "2.0", false);
clone.a("server_url", "http://imfv.openspeech.cn/msp.do", false);
clone.a("scene_mode", "verify".equals(clone.e("sst")) ? "vfy" : "gen", false);
clone.a(C0062ab.c);
return clone.toString();
}
public static String d(Context context, C0061aa c0061aa) {
C0061aa clone = c0061aa.clone();
clone.a("appid", SpeechUtility.getUtility().getParameter("appid"));
clone.a(G.b(context));
clone.a("dvc", a(context), false);
clone.a(C0062ab.c);
return clone.toString();
}
public static String d(Context context, AbstractHandlerC0098v abstractHandlerC0098v) {
C0061aa clone = abstractHandlerC0098v.v().clone();
a(context, clone);
b(context, clone);
clone.a("ssm", "1", false);
int s = abstractHandlerC0098v.s();
clone.a("auf=audio/L16;rate", Integer.toString(s));
clone.a("aue", s == 16000 ? "speex-wb" : "speex", false);
clone.a(SpeechConstant.VOICE_NAME, clone.b(SpeechConstant.VOICE_NAME, a), true);
clone.a(SpeechConstant.TEXT_ENCODING, abstractHandlerC0098v.q(), false);
b(clone);
clone.a(C0062ab.c);
return clone.toString();
}
public static String e(Context context, AbstractHandlerC0098v abstractHandlerC0098v) {
C0061aa clone = abstractHandlerC0098v.v().clone();
a(context, clone);
b(context, clone);
clone.a("ssm", "1", false);
int s = abstractHandlerC0098v.s();
clone.a("auf=audio/L16;rate", Integer.toString(s), false);
clone.a("aue", s == 16000 ? "speex-wb" : "speex", false);
clone.a(SpeechConstant.TEXT_ENCODING, abstractHandlerC0098v.q(), false);
clone.a("plev", "1", false);
clone.a(SpeechConstant.ACCENT, "mandarin", false);
clone.a(SpeechConstant.DOMAIN, "ise", false);
clone.a(SpeechConstant.SUBJECT, "ise", false);
clone.a(SpeechConstant.RESULT_TYPE, "xml", false);
clone.a(SpeechConstant.VAD_BOS, "5000", false);
clone.a(SpeechConstant.VAD_EOS, "1800", false);
clone.a("vad_speech_timeout", "2147483647", false);
clone.a(C0062ab.c);
return clone.toString();
}
}