6.3.1 - 新增发布通知权限 / WS 实例创建; 修复 floaty 模块异常 / 安卓 7.x 异常; UI 模式增强; 迁移至 View Binding

This commit is contained in:
SuperMonster003
2023-05-26 20:58:38 +08:00
parent 31ebd5b854
commit 1755ae3271
511 changed files with 12567 additions and 11063 deletions

View File

@@ -1,5 +1,9 @@
// noinspection JSUnusedGlobalSymbols
/* Overwritten protection. */
let { http } = global;
/**
* @param {org.autojs.autojs.runtime.ScriptRuntime} scriptRuntime
* @param {org.mozilla.javascript.Scriptable | global} scope
@@ -38,6 +42,9 @@ module.exports = function (scriptRuntime, scope) {
newInjectableWebClient() {
return new InjectableWebClient(Context.getCurrentContext(), scope);
},
newWebSocket(url) {
return new org.autojs.autojs.core.web.WebSocket(http.__okhttp__, url);
},
};
return Web;
@@ -46,7 +53,7 @@ module.exports = function (scriptRuntime, scope) {
/**
* @type {(keyof Internal.Web)[]}
*/
let methods = [ 'newInjectableWebView', 'newInjectableWebClient' ];
let methods = [ 'newInjectableWebView', 'newInjectableWebClient', 'newWebSocket' ];
__asGlobal__(web, methods, scope);
},
};