吉他调音器专业版 v2.30701.8版本的 MD5 值为:9d8c85f04999890638bf11bd08e611f4
以下内容为反编译后的 BFYConfig.java 源代码,内容仅作参考
package com.bafenyi.zh.bafenyilib.config;
import android.app.Application;
import com.bafenyi.zh.bafenyilib.BFYMethodListener;
import com.bafenyi.zh.bafenyilib.base.BFYBaseActivityLifecycleClassbacks;
import com.bafenyi.zh.bafenyilib.util.PreferenceUtil;
import com.heytap.mcssdk.a.a;
import com.huawei.hms.adapter.internal.CommonCode;
import com.meizu.cloud.pushsdk.constants.PushConstants;
import com.vivo.push.PushClientConstants;
import java.util.ArrayList;
import java.util.regex.Pattern;
import org.json.JSONException;
import org.json.JSONObject;
public class BFYConfig {
public static BFYMethodListener.AdCallBackForInit adCallBackForInit = null;
public static BFYMethodListener.AdCallBackForSplash adCallBackForSplash = null;
public static Application app = null;
public static String appName = null;
public static String appVersion = null;
public static String appVersionCode = null;
public static boolean isTenseCity = true;
public static ArrayList<String> moreAppPics;
public static BFYBaseActivityLifecycleClassbacks myActivityLifecycle;
public static String pkgName;
public static String staticticalAppid;
public static String statisticalAppSecret;
public static String getAdServer() {
String string = PreferenceUtil.getString(a.f2775p, "");
if (string.isEmpty()) {
return "";
}
try {
JSONObject jSONObject = new JSONObject(string);
return jSONObject.isNull("adServer") ? "" : jSONObject.getString("adServer");
} catch (JSONException unused) {
return "";
}
}
public static Application getApp() {
return app;
}
public static String getAppName() {
return PreferenceUtil.getString("appName", "");
}
public static String getAppVersion() {
return PreferenceUtil.getString("appVersion", "");
}
public static String getAppVersionCode() {
return PreferenceUtil.getString("appVersionCode", "");
}
public static String getFlavor() {
return PreferenceUtil.getString("bfyFlavor", "");
}
public static boolean getIsAppMarket() {
return PreferenceUtil.getBoolean("isAppMarket", true);
}
public static String getLastUpdateTime() {
String string = PreferenceUtil.getString(a.f2775p, "");
if (string.isEmpty()) {
return "";
}
try {
JSONObject jSONObject = new JSONObject(string);
return jSONObject.isNull("lastUpdateTime") ? "" : jSONObject.getString("lastUpdateTime");
} catch (JSONException unused) {
return "";
}
}
public static String getMarketUrl() {
String string = PreferenceUtil.getString(a.f2775p, "");
if (string.isEmpty()) {
return "https://m.8fenyi.cn/index.html?language=cn";
}
try {
JSONObject jSONObject = new JSONObject(string);
return jSONObject.isNull("marketUrl") ? "https://m.8fenyi.cn/index.html?language=cn" : jSONObject.getString("marketUrl");
} catch (JSONException unused) {
return "https://m.8fenyi.cn/index.html?language=cn";
}
}
public static ArrayList<String> getMoreAppPics() {
return moreAppPics;
}
public static String getNewForceUpdate() {
String string = PreferenceUtil.getString(a.f2775p, "");
if (string.isEmpty()) {
return "off";
}
try {
JSONObject jSONObject = new JSONObject(string);
return jSONObject.isNull("new_forceUpdate") ? "off" : jSONObject.getString("new_forceUpdate");
} catch (JSONException unused) {
return "off";
}
}
public static String getNewMoreApp() {
String string = PreferenceUtil.getString(a.f2775p, "");
if (string.isEmpty()) {
return "off";
}
try {
JSONObject jSONObject = new JSONObject(string);
return jSONObject.isNull("new_more_app") ? "off" : jSONObject.getString("new_more_app");
} catch (JSONException unused) {
return "off";
}
}
public static String getOaid() {
return PreferenceUtil.getString("oaid", "");
}
public static String getOtherParamsForKey(String str, String str2) {
String string = PreferenceUtil.getString(a.f2775p, "");
if (string.isEmpty()) {
return str2;
}
try {
JSONObject jSONObject = new JSONObject(string);
return jSONObject.isNull(str) ? str2 : jSONObject.getString(str);
} catch (JSONException unused) {
return str2;
}
}
public static String getPkgName() {
return PreferenceUtil.getString(PushClientConstants.TAG_PKG_NAME, "");
}
public static String getStaticticalAppid() {
return PreferenceUtil.getString("staticticalAppid", "");
}
public static String getStatisticalAppSecret() {
return PreferenceUtil.getString("statisticalAppSecret", "");
}
public static boolean getTenseCity() {
if (getFlavor().equals("ceshi") && !getOtherParamsForKey("isNeedAmend", "-1").equals("-1")) {
return getOtherParamsForKey("isNeedAmend", "").equals("on");
}
return isTenseCity;
}
public static String getUpdateApk() {
String string = PreferenceUtil.getString(a.f2775p, "");
if (string.isEmpty()) {
return "";
}
try {
JSONObject jSONObject = new JSONObject(string);
return jSONObject.isNull("updateApk") ? "" : jSONObject.getString("updateApk");
} catch (JSONException unused) {
return "";
}
}
public static String getUpdateVersion() {
String string = PreferenceUtil.getString(a.f2775p, "");
if (string.isEmpty()) {
return PushConstants.PUSH_TYPE_NOTIFY;
}
try {
JSONObject jSONObject = new JSONObject(string);
return jSONObject.isNull(CommonCode.MapKey.UPDATE_VERSION) ? PushConstants.PUSH_TYPE_NOTIFY : Pattern.compile("[^0-9]").matcher(jSONObject.getString(CommonCode.MapKey.UPDATE_VERSION)).replaceAll("");
} catch (JSONException unused) {
return PushConstants.PUSH_TYPE_NOTIFY;
}
}
public static void init(String str, String str2, String str3, String str4, String str5, String str6, String str7, String str8, Application application) {
setApp(application);
setOaid(str8);
init(str, str2, str3, str4, str5, str6, str7, application);
}
public static void setApp(Application application) {
app = application;
}
public static void setAppName(String str) {
PreferenceUtil.put("appName", str);
}
public static void setAppVersion(String str) {
PreferenceUtil.put("appVersion", str);
}
public static void setAppVersionCode(String str) {
PreferenceUtil.put("appVersionCode", str);
}
public static void setFlavor(String str) {
PreferenceUtil.put("bfyFlavor", str);
}
public static void setIsAppMarket(String str) {
PreferenceUtil.put("isAppMarket", (str.contains("juliang") || str.contains("kuaishou")) ? false : true);
}
public static void setMoreAppPics(ArrayList<String> arrayList) {
moreAppPics = arrayList;
}
public static void setOaid(String str) {
PreferenceUtil.put("oaid", str);
}
public static void setPkgName(String str) {
PreferenceUtil.put(PushClientConstants.TAG_PKG_NAME, str);
}
public static void setStaticticalAppid(String str) {
PreferenceUtil.put("staticticalAppid", str);
}
public static void setStatisticalAppSecret(String str) {
PreferenceUtil.put("statisticalAppSecret", str);
}
public static void setTenseCity(boolean z) {
isTenseCity = z;
}
public static void init(String str, String str2, String str3, String str4, String str5, String str6, String str7, Application application) {
setApp(application);
setIsAppMarket(str7);
setFlavor(str7);
setAppName(str);
setPkgName(str2);
setStatisticalAppSecret(str4);
setStaticticalAppid(str3);
setAppVersion(str5);
setAppVersionCode(str6);
BFYBaseActivityLifecycleClassbacks bFYBaseActivityLifecycleClassbacks = new BFYBaseActivityLifecycleClassbacks();
myActivityLifecycle = bFYBaseActivityLifecycleClassbacks;
application.registerActivityLifecycleCallbacks(bFYBaseActivityLifecycleClassbacks);
}
}