Skip to content

Commit

Permalink
2.1.6 - 新增Root权限功能配置 适配排行榜改版 修复模块独立引用/通话状态值 优化逛一逛获取倒计时
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperMonster003 committed Jul 19, 2021
1 parent 642102c commit 65db6ba
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 21 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
* `新增` Root权限功能配置
* `修复` 模块交叉引用导致部分模块独立引用失败的问题
* `修复` 版本忽略管理匹配输入时结果可能出现错误的问题
* `修复` 配置工具设备通话状态值无法直接填入空闲值的问题
* `修复` 排行榜自定义标题无效导致初始状态准备失败的问题 _[`issue #498`](https://github.com/SuperMonster003/Ant-Forest/issues/498)_
* `修复` 排行榜页面更新导致的好友信息获取异常的问题 _[`issue #499`](https://github.com/SuperMonster003/Ant-Forest/issues/499)_
* `修复` 逛一逛方案获取排行榜倒计时可能出现空指针引用的问题
Expand Down
18 changes: 10 additions & 8 deletions ant-forest-launcher.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Alipay ant forest intelligent collection script launcher
* @since Jul 19, 2021
* @version 2.1.6 Alpha6
* @version 2.1.6
* @author SuperMonster003
* @see https://github.com/SuperMonster003/Ant-Forest
*/
Expand Down Expand Up @@ -3719,8 +3719,8 @@ let $$init = {
$$link(_text).$(_height).$(_signal);
break;
}
} catch (e /* TypeError: Cannot call method "childCount" of null */) {
sleep(1.5e3);
} catch (e) {
// eg: TypeError: Cannot call method "childCount" of null
}
sleep(480);
}
Expand Down Expand Up @@ -3756,7 +3756,12 @@ let $$init = {
let _child_cnt;
let _child_w = _list_w;
while ((_child_cnt = _child_w.childCount())) {
_child_w = _child_w.child(_child_cnt - 1);
let _child_w_tmp = _child_w.child(_child_cnt - 1);
if (_child_w_tmp === null) {
break;
}
_child_w = _child_w_tmp;
_child_w_tmp = null;
}
_rl_end_w = _child_w;
if ($$sel.pickup(_rl_end_w, 'txt').match(/没有更多/)) {
Expand Down Expand Up @@ -6016,16 +6021,13 @@ let $$af = {
// tool function(s) //

function _diffLmtRch() {
if (_pool.isDiff()) {
if ($$flag.rl_bottom_rch || _pool.isDiff()) {
delete $$flag.rl_capt_pool_ctr;
return;
}

let _max = $$cfg.rank_list_capt_pool_diff_check_threshold;

debugInfo('排行榜截图样本池差异检测:');
debugInfo('检测未通过: (' + ++_ctr + '/' + _max + ')');

if (_ctr >= _max) {
debugInfo('发送排行榜停检信号');
debugInfo('>已达截图样本池差异检测阈值');
Expand Down
3 changes: 1 addition & 2 deletions ant-forest-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -7531,11 +7531,10 @@ $$view.page.new('通话状态监测', 'phone_call_state_monitor_page', (t) => {
if (!_input) {
return d.dismiss();
}
let _num = Number(_input);
let _num = Math.floor(Number(_input));
if (isNaN(_num)) {
return dialogsx.alertTitle(d, '输入值类型不合法');
}
_num = Math.floor(_num);
if (_num !== devicex.getCallState()) {
dialogsx
.builds([
Expand Down
1 change: 1 addition & 0 deletions documents/CHANGELOG-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* `新增` Root权限功能配置
* `修复` 模块交叉引用导致部分模块独立引用失败的问题
* `修复` 版本忽略管理匹配输入时结果可能出现错误的问题
* `修复` 配置工具设备通话状态值无法直接填入空闲值的问题
* `修复` 排行榜自定义标题无效导致初始状态准备失败的问题 _[`issue #498`](https://github.com/SuperMonster003/Ant-Forest/issues/498)_
* `修复` 排行榜页面更新导致的好友信息获取异常的问题 _[`issue #499`](https://github.com/SuperMonster003/Ant-Forest/issues/499)_
* `修复` 逛一逛方案获取排行榜倒计时可能出现空指针引用的问题
Expand Down
3 changes: 3 additions & 0 deletions modules/ext-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1910,6 +1910,7 @@ let ext = {
* @property {boolean|'YES'|'NO'} [sd=true] - {@alias showDomain}
* @property {boolean|'YES'|'NO'} [enableScrollBar=true] - zh-CN: 是否使用webview的滚动条, 包括垂直和水平. 只对Android有效. (since 9.2)
* @property {boolean|'YES'|'NO'} [es=true] - {@alias enableScrollBar}
* @property {boolean|'YES'|'NO'} [titlePenetrate='NO'] - zh-CN: 是否允许导航栏点击穿透. (since 10.1.52)
* @property {boolean|'YES'|'NO'} [appClearTop]
* @property {boolean|'YES'|'NO'} [abv]
* @property {string} [bizScenario] - {@example 'search'}
Expand Down Expand Up @@ -1952,10 +1953,12 @@ let ext = {
* @property {boolean|'YES'|'NO'} [smartToolBar]
* @property {string} [sub_url] - {@example '[]'}
* @property {string} [third_platform] - {@example '{}'}
* @property {string[]} [nbpkgres] - {@example ['63300002', '66666817', '68687209']}
* @property {boolean|'YES'|'NO'} [tinyPubRes]
* @property {number|string} [titleColor]
* @property {boolean|'YES'|'NO'} [transparentTitleTextAuto]
* @property {string} [ttid] - {@example '12zfb0xxxxxx'}
* @property {string} [url] - {@example '/www/home.html'}
* @property {boolean|'YES'|'NO'} [useSW]
* @property {number|string} [waitRender] - {@example '300'}
* @property {boolean|'YES'|'NO'} [fullscreen]
Expand Down
2 changes: 1 addition & 1 deletion modules/ext-device.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ let BatteryManager = android.os.BatteryManager;
let ServiceManager = android.os.ServiceManager;
let DisplayMetrics = android.util.DisplayMetrics;
let RootTool = org.autojs.autojs.tool.RootTool;
let ITelecomService = com.android.internal.telephony.ITelecomService;
let ITelecomService = com.android.internal.telecom.ITelecomService;

// noinspection JSUnusedGlobalSymbols
let ext = {
Expand Down
14 changes: 7 additions & 7 deletions modules/ext-dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ let ext = {
_titles[d].ori_text = _ori_txt = _ori_view.getText();
}
if (!_ori_color) {
_titles[d].ori_text_color = _ori_color = _ori_view.getTextColors().colors[0];
_titles[d].ori_text_color = _ori_color = _ori_view.getTextColors().getColors()[0];
}
if (!_ori_bg_color) {
let _ori_view_bg_d = _ori_view.getBackground();
Expand Down Expand Up @@ -512,7 +512,7 @@ let ext = {
/**
* @template {JsDialog$|MaterialDialog$} DIALOG
* @param {DIALOG} d
* @param {function} [f]
* @param {function|*} [f]
* @returns {DIALOG}
*/
disableBack(d, f) {
Expand Down Expand Up @@ -610,12 +610,11 @@ let ext = {
},
/**
* @param {JsDialog$|MaterialDialog$} d
* @param {string|{toString:function():string}} [str='']
* @param {string|{toString:function():string}} [s='']
*/
setInputText(d, str) {
ui.run(() => {
d && d.getInputEditText().setText(str ? str.toString() : '');
});
setInputText(d, s) {
let _s = typeof s === 'string' ? s : typeof s !== 'undefined' ? s.toString() : '';
ui.run(() => d && d.getInputEditText().setText(_s));
},
/**
* @param {JsDialog$|MaterialDialog$} d
Expand Down Expand Up @@ -729,6 +728,7 @@ let ext = {
* neutral?: string|[RegExp|string,string],
* negative?: string|[RegExp|string,string],
* positive?: string|[RegExp|string,string],
* action?: function(d:BuildCountdownExtendedJsDialog),
* },
* }} extensions
* @returns {BuildCountdownExtendedJsDialog}
Expand Down
13 changes: 12 additions & 1 deletion modules/mod-treasury-vault.js
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,18 @@ module.exports = {
'当前暂未生成图片模板\n' +
'脚本在下次运行时将自动生成新模板',
about_root_access_functions: // 关于Root权限功能
'开发中...',
'当Auto.js被授予Root权限时\n' +
'可通过Root权限实现功能升级\n' +
'如可以直接模拟按键实现快速关屏\n' +
'或通过adb命令直接杀死应用进程\n\n' +
'即便Auto.js未获取Root权限\n' +
'用户依然可以进行功能参数配置\n' +
'此时所有开启的功能均无法生效\n' +
'脚本在运行过程中将做平稳退化\n\n' +
'注意:\nRoot权限关闭应用时\n' +
'可能出现几秒钟的黑屏现象\n' +
'此时Toast及Floaty消息会出现阻塞\n' +
'因此可能影响运行结果展示的效果',
about_auto_enable_a11y_svc: // 关于自动开启无障碍服务
'通过修改系统无障碍服务的列表参数\n' +
'实现Auto.js无障碍服务的自动开启\n' +
Expand Down
4 changes: 2 additions & 2 deletions project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"build"
],
"packageName": "com.sm003.ant.forest",
"versionName": "2.1.6 Alpha6",
"versionCode": 419,
"versionName": "2.1.6",
"versionCode": 420,
"launchConfig": {
"displaySplash": false,
"hideLogs": false,
Expand Down

0 comments on commit 65db6ba

Please sign in to comment.