|
@@ -1126,10 +1126,12 @@ public class Bridge implements IPostMessage {
|
|
|
String cordovaPluginsJS = JSExport.getCordovaPluginJS(context);
|
|
|
String cordovaPluginsFileJS = JSExport.getCordovaPluginsFileJS(context);
|
|
|
String localUrlJS = "window.WEBVIEW_SERVER_URL = '" + localUrl + "';"
|
|
|
- // 修复gecko view 远程验证权限
|
|
|
- +"Services.prefs.setBoolPref('services.settings.remote-settings.enabled', false);"
|
|
|
- // 修复@capacitor/device 丢失 identifier参数 _capuid
|
|
|
- +"setInterval(()=>{window.localStorage.setItem('_capuid', '" + androidId + "')},1000);";
|
|
|
+ // (浏览器缺少Services无法运行)修复gecko view 远程验证权限
|
|
|
+ // +"Services.prefs.setBoolPref('services.settings.remote-settings.enabled', false);"
|
|
|
+ /* Fixed: 修复@capacitor/device
|
|
|
+ 修复丢失identifier参数_capuid,导致每次重启都是新的uid
|
|
|
+ */
|
|
|
+ +"window.localStorage.setItem('_capuid', '" + androidId + "');";
|
|
|
// String remoteDisableJS = "Services.prefs.setBoolPref('services.settings.remote-settings.enabled', false);";
|
|
|
|
|
|
return new JSInjector(globalJS, bridgeJS, pluginJS, cordovaJS, cordovaPluginsJS, cordovaPluginsFileJS, localUrlJS);
|