Trip On v2.1.2版本的 MD5 值为:55953a6deb5e434bd7a356ea51d31456
以下内容为反编译后的 e.java 源代码,内容仅作参考
package io.dcloud.e.b;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Process;
import android.text.TextUtils;
import android.util.Log;
import com.taobao.weex.common.Constants;
import com.taobao.weex.common.WXConfig;
import com.taobao.weex.el.parse.Operators;
import com.taobao.weex.ui.component.WXBasicComponentType;
import io.dcloud.WebAppActivity;
import io.dcloud.common.DHInterface.IActivityHandler;
import io.dcloud.common.DHInterface.IApp;
import io.dcloud.common.DHInterface.IBoot;
import io.dcloud.common.DHInterface.ICallBack;
import io.dcloud.common.DHInterface.IConfusionMgr;
import io.dcloud.common.DHInterface.IDCloudWebviewClientListener;
import io.dcloud.common.DHInterface.IFeature;
import io.dcloud.common.DHInterface.IFrameView;
import io.dcloud.common.DHInterface.IMgr;
import io.dcloud.common.DHInterface.IOnCreateSplashView;
import io.dcloud.common.DHInterface.IPdrModule;
import io.dcloud.common.DHInterface.ISysEventListener;
import io.dcloud.common.DHInterface.IWebviewStateListener;
import io.dcloud.common.DHInterface.ReceiveSystemEventVoucher;
import io.dcloud.common.adapter.io.DHFile;
import io.dcloud.common.adapter.io.UnicodeInputStream;
import io.dcloud.common.adapter.ui.AdaFrameView;
import io.dcloud.common.adapter.ui.webview.WebViewFactory;
import io.dcloud.common.adapter.util.AndroidResources;
import io.dcloud.common.adapter.util.DeviceInfo;
import io.dcloud.common.adapter.util.Logger;
import io.dcloud.common.adapter.util.MessageHandler;
import io.dcloud.common.adapter.util.MobilePhoneModel;
import io.dcloud.common.adapter.util.PermissionUtil;
import io.dcloud.common.adapter.util.PlatformUtil;
import io.dcloud.common.adapter.util.SP;
import io.dcloud.common.constant.AbsoluteConst;
import io.dcloud.common.constant.DOMException;
import io.dcloud.common.constant.IntentConst;
import io.dcloud.common.core.permission.PermissionControler;
import io.dcloud.common.util.ADUtils;
import io.dcloud.common.util.AppRuntime;
import io.dcloud.common.util.AppStatus;
import io.dcloud.common.util.AppStatusBarManager;
import io.dcloud.common.util.AppStreamUtil;
import io.dcloud.common.util.Base64;
import io.dcloud.common.util.BaseInfo;
import io.dcloud.common.util.CreateShortResultReceiver;
import io.dcloud.common.util.IOUtil;
import io.dcloud.common.util.JSONUtil;
import io.dcloud.common.util.LoadAppUtils;
import io.dcloud.common.util.Md5Utils;
import io.dcloud.common.util.NetworkTypeUtil;
import io.dcloud.common.util.PdrUtil;
import io.dcloud.common.util.StringUtil;
import io.dcloud.common.util.TestUtil;
import io.dcloud.common.util.ThreadPool;
import io.dcloud.common.util.XmlUtil;
import io.dcloud.common.util.Zip4JUtil;
import io.dcloud.common.util.ZipUtils;
import io.dcloud.feature.gg.dcloud.ADSim;
import io.dcloud.feature.internal.sdk.SDK;
import io.src.dcloud.adapter.DCloudAdapterUtil;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLDecoder;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class e extends io.dcloud.e.b.f implements IApp, ISysEventListener {
public static String r = "webapp";
ArrayList<String> B0;
private String R0;
private String f0;
private String g0;
private String h0;
private String i0;
g s;
private boolean s1;
private IConfusionMgr u1;
private String v1;
io.dcloud.e.b.a y;
BaseInfo.BaseAppInfo t = null;
byte u = 1;
boolean v = false;
boolean w = false;
boolean x = false;
String z = null;
String A = "";
String B = "";
String C = "";
String D = null;
String E = "";
String F = null;
String G = null;
String H = null;
String I = null;
String J = null;
String K = null;
String L = null;
boolean M = true;
boolean N = true;
boolean O = true;
boolean P = false;
boolean Q = false;
boolean R = true;
boolean S = false;
private String T = null;
boolean U = false;
private byte V = 1;
private boolean W = false;
private boolean X = false;
private boolean Y = true;
private boolean Z = true;
private int a0 = ADSim.INTISPLSH;
private int b0 = 0;
private int c0 = 0;
private String d0 = null;
private String e0 = null;
boolean j0 = false;
private String k0 = null;
String l0 = null;
String m0 = null;
String n0 = null;
boolean o0 = false;
String p0 = "accept";
String q0 = "file:///android_asset/data/dcloud_error.html";
String r0 = null;
private String s0 = null;
String t0 = null;
private String u0 = "-1";
private JSONObject v0 = null;
private String w0 = "";
private boolean x0 = true;
private boolean y0 = false;
private String z0 = AbsoluteConst.UNI_V3;
private String A0 = "fast";
HashMap<ISysEventListener.SysEventType, ArrayList<ISysEventListener>> C0 = null;
JSONObject D0 = null;
JSONObject E0 = null;
JSONObject F0 = null;
JSONObject G0 = null;
JSONObject H0 = null;
JSONObject I0 = null;
JSONObject J0 = null;
JSONObject K0 = null;
JSONObject L0 = null;
String M0 = null;
String N0 = null;
Intent O0 = null;
IApp.IAppStatusListener P0 = null;
String Q0 = null;
private String S0 = "none";
boolean T0 = false;
private boolean U0 = false;
private boolean V0 = false;
private String W0 = "default";
private String X0 = null;
private String Y0 = null;
private String Z0 = null;
private String a1 = "";
protected boolean b1 = false;
private boolean c1 = false;
private boolean d1 = false;
private String e1 = null;
private String f1 = null;
private boolean g1 = false;
long h1 = 0;
boolean i1 = true;
boolean j1 = false;
boolean k1 = false;
ArrayList<String> l1 = new ArrayList<>();
ArrayList<String> m1 = new ArrayList<>();
String n1 = null;
String o1 = null;
private String p1 = "";
private boolean q1 = false;
private String r1 = null;
private int t1 = 1;
IWebviewStateListener w1 = null;
boolean x1 = false;
JSONObject y1 = null;
private boolean z1 = false;
private String A1 = "none";
private String B1 = AbsoluteConst.INSTALL_OPTIONS_FORCE;
private String C1 = null;
private String D1 = null;
boolean E1 = true;
HashMap<String, Integer> F1 = null;
String G1 = null;
boolean H1 = false;
public class a implements Runnable {
a() {
}
@Override
public void run() {
try {
DHFile.deleteFile(BaseInfo.sBaseWap2AppTemplatePath + "wap2app_temp/");
} catch (IOException e) {
e.printStackTrace();
}
}
}
public class b implements Runnable {
b() {
}
@Override
public void run() {
try {
DHFile.deleteFile(BaseInfo.sBaseWap2AppTemplatePath + "wap2app_temp/");
DHFile.deleteFile(BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template.zip");
} catch (IOException e) {
e.printStackTrace();
}
}
}
public class c implements Runnable {
final ICallBack a;
class a implements MessageHandler.IMessages {
a() {
}
@Override
public void execute(Object obj) {
c.this.a.onCallBack(0, null);
}
}
c(ICallBack iCallBack) {
this.a = iCallBack;
}
@Override
public void run() {
String str = BaseInfo.sCacheFsAppsPath + e.this.p + DeviceInfo.sSeparatorChar + BaseInfo.APP_WWW_FS_DIR;
long currentTimeMillis = System.currentTimeMillis();
Logger.d(e.r, e.this.p + " copy resoure begin!!!");
DHFile.delete(str);
DHFile.copyDir(e.this.k0, str);
long currentTimeMillis2 = System.currentTimeMillis();
Logger.d(e.r, e.this.p + " copy resoure end!!! useTime=" + (currentTimeMillis2 - currentTimeMillis));
e.this.V = (byte) 0;
e.this.setAppDataPath(str);
e eVar = e.this;
BaseInfo.BaseAppInfo baseAppInfo = eVar.t;
if (baseAppInfo != null) {
baseAppInfo.saveToBundleData(eVar.getActivity());
}
MessageHandler.sendMessage(new a(), null);
}
}
public class d implements Runnable {
final String a;
d(String str) {
this.a = str;
}
@Override
public void run() {
TestUtil.PointTime.commitTid(e.this.getActivity(), this.a, null, e.this.N0, 1);
}
}
public class RunnableC0061e implements Runnable {
RunnableC0061e() {
}
@Override
public void run() {
try {
DHFile.deleteFile(e.this.obtainAppTempPath());
} catch (IOException e) {
e.printStackTrace();
}
}
}
static class f {
static final int[] a;
static {
int[] iArr = new int[IApp.ConfigProperty.ThridInfo.values().length];
a = iArr;
try {
iArr[IApp.ConfigProperty.ThridInfo.OverrideUrlJsonData.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[IApp.ConfigProperty.ThridInfo.OverrideResourceJsonData.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
a[IApp.ConfigProperty.ThridInfo.SecondWebviewJsonData.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
a[IApp.ConfigProperty.ThridInfo.LaunchWebviewJsonData.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
a[IApp.ConfigProperty.ThridInfo.TitleNViewJsonData.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
a[IApp.ConfigProperty.ThridInfo.SitemapJsonData.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
a[IApp.ConfigProperty.ThridInfo.URDJsonData.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
try {
a[IApp.ConfigProperty.ThridInfo.DirectPageJsonData.ordinal()] = 8;
} catch (NoSuchFieldError unused8) {
}
try {
a[IApp.ConfigProperty.ThridInfo.Tabbar.ordinal()] = 9;
} catch (NoSuchFieldError unused9) {
}
}
}
public e(io.dcloud.e.b.a aVar, String str, byte b2) {
this.s = null;
this.y = null;
this.B0 = null;
this.s1 = false;
this.y = aVar;
this.p = str;
b(b2);
this.u1 = io.dcloud.e.c.b.c();
this.s = new g();
this.B0 = new ArrayList<>(2);
this.s1 = AppRuntime.isUniApp(str);
}
private void d() {
}
private void e() {
JSONObject jSONObject = this.K0;
if (jSONObject != null) {
try {
String optString = jSONObject.optString("webviewid");
if (TextUtils.isEmpty(optString)) {
this.K0.put("webviewid", IntentConst.DIRECT_PAGE);
}
if (this.p.equals(optString)) {
this.J0 = this.K0.optJSONObject("titleNView");
return;
}
JSONObject optJSONObject = this.K0.has("titleNView") ? this.K0.optJSONObject("titleNView") : null;
if (optJSONObject == null) {
optJSONObject = new JSONObject();
this.K0.put("titleNView", optJSONObject);
}
optJSONObject.put("autoBackButton", true);
if (optJSONObject.has("homeButton")) {
return;
}
optJSONObject.put("homeButton", true);
} catch (JSONException e) {
e.printStackTrace();
}
}
}
private boolean e(String str) {
return false;
}
private void f() {
try {
int rename = DHFile.rename(BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template/", BaseInfo.sBaseWap2AppTemplatePath + "wap2app_temp/");
DHFile.copyDir("data/wap2app", BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template/");
if (rename == 1) {
ThreadPool.self().addThreadTask(new a());
}
} catch (IOException e) {
e.printStackTrace();
}
}
private JSONObject h() {
JSONObject jSONObject = null;
try {
InputStream obtainResInStream = obtainResInStream("_www/__template.json");
if (obtainResInStream != null) {
jSONObject = a(obtainResInStream);
IOUtil.close(obtainResInStream);
return jSONObject;
}
return null;
} catch (Exception e) {
e.printStackTrace();
return jSONObject;
}
}
private JSONObject i() {
ThreadPool self;
b bVar;
JSONObject jSONObject = null;
try {
boolean z = true;
boolean z2 = false;
if (BaseInfo.sCoverApkRuning) {
if (new File(BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template/__template.json").exists()) {
InputStream inputStream = PlatformUtil.getInputStream(BaseInfo.sBaseConfigTemplatePath);
JSONObject a2 = a(inputStream);
String optString = a2.optString("version");
IOUtil.close(inputStream);
InputStream inputStream2 = DHFile.getInputStream(BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template/__template.json");
JSONObject a3 = a(inputStream2);
String optString2 = a3.optString("version");
IOUtil.close(inputStream2);
BaseInfo.mWap2appTemplateFiles.clear();
BaseInfo.mW2AE.clear();
if (BaseInfo.BaseAppInfo.compareVersion(optString, optString2)) {
f();
jSONObject = a2;
z2 = true;
} else {
jSONObject = a3;
}
}
}
if (DHFile.isExist(BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template.zip")) {
DHFile.rename(BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template/", BaseInfo.sBaseWap2AppTemplatePath + "wap2app_temp/");
try {
ZipUtils.upZipFile(new File(BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template.zip"), BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template/");
self = ThreadPool.self();
bVar = new b();
} catch (IOException e) {
e.printStackTrace();
self = ThreadPool.self();
bVar = new b();
z = z2;
}
self.addThreadTask(bVar);
} else {
if (new File(BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template/__template.json").exists()) {
z = z2;
} else {
f();
}
}
if (z || TextUtils.isEmpty(BaseInfo.sWap2AppTemplateVersion) || BaseInfo.mWap2appTemplateFiles.size() == 0 || this.u1.getData("__w2a__template__") == null) {
if (DHFile.isExist(BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template/__template.json")) {
InputStream inputStream3 = DHFile.getInputStream(BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template/__template.json");
jSONObject = a(inputStream3);
IOUtil.close(inputStream3);
BaseInfo.mWap2appTemplateFiles.clear();
BaseInfo.mW2AE.clear();
this.u1.removeData("__w2a__template__");
return jSONObject;
}
return jSONObject;
}
return jSONObject;
} catch (Exception e2) {
e2.printStackTrace();
return jSONObject;
}
}
private void l() {
String[] split;
this.F1 = new HashMap<>();
String string = SP.getOrCreateBundle(getActivity(), this.p + "_1").getString("Authorize", null);
this.G1 = string;
if (string == null || (split = string.split("&")) == null || split.length <= 0) {
return;
}
for (String str : split) {
if (!TextUtils.isEmpty(str)) {
String[] split2 = str.split("=");
this.F1.put(split2[0], Integer.valueOf(Integer.parseInt(split2[1])));
}
}
}
private void x() {
boolean z;
Context activity;
String handleEncryption;
if (BaseInfo.isWap2AppAppid(this.p)) {
JSONObject i = i();
String optString = i == null ? BaseInfo.sWap2AppTemplateVersion : i.optString("version");
try {
JSONObject h = h();
if (h != null) {
String optString2 = h.optString("version");
if (!TextUtils.isEmpty(optString2) && BaseInfo.BaseAppInfo.compareVersion(optString2, optString)) {
DHFile.deleteFile(BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template/");
BaseInfo.mWap2appTemplateFiles.clear();
BaseInfo.mW2AE.clear();
optString = optString2;
i = h;
z = true;
if (BaseInfo.mWap2appTemplateFiles.size() == 0) {
if (i != null && i.has("files")) {
JSONArray optJSONArray = i.optJSONArray("files");
int length = optJSONArray.length();
boolean z2 = obtainRunningAppMode() == 1;
for (int i2 = 0; i2 < length; i2++) {
String optString3 = optJSONArray.optString(i2);
BaseInfo.mWap2appTemplateFiles.add(optString3);
if (z) {
if (z2) {
DHFile.copyAssetsFile(BaseInfo.sBaseResAppsPath + this.p + "/www/" + optString3, BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template/" + optString3);
} else {
DHFile.copyFile(BaseInfo.sCacheFsAppsPath + this.p + "/www/" + optString3, BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template/" + optString3, true, false);
}
}
}
if (z && !BaseInfo.mWap2appTemplateFiles.contains("__template.json")) {
if (z2) {
DHFile.copyAssetsFile(BaseInfo.sBaseResAppsPath + this.p + "/www/__template.json", BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template/__template.json");
} else {
DHFile.copyFile(BaseInfo.sCacheFsAppsPath + this.p + "/www/__template.json", BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template/__template.json", true, false);
}
}
} else {
String[] list = new File(BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template/").list();
if (list != null) {
for (String str : list) {
BaseInfo.mWap2appTemplateFiles.add(str);
}
}
}
}
if ((!z || this.u1.getData("__w2a__template__") == null) && i != null && i.has(IApp.ConfigProperty.CONFIG_CONFUSION)) {
byte[] decode2bytes = Base64.decode2bytes(i.optString(IApp.ConfigProperty.CONFIG_CONFUSION));
activity = getActivity();
if (activity == null) {
activity = DeviceInfo.sApplicationContext;
}
handleEncryption = this.u1.handleEncryption(activity, decode2bytes);
if (PdrUtil.isEmpty(handleEncryption)) {
handleEncryption = "{}";
}
this.u1.removeData("__w2a__template__");
this.u1.recordEncryptionResources("__w2a__template__", new JSONObject(handleEncryption));
}
BaseInfo.sTemplateModifyTime = new File(BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template/__template.json").lastModified();
BaseInfo.sWap2AppTemplateVersion = optString;
this.D = optString;
}
}
z = false;
if (BaseInfo.mWap2appTemplateFiles.size() == 0) {
}
if (!z) {
}
byte[] decode2bytes2 = Base64.decode2bytes(i.optString(IApp.ConfigProperty.CONFIG_CONFUSION));
activity = getActivity();
if (activity == null) {
}
handleEncryption = this.u1.handleEncryption(activity, decode2bytes2);
if (PdrUtil.isEmpty(handleEncryption)) {
}
this.u1.removeData("__w2a__template__");
this.u1.recordEncryptionResources("__w2a__template__", new JSONObject(handleEncryption));
BaseInfo.sTemplateModifyTime = new File(BaseInfo.sBaseWap2AppTemplatePath + "wap2app__template/__template.json").lastModified();
BaseInfo.sWap2AppTemplateVersion = optString;
this.D = optString;
} catch (Exception e) {
e.printStackTrace();
}
}
}
@Override
public void addAllFeaturePermission() {
PermissionControler.registerRootPermission(this.p);
}
@Override
public void addFeaturePermission(String str) {
this.B0.add(str.toLowerCase(Locale.ENGLISH));
}
@Override
public void applyMani() {
try {
a(DHFile.getInputStream(DHFile.createFileHandler(a(BaseInfo.sConfigXML))), this.p, null);
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
public void applySmartUpdate() {
a(false);
}
public void b(InputStream inputStream) {
}
public boolean b(String str, JSONObject jSONObject) {
boolean z;
HashMap<String, BaseInfo.BaseAppInfo> hashMap;
boolean z2 = false;
InputStream inputStream = null;
try {
try {
this.p = str;
this.u1.removeData(str);
k();
} catch (Exception e) {
Logger.w("parseConfig", e);
}
if (this.V != 0 && ((hashMap = BaseInfo.mBaseAppInfoSet) == null || hashMap.containsKey(this.p))) {
if (this.V == 1) {
inputStream = PlatformUtil.getResInputStream(a(BaseInfo.sConfigXML));
}
if (BaseInfo.isWap2AppAppid(this.p)) {
z = true;
} else {
x();
z = false;
}
if (inputStream != null) {
if (!BaseInfo.isWap2AppAppid(this.p) || TextUtils.isEmpty(this.n1)) {
if (!q() || TextUtils.isEmpty(this.r0)) {
g gVar = this.s;
gVar.a = true;
if (gVar.c) {
gVar.b = DOMException.toJSON((int) DOMException.CODE_RUNTIME_WGTU_WWW_MANIFEST_NOT_EXIST, DOMException.MSG_RUNTIME_WGTU_WWW_MANIFEST_NOT_EXIST);
} else {
gVar.b = DOMException.toJSON((int) DOMException.CODE_RUNTIME_WGT_MANIFEST_NOT_EXIST, DOMException.MSG_RUNTIME_WGT_MANIFEST_NOT_EXIST);
}
return false;
}
return true;
}
return true;
}
z2 = a(inputStream, str, jSONObject);
if (z) {
x();
}
g gVar2 = this.s;
if (gVar2 != null && gVar2.a) {
Logger.i("WebApp", "InstallError---msg=" + this.s.b);
}
IActivityHandler iActivityHandler = DCloudAdapterUtil.getIActivityHandler(getActivity());
if (iActivityHandler != null) {
iActivityHandler.updateSplash(this.t0);
}
this.v = true;
return z2;
}
inputStream = DHFile.getInputStream(DHFile.createFileHandler(a(BaseInfo.sConfigXML)));
if (inputStream == null && (inputStream = PlatformUtil.getResInputStream(a(BaseInfo.sConfigXML))) != null) {
this.V = (byte) 1;
}
if (BaseInfo.isWap2AppAppid(this.p)) {
}
if (inputStream != null) {
}
} finally {
IOUtil.close((InputStream) null);
}
}
public void c() {
Activity activity = this.a;
if (activity != null && (activity instanceof WebAppActivity)) {
((WebAppActivity) activity).onAppActive(this.p);
((WebAppActivity) this.a).onAppActive(this);
}
diyStatusBarState();
setStatus((byte) 3);
this.b.onAppActive(this);
callSysEventListener(ISysEventListener.SysEventType.onWebAppForeground, IntentConst.obtainArgs(obtainWebAppIntent(), this.p));
}
@Override
public boolean callSysEventListener(ISysEventListener.SysEventType sysEventType, Object obj) {
HashMap<ISysEventListener.SysEventType, ArrayList<ISysEventListener>> hashMap = this.C0;
boolean z = false;
if (hashMap == null) {
return false;
}
ArrayList<ISysEventListener> arrayList = hashMap.get(sysEventType);
ArrayList<ISysEventListener> arrayList2 = this.C0.get(ISysEventListener.SysEventType.AllSystemEvent);
ArrayList arrayList3 = new ArrayList();
if (arrayList != null) {
arrayList3.addAll(arrayList);
}
if (arrayList2 != null) {
arrayList3.addAll(arrayList2);
}
for (int size = arrayList3.size() - 1; size >= 0; size--) {
ISysEventListener iSysEventListener = (ISysEventListener) arrayList3.get(size);
if (a(iSysEventListener, sysEventType) && (z || iSysEventListener.onExecute(sysEventType, obj)) && !a(sysEventType)) {
break;
}
}
return z;
}
@Override
public boolean checkIsCustomPath() {
return this.o0;
}
@Override
public void checkOrLoadlaunchWebview() {
io.dcloud.e.b.a aVar = this.y;
if (aVar != null) {
AdaFrameView adaFrameView = (AdaFrameView) aVar.processEvent(IMgr.MgrType.WindowMgr, 46, obtainAppId());
Logger.d("Direct_page", "checkOrLoadlaunchWebview " + manifestBeParsed() + ";adaFrameView=" + adaFrameView);
this.x1 = manifestBeParsed() ^ true;
if (adaFrameView == null || !manifestBeParsed()) {
return;
}
adaFrameView.obtainWebView().checkIfNeedLoadOriginalUrl();
}
}
@Override
public boolean checkPrivateDir(String str) {
return str.startsWith(obtainAppDataPath()) || str.startsWith(BaseInfo.REL_PRIVATE_WWW_DIR);
}
@Override
public String checkPrivateDirAndCopy2Temp(String str) {
if (obtainRunningAppMode() == 1 && checkPrivateDir(str)) {
String str2 = "/" + BaseInfo.APP_WWW_FS_DIR;
String substring = str.substring(str.indexOf(str2) + str2.length());
String str3 = this.k0 + substring;
str = obtainAppTempPath() + substring;
if (!DHFile.exists(str)) {
DHFile.copyAssetsFile(str3, str);
}
}
return str;
}
@Override
public boolean checkSchemeWhite(String str) {
if (q()) {
if (TextUtils.isEmpty(str)) {
return false;
}
Iterator<String> it = this.m1.iterator();
while (it.hasNext()) {
String next = it.next();
if (!TextUtils.equals(next, "*")) {
if (str.startsWith(next + ":")) {
}
}
return true;
}
return false;
}
return true;
}
@Override
public boolean checkWhiteUrl(String str) {
if (TextUtils.isEmpty(str)) {
return false;
}
return this.l1.contains("*") || this.l1.contains(str);
}
@Override
public void clearRuntimeArgs() {
this.E = "";
}
@Override
public String convert2AbsFullPath(String str, String str2) {
boolean z = true;
try {
if (!PdrUtil.isEmpty(str2)) {
if (this.V == 1 && PlatformUtil.isResFileExists(str2)) {
return str2;
}
if (DHFile.isExist(str2)) {
return str2;
}
}
} catch (IOException e) {
e.printStackTrace();
}
if (PdrUtil.isEmpty(str2)) {
return str2;
}
int indexOf = str2.indexOf(Operators.CONDITION_IF_STRING);
if (indexOf > 0) {
str2 = str2.substring(0, indexOf);
}
if (str2.startsWith("_documents/")) {
return BaseInfo.sDocumentFullPath + str2.substring(11);
} else if (str2.startsWith(BaseInfo.REL_PUBLIC_DOCUMENTS_DIR)) {
return BaseInfo.sDocumentFullPath + str2.substring(10);
} else if (str2.startsWith(AbsoluteConst.MINI_SERVER_APP_DOC)) {
return obtainAppDocPath() + str2.substring(5);
} else if (str2.startsWith(BaseInfo.REL_PRIVATE_DOC_DIR)) {
return obtainAppDocPath() + str2.substring(4);
} else if (str2.startsWith("_downloads/")) {
return BaseInfo.sDownloadFullPath + str2.substring(11);
} else if (str2.startsWith(BaseInfo.REL_PUBLIC_DOWNLOADS_DIR)) {
return BaseInfo.sDownloadFullPath + str2.substring(10);
} else if (str2.startsWith(AbsoluteConst.MINI_SERVER_APP_WWW)) {
byte b2 = this.V;
if (b2 != 1) {
if (b2 == 0) {
return this.k0 + str2.substring(5);
}
return str2;
}
return BaseInfo.sBaseResAppsPath + this.p + "/" + BaseInfo.APP_WWW_FS_DIR + str2.substring(5);
} else if (str2.startsWith(BaseInfo.REL_PRIVATE_WWW_DIR)) {
byte b3 = this.V;
if (b3 != 1) {
if (b3 == 0) {
return this.k0 + str2.substring(4);
}
return str2;
}
return BaseInfo.sBaseResAppsPath + this.p + "/" + BaseInfo.APP_WWW_FS_DIR + str2.substring(4);
} else if (str2.startsWith(DeviceInfo.FILE_PROTOCOL)) {
return str2.substring(7);
} else {
if (str2.startsWith("content://") || str2.startsWith(DeviceInfo.sDeviceRootDir)) {
return str2;
}
if (str2.startsWith("http://localhost")) {
String substring = str2.substring(16);
return convert2AbsFullPath(null, substring.substring(substring.indexOf("/") + 1));
}
if (!str2.startsWith("/") && str != null) {
z = false;
} else if (str2.startsWith("/")) {
str2 = str2.substring(1);
}
if (str != null) {
if (str.startsWith(SDK.ANDROID_ASSET)) {
str = str.substring(22);
} else if (str.startsWith(DeviceInfo.FILE_PROTOCOL)) {
str = str.substring(7);
}
}
if (str == null || z) {
if (z) {
String obtainAppDataPath = obtainAppDataPath();
if (str != null && !PdrUtil.isEquals(str, obtainAppDataPath) && str.contains("/www/")) {
obtainAppDataPath = str.substring(0, str.indexOf("/www/") + 5);
}
return obtainAppDataPath + b(str2);
}
return str2;
}
return PdrUtil.standardizedURL(str, str2);
}
}
@Override
public String convert2LocalFullPath(String str, String str2) {
InputStream inputStream;
String convert2AbsFullPath = convert2AbsFullPath(str, str2);
byte b2 = this.V;
if (b2 == 1 || DeviceInfo.isPrivateDirectory) {
if (b2 == 1) {
inputStream = PlatformUtil.getResInputStream(convert2AbsFullPath);
} else {
inputStream = PlatformUtil.getInputStream(convert2AbsFullPath);
}
if (inputStream != null) {
convert2AbsFullPath = obtainAppTempPath() + System.currentTimeMillis();
try {
DHFile.writeFile(inputStream, convert2AbsFullPath);
inputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
} else if (b2 == 0) {
return convert2AbsFullPath;
}
return convert2AbsFullPath;
}
@Override
public String convert2RelPath(String str) {
int i;
int i2;
int i3;
int i4;
try {
int length = obtainAppDataPath().length();
int length2 = obtainAppDocPath().length();
int length3 = BaseInfo.sDocumentFullPath.length();
int length4 = BaseInfo.sDownloadFullPath.length();
if (str.startsWith(obtainAppDataPath())) {
str = BaseInfo.REL_PRIVATE_WWW_DIR + str.substring(length - 1);
} else {
if (str.startsWith(obtainAppDataPath().substring(0, length - 1))) {
str = BaseInfo.REL_PRIVATE_WWW_DIR + str.substring(i, str.length());
} else if (str.startsWith(obtainAppDocPath())) {
str = BaseInfo.REL_PRIVATE_DOC_DIR + str.substring(length2 - 1);
} else {
if (str.startsWith(obtainAppDocPath().substring(0, length2 - 1))) {
str = BaseInfo.REL_PRIVATE_DOC_DIR + str.substring(i2);
} else if (str.startsWith(BaseInfo.sDocumentFullPath)) {
str = BaseInfo.REL_PUBLIC_DOCUMENTS_DIR + str.substring(length3 - 1);
} else {
if (str.startsWith(BaseInfo.sDocumentFullPath.substring(0, length3 - 1))) {
str = BaseInfo.REL_PUBLIC_DOCUMENTS_DIR + str.substring(i3);
} else if (str.startsWith(BaseInfo.sDownloadFullPath)) {
str = BaseInfo.REL_PUBLIC_DOWNLOADS_DIR + str.substring(length4 - 1);
} else {
if (str.startsWith(BaseInfo.sDownloadFullPath.substring(0, length4 - 1))) {
str = BaseInfo.REL_PUBLIC_DOWNLOADS_DIR + str.substring(i4);
}
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
return str;
}
@Override
public String convert2WebviewFullPath(String str, String str2) {
if (PdrUtil.isEmpty(str2)) {
return str2;
}
if (this.U) {
if (str2.startsWith(DeviceInfo.HTTP_PROTOCOL)) {
return str2;
}
return this.s0 + str2;
} else if (str2.startsWith(DeviceInfo.FILE_PROTOCOL) || str2.startsWith(DeviceInfo.HTTP_PROTOCOL) || str2.startsWith(DeviceInfo.HTTPS_PROTOCOL)) {
return str2;
} else {
try {
if (DHFile.isExist(str2)) {
return "file:///" + b(str2);
}
} catch (IOException e) {
e.printStackTrace();
}
if (str2.startsWith(DeviceInfo.sDeviceRootDir)) {
return DeviceInfo.FILE_PROTOCOL + str2;
}
boolean z = true;
if (str2.startsWith("/")) {
str2 = str2.substring(1);
} else {
z = false;
}
if (str2.startsWith(BaseInfo.REL_PRIVATE_WWW_DIR)) {
return obtainWebviewBaseUrl() + b(str2.substring(4));
} else if (str2.startsWith(BaseInfo.REL_PUBLIC_DOCUMENTS_DIR)) {
return DeviceInfo.FILE_PROTOCOL + BaseInfo.sDocumentFullPath + b(str2.substring(10));
} else if (str2.startsWith(BaseInfo.REL_PRIVATE_DOC_DIR)) {
return DeviceInfo.FILE_PROTOCOL + obtainAppDocPath() + b(str2.substring(4));
} else if (str2.startsWith(BaseInfo.REL_PUBLIC_DOWNLOADS_DIR)) {
return DeviceInfo.FILE_PROTOCOL + BaseInfo.sDownloadFullPath + b(str2.substring(10));
} else if (str != null && !z) {
return PdrUtil.standardizedURL(str, str2);
} else {
String obtainWebviewBaseUrl = obtainWebviewBaseUrl();
if (str != null && !PdrUtil.isEquals(str, obtainWebviewBaseUrl) && str.contains("/www/")) {
obtainWebviewBaseUrl = str.substring(0, str.indexOf("/www/") + 5);
}
return obtainWebviewBaseUrl + b(str2);
}
}
}
JSONObject d(String str) {
if (this.y1 == null) {
m();
}
if (this.y1 == null || TextUtils.isEmpty(str)) {
return null;
}
return PdrUtil.getSitemapParameters(this.y1, obtainAppId(), str);
}
@Override
public void deleteAppTemp() {
ThreadPool.self().addThreadTask(new RunnableC0061e(), true);
}
@Override
public void diyStatusBarState() {
AppStatusBarManager appStatusBarManager = this.m;
if (appStatusBarManager == null) {
return;
}
if (this.i) {
appStatusBarManager.setFullScreen(getActivity(), this.i);
} else {
if (appStatusBarManager.checkImmersedStatusBar(getActivity(), this.b1)) {
BaseInfo.isImmersive = true;
this.m.setImmersive(getActivity(), true);
} else {
BaseInfo.isImmersive = false;
this.m.setImmersive(getActivity(), false);
}
if (Build.VERSION.SDK_INT >= 21 && getActivity() != null) {
if (!PdrUtil.isEmpty(this.X0)) {
this.m.setStatusBarColor(getActivity(), this.X0.startsWith("#") ? PdrUtil.stringToColor(this.X0) : 0);
} else {
this.m.setStatusBarColor(getActivity(), BaseInfo.mDeStatusBarBackground);
}
}
this.m.setStatusBarMode(getActivity(), this.a1);
}
if (this.m.isFullScreenOrImmersive()) {
updateScreenInfo(2);
}
}
@Override
public String forceShortCut() {
return this.B1;
}
public boolean g(String str) {
setRuntimeArgs(str);
setStatus((byte) 3);
Object processEvent = this.y.processEvent(IMgr.MgrType.WindowMgr, 41, new Object[]{this, convert2WebviewFullPath(null, this.r0), Boolean.valueOf(this.T0)});
if (processEvent == null) {
return true;
}
return Boolean.parseBoolean(String.valueOf(processEvent));
}
@Override
public IConfusionMgr getConfusionMgr() {
return this.u1;
}
@Override
public String getDirectPage() {
return this.n1;
}
@Override
public IApp.IAppStatusListener getIAppStatusListener() {
return this.P0;
}
@Override
public String getOriginalDirectPage() {
return this.o1;
}
@Override
public String getPathByType(byte b2) {
if (b2 == 0) {
return obtainAppDataPath();
}
if (b2 == 1) {
return obtainAppDocPath();
}
if (b2 == 2) {
return BaseInfo.sDocumentFullPath;
}
if (b2 == 3) {
return BaseInfo.sDownloadFullPath;
}
if (b2 == -1) {
return BaseInfo.sBaseResAppsPath + this.p + "/" + BaseInfo.APP_WWW_FS_DIR;
}
return null;
}
@Override
public String getPopGesture() {
return this.S0;
}
@Override
public int getQuitModel() {
return this.t1;
}
@Override
public String getSystemInfo() {
try {
if (DeviceInfo.sSystemInfo != null) {
JSONObject jSONObject = new JSONObject(DeviceInfo.sSystemInfo.toString());
jSONObject.put("uniCompileVersion", this.u0);
jSONObject.put("uniRuntimeVersion", BaseInfo.uniVersionV3);
jSONObject.put("browserName", WebViewFactory.isOther() ? "x5webview" : "chrome");
jSONObject.put("appId", BaseInfo.sCurrentAppOriginalAppid);
jSONObject.put(WXConfig.appName, this.t0);
if (SDK.isUniMP) {
jSONObject.put(WXConfig.appVersion, this.A);
jSONObject.put("appVersionCode", this.B);
} else {
jSONObject.put(WXConfig.appVersion, b(getActivity()));
jSONObject.put("appVersionCode", a((Context) getActivity()));
}
jSONObject.put("appWgtVersion", this.A);
return jSONObject.toString();
}
return null;
} catch (Exception unused) {
return null;
}
}
@Override
public boolean isOnAppRunningMode() {
return this.V == 1;
}
@Override
public boolean isUniApp() {
return this.s1;
}
public float j() {
return (PermissionControler.checkPermission(this.p, IFeature.F_DEVICE.toLowerCase(Locale.ENGLISH)) && getActivity() != null && NetworkTypeUtil.getNetworkType(getActivity()) == 4) ? 1000.0f : 0.0f;
}
void k() {
if (PdrUtil.isEmpty(this.k0) || !DeviceInfo.startsWithSdcard(this.k0)) {
setAppDataPath(BaseInfo.sCacheFsAppsPath + this.p + "/" + BaseInfo.REAL_PRIVATE_WWW_DIR);
}
if (PdrUtil.isEmpty(this.C1) || !DeviceInfo.startsWithSdcard(this.C1)) {
setAppDocPath(BaseInfo.sBaseFsAppsPath + this.p + "/" + BaseInfo.REAL_PRIVATE_DOC_DIR);
}
if (PdrUtil.isEmpty(this.D1) || !DeviceInfo.startsWithSdcard(this.D1)) {
this.D1 = BaseInfo.sCacheFsAppsPath + this.p + "/" + BaseInfo.APP_WEB_CHACHE;
}
}
void m() {
File file = new File(c(this.p));
if (file.exists()) {
try {
JSONObject jSONObject = new JSONObject(IOUtil.toString(new FileInputStream(file)));
this.y1 = jSONObject;
this.C = jSONObject.optString("version");
return;
} catch (Exception e) {
e.printStackTrace();
return;
}
}
byte[] fileContent = PlatformUtil.getFileContent("data/sitemap/" + this.p + ".json", 0);
if (fileContent != null) {
DHFile.writeFile(fileContent, 0, c(this.p));
m();
}
}
@Override
public boolean manifestBeParsed() {
return this.v || SDK.IntegratedMode.WEBVIEW == BaseInfo.sRuntimeMode;
}
public boolean n() {
if (q() && this.v) {
return this.P;
}
return true;
}
@Override
public boolean needRefreshApp() {
return this.k1;
}
@Override
public boolean needReload() {
return this.j1;
}
public boolean o() {
String str;
if (PdrUtil.isEmpty(BaseInfo.uniVersionV3)) {
String str2 = "uni-jsframework-dev.js";
try {
str = new JSONObject(new BufferedReader(new InputStreamReader(getActivity().getAssets().open((!BaseInfo.SyncDebug || PlatformUtil.getResInputStream("uni-jsframework-dev.js") == null || SDK.isUniMPSDK()) ? "uni-jsframework.js" : "uni-jsframework.js"))).readLine().substring(2)).optString("version");
BaseInfo.uniVersionV3 = str;
} catch (IOException | JSONException unused) {
str = "";
}
} else {
str = BaseInfo.uniVersionV3;
}
return ((!PdrUtil.isEmpty(this.w0) && this.w0.contains(str) && !this.x0) || this.y0 || !this.v || this.u0.equals("-1") || this.u0.trim().equals(str) || PdrUtil.isEmpty(str) || !this.s1) ? false : true;
}
@Override
public String obtainAdaptationJs() {
if (this.T == null && !PdrUtil.isEmpty(this.K)) {
byte[] fileContent = PlatformUtil.getFileContent(a(this.K), obtainRunningAppMode() == 1 ? 0 : 2);
if (fileContent != null) {
this.T = new String(fileContent);
} else {
this.T = "";
}
}
return this.T;
}
@Override
public String obtainAppDataPath() {
String str = this.k0;
if (str != null) {
return str;
}
return this.p + "/www/";
}
@Override
public String obtainAppDocPath() {
return this.C1;
}
@Override
public String obtainAppId() {
return this.p;
}
@Override
public String obtainAppInfo() {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("appid", this.p);
jSONObject.put("versionName", this.A);
jSONObject.put("name", this.t0);
jSONObject.put("versionCode", this.B);
} catch (JSONException e) {
e.printStackTrace();
}
return jSONObject.toString();
}
@Override
public String obtainAppLog() {
return BaseInfo.sBaseFsAppsPath + this.p + "/log/";
}
@Override
public String obtainAppName() {
return this.t0;
}
@Override
public byte obtainAppStatus() {
return this.u;
}
@Override
public String obtainAppTempPath() {
return BaseInfo.sBaseFsAppsPath + this.p + "/temp/";
}
@Override
public String obtainAppVersionCode() {
return this.B;
}
@Override
public String obtainAppVersionName() {
return this.A;
}
@Override
public String obtainAppWebCachePath() {
return this.D1;
}
@Override
public String obtainAuthority(String str) {
String str2 = BaseInfo.sGlobalAuthority;
if ((str2 == null || !TextUtils.equals("*", str2)) && q() && !TextUtils.isEmpty(str) && !e(this.p)) {
JSONObject jSONObject = this.I0;
if (jSONObject != null) {
Iterator<String> keys = jSONObject.keys();
while (keys.hasNext()) {
String next = keys.next();
if (str.equalsIgnoreCase(next)) {
return this.I0.optString(next, IApp.AUTHORITY_UNDETERMINED);
}
}
return IApp.AUTHORITY_UNDETERMINED;
}
return IApp.AUTHORITY_UNDETERMINED;
}
return IApp.AUTHORITY_AUTHORIZED;
}
@Override
public String obtainConfigProperty(String str) {
String str2;
if (PdrUtil.isEquals(str, "adid")) {
str2 = this.N0;
} else if (PdrUtil.isEquals(str, "launchError")) {
str2 = this.M0;
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_AUTOCLOSE)) {
str2 = String.valueOf(this.Y);
} else if (PdrUtil.isEquals(str, "timeout")) {
str2 = String.valueOf(this.a0);
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_DELAY)) {
str2 = String.valueOf(this.b0);
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_SPLASHSCREEN)) {
str2 = String.valueOf(this.W);
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_WAITING)) {
str2 = String.valueOf(this.X);
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_H5PLUS)) {
str2 = String.valueOf(this.R);
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_funSetUA)) {
str2 = String.valueOf(this.S);
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_USER_AGENT)) {
str2 = this.L;
} else if (PdrUtil.isEquals(str, "error")) {
str2 = this.q0;
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_FULLSCREEN)) {
str2 = String.valueOf(this.i);
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_UNTRUSTEDCA)) {
str2 = this.p0;
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_LOADED_TIME)) {
str2 = this.Q0;
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_RAM_CACHE_MODE)) {
str2 = this.R0;
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_JSERROR)) {
str2 = this.N + "";
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_CRASH)) {
str2 = this.M + "";
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_USE_ENCRYPTION)) {
str2 = this.U0 + "";
} else if (PdrUtil.isEquals(str, "w2a_delay")) {
str2 = String.valueOf(this.c0);
} else if (PdrUtil.isEquals(str, "w2a_autoclose")) {
str2 = String.valueOf(this.Z);
} else if (PdrUtil.isEquals(str, "wap2app_running_mode")) {
str2 = this.O + "";
} else if (PdrUtil.isEquals(str, "injection")) {
str2 = this.i1 + "";
} else if (PdrUtil.isEquals(str, "event")) {
str2 = this.d0;
} else if (PdrUtil.isEquals(str, "target")) {
str2 = this.e0;
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_LPLUSERQUIRE)) {
str2 = this.f0;
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_SPLUSERQUIRE)) {
str2 = this.g0;
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_LGEOLOCATION)) {
str2 = this.h0;
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_SGEOLOCATION)) {
str2 = this.i0;
} else if (PdrUtil.isEquals(str, AbsoluteConst.JSONKEY_STATUSBAR_BC)) {
str2 = this.X0 + "";
} else if (PdrUtil.isEquals(str, AbsoluteConst.JSONKEY_STATUSBAR_MODE)) {
str2 = this.a1;
} else if (PdrUtil.isEquals(str, AbsoluteConst.JSONKEY_STATUSBAR_IMMERSED)) {
str2 = this.b1 + "";
} else if (PdrUtil.isEquals(str, AbsoluteConst.JSONKEY_STATUSBAR_LAUNCH_ISSTATUS)) {
str2 = String.valueOf(this.c1);
} else if (PdrUtil.isEquals(str, AbsoluteConst.JSONKEY_STATUSBAR_LAUNCH_STATUSBAR_COLOR)) {
str2 = this.e1;
} else if (PdrUtil.isEquals(str, AbsoluteConst.JSONKEY_STATUSBAR_SECOND_ISATATUS)) {
str2 = String.valueOf(this.d1);
} else if (PdrUtil.isEquals(str, AbsoluteConst.JSONKEY_STATUSBAR_SECOND_STATUSBAR_COLOR)) {
str2 = this.f1;
} else if (PdrUtil.isEquals(str, AbsoluteConst.JSONKEY_MAP_COORD_TYPE)) {
str2 = this.p1;
} else if (PdrUtil.isEquals(str, AbsoluteConst.UNIAPP_WEEX_JS_SERVICE)) {
str2 = String.valueOf(this.g1);
} else if (PdrUtil.isEquals(str, AbsoluteConst.APP_UNIAPP_VERSION)) {
str2 = this.u0;
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_UNIAPP_CONTROL)) {
str2 = this.s1 ? this.z0 : "h5+";
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.UNI_NVUE_DATA)) {
JSONObject jSONObject = this.v0;
if (jSONObject == null) {
return null;
}
return jSONObject.toString();
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_CONCATENATE)) {
return this.Q + "";
} else if (PdrUtil.isEquals(str, AbsoluteConst.NVUE_LAUNCH_MODE)) {
return this.A0;
} else {
if (PdrUtil.isEquals(str, AbsoluteConst.JSON_KEY_DEBUG_REFRESH)) {
return this.r1;
}
if (PdrUtil.isEquals(str, IApp.ConfigProperty.UNI_RESTART_TO_DIRECT)) {
return String.valueOf(this.q1);
}
if (PdrUtil.isEquals(str, AbsoluteConst.APP_IS_UNIAPP)) {
return String.valueOf(this.s1);
}
if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_USE_V3_ENCRYPTION)) {
return String.valueOf(this.V0);
}
if (PdrUtil.isEquals(str, IntentConst.UNIMP_RUN_EXTRA_INFO)) {
return this.v1;
}
return null;
}
return str2;
}
@Override
public IWebviewStateListener obtainLaunchPageStateListener() {
return this.w1;
}
@Override
public Object obtainMgrData(IMgr.MgrType mgrType, int i, Object[] objArr) {
return this.y.processEvent(mgrType, i, objArr);
}
@Override
public String obtainOriginalAppId() {
return this.z;
}
@Override
public InputStream obtainResInStream(String str, String str2) {
String convert2AbsFullPath = convert2AbsFullPath(str, str2);
byte b2 = this.V;
if (b2 == 1) {
if (PdrUtil.isDeviceRootDir(convert2AbsFullPath)) {
try {
return DHFile.getInputStream(DHFile.createFileHandler(convert2AbsFullPath));
} catch (IOException e) {
Logger.w("WebApp.obtainResInStream", e);
}
} else {
return PlatformUtil.getResInputStream(convert2AbsFullPath);
}
} else if (b2 == 0) {
try {
return DHFile.getInputStream(DHFile.createFileHandler(convert2AbsFullPath));
} catch (IOException e2) {
Logger.w("WebApp.obtainResInStream", e2);
}
}
return null;
}
@Override
public byte obtainRunningAppMode() {
return this.V;
}
@Override
public String obtainRuntimeArgs(boolean z) {
if (z) {
return JSONObject.quote(this.E);
}
return this.E;
}
@Override
public AppStatusBarManager obtainStatusBarMgr() {
return this.m;
}
@Override
public JSONObject obtainThridInfo(IApp.ConfigProperty.ThridInfo thridInfo) {
switch (f.a[thridInfo.ordinal()]) {
case 1:
return this.D0;
case 2:
return this.F0;
case 3:
return this.G0;
case 4:
return this.H0;
case 5:
return this.J0;
case 6:
m();
return this.y1;
case 7:
return this.y.h;
case 8:
return this.K0;
case 9:
return this.E0;
default:
return null;
}
}
@Override
public String obtainVersionSitemap() {
return this.C;
}
@Override
public Intent obtainWebAppIntent() {
return this.O0;
}
@Override
public String obtainWebviewBaseUrl() {
return a(this.V);
}
@Override
public boolean onExecute(ISysEventListener.SysEventType sysEventType, Object obj) {
byte b2 = this.u;
if (b2 == 3) {
return callSysEventListener(sysEventType, obj);
}
if (b2 == 1 && (sysEventType == ISysEventListener.SysEventType.onWebAppStop || sysEventType == ISysEventListener.SysEventType.onStop)) {
s();
}
return false;
}
@Override
public void onSplashClosed() {
diyStatusBarState();
}
public boolean p() {
return this.u == 3;
}
public boolean q() {
Intent obtainWebAppIntent = obtainWebAppIntent();
if (obtainWebAppIntent != null) {
boolean z = this.H1;
this.H1 = obtainWebAppIntent.getBooleanExtra(IntentConst.IS_STREAM_APP, z) | z;
}
return this.H1;
}
public boolean r() {
Logger.d(Logger.AppMgr_TAG, this.p + " onStop");
IApp.IAppStatusListener iAppStatusListener = this.P0;
if (iAppStatusListener != null) {
return iAppStatusListener.onStop();
}
return true;
}
@Override
public void registerSysEventListener(ISysEventListener iSysEventListener, ISysEventListener.SysEventType sysEventType) {
if (this.C0 == null) {
this.C0 = new HashMap<>(1);
}
ArrayList<ISysEventListener> arrayList = this.C0.get(sysEventType);
if (arrayList == null) {
arrayList = new ArrayList<>();
this.C0.put(sysEventType, arrayList);
}
arrayList.add(iSysEventListener);
}
public void s() {
this.l1.clear();
this.m1.clear();
Activity activity = this.a;
if (activity != null && (activity instanceof WebAppActivity)) {
((WebAppActivity) activity).onAppStop(this.p);
}
Logger.d(Logger.AppMgr_TAG, "webapp.onStoped");
BaseInfo.s_Runing_App_Count--;
callSysEventListener(ISysEventListener.SysEventType.onWebAppStop, this);
d();
PermissionUtil.removeTempPermission(this.a, this.p);
b();
deleteAppTemp();
PermissionControler.unregisterRootPermission(this.p);
this.y.e(this);
if (getIAppStatusListener() != null) {
getIAppStatusListener().onStoped(false, null);
}
this.y.processEvent(IMgr.MgrType.WindowMgr, 25, this);
}
@Override
public void setAppDataPath(String str) {
if (this.V == 1) {
if (str.startsWith(BaseInfo.sBaseResAppsPath)) {
this.k0 = str;
return;
}
this.k0 = BaseInfo.sBaseResAppsPath + this.p + "/" + BaseInfo.APP_WWW_FS_DIR;
} else if (new File(str).exists()) {
this.k0 = str;
} else if (!str.startsWith(DeviceInfo.sCacheRootDir)) {
this.k0 = DeviceInfo.sCacheRootDir + "/" + str;
} else {
this.k0 = str;
}
}
@Override
public void setAppDocPath(String str) {
this.C1 = PdrUtil.appendByDeviceRootDir(str);
}
@Override
public void setConfigProperty(String str, String str2) {
if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_AUTOCLOSE)) {
this.Y = PdrUtil.parseBoolean(str2, this.Y, false);
} else if (PdrUtil.isEquals(str, "commit")) {
a();
} else if (PdrUtil.isEquals(str, "timeout")) {
this.a0 = PdrUtil.parseInt(str2, this.a0);
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_DELAY)) {
this.b0 = PdrUtil.parseInt(str2, this.b0);
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_SPLASHSCREEN)) {
this.W = PdrUtil.parseBoolean(str2, this.W, false);
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_WAITING)) {
this.X = PdrUtil.parseBoolean(str2, this.X, false);
} else if (PdrUtil.isEquals(str, "name")) {
this.t0 = str2;
} else if (PdrUtil.isEquals(str, "name")) {
this.G = str2;
} else if (PdrUtil.isEquals(str, "email")) {
this.H = str2;
} else if (PdrUtil.isEquals(str, "url")) {
this.J = str2;
} else if (PdrUtil.isEquals(str, "name")) {
this.A = str2;
BaseInfo.sLastAppVersionName = str2;
} else if (PdrUtil.isEquals(str, "code")) {
this.B = str2;
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_RUNMODE_LIBERATE)) {
this.j0 = PdrUtil.parseBoolean(str2, this.W, false);
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_H5PLUS)) {
this.R = PdrUtil.parseBoolean(str2, true, false);
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_funSetUA)) {
this.S = PdrUtil.parseBoolean(str2, true, false);
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_USER_AGENT)) {
this.L = str2;
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_FULLSCREEN)) {
this.i = PdrUtil.parseBoolean(str2, this.i, false);
} else if (PdrUtil.isEquals(str, "webcache_path")) {
this.D1 = str2;
} else if (PdrUtil.isEquals(str, "wap2app_running_mode")) {
this.O = PdrUtil.parseBoolean(str2, false, false);
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.CONFIG_LOADED_TIME)) {
this.Q0 = str2;
} else if (PdrUtil.isEquals(str, AbsoluteConst.JSONKEY_STATUSBAR_BC)) {
this.X0 = str2;
} else if (PdrUtil.isEquals(str, AbsoluteConst.JSONKEY_STATUSBAR_MODE)) {
this.a1 = str2;
} else if (PdrUtil.isEquals(str, AbsoluteConst.JSONKEY_STATUSBAR_IMMERSED)) {
this.b1 = Boolean.valueOf(str2).booleanValue();
} else if (PdrUtil.isEquals(str, AbsoluteConst.JSONKEY_STATUSBAR_LAUNCH_ISSTATUS)) {
this.c1 = Boolean.valueOf(str2).booleanValue();
} else if (PdrUtil.isEquals(str, AbsoluteConst.JSONKEY_STATUSBAR_LAUNCH_STATUSBAR_COLOR)) {
this.e1 = str2;
} else if (PdrUtil.isEquals(str, AbsoluteConst.JSONKEY_STATUSBAR_SECOND_ISATATUS)) {
this.d1 = Boolean.valueOf(str2).booleanValue();
} else if (PdrUtil.isEquals(str, AbsoluteConst.JSONKEY_STATUSBAR_SECOND_STATUSBAR_COLOR)) {
this.f1 = str2;
} else if (PdrUtil.isEquals(str, AbsoluteConst.UNIAPP_WEEX_JS_SERVICE)) {
this.g1 = Boolean.valueOf(str2).booleanValue();
} else if (PdrUtil.isEquals(str, AbsoluteConst.JSON_KEY_DEBUG_REFRESH)) {
this.r1 = str2;
} else if (PdrUtil.isEquals(str, IApp.ConfigProperty.UNI_RESTART_TO_DIRECT)) {
this.q1 = Boolean.valueOf(str2).booleanValue();
} else if (PdrUtil.isEquals(str, IntentConst.UNIMP_RUN_EXTRA_INFO)) {
this.v1 = str2;
}
}
@Override
public void setDirectPage(String str) {
this.n1 = str;
}
@Override
public void setHideNavBarState(boolean z) {
this.q = z;
}
@Override
public void setIAppStatusListener(IApp.IAppStatusListener iAppStatusListener) {
this.P0 = iAppStatusListener;
}
@Override
public void setLaunchPageStateListener(IWebviewStateListener iWebviewStateListener) {
this.w1 = iWebviewStateListener;
}
@Override
public void setNeedRefreshApp(boolean z) {
this.k1 = z;
}
@Override
public void setQuitModel(int i) {
this.t1 = i;
}
@Override
public void setRuntimeArgs(String str) {
if (PdrUtil.isEmpty(str)) {
return;
}
this.E = str;
}
@Override
public void setStatus(byte b2) {
this.u = b2;
if (b2 == 3) {
this.h1 = System.currentTimeMillis();
}
}
@Override
public void setWebAppActivity(Activity activity) {
this.a = activity;
a(activity);
}
@Override
public void setWebAppIntent(Intent intent) {
URL url;
String str;
JSONObject d2;
JSONObject optJSONObject;
char c2 = 1;
boolean booleanExtra = intent.getBooleanExtra(IntentConst.EXE_NEW_INTENT, true);
if (booleanExtra || this.O0 == null) {
this.O0 = new Intent(intent);
if (TextUtils.isEmpty(this.t0)) {
this.t0 = this.O0.getStringExtra(IntentConst.NAME);
}
String stringExtra = this.O0.getStringExtra(IntentConst.FIRST_WEB_URL);
if (!TextUtils.equals(this.r0, "__no__")) {
this.r0 = stringExtra;
}
String stringExtra2 = this.O0.getStringExtra(IntentConst.DIRECT_PAGE);
if (!TextUtils.isEmpty(stringExtra2)) {
try {
String query = new URL(stringExtra2).getQuery();
if (query != null) {
if (query.contains("webviewParameter") || query.contains("__html5plusWebviewParameter")) {
String str2 = query.contains("webviewParameter") ? "webviewParameter" : "__html5plusWebviewParameter";
this.n1 = url.getProtocol() + "://" + url.getHost() + url.getPath();
String[] split = query.split("&");
if (split != null) {
int i = 0;
boolean z = true;
String str3 = null;
while (i < split.length) {
String[] split2 = split[i].split("=");
if (str2.equals(split2[0])) {
str3 = URLDecoder.decode(split2[c2]);
} else {
if (z) {
try {
this.n1 += Operators.CONDITION_IF_STRING;
z = false;
} catch (Exception e) {
e.printStackTrace();
}
} else if (i < split.length) {
this.n1 += "&";
}
this.n1 += split2[0] + "=" + split2[1];
}
i++;
c2 = 1;
}
str = str3;
String str4 = this.n1;
this.o1 = str4;
this.O0.putExtra(IntentConst.DIRECT_PAGE, str4);
d2 = d(this.n1);
this.K0 = d2;
if (d2 == null) {
try {
if (!TextUtils.isEmpty(str)) {
this.K0 = new JSONObject(str);
} else {
this.K0 = new JSONObject();
}
} catch (JSONException e2) {
e2.printStackTrace();
}
}
if (this.p.equals(this.K0.optString("webviewid"))) {
if (!new File(a(BaseInfo.sConfigXML)).exists()) {
String optString = this.K0.optString(IApp.ConfigProperty.CONFIG_LAUNCH_PATH);
if (TextUtils.isEmpty(optString)) {
optString = this.n1;
}
this.m0 = optString;
}
if (this.K0.has(AbsoluteConst.JSONKEY_STATUSBAR) && (optJSONObject = this.K0.optJSONObject(AbsoluteConst.JSONKEY_STATUSBAR)) != null && optJSONObject.optBoolean(AbsoluteConst.JSONKEY_STATUSBAR_IMMERSED, true)) {
this.c1 = true;
if (optJSONObject.has("background")) {
this.e1 = optJSONObject.optString("background", this.X0);
}
}
this.O0.removeExtra(IntentConst.DIRECT_PAGE);
this.J0 = this.K0.optJSONObject("titleNView");
} else {
e();
}
}
str = null;
String str42 = this.n1;
this.o1 = str42;
this.O0.putExtra(IntentConst.DIRECT_PAGE, str42);
d2 = d(this.n1);
this.K0 = d2;
if (d2 == null) {
}
if (this.p.equals(this.K0.optString("webviewid"))) {
}
}
}
this.n1 = stringExtra2;
str = null;
String str422 = this.n1;
this.o1 = str422;
this.O0.putExtra(IntentConst.DIRECT_PAGE, str422);
d2 = d(this.n1);
this.K0 = d2;
if (d2 == null) {
}
if (this.p.equals(this.K0.optString("webviewid"))) {
}
} catch (MalformedURLException e3) {
e3.printStackTrace();
} catch (Exception e4) {
e4.printStackTrace();
}
}
}
if (q() && BaseInfo.isWap2AppAppid(this.p) && !booleanExtra && intent.getBooleanExtra(IntentConst.WEBAPP_ACTIVITY_JUST_DOWNLOAD, false) && this.E1) {
this.y.processEvent(IMgr.MgrType.WindowMgr, 50, this);
this.E1 = false;
}
}
@Override
public String shortcutQuit() {
return this.A1;
}
@Override
public void showSplash() {
Activity activity = getActivity();
if (activity instanceof IOnCreateSplashView) {
activity.setIntent(this.O0);
((IOnCreateSplashView) activity).onCreateSplash(activity);
}
}
@Override
public boolean startFromShortCut() {
return this.z1;
}
void t() {
PermissionControler.registerPermission(this.p, this.B0);
}
public String toString() {
return this.t0 + Operators.SUB + this.p + Operators.SUB + super.toString();
}
public void u() {
b(false);
setStatus((byte) 1);
AppStatus.setAppStatus(this.p, 0);
this.y.processEvent(IMgr.MgrType.FeatureMgr, 3, this.p);
Logger.d(Logger.AppMgr_TAG, this.p + " will active change to unrunning");
this.y.processEvent(null, 0, this);
WebViewFactory.sUsePermissionWebviews.clear();
}
@Override
public void unregisterSysEventListener(ISysEventListener iSysEventListener, ISysEventListener.SysEventType sysEventType) {
ArrayList<ISysEventListener> arrayList;
HashMap<ISysEventListener.SysEventType, ArrayList<ISysEventListener>> hashMap = this.C0;
if (hashMap == null || (arrayList = hashMap.get(sysEventType)) == null) {
return;
}
arrayList.remove(iSysEventListener);
if (arrayList.isEmpty()) {
this.C0.remove(sysEventType);
}
}
@Override
public void updateDirectPage(String str) {
if (TextUtils.isEmpty(str)) {
str = this.n1;
}
JSONObject d2 = d(str);
if (d2 != null) {
this.K0 = d2;
if (d2 != null) {
e();
this.y.processEvent(IMgr.MgrType.WindowMgr, 48, this);
}
}
}
public String v() {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("appid", this.p);
jSONObject.put("version", this.A);
jSONObject.put("name", this.t0);
jSONObject.put("versionCode", this.B);
jSONObject.put("description", this.F);
jSONObject.put("author", this.G);
jSONObject.put("email", this.H);
jSONObject.put(IApp.ConfigProperty.CONFIG_LICENSE, this.I);
jSONObject.put("licensehref", this.J);
jSONObject.put(IApp.ConfigProperty.CONFIG_FEATURES, new JSONArray((Collection) this.B0));
} catch (JSONException e) {
e.printStackTrace();
}
return jSONObject.toString();
}
public void w() {
b(true);
}
boolean a(InputStream inputStream, String str, JSONObject jSONObject) {
String handleEncryption;
boolean z;
String string;
boolean z2;
String str2;
String str3;
String str4;
String str5;
String str6;
boolean z3;
boolean z4;
String str7;
String str8;
Context context;
JSONObject jSONObject2;
String str9;
String str10;
JSONObject jSONObject3;
JSONObject jSONObject4;
JSONObject jSONObject5;
boolean z5;
boolean z6;
JSONObject jSONObject6;
String str11;
JSONObject jSONObject7;
String str12;
boolean isEquals;
JSONObject jSONObject8;
boolean z7;
boolean z8;
String str13;
String str14;
String str15;
String str16;
boolean z9;
boolean z10;
int i;
int i2;
boolean z11;
boolean z12;
JSONObject jSONObject9;
String str17;
boolean z13;
String str18;
boolean z14;
boolean z15;
boolean z16;
boolean z17;
boolean z18;
boolean z19;
JSONArray names;
boolean z20;
boolean z21;
JSONObject jSONObject10;
boolean z22;
boolean z23;
boolean z24;
int i3;
int i4;
StringBuilder sb;
int i5;
JSONObject jSONObject11;
JSONArray jSONArray;
JSONArray jSONArray2;
JSONObject jSONObject12;
JSONObject jSONObject13;
String optString;
String str19;
JSONObject jSONObject14;
Context context2;
UnicodeInputStream unicodeInputStream = inputStream;
String str20 = str;
this.j1 = false;
g gVar = this.s;
boolean z25 = gVar != null && gVar.d;
this.m1.addAll(AppStreamUtil.AppStreamSchemeWhiteDefaultList);
Context activity = getActivity();
if (activity == null) {
activity = DeviceInfo.sApplicationContext;
}
try {
if (unicodeInputStream != null) {
try {
if (!this.s1) {
unicodeInputStream = new UnicodeInputStream(unicodeInputStream, Charset.defaultCharset().name());
}
byte[] bytes = IOUtil.getBytes(unicodeInputStream);
handleEncryption = this.u1.handleEncryption(activity, bytes);
if (handleEncryption != null) {
this.U0 = true;
} else {
this.U0 = false;
handleEncryption = new String(bytes);
}
} catch (IOException e) {
e.printStackTrace();
Logger.e("parseConfig error=" + e.getMessage());
}
if (!this.U0 && z25 && BaseInfo.SyncDebug && !BaseInfo.isBase(activity) && z25) {
gVar.a = true;
gVar.b = DOMException.toJSON((int) DOMException.CODE_BASE_DEBUG_WGT_INSTALL_ERROR_MALFORMED, DOMException.MSG_BASE_DEBUG_WGT_INSTALL_NOT_CONFUSION);
return false;
}
JSONObject jSONObject15 = new JSONObject(handleEncryption);
JSONObject jSONObject16 = JSONUtil.getJSONObject(jSONObject15, "version");
String string2 = JSONUtil.getString(jSONObject16, "name");
String string3 = JSONUtil.getString(jSONObject16, "code");
BaseInfo.sLastAppVersionName = string2;
String str21 = this.p0;
String appSignatureSHA1 = LoadAppUtils.getAppSignatureSHA1(activity);
if (z25) {
z = false;
} else {
z = jSONObject != null ? Boolean.parseBoolean(JSONUtil.getString(jSONObject, AbsoluteConst.INSTALL_OPTIONS_FORCE)) : false;
if (!z && !TextUtils.isEmpty(this.A) && !BaseInfo.BaseAppInfo.compareVersion(string2, this.A)) {
if (gVar.c) {
gVar.b = DOMException.toJSON((int) DOMException.CODE_RUNTIME_WGTU_WWW_MANIFEST_VERSION_NOT_MATCH, DOMException.MSG_RUNTIME_WGTU_WWW_MANIFEST_VERSION_NOT_MATCH);
} else {
gVar.b = DOMException.toJSON((int) DOMException.CODE_RUNTIME_WGT_MANIFEST_VERSION_NOT_MATCH, DOMException.MSG_RUNTIME_WGT_MANIFEST_VERSION_NOT_MATCH);
}
gVar.a = true;
return false;
}
}
string = JSONUtil.getString(jSONObject15, "id");
BaseInfo.sCurrentAppOriginalAppid = string;
if (BaseInfo.ISDEBUG || (context2 = DeviceInfo.sApplicationContext) == null || !BaseInfo.isBase(context2)) {
z2 = !PdrUtil.isEquals(str20, string) && PdrUtil.isEquals(this.p, string);
if (z2) {
gVar.a = true;
if (gVar.c) {
gVar.b = DOMException.toJSON((int) DOMException.CODE_RUNTIME_WGTU_WWW_MANIFEST_ERROR_MALFORMED, DOMException.MSG_RUNTIME_WGTU_WWW_MANIFEST_APPID_NOT_MATCH);
} else {
gVar.b = DOMException.toJSON((int) DOMException.CODE_RUNTIME_WGT_MANIFEST_APPID_NOT_MATCH, DOMException.MSG_RUNTIME_WGT_MANIFEST_APPID_NOT_MATCH);
}
Log.e("Appmgr", "appid config is wrong pExpectAppid=" + str20 + ";appid=" + string);
return false;
}
str20 = string;
} else {
z2 = true;
}
String string4 = JSONUtil.getString(jSONObject15, "name");
boolean z26 = z2;
if (io.dcloud.e.c.g.c()) {
str2 = string4;
str3 = string;
str4 = str21;
} else {
StringBuilder sb2 = new StringBuilder();
sb2.append(appSignatureSHA1);
str4 = str21;
str2 = string4;
str3 = string;
sb2.append(getConfusionMgr().decodeString(getConfusionMgr().getS5DS(), true, 60));
appSignatureSHA1 = sb2.toString();
}
String str22 = appSignatureSHA1;
String string5 = JSONUtil.getString(jSONObject15, "description");
JSONObject jSONObject17 = JSONUtil.getJSONObject(jSONObject15, IApp.ConfigProperty.CONFIG_DEVELOPER);
String string6 = JSONUtil.getString(jSONObject17, "name");
String string7 = JSONUtil.getString(jSONObject17, "email");
JSONUtil.getString(jSONObject17, "url");
JSONObject jSONObject18 = JSONUtil.getJSONObject(jSONObject15, IApp.ConfigProperty.CONFIG_LICENSE);
String string8 = JSONUtil.getString(jSONObject18, "url");
JSONUtil.getString(jSONObject18, "description");
String string9 = JSONUtil.getString(jSONObject15, IApp.ConfigProperty.CONFIG_LAUNCH_PATH);
String string10 = JSONUtil.getString(jSONObject15, IApp.ConfigProperty.CONFIG_LAUNCH_PATH_W2A);
boolean z27 = this.j1 || !(TextUtils.isEmpty(this.l0) || TextUtils.equals(string9, this.l0));
this.j1 = z27;
this.j1 = z27 || !(TextUtils.isEmpty(this.n0) || TextUtils.equals(string10, this.n0));
String string11 = JSONUtil.getString(jSONObject15, IApp.ConfigProperty.CONFIG_BASEURL);
boolean z28 = !PdrUtil.isEmpty(this.s0);
JSONObject jSONObject19 = JSONUtil.getJSONObject(jSONObject15, IApp.ConfigProperty.CONFIG_PLUS);
if (jSONObject19.has(IApp.ConfigProperty.CONFIG_CONFUSION)) {
str6 = string9;
JSONObject jSONObject20 = JSONUtil.getJSONObject(jSONObject19, IApp.ConfigProperty.CONFIG_CONFUSION);
if (jSONObject20 == null) {
str5 = string5;
if (jSONObject19.optString(IApp.ConfigProperty.CONFIG_CONFUSION).startsWith("BQ81KwABAA")) {
this.U0 = true;
this.V0 = true;
}
if (this.u1.recordEncryptionV3Resources(this.p, jSONObject19.optString(IApp.ConfigProperty.CONFIG_CONFUSION))) {
this.U0 = true;
this.V0 = true;
}
} else {
str5 = string5;
if (this.U0) {
this.u1.recordEncryptionResources(this.p, jSONObject20);
}
}
} else {
str5 = string5;
str6 = string9;
}
PermissionUtil.isCheckPermissionDisabled = JSONUtil.getBoolean(jSONObject19, "checkPermissionDenied");
JSONObject jSONObject21 = JSONUtil.getJSONObject(jSONObject19, AbsoluteConst.UNI_TABBAR_KEY);
JSONObject jSONObject22 = JSONUtil.getJSONObject(jSONObject19, AbsoluteConst.JSONKEY_STATUSBAR);
String str23 = "none";
if (jSONObject22 != null) {
if (jSONObject22.has("background")) {
str7 = string2;
String optString2 = jSONObject22.optString("background");
if (!PdrUtil.isEmpty(optString2)) {
this.X0 = optString2;
}
} else {
str7 = string2;
}
if (jSONObject22.has("style")) {
z3 = z;
this.a1 = jSONObject22.optString("style", this.a1);
} else {
z3 = z;
}
if (jSONObject22.has(AbsoluteConst.JSONKEY_STATUSBAR_IMMERSED)) {
z4 = z25;
if (Build.VERSION.SDK_INT >= 19) {
String optString3 = jSONObject22.optString(AbsoluteConst.JSONKEY_STATUSBAR_IMMERSED);
this.n = optString3;
if (!optString3.equals("supportedDevice") && !this.n.equals("suggestedDevice")) {
if (this.n.equals("none")) {
this.b1 = false;
} else {
this.b1 = jSONObject22.optBoolean(AbsoluteConst.JSONKEY_STATUSBAR_IMMERSED, this.b1);
}
} else {
this.b1 = true;
}
}
} else {
z4 = z25;
}
} else {
z3 = z;
z4 = z25;
str7 = string2;
}
JSONObject jSONObject23 = JSONUtil.getJSONObject(jSONObject19, IApp.ConfigProperty.CONFIG_LAUNCHWEBVIEW);
String str24 = null;
if (jSONObject23 != null) {
JSONObject jSONObject24 = JSONUtil.getJSONObject(jSONObject23, IApp.ConfigProperty.CONFIG_OVERRIDEURL);
JSONArray jSONArray3 = JSONUtil.getJSONArray(jSONObject23, IApp.ConfigProperty.CONFIG_OVERRIDE_RESOURCE);
str8 = str22;
if (jSONArray3 != null) {
jSONObject12 = new JSONObject();
context = activity;
try {
jSONObject12.put("0", jSONArray3);
} catch (JSONException e2) {
e2.printStackTrace();
}
} else {
context = activity;
jSONObject12 = null;
}
boolean optBoolean = jSONObject23.optBoolean("injection", this.i1);
String optString4 = jSONObject23.optString("plusrequire", "normal");
if (jSONObject23.has("titleNView")) {
jSONObject13 = JSONUtil.getJSONObject(jSONObject23, "titleNView");
} else {
jSONObject13 = jSONObject23.has("navigationbar") ? JSONUtil.getJSONObject(jSONObject23, "navigationbar") : null;
}
if (jSONObject23.has("replacewebapi")) {
jSONObject5 = jSONObject13;
JSONObject optJSONObject = jSONObject23.optJSONObject("replacewebapi");
if (optJSONObject != null && optJSONObject.has("geolocation")) {
optString = optJSONObject.optString("geolocation", "none");
str19 = optString;
}
str19 = "none";
} else {
jSONObject5 = jSONObject13;
if (jSONObject23.has("geolocation")) {
optString = jSONObject23.optString("geolocation", "none");
str19 = optString;
}
str19 = "none";
}
if (this.b1 && jSONObject23.has(AbsoluteConst.JSONKEY_STATUSBAR)) {
JSONObject jSONObject25 = jSONObject12;
this.c1 = true;
JSONObject optJSONObject2 = jSONObject23.optJSONObject(AbsoluteConst.JSONKEY_STATUSBAR);
if (optJSONObject2 == null || !optJSONObject2.has("background")) {
jSONObject14 = jSONObject25;
} else {
jSONObject14 = jSONObject25;
this.e1 = optJSONObject2.optString("background", this.X0);
}
} else {
jSONObject14 = jSONObject12;
}
jSONObject3 = jSONObject24;
z5 = optBoolean;
str9 = str19;
jSONObject2 = jSONObject23;
str10 = optString4;
jSONObject4 = jSONObject14;
} else {
str8 = str22;
context = activity;
jSONObject2 = jSONObject23;
str9 = "none";
str10 = "normal";
jSONObject3 = null;
jSONObject4 = null;
jSONObject5 = null;
z5 = true;
}
if (jSONObject19.has("appWhitelist")) {
JSONArray optJSONArray = jSONObject19.optJSONArray("appWhitelist");
z6 = z5;
jSONObject6 = jSONObject4;
int i6 = 0;
while (i6 < optJSONArray.length()) {
String optString5 = optJSONArray.optString(i6);
if (TextUtils.isEmpty(optString5)) {
jSONArray2 = optJSONArray;
} else {
jSONArray2 = optJSONArray;
if (!this.l1.contains(optString5)) {
this.l1.add(optString5);
}
}
i6++;
optJSONArray = jSONArray2;
}
} else {
z6 = z5;
jSONObject6 = jSONObject4;
}
if (jSONObject19.has("schemeWhitelist")) {
JSONArray optJSONArray2 = jSONObject19.optJSONArray("schemeWhitelist");
int i7 = 0;
while (i7 < optJSONArray2.length()) {
String optString6 = optJSONArray2.optString(i7);
if (TextUtils.isEmpty(optString6)) {
jSONArray = optJSONArray2;
} else {
jSONArray = optJSONArray2;
if (!this.m1.contains(optString6)) {
this.m1.add(optString6);
}
}
i7++;
optJSONArray2 = jSONArray;
}
}
JSONObject jSONObject26 = JSONUtil.getJSONObject(jSONObject19, IApp.ConfigProperty.CONFIG_SECONDWEBVIEW);
if (jSONObject26 != null) {
str11 = jSONObject26.optString("plusrequire", "normal");
if (jSONObject26.has("replacewebapi")) {
JSONObject optJSONObject3 = jSONObject26.optJSONObject("replacewebapi");
if (optJSONObject3 != null && optJSONObject3.has("geolocation")) {
str23 = optJSONObject3.optString("geolocation", "none");
}
} else if (jSONObject26.has("geolocation")) {
str23 = jSONObject26.optString("geolocation", "none");
}
if (this.b1 && jSONObject26.has(AbsoluteConst.JSONKEY_STATUSBAR)) {
this.d1 = true;
JSONObject optJSONObject4 = jSONObject26.optJSONObject(AbsoluteConst.JSONKEY_STATUSBAR);
if (optJSONObject4 != null && optJSONObject4.has("background")) {
this.f1 = optJSONObject4.optString("background", this.X0);
}
}
} else {
str11 = "normal";
}
if (BaseInfo.isBase(this.y.getContext())) {
this.R0 = JSONUtil.getString(jSONObject19, IApp.ConfigProperty.CONFIG_RAM_CACHE_MODE);
}
this.T0 = jSONObject19.optBoolean(AbsoluteConst.JSON_KEY_HARDWARE_ACCELERATED, MobilePhoneModel.checkPhoneBanAcceleration(Build.BRAND) || (BaseInfo.isWap2AppAppid(this.p) && q()));
this.S0 = jSONObject19.optString("popGesture", this.S0);
JSONObject jSONObject27 = JSONUtil.getJSONObject(jSONObject19, IApp.ConfigProperty.CONFIG_CACHE);
if (jSONObject27 != null) {
String string12 = JSONUtil.getString(jSONObject27, "mode");
if (TextUtils.isEmpty(string12)) {
string12 = this.W0;
}
this.W0 = string12;
}
JSONObject jSONObject28 = JSONUtil.getJSONObject(jSONObject19, IApp.ConfigProperty.CONFIG_CERS);
boolean parseBoolean = PdrUtil.parseBoolean(JSONUtil.getString(jSONObject28, IApp.ConfigProperty.CONFIG_CRASH), this.M, false);
boolean parseBoolean2 = PdrUtil.parseBoolean(JSONUtil.getString(jSONObject28, IApp.ConfigProperty.CONFIG_JSERROR), this.N, false);
JSONObject optJSONObject5 = jSONObject19.optJSONObject("compatible");
String str25 = str23;
if (optJSONObject5 != null && jSONObject19.has("uni-app")) {
JSONObject optJSONObject6 = jSONObject19.optJSONObject("uni-app");
if (!a(optJSONObject6, gVar)) {
return false;
}
str12 = str11;
this.s1 = true;
this.z0 = AbsoluteConst.UNI_V3;
jSONObject7 = jSONObject26;
this.y0 = optJSONObject5.optBoolean("ignoreVersion", false);
String optString7 = optJSONObject5.optString("compilerVersion");
this.w0 = optJSONObject5.optString("runtimeVersion");
this.u0 = optJSONObject6.optString("compilerVersion");
this.A0 = optJSONObject6.optString(AbsoluteConst.NVUE_LAUNCH_MODE, "normal");
if (!PdrUtil.isEmpty(optString7) && optString7.trim().equals(this.u0)) {
this.x0 = false;
}
} else {
jSONObject7 = jSONObject26;
str12 = str11;
if (jSONObject19.has("uni-app")) {
JSONObject optJSONObject7 = jSONObject19.optJSONObject("uni-app");
if (!a(optJSONObject7, gVar)) {
return false;
}
this.s1 = true;
this.u0 = optJSONObject7.optString("compilerVersion");
this.z0 = AbsoluteConst.UNI_V3;
this.v0 = optJSONObject7.optJSONObject("nvue");
this.A0 = optJSONObject7.optString(AbsoluteConst.NVUE_LAUNCH_MODE, "normal");
} else {
this.s1 = false;
}
}
if (SDK.isUniMPSDK()) {
isEquals = true;
} else {
String string13 = JSONUtil.getString(jSONObject19, IApp.ConfigProperty.CONFIG_RUNMODE);
if (TextUtils.isEmpty(string13) && this.s1) {
string13 = IApp.ConfigProperty.CONFIG_RUNMODE_LIBERATE;
}
isEquals = PdrUtil.isEquals(string13, IApp.ConfigProperty.CONFIG_RUNMODE_LIBERATE);
}
JSONObject jSONObject29 = JSONUtil.getJSONObject(jSONObject19, IApp.ConfigProperty.CONFIG_USER_AGENT);
String string14 = JSONUtil.getString(jSONObject29, "value");
boolean parseBoolean3 = PdrUtil.parseBoolean(JSONUtil.getString(jSONObject29, IApp.ConfigProperty.CONFIG_CONCATENATE), this.Q, false);
JSONObject jSONObject30 = JSONUtil.getJSONObject(jSONObject19, IApp.ConfigProperty.CONFIG_USER_AGENT_ANDROID);
String string15 = JSONUtil.getString(jSONObject30, "value");
boolean parseBoolean4 = PdrUtil.parseBoolean(JSONUtil.getString(jSONObject30, IApp.ConfigProperty.CONFIG_CONCATENATE), parseBoolean3, false);
String str26 = !PdrUtil.isEmpty(string15) ? string15 : string14;
JSONObject jSONObject31 = JSONUtil.getJSONObject(jSONObject19, IApp.ConfigProperty.CONFIG_SPLASHSCREEN);
if (jSONObject31 != null) {
SharedPreferences orCreateBundle = SP.getOrCreateBundle(getActivity(), "pdr");
StringBuilder sb3 = new StringBuilder();
jSONObject8 = jSONObject3;
sb3.append(this.p);
sb3.append(SP.UPDATE_SPLASH_AUTOCLOSE);
if (orCreateBundle.contains(sb3.toString())) {
z22 = orCreateBundle.getBoolean(this.p + SP.UPDATE_SPLASH_AUTOCLOSE, true);
} else if (!JSONUtil.isNull(jSONObject31, IApp.ConfigProperty.CONFIG_AUTOCLOSE)) {
z22 = Boolean.parseBoolean(String.valueOf(JSONUtil.getString(jSONObject31, IApp.ConfigProperty.CONFIG_AUTOCLOSE)));
} else {
z22 = false;
z23 = true;
if (z23) {
z8 = parseBoolean4;
z24 = z23;
} else {
z24 = z23;
StringBuilder sb4 = new StringBuilder();
z8 = parseBoolean4;
sb4.append(this.p);
sb4.append(SP.UPDATE_SPLASH_DELAY);
if (orCreateBundle.contains(sb4.toString())) {
i3 = orCreateBundle.getInt(this.p + SP.UPDATE_SPLASH_DELAY, 0);
} else if (!JSONUtil.isNull(jSONObject31, IApp.ConfigProperty.CONFIG_DELAY)) {
i3 = PdrUtil.parseInt(JSONUtil.getString(jSONObject31, IApp.ConfigProperty.CONFIG_DELAY), this.b0);
}
i4 = i3;
sb = new StringBuilder();
z7 = isEquals;
sb.append(this.p);
sb.append(SP.UPDATE_SPLASH_AUTOCLOSE_W2A);
if (orCreateBundle.contains(sb.toString())) {
z22 = orCreateBundle.getBoolean(this.p + SP.UPDATE_SPLASH_AUTOCLOSE_W2A, z22);
} else if (!JSONUtil.isNull(jSONObject31, IApp.ConfigProperty.CONFIG_AUTOCLOSE_W2A)) {
z22 = Boolean.parseBoolean(String.valueOf(JSONUtil.getString(jSONObject31, IApp.ConfigProperty.CONFIG_AUTOCLOSE_W2A)));
}
if (z22) {
if (orCreateBundle.contains(this.p + SP.UPDATE_SPLASH_DELAY_W2A)) {
i3 = orCreateBundle.getInt(this.p + SP.UPDATE_SPLASH_DELAY_W2A, i3);
} else if (!JSONUtil.isNull(jSONObject31, IApp.ConfigProperty.CONFIG_DELAY_W2A)) {
i3 = PdrUtil.parseInt(JSONUtil.getString(jSONObject31, IApp.ConfigProperty.CONFIG_DELAY_W2A), this.c0);
}
i5 = (int) (i3 + j());
} else {
i5 = i3;
}
boolean parseBoolean5 = PdrUtil.parseBoolean(JSONUtil.getString(jSONObject31, IApp.ConfigProperty.CONFIG_WAITING), this.X, false);
str13 = JSONUtil.getString(jSONObject31, "event");
boolean z29 = z22;
String optString8 = jSONObject31.optString("target", "default");
jSONObject11 = JSONUtil.getJSONObject(jSONObject31, "ads");
if (jSONObject11 != null) {
String optString9 = jSONObject11.optString("background", "#ffffff");
String optString10 = jSONObject11.optString("image", "");
z12 = parseBoolean5;
i2 = i4;
z10 = true;
str15 = optString9;
z11 = z24;
str14 = optString10;
i = i5;
z9 = z29;
str16 = optString8;
} else {
i = i5;
z12 = parseBoolean5;
z11 = z24;
i2 = i4;
z9 = z29;
z10 = true;
str16 = optString8;
str14 = null;
str15 = null;
}
}
i3 = 0;
i4 = 0;
sb = new StringBuilder();
z7 = isEquals;
sb.append(this.p);
sb.append(SP.UPDATE_SPLASH_AUTOCLOSE_W2A);
if (orCreateBundle.contains(sb.toString())) {
}
if (z22) {
}
boolean parseBoolean52 = PdrUtil.parseBoolean(JSONUtil.getString(jSONObject31, IApp.ConfigProperty.CONFIG_WAITING), this.X, false);
str13 = JSONUtil.getString(jSONObject31, "event");
boolean z292 = z22;
String optString82 = jSONObject31.optString("target", "default");
jSONObject11 = JSONUtil.getJSONObject(jSONObject31, "ads");
if (jSONObject11 != null) {
}
}
z23 = z22;
if (z23) {
}
i3 = 0;
i4 = 0;
sb = new StringBuilder();
z7 = isEquals;
sb.append(this.p);
sb.append(SP.UPDATE_SPLASH_AUTOCLOSE_W2A);
if (orCreateBundle.contains(sb.toString())) {
}
if (z22) {
}
boolean parseBoolean522 = PdrUtil.parseBoolean(JSONUtil.getString(jSONObject31, IApp.ConfigProperty.CONFIG_WAITING), this.X, false);
str13 = JSONUtil.getString(jSONObject31, "event");
boolean z2922 = z22;
String optString822 = jSONObject31.optString("target", "default");
jSONObject11 = JSONUtil.getJSONObject(jSONObject31, "ads");
if (jSONObject11 != null) {
}
} else {
jSONObject8 = jSONObject3;
z7 = isEquals;
z8 = parseBoolean4;
str13 = null;
str14 = null;
str15 = null;
str16 = null;
z9 = false;
z10 = false;
i = 0;
i2 = 0;
z11 = true;
z12 = false;
}
JSONObject jSONObject32 = JSONUtil.getJSONObject(jSONObject19, "error");
String string16 = (jSONObject32 == null || JSONUtil.isNull(jSONObject32, "url")) ? "file:///android_asset/data/dcloud_error.html" : JSONUtil.getString(jSONObject32, "url");
JSONObject jSONObject33 = JSONUtil.getJSONObject(jSONObject19, IApp.ConfigProperty.CONFIG_SSL);
String str27 = str13;
String string17 = (jSONObject33 == null || JSONUtil.isNull(jSONObject33, IApp.ConfigProperty.CONFIG_UNTRUSTEDCA)) ? str4 : JSONUtil.getString(jSONObject33, IApp.ConfigProperty.CONFIG_UNTRUSTEDCA);
JSONObject jSONObject34 = JSONUtil.getJSONObject(jSONObject19, IApp.ConfigProperty.CONFIG_STREAM);
int i8 = i;
boolean isWap2AppAppid = BaseInfo.isWap2AppAppid(this.p);
this.P = isWap2AppAppid;
int i9 = i2;
if (jSONObject34 != null) {
this.P = jSONObject34.optBoolean(IApp.ConfigProperty.CONFIG_COMPETENT, isWap2AppAppid);
this.B1 = jSONObject34.optString(IApp.ConfigProperty.CONFIG_SHORTCUT);
this.A1 = jSONObject34.optString("shortcutQuit");
jSONObject9 = jSONObject34.optJSONObject(IApp.ConfigProperty.CONFIG_AUTHORITY);
} else {
jSONObject9 = null;
}
if (!this.P) {
BaseInfo.createAppTestFile(str20);
} else {
BaseInfo.removeTestFile(str20);
}
String str28 = r;
StringBuilder sb5 = new StringBuilder();
JSONObject jSONObject35 = jSONObject9;
sb5.append(this.p);
sb5.append(" app competent=");
sb5.append(this.P);
Logger.i(str28, sb5.toString());
if (this.s1 || io.dcloud.e.c.g.c()) {
str17 = string17;
z13 = z26;
} else {
String metaValue = AndroidResources.getMetaValue(getConfusionMgr().decryptStr("lkdg}lWixxcmq"));
if (io.dcloud.e.c.g.b()) {
if (io.dcloud.e.c.h.a.c(context, str20)) {
str17 = string17;
z13 = true;
if (!z13) {
setStatus((byte) 4);
return false;
}
}
str17 = string17;
z13 = false;
if (!z13) {
}
} else {
Context context3 = context;
if (!TextUtils.isEmpty(metaValue)) {
StringBuilder sb6 = new StringBuilder();
sb6.append(str20);
str17 = string17;
sb6.append(context3.getPackageName().toLowerCase(Locale.ENGLISH));
String md5 = Md5Utils.md5(sb6.toString() + str8);
if (!TextUtils.isEmpty(md5)) {
}
z13 = false;
if (!z13) {
}
}
str17 = string17;
z13 = false;
if (!z13) {
}
}
}
JSONObject jSONObject36 = JSONUtil.getJSONObject(jSONObject19, "ads");
String string18 = JSONUtil.getString(jSONObject19, "adid");
JSONObject jSONObject37 = JSONUtil.getJSONObject(jSONObject19, "wap2app");
boolean z30 = z13;
if (jSONObject37 != null) {
str18 = string18;
str24 = jSONObject37.optString("launchError", "tip");
} else {
str18 = string18;
}
String str29 = str24;
Intent intent = this.O0;
if (intent != null && intent.hasExtra(IntentConst.UNIMP_DIRECT_DATA)) {
this.q1 = true;
this.r1 = this.O0.getStringExtra(IntentConst.UNIMP_DIRECT_DATA);
this.O0.removeExtra(IntentConst.UNIMP_DIRECT_DATA);
}
this.v1 = IntentConst.obtainIntentStringExtra(this.O0, IntentConst.UNIMP_RUN_EXTRA_INFO, true);
if (jSONObject19.has("arguments")) {
setRuntimeArgs(JSONUtil.getString(jSONObject19, "arguments"));
} else {
Intent intent2 = this.O0;
if (intent2 != null && intent2.hasExtra(IntentConst.UNIMP_RUN_ARGUMENTS)) {
setRuntimeArgs(this.O0.getStringExtra(IntentConst.UNIMP_RUN_ARGUMENTS));
}
}
boolean parseBoolean6 = PdrUtil.parseBoolean(JSONUtil.getString(jSONObject15, IApp.ConfigProperty.CONFIG_FULLSCREEN), this.i, false);
Logger.i(r, this.p + " app fullScreen=" + parseBoolean6);
ArrayList<String> arrayList = new ArrayList<>();
boolean q = q();
JSONObject jSONObject38 = JSONUtil.getJSONObject(jSONObject15, "permissions");
if (jSONObject38 == null || (names = jSONObject38.names()) == null) {
z14 = z9;
z15 = z10;
z16 = parseBoolean6;
z17 = z11;
z18 = z12;
z19 = z30;
} else {
z16 = parseBoolean6;
StringBuffer stringBuffer = new StringBuffer();
boolean z31 = z30;
z14 = z9;
z18 = z12;
int i10 = 0;
while (i10 < names.length()) {
JSONArray jSONArray4 = names;
String lowerCase = JSONUtil.getString(names, i10).toLowerCase(Locale.ENGLISH);
arrayList.add(lowerCase);
if (lowerCase.equals("push")) {
z21 = z11;
z20 = z10;
PlatformUtil.APS_COVER = PdrUtil.parseBoolean(JSONUtil.getString(JSONUtil.getJSONObject(jSONObject38, lowerCase), IApp.ConfigProperty.CONFIG_COVER), PlatformUtil.APS_COVER, false);
} else {
z20 = z10;
z21 = z11;
if (lowerCase.equals("webview")) {
arrayList.add(AbsoluteConst.F_UI);
} else if (lowerCase.equals(AbsoluteConst.F_UI)) {
arrayList.add("webview");
arrayList.add("nativeui");
arrayList.add("navigator");
} else if (lowerCase.equals("maps") && (jSONObject10 = JSONUtil.getJSONObject(jSONObject38, IFeature.F_MAPS)) != null && jSONObject10.has(AbsoluteConst.JSONKEY_MAP_COORD_TYPE)) {
this.p1 = JSONUtil.getString(jSONObject10, AbsoluteConst.JSONKEY_MAP_COORD_TYPE);
}
}
if (z4 && !z3 && !q && !PermissionControler.checkSafePermission(str20, lowerCase) && !((Boolean) this.y.processEvent(IMgr.MgrType.FeatureMgr, 9, lowerCase)).booleanValue()) {
if (stringBuffer.length() > 0) {
stringBuffer.append(",");
}
stringBuffer.append(lowerCase);
z31 = false;
}
i10++;
names = jSONArray4;
z11 = z21;
z10 = z20;
}
z15 = z10;
z17 = z11;
if (!z31 && z4) {
gVar.b = DOMException.toJSON((int) DOMException.CODE_RUNTIME_5PRUNTIME_LACK_MODULE, StringUtil.format(DOMException.MSG_RUNTIME_5PRUNTIME_LACK_MODULE, stringBuffer));
gVar.a = true;
return false;
}
z19 = z31;
}
if (z19) {
BaseInfo.BaseAppInfo baseAppInfo = this.t;
if (baseAppInfo != null) {
baseAppInfo.mAppVer = this.A;
}
this.A = str7;
this.B = string3;
this.B0 = arrayList;
this.p = str20;
this.z = str3;
this.t0 = str2;
this.M = parseBoolean;
this.N = parseBoolean2;
this.F = str5;
this.G = string6;
this.H = string7;
this.J = string8;
this.l0 = str6;
this.n0 = string10;
this.s0 = string11;
this.L = str26;
this.q0 = string16;
this.W = z15;
this.Y = z17;
this.Z = z14;
this.j0 = z7;
this.X = z18;
this.Q = z8;
this.i = z16;
this.U = z28;
String str30 = str17;
this.p0 = str30;
BaseInfo.untrustedca = str30;
this.b0 = i9;
this.c0 = i8;
this.d0 = str27;
this.e0 = str16;
this.D0 = jSONObject8;
this.F0 = jSONObject6;
this.i1 = z6;
this.G0 = jSONObject7;
this.H0 = jSONObject2;
this.J0 = jSONObject5;
this.I0 = jSONObject35;
this.L0 = jSONObject36;
this.N0 = str18;
this.f0 = str10;
this.g0 = str12;
this.h0 = str9;
this.i0 = str25;
this.Y0 = str15;
this.Z0 = str14;
this.M0 = str29;
this.E0 = jSONObject21;
l();
gVar.b = v();
}
gVar.a = !z19;
return z19;
}
JSONObject jSONObject152 = new JSONObject(handleEncryption);
JSONObject jSONObject162 = JSONUtil.getJSONObject(jSONObject152, "version");
String string22 = JSONUtil.getString(jSONObject162, "name");
String string32 = JSONUtil.getString(jSONObject162, "code");
BaseInfo.sLastAppVersionName = string22;
String str212 = this.p0;
String appSignatureSHA12 = LoadAppUtils.getAppSignatureSHA1(activity);
if (z25) {
}
string = JSONUtil.getString(jSONObject152, "id");
BaseInfo.sCurrentAppOriginalAppid = string;
if (BaseInfo.ISDEBUG) {
}
if (PdrUtil.isEquals(str20, string)) {
}
if (z2) {
}
} catch (Exception e3) {
e3.printStackTrace();
gVar.a = true;
if (gVar.c) {
gVar.b = DOMException.toJSON((int) DOMException.CODE_RUNTIME_WGTU_WWW_MANIFEST_ERROR_MALFORMED, DOMException.MSG_RUNTIME_WGTU_WWW_MANIFEST_ERROR_MALFORMED);
return false;
}
gVar.b = DOMException.toJSON((int) DOMException.CODE_RUNTIME_WGT_MANIFEST_ERROR_MALFORMED, DOMException.MSG_RUNTIME_WGT_MANIFEST_ERROR_MALFORMED);
return false;
}
handleEncryption = "";
if (!this.U0) {
}
}
public void g() {
ArrayList<String> arrayList = this.B0;
if (arrayList != null) {
arrayList.clear();
this.B0 = null;
}
HashMap<ISysEventListener.SysEventType, ArrayList<ISysEventListener>> hashMap = this.C0;
if (hashMap != null) {
hashMap.clear();
this.C0 = null;
}
this.u1.removeData(this.p);
this.y = null;
this.t = null;
this.g1 = false;
}
private static PackageInfo c(Context context) {
try {
return context.getPackageManager().getPackageInfo(context.getPackageName(), 16384);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public boolean c(String str, JSONObject jSONObject) {
String str2;
String obtainAppDataPath = obtainAppDataPath();
StringBuilder sb = new StringBuilder();
boolean z = false;
sb.append(obtainAppDataPath.substring(0, obtainAppDataPath.length() - 1));
sb.append("_backup");
String sb2 = sb.toString();
byte b2 = this.V;
try {
if (b2 == 1) {
str2 = BaseInfo.sCacheFsAppsPath + this.p + File.separatorChar + BaseInfo.APP_WWW_FS_DIR;
try {
DHFile.deleteFile(str2);
sb2 = str2.substring(0, str2.length() - 1) + "_backup";
} catch (Exception e) {
e = e;
e.printStackTrace();
g gVar = this.s;
gVar.a = true;
gVar.b = StringUtil.format(DOMException.JSON_ERROR_INFO, 10, e.getMessage());
if (z) {
}
return z;
}
} else {
if (b2 == 0) {
new File(obtainAppDataPath).renameTo(new File(sb2));
}
str2 = obtainAppDataPath;
}
File file = new File(str);
if (Zip4JUtil.isEncryptedZip(file)) {
Zip4JUtil.upZipFileWithPassword(file, str2, jSONObject.getString(Constants.Value.PASSWORD));
} else {
ZipUtils.upZipFile(file, str2);
}
b((byte) 0);
setAppDataPath(str2);
z = b(this.p, jSONObject);
} catch (Exception e2) {
e = e2;
str2 = obtainAppDataPath;
}
if (z) {
Logger.e(Logger.AppMgr_TAG, "unZipWebApp failed pFilePath=" + str);
b(b2);
setAppDataPath(obtainAppDataPath);
try {
DHFile.deleteFile(str2);
} catch (IOException e3) {
e3.printStackTrace();
}
if (b2 == 0) {
new File(sb2).renameTo(new File(str2));
}
} else {
if (b2 == 0) {
try {
DHFile.deleteFile(sb2);
} catch (IOException e4) {
e4.printStackTrace();
}
}
BaseInfo.BaseAppInfo baseAppInfo = new BaseInfo.BaseAppInfo(this.p, this.A);
this.t = baseAppInfo;
baseAppInfo.saveToBundleData(getActivity());
}
return z;
}
public boolean f(String str) {
if (this.v || !this.x) {
Logger.e("Webapp start " + this.p);
Activity activity = this.a;
if (activity != null && (activity instanceof WebAppActivity)) {
((WebAppActivity) activity).onAppStart(this.p);
((WebAppActivity) this.a).onAppStart(this);
}
BaseInfo.s_Runing_App_Count++;
this.w = true;
this.x = !this.v;
setRuntimeArgs(str);
return a(5);
}
return false;
}
@Override
public InputStream obtainResInStream(String str) {
return obtainResInStream(null, str);
}
private String c(String str) {
return BaseInfo.sBaseFsSitMapPath + str + "/_sitemap.json";
}
@Override
public String convert2AbsFullPath(String str) {
return convert2AbsFullPath(null, str);
}
public void b(byte b2) {
this.V = b2;
}
private static String b(String str) {
return (str == null || str.length() <= 0 || str.charAt(0) != '/') ? str : b(str.substring(1));
}
void b(boolean z) {
this.b.onAppUnActive(this);
if (z) {
callSysEventListener(ISysEventListener.SysEventType.onWebAppPause, this);
callSysEventListener(ISysEventListener.SysEventType.onWebAppBackground, this);
}
IApp.IAppStatusListener iAppStatusListener = this.P0;
if (iAppStatusListener != null) {
iAppStatusListener.onPause(this, null);
}
setStatus((byte) 2);
}
private void b() {
if (q() || !io.dcloud.e.c.h.a.c(getActivity())) {
return;
}
ThreadPool.self().addThreadTask(new d(obtainAppId()));
}
public static String b(Context context) {
return c(context).versionName;
}
private JSONObject a(InputStream inputStream) {
try {
if (!this.s1) {
inputStream = new UnicodeInputStream(inputStream, Charset.defaultCharset().name());
}
return new JSONObject(new String(IOUtil.getBytes(inputStream)));
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
@Override
public void a(Activity activity) {
super.a(activity);
AppStatusBarManager appStatusBarManager = this.m;
if (appStatusBarManager != null) {
appStatusBarManager.checkImmersedStatusBar(activity, this.b1);
this.m.isFullScreen = isFullScreen();
}
this.l.mJsonViewOption = JSONUtil.createJSONObject("{}");
this.f = PdrUtil.parseInt(SP.getBundleData(getActivity(), BaseInfo.PDR, "StatusBarHeight"), 0);
updateScreenInfo(4);
this.z1 = false;
IActivityHandler iActivityHandler = DCloudAdapterUtil.getIActivityHandler(getActivity());
if (!q() && iActivityHandler != null) {
HashMap hashMap = new HashMap();
hashMap.put(CreateShortResultReceiver.KEY_VERSIONNAME, this.A);
hashMap.put("appid", this.p);
hashMap.put("name", this.t0);
hashMap.put("adid", this.N0);
hashMap.put("bg", this.Y0);
hashMap.put(WXBasicComponentType.IMG, convert2AbsFullPath(this.Z0));
io.dcloud.a.a(getActivity(), this.p, "save", hashMap);
}
Intent intent = activity.getIntent();
if (intent != null) {
Bundle extras = intent.getExtras();
if (extras != null && extras.containsKey(IntentConst.FROM_SHORT_CUT_STRAT) && extras.getBoolean(IntentConst.FROM_SHORT_CUT_STRAT)) {
this.z1 = true;
}
if (extras != null && extras.containsKey(IntentConst.WEBAPP_ACTIVITY_CREATE_SHORTCUT)) {
this.B1 = extras.getString(IntentConst.WEBAPP_ACTIVITY_CREATE_SHORTCUT);
}
if (extras != null && extras.containsKey("shortcutQuit")) {
this.A1 = extras.getString("shortcutQuit");
}
if (extras != null && extras.containsKey(IntentConst.START_FORCE_SHORT_QUIT)) {
this.A1 = extras.getString(IntentConst.START_FORCE_SHORT_QUIT);
}
if (intent.hasExtra(IntentConst.START_FORCE_SHORT)) {
this.B1 = intent.getStringExtra(IntentConst.START_FORCE_SHORT);
}
if (TextUtils.isEmpty(this.B1)) {
String launchType = BaseInfo.getLaunchType(intent);
this.B1 = AbsoluteConst.INSTALL_OPTIONS_FORCE;
if (launchType.equals("scheme")) {
this.B1 = "query";
} else if (this.P) {
this.B1 = AbsoluteConst.INSTALL_OPTIONS_FORCE;
} else {
SharedPreferences orCreateBundle = SP.getOrCreateBundle(activity, "pdr");
String string = orCreateBundle.getString(AbsoluteConst.TEST_RUN + this.p, null);
if (!TextUtils.isEmpty(string) && string.equals("__am=t")) {
this.B1 = AbsoluteConst.INSTALL_OPTIONS_FORCE;
} else {
this.B1 = "none";
}
}
}
}
try {
ADUtils.runThreadCheckADDownload(activity);
} catch (Exception e) {
e.printStackTrace();
}
}
String a(String str) {
return this.k0 + str;
}
public void a(ICallBack iCallBack) {
if ((BaseInfo.ISDEBUG || this.j0) && this.V == 1) {
ThreadPool.self().addThreadTask(new c(iCallBack), true);
} else {
iCallBack.onCallBack(0, null);
}
}
private boolean a(int i) {
PermissionUtil.sUseStreamAppPermissionDialogCount = 0;
WebViewFactory.sUsePermissionWebviews.clear();
PermissionUtil.removeTempPermission(this.a, this.p);
String str = r;
Logger.e(str, "start0 mAppid===" + this.p);
BaseInfo.sCurrentAppOriginalAppid = this.z;
BaseInfo.putStartupTimeData(this.p, String.valueOf(System.currentTimeMillis()));
BaseInfo.sProcessId = (long) Process.myPid();
String str2 = r;
StringBuilder sb = new StringBuilder();
sb.append(this.p);
sb.append(this.V == 1 ? " APP_RUNNING_MODE" : " FS_RUNNING_MODE");
Logger.i(str2, sb.toString());
t();
setStatus((byte) 3);
IApp.IAppStatusListener iAppStatusListener = this.P0;
if (iAppStatusListener != null) {
iAppStatusListener.onStart();
}
String str3 = r;
Logger.i(str3, "mLaunchPath=" + this.l0);
Logger.i("download_manager", "webapp start task begin success appid=" + this.p + " mLaunchPath=" + this.l0);
String str4 = TestUtil.START_STREAM_APP;
StringBuilder sb2 = new StringBuilder();
sb2.append("webapp start appid=");
sb2.append(this.p);
TestUtil.print(str4, sb2.toString());
BaseInfo.setLoadingLaunchePage(true, "start0");
String stringExtra = getActivity().getIntent().getStringExtra(IntentConst.WEBAPP_ACTIVITY_LAUNCH_PATH);
if (stringExtra != null && !"".equals(stringExtra.trim())) {
getActivity().getIntent().removeExtra(IntentConst.WEBAPP_ACTIVITY_LAUNCH_PATH);
if (!"about:blank".equals(stringExtra)) {
stringExtra = convert2WebviewFullPath(null, stringExtra);
}
this.o0 = true;
} else if (BaseInfo.isWap2AppAppid(this.p) && !TextUtils.isEmpty(this.n0)) {
stringExtra = convert2WebviewFullPath(null, this.n0);
} else {
stringExtra = convert2WebviewFullPath(null, this.l0);
}
if (a((IApp) this) && !new File(a(BaseInfo.sConfigXML)).exists()) {
stringExtra = TextUtils.isEmpty(this.m0) ? this.o1 : this.m0;
}
Uri data = getActivity().getIntent().getData();
if (data != null && data.toString().endsWith(".html")) {
stringExtra = data.toString();
}
if (this.q1) {
stringExtra = convert2WebviewFullPath(null, "__uniappview.html");
}
Object processEvent = this.y.processEvent(IMgr.MgrType.WindowMgr, i, new Object[]{this, stringExtra, Boolean.valueOf(this.T0), this.W0});
if (processEvent == null) {
return true;
}
return Boolean.parseBoolean(String.valueOf(processEvent));
}
private boolean a(IApp iApp) {
return (TextUtils.isEmpty(iApp.getOriginalDirectPage()) || iApp.obtainWebAppIntent().hasExtra(IntentConst.DIRECT_PAGE)) ? false : true;
}
public boolean a(boolean z) {
if (z) {
this.r1 = null;
this.y.processEvent(IMgr.MgrType.WindowMgr, 76, this);
}
setAppDataPath(BaseInfo.sCacheFsAppsPath + this.p + DeviceInfo.sSeparatorChar + BaseInfo.REAL_PRIVATE_WWW_DIR);
boolean b2 = b(this.p, null);
if (b2) {
setConfigProperty(IApp.ConfigProperty.CONFIG_funSetUA, String.valueOf(false));
PermissionUtil.clearUseRejectedCache();
showSplash();
this.y.processEvent(IMgr.MgrType.FeatureMgr, 3, this.p);
callSysEventListener(ISysEventListener.SysEventType.onWebAppReStart, null);
this.g1 = false;
TestUtil.record(AbsoluteConst.RUN_5AP_TIME_KEY);
return a(10);
}
return b2;
}
private void a() {
IPdrModule a2;
if (this.s1) {
return;
}
if (!SDK.isUniMPSDK()) {
io.dcloud.e.c.a.f().a(this.a);
}
if (q() || (a2 = io.dcloud.e.c.e.a().a("commit")) == null) {
return;
}
Object[] objArr = new Object[3];
objArr[0] = this;
objArr[1] = this.N0;
JSONObject jSONObject = this.y.h;
objArr[2] = jSONObject != null ? jSONObject.optString("version") : "0.1";
a2.execute("start_up", objArr);
}
public static int a(Context context) {
return c(context).versionCode;
}
public IFrameView a(IWebviewStateListener iWebviewStateListener) {
t();
return (IFrameView) this.y.processEvent(IMgr.MgrType.WindowMgr, 17, new Object[]{this, convert2WebviewFullPath(null, this.l0), iWebviewStateListener});
}
public IFrameView a(IWebviewStateListener iWebviewStateListener, IDCloudWebviewClientListener iDCloudWebviewClientListener) {
t();
return (IFrameView) this.y.processEvent(IMgr.MgrType.WindowMgr, 17, new Object[]{this, convert2WebviewFullPath(null, this.l0), iWebviewStateListener, iDCloudWebviewClientListener});
}
private boolean a(ISysEventListener iSysEventListener, ISysEventListener.SysEventType sysEventType) {
if (!(iSysEventListener instanceof IBoot) || PdrUtil.parseBoolean(String.valueOf(this.y.processEvent(null, 1, iSysEventListener)), false, false)) {
return true;
}
return !(sysEventType == ISysEventListener.SysEventType.onStart || sysEventType == ISysEventListener.SysEventType.onStop || sysEventType == ISysEventListener.SysEventType.onPause || sysEventType == ISysEventListener.SysEventType.onResume) || (iSysEventListener instanceof ReceiveSystemEventVoucher);
}
public static boolean a(ISysEventListener.SysEventType sysEventType) {
return (sysEventType == ISysEventListener.SysEventType.onKeyDown || sysEventType == ISysEventListener.SysEventType.onKeyUp || sysEventType == ISysEventListener.SysEventType.onKeyLongPress) ? false : true;
}
public boolean a(String str, JSONObject jSONObject) {
String str2;
boolean z;
boolean z2;
ArrayList<XmlUtil.DHNode> elements;
int size;
int i;
XmlUtil.DHNode element;
g gVar = this.s;
gVar.c = true;
gVar.d = true;
String str3 = BaseInfo.sCacheFsAppsPath + this.p + DeviceInfo.sSeparatorChar + BaseInfo.APP_WWW_FS_DIR;
String str4 = str3.substring(0, str3.length() - 1) + "_unzip" + File.separatorChar;
String str5 = str3.substring(0, str3.length() - 1) + "_backup" + File.separatorChar;
String str6 = str3.substring(0, str3.length() - 1) + "_backup1" + File.separatorChar;
?? file = new File(str);
InputStream inputStream = null;
String str7 = null;
XmlUtil.DHNode dHNode = null;
try {
try {
try {
try {
try {
DHFile.delete(str4);
ZipUtils.upZipFile(file, str4);
} catch (IOException e) {
e = e;
file = 0;
str2 = null;
}
} catch (IOException e2) {
e = e2;
str2 = null;
}
try {
file = DHFile.getInputStream(DHFile.createFileHandler(str4 + BaseInfo.WGTU_UPDATE_XML));
try {
if (file == 0) {
this.s.b = DOMException.toJSON((int) DOMException.CODE_RUNTIME_WGTU_UPDATE_NOT_EXIST, DOMException.MSG_RUNTIME_WGTU_UPDATE_NOT_EXIST);
this.s.a = true;
IOUtil.close((InputStream) file);
return false;
}
XmlUtil.DHNode XML_Parser = XmlUtil.XML_Parser(file);
if (XML_Parser != null) {
String attributeValue = XmlUtil.getAttributeValue(XML_Parser, "appid");
String attributeValue2 = XmlUtil.getAttributeValue(XmlUtil.getElement(XML_Parser, AbsoluteConst.XML_BASIS), "version");
if (!BaseInfo.ISDEBUG && !this.p.equalsIgnoreCase(attributeValue)) {
this.s.b = DOMException.toJSON((int) DOMException.CODE_RUNTIME_WGTU_UPDATE_APPID_NOT_MATCH, DOMException.MSG_RUNTIME_WGTU_UPDATE_APPID_NOT_MATCH);
element = null;
z = false;
IOUtil.close((InputStream) file);
str2 = str7;
dHNode = element;
if (!z) {
try {
DHFile.deleteFile(str5);
byte b2 = this.V;
if (b2 == 1) {
DHFile.copyDir(this.k0, str5);
} else if (b2 == 0) {
DHFile.copyFile(str3, str5, true, false);
z2 = true;
elements = XmlUtil.getElements(dHNode, AbsoluteConst.XML_ITEM);
if (elements != null && !elements.isEmpty()) {
size = elements.size();
for (i = 0; i < size; i++) {
DHFile.deleteFile(str5 + XmlUtil.getAttributeValue(elements.get(i), AbsoluteConst.XML_PATH));
}
}
if (1 == DHFile.copyFile(str2, str5, true, false)) {
DHFile.deleteFile(str5);
this.s.b = DOMException.toJSON(-5, DOMException.MSG_IO_ERROR);
this.s.a = true;
return false;
}
try {
DHFile.deleteFile(str4);
if (z2) {
DHFile.rename(str3, str6.substring(str6.substring(0, str6.length() - 1).lastIndexOf(47) + 1));
}
DHFile.rename(str5, BaseInfo.APP_WWW_FS_DIR);
if (z2) {
DHFile.deleteFile(str6);
}
b((byte) 0);
setAppDataPath(str3);
BaseInfo.BaseAppInfo baseAppInfo = new BaseInfo.BaseAppInfo(this.p, this.A);
this.t = baseAppInfo;
baseAppInfo.saveToBundleData(getActivity());
} catch (IOException e3) {
e3.printStackTrace();
this.s.b = DOMException.toJSON(-5, DOMException.MSG_IO_ERROR);
this.s.a = true;
return false;
}
}
z2 = false;
elements = XmlUtil.getElements(dHNode, AbsoluteConst.XML_ITEM);
if (elements != null) {
size = elements.size();
while (i < size) {
}
}
if (1 == DHFile.copyFile(str2, str5, true, false)) {
}
} catch (Exception e4) {
e4.printStackTrace();
try {
DHFile.deleteFile(str4);
} catch (IOException e5) {
e5.printStackTrace();
}
this.s.b = DOMException.toJSON(-99, DOMException.MSG_UNKNOWN_ERROR);
this.s.a = true;
return false;
}
} else {
this.s.a = true;
try {
DHFile.deleteFile(str4);
} catch (IOException e6) {
e6.printStackTrace();
}
}
return false;
}
if (!this.A.equals(attributeValue2) && !jSONObject.optBoolean(AbsoluteConst.INSTALL_OPTIONS_FORCE)) {
this.s.b = DOMException.toJSON((int) DOMException.CODE_RUNTIME_WGTU_UPDATE_VERSION_NOT_MATCH, DOMException.MSG_RUNTIME_WGTU_UPDATE_VERSION_NOT_MATCH);
element = null;
z = false;
IOUtil.close((InputStream) file);
str2 = str7;
dHNode = element;
if (!z) {
}
return false;
}
str2 = str4 + BaseInfo.APP_WWW_FS_DIR;
String str8 = str2 + BaseInfo.sConfigXML;
if (DHFile.isExist(str8)) {
InputStream inputStream2 = DHFile.getInputStream(DHFile.createFileHandler(str8));
z = a(inputStream2, this.p, jSONObject);
IOUtil.close(inputStream2);
element = XmlUtil.getElement(XML_Parser, AbsoluteConst.XML_REMOVE);
str7 = str2;
IOUtil.close((InputStream) file);
str2 = str7;
dHNode = element;
if (!z) {
}
return false;
}
this.s.b = DOMException.toJSON((int) DOMException.CODE_RUNTIME_WGTU_WWW_MANIFEST_NOT_EXIST, DOMException.MSG_RUNTIME_WGTU_WWW_MANIFEST_NOT_EXIST);
this.s.a = true;
IOUtil.close((InputStream) file);
return false;
}
throw new Exception();
} catch (Exception e7) {
e = e7;
e.printStackTrace();
this.s.b = DOMException.toJSON((int) DOMException.CODE_RUNTIME_WGTU_UPDATE_ERROR_MALFORMED, DOMException.MSG_RUNTIME_WGTU_UPDATE_ERROR_MALFORMED);
this.s.a = true;
IOUtil.close((InputStream) file);
return false;
}
} catch (Exception e8) {
e = e8;
file = 0;
}
} catch (Throwable th) {
th = th;
inputStream = file;
IOUtil.close(inputStream);
throw th;
}
} catch (FileNotFoundException unused) {
DHFile.delete(str4);
this.s.b = DOMException.toJSON(-4, DOMException.MSG_FILE_NOT_EXIST);
this.s.a = true;
IOUtil.close((InputStream) null);
return false;
} catch (Exception e9) {
Logger.w(e9);
DHFile.delete(str4);
this.s.b = DOMException.toJSON((int) DOMException.CODE_RUNTIME_WGT_OR_WGTU_ERROR_MALFORMED, DOMException.MSG_RUNTIME_WGT_OR_WGTU_ERROR_MALFORMED);
this.s.a = true;
IOUtil.close((InputStream) null);
return false;
}
} catch (Throwable th2) {
th = th2;
}
}
private String a(byte b2) {
byte b3 = this.V;
if (b3 == 1) {
return BaseInfo.sBaseResAppsFullPath + this.p + "/" + BaseInfo.APP_WWW_FS_DIR;
} else if (b3 == 0) {
return DeviceInfo.FILE_PROTOCOL + this.k0;
} else {
return null;
}
}
public void a(String str, int i) {
this.F1.put(str, Integer.valueOf(i));
if (TextUtils.isEmpty(this.G1)) {
this.G1 = str + "=" + i;
} else {
this.G1 += "&" + str + "=" + i;
}
SP.getOrCreateBundle(getActivity(), this.p + "_1").edit().putString("Authorize", this.G1).commit();
}
private boolean a(JSONObject jSONObject, g gVar) {
boolean z;
if (jSONObject != null && jSONObject.has(IApp.ConfigProperty.CONFIG_UNIAPP_CONTROL)) {
z = false;
String optString = jSONObject.optString(IApp.ConfigProperty.CONFIG_UNIAPP_CONTROL);
if (!TextUtils.isEmpty(optString)) {
}
if (!z) {
gVar.a = true;
gVar.b = DOMException.toJSON((int) DOMException.CODE_RUNTIME_COMPONENTS_MODE_NOT_SUPPORT, DOMException.MSG_RUNTIME_COMPONENTS_MODE_NOT_SUPPORT);
}
return z;
}
z = true;
if (!z) {
}
return z;
}
}