initSDK新增useLocalTbsCore、tbsCoreUrl配置项;initialize去除useLocalTbsCore、tbsCoreUrl配置项;
parent
484a2878b2
commit
76fabf9187
|
@ -67,16 +67,6 @@ public class BaseModule extends BaseApi {
|
||||||
disablePermission = false;
|
disablePermission = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Boolean useLocalTbsCore = (Boolean) param.get("useLocalTbsCore");
|
|
||||||
if (useLocalTbsCore == null) {
|
|
||||||
useLocalTbsCore = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
String tbsCoreUrl = "";
|
|
||||||
if (param.get("tbsCoreUrl") != null) {
|
|
||||||
tbsCoreUrl = (String) param.get("tbsCoreUrl");
|
|
||||||
}
|
|
||||||
|
|
||||||
String userId = "";
|
String userId = "";
|
||||||
if (param.get("userId") != null) {
|
if (param.get("userId") != null) {
|
||||||
userId = (String) param.get("userId");
|
userId = (String) param.get("userId");
|
||||||
|
@ -135,8 +125,6 @@ public class BaseModule extends BaseApi {
|
||||||
.setLogLevel(XLogLevel.LEVEL_VERBOSE)
|
.setLogLevel(XLogLevel.LEVEL_VERBOSE)
|
||||||
.setXLogDir(new File(getContext().getExternalCacheDir(),"xlog"))
|
.setXLogDir(new File(getContext().getExternalCacheDir(),"xlog"))
|
||||||
.setPageCountLimit(pageCountLimit)
|
.setPageCountLimit(pageCountLimit)
|
||||||
.setUseLocalTbsCore(useLocalTbsCore)
|
|
||||||
.setTbsCoreUrl(tbsCoreUrl);
|
|
||||||
|
|
||||||
if (customWebViewUserAgent != null)
|
if (customWebViewUserAgent != null)
|
||||||
builder.setCustomWebViewUserAgent(customWebViewUserAgent);
|
builder.setCustomWebViewUserAgent(customWebViewUserAgent);
|
||||||
|
|
|
@ -169,7 +169,11 @@ public class InitSDKModule extends BaseApi {
|
||||||
configBuilder.setXLogDir(logDir);
|
configBuilder.setXLogDir(logDir);
|
||||||
}
|
}
|
||||||
configBuilder.setEnablePreNewProcess((Boolean) configMap.get("enablePreNewProcess"));
|
configBuilder.setEnablePreNewProcess((Boolean) configMap.get("enablePreNewProcess"));
|
||||||
|
configBuilder.setUseLocalTbsCore((Boolean) configMap.get("useLocalTbsCore"));
|
||||||
|
String tbsCoreUrl = (String) configMap.get("tbsCoreUrl");
|
||||||
|
if (tbsCoreUrl != null) {
|
||||||
|
configBuilder.setTbsCoreUrl(tbsCoreUrl);
|
||||||
|
}
|
||||||
Map<Object, Object> uiConfigMap = (Map<Object, Object>) param.get("uiConfig");
|
Map<Object, Object> uiConfigMap = (Map<Object, Object>) param.get("uiConfig");
|
||||||
String appendingCustomUserAgent = (String) uiConfigMap.get("appendingCustomUserAgent");
|
String appendingCustomUserAgent = (String) uiConfigMap.get("appendingCustomUserAgent");
|
||||||
if (appendingCustomUserAgent != null) {
|
if (appendingCustomUserAgent != null) {
|
||||||
|
|
16
lib/mop.dart
16
lib/mop.dart
|
@ -202,6 +202,14 @@ class Config {
|
||||||
/// 是否提前创建进程
|
/// 是否提前创建进程
|
||||||
bool enablePreNewProcess = false;
|
bool enablePreNewProcess = false;
|
||||||
|
|
||||||
|
/// Android属性
|
||||||
|
/// 是否使用本地加载tbs内核
|
||||||
|
bool useLocalTbsCore = false;
|
||||||
|
|
||||||
|
/// Android属性
|
||||||
|
/// tbs内核的下载地址,不包含文件名
|
||||||
|
String? tbsCoreUrl;
|
||||||
|
|
||||||
Config(this.finStoreConfigs);
|
Config(this.finStoreConfigs);
|
||||||
|
|
||||||
Map<String, dynamic> toMap() {
|
Map<String, dynamic> toMap() {
|
||||||
|
@ -243,6 +251,8 @@ class Config {
|
||||||
"logMaxAliveSec": logMaxAliveSec,
|
"logMaxAliveSec": logMaxAliveSec,
|
||||||
"logDir": logDir,
|
"logDir": logDir,
|
||||||
"enablePreNewProcess": enablePreNewProcess,
|
"enablePreNewProcess": enablePreNewProcess,
|
||||||
|
"useLocalTbsCore": useLocalTbsCore,
|
||||||
|
"tbsCoreUrl": tbsCoreUrl,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -964,9 +974,7 @@ class Mop {
|
||||||
UIConfig? uiConfig,
|
UIConfig? uiConfig,
|
||||||
String? customWebViewUserAgent,
|
String? customWebViewUserAgent,
|
||||||
int? appletIntervalUpdateLimit,
|
int? appletIntervalUpdateLimit,
|
||||||
int? maxRunningApplet,
|
int? maxRunningApplet
|
||||||
bool useLocalTbsCore = false,
|
|
||||||
String? tbsCoreUrl,
|
|
||||||
}) async {
|
}) async {
|
||||||
List<Map<String, dynamic>>? storeConfigs =
|
List<Map<String, dynamic>>? storeConfigs =
|
||||||
finStoreConfigs?.map((e) => e.toMap()).toList();
|
finStoreConfigs?.map((e) => e.toMap()).toList();
|
||||||
|
@ -988,8 +996,6 @@ class Mop {
|
||||||
"customWebViewUserAgent": customWebViewUserAgent,
|
"customWebViewUserAgent": customWebViewUserAgent,
|
||||||
"appletIntervalUpdateLimit": appletIntervalUpdateLimit,
|
"appletIntervalUpdateLimit": appletIntervalUpdateLimit,
|
||||||
"maxRunningApplet": maxRunningApplet,
|
"maxRunningApplet": maxRunningApplet,
|
||||||
"useLocalTbsCore": useLocalTbsCore,
|
|
||||||
"tbsCoreUrl": tbsCoreUrl
|
|
||||||
});
|
});
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue