fix: disable legacy ToolApp back strips
This commit is contained in:
@@ -103,7 +103,7 @@ var ConfigValidator = {
|
|||||||
TOOLAPP_BACK_GESTURE_MODE: { type: "enum", values: ["edge", "surface", "off"], default: "surface" },
|
TOOLAPP_BACK_GESTURE_MODE: { type: "enum", values: ["edge", "surface", "off"], default: "surface" },
|
||||||
TOOLAPP_BACK_EDGE_WIDTH_DP: { type: "int", min: 1, max: 120, default: 72 },
|
TOOLAPP_BACK_EDGE_WIDTH_DP: { type: "int", min: 1, max: 120, default: 72 },
|
||||||
ENABLE_TOOLAPP_INNER_BACK_STRIPS: { type: "bool", default: false },
|
ENABLE_TOOLAPP_INNER_BACK_STRIPS: { type: "bool", default: false },
|
||||||
ENABLE_TOOLAPP_SCREEN_BACK_STRIPS: { type: "bool", default: true },
|
ENABLE_TOOLAPP_SCREEN_BACK_STRIPS: { type: "bool", default: false },
|
||||||
TOOLAPP_BACK_COMMIT_DISTANCE_DP: { type: "int", min: 1, max: 480, default: 36 },
|
TOOLAPP_BACK_COMMIT_DISTANCE_DP: { type: "int", min: 1, max: 480, default: 36 },
|
||||||
TOOLAPP_BACK_SURFACE_SLOP_DP: { type: "int", min: 8, max: 96, default: 24 },
|
TOOLAPP_BACK_SURFACE_SLOP_DP: { type: "int", min: 8, max: 96, default: 24 },
|
||||||
TOOLAPP_BACK_PROGRESS_DISTANCE_DP: { type: "int", min: 1, max: 720, default: 96 },
|
TOOLAPP_BACK_PROGRESS_DISTANCE_DP: { type: "int", min: 1, max: 720, default: 96 },
|
||||||
@@ -741,7 +741,7 @@ var ConfigManager = {
|
|||||||
TOOLAPP_BACK_GESTURE_MODE: "surface",
|
TOOLAPP_BACK_GESTURE_MODE: "surface",
|
||||||
TOOLAPP_BACK_EDGE_WIDTH_DP: 72,
|
TOOLAPP_BACK_EDGE_WIDTH_DP: 72,
|
||||||
ENABLE_TOOLAPP_INNER_BACK_STRIPS: false,
|
ENABLE_TOOLAPP_INNER_BACK_STRIPS: false,
|
||||||
ENABLE_TOOLAPP_SCREEN_BACK_STRIPS: true,
|
ENABLE_TOOLAPP_SCREEN_BACK_STRIPS: false,
|
||||||
TOOLAPP_BACK_COMMIT_DISTANCE_DP: 36,
|
TOOLAPP_BACK_COMMIT_DISTANCE_DP: 36,
|
||||||
TOOLAPP_BACK_SURFACE_SLOP_DP: 24,
|
TOOLAPP_BACK_SURFACE_SLOP_DP: 24,
|
||||||
TOOLAPP_BACK_PROGRESS_DISTANCE_DP: 96,
|
TOOLAPP_BACK_PROGRESS_DISTANCE_DP: 96,
|
||||||
@@ -861,7 +861,7 @@ var ConfigManager = {
|
|||||||
]},
|
]},
|
||||||
{ key: "TOOLAPP_BACK_EDGE_WIDTH_DP", name: "边缘模式起手宽度", type: "int", min: 1, max: 120, step: 1 },
|
{ key: "TOOLAPP_BACK_EDGE_WIDTH_DP", name: "边缘模式起手宽度", type: "int", min: 1, max: 120, step: 1 },
|
||||||
{ key: "ENABLE_TOOLAPP_INNER_BACK_STRIPS", name: "启用旧版页面覆盖热区(不推荐)", type: "bool" },
|
{ key: "ENABLE_TOOLAPP_INNER_BACK_STRIPS", name: "启用旧版页面覆盖热区(不推荐)", type: "bool" },
|
||||||
{ key: "ENABLE_TOOLAPP_SCREEN_BACK_STRIPS", name: "启用屏幕空白区返回", type: "bool" },
|
{ key: "ENABLE_TOOLAPP_SCREEN_BACK_STRIPS", name: "启用旧版屏幕空白区热区(已禁用)", type: "bool" },
|
||||||
{ key: "TOOLAPP_BACK_COMMIT_DISTANCE_DP", name: "设置页返回触发距离", type: "int", min: 1, max: 480, step: 1 },
|
{ key: "TOOLAPP_BACK_COMMIT_DISTANCE_DP", name: "设置页返回触发距离", type: "int", min: 1, max: 480, step: 1 },
|
||||||
{ key: "TOOLAPP_BACK_SURFACE_SLOP_DP", name: "表面横滑起手阈值", type: "int", min: 8, max: 96, step: 1 },
|
{ key: "TOOLAPP_BACK_SURFACE_SLOP_DP", name: "表面横滑起手阈值", type: "int", min: 8, max: 96, step: 1 },
|
||||||
{ key: "TOOLAPP_BACK_PROGRESS_DISTANCE_DP", name: "设置页返回动画距离", type: "int", min: 1, max: 720, step: 1 },
|
{ key: "TOOLAPP_BACK_PROGRESS_DISTANCE_DP", name: "设置页返回动画距离", type: "int", min: 1, max: 720, step: 1 },
|
||||||
|
|||||||
@@ -1210,59 +1210,15 @@ FloatBallAppWM.prototype.getToolAppBackEdgeWidthPx = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
FloatBallAppWM.prototype.isToolAppScreenBackStripsEnabled = function() {
|
FloatBallAppWM.prototype.isToolAppScreenBackStripsEnabled = function() {
|
||||||
try { return parseBooleanLike(this.config.ENABLE_TOOLAPP_SCREEN_BACK_STRIPS); } catch(e) {}
|
// 旧版 WindowManager 透明边缘热区已禁用:它可能抢 ACTION_DOWN,影响按钮、列表、SeekBar、Switch。
|
||||||
try { return String(this.config.ENABLE_TOOLAPP_SCREEN_BACK_STRIPS || "true") === "true"; } catch(e2) {}
|
// 保留函数和清理路径仅为兼容历史状态;正式返回手势由 ToolApp root surface 接管。
|
||||||
return true;
|
try { this.hideToolAppScreenBackStrips(); } catch(eHide) {}
|
||||||
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
FloatBallAppWM.prototype.showToolAppScreenBackStrips = function() {
|
FloatBallAppWM.prototype.showToolAppScreenBackStrips = function() {
|
||||||
// 只在 ToolApp 面板左右的屏幕空白区创建触摸层;绝不覆盖 ToolApp 矩形内部控件区域。
|
// 旧版 WindowManager 透明边缘热区已禁用;不要再创建额外触摸层。
|
||||||
try {
|
try { this.hideToolAppScreenBackStrips(); } catch(eHide) {}
|
||||||
this.hideToolAppScreenBackStrips();
|
|
||||||
if (!this.state || !this.state.wm || !this.state.viewerPanelLp) return false;
|
|
||||||
var lp0 = this.state.viewerPanelLp;
|
|
||||||
var sw = Math.max(1, Number(this.state.screen && this.state.screen.w || 0));
|
|
||||||
var sh = Math.max(1, Number(this.state.screen && this.state.screen.h || 0));
|
|
||||||
if (sw <= 1 || sh <= 1) {
|
|
||||||
try { var ss = this.getScreenSizePx(); sw = ss.w; sh = ss.h; } catch(eScreen) {}
|
|
||||||
}
|
|
||||||
var px = Number(lp0.x || 0);
|
|
||||||
var pw = Number(lp0.width || 0);
|
|
||||||
if (isNaN(px)) px = 0;
|
|
||||||
if (isNaN(pw) || pw <= 0) return false;
|
|
||||||
var minBlank = this.dp(3);
|
|
||||||
var leftW = Math.max(0, Math.floor(px));
|
|
||||||
var rightX = Math.floor(px + pw);
|
|
||||||
var rightW = Math.max(0, Math.floor(sw - rightX));
|
|
||||||
var made = false;
|
|
||||||
var arr = [];
|
|
||||||
var addBlankStrip = function(self, edge, x, w) {
|
|
||||||
if (!w || w < minBlank) return false;
|
|
||||||
var strip = self.createToolAppEdgeBackStrip(edge);
|
|
||||||
var flags = android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
|
|
||||||
android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
|
||||||
var lp = new android.view.WindowManager.LayoutParams(
|
|
||||||
w,
|
|
||||||
sh,
|
|
||||||
android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY,
|
|
||||||
flags,
|
|
||||||
android.graphics.PixelFormat.TRANSLUCENT
|
|
||||||
);
|
|
||||||
lp.gravity = android.view.Gravity.TOP | android.view.Gravity.START;
|
|
||||||
lp.x = x;
|
|
||||||
lp.y = 0;
|
|
||||||
try { self.state.wm.addView(strip, lp); arr.push(strip); return true; } catch(eAdd) { safeLog(self.L, 'w', 'add blank screen back strip fail edge=' + String(edge) + ' err=' + String(eAdd)); }
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
if (addBlankStrip(this, 0, 0, leftW)) made = true;
|
|
||||||
if (addBlankStrip(this, 1, rightX, rightW)) made = true;
|
|
||||||
this.state.toolAppScreenBackStrips = arr;
|
|
||||||
try { if (made) safeLog(this.L, 'd', 'blank screen back strips leftW=' + String(leftW) + ' rightW=' + String(rightW) + ' panelX=' + String(px) + ' panelW=' + String(pw)); } catch(eLog) {}
|
|
||||||
return made;
|
|
||||||
} catch(e) {
|
|
||||||
try { this.hideToolAppScreenBackStrips(); } catch(eHide2) {}
|
|
||||||
safeLog(this.L, 'w', "show blank screen back strips fail: " + String(e));
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
"alg": "SHA256withRSA",
|
"alg": "SHA256withRSA",
|
||||||
"files": {
|
"files": {
|
||||||
"th_01_base.js": {
|
"th_01_base.js": {
|
||||||
"sha256": "12c6645e42cb7dd21da495545e69f64d11c9d6b510aabf0d169edf883b57c4ff",
|
"sha256": "4174459f79dfbc9a79ae5fb148060470586f13c92bc28dbedc77396e0f93dc4b",
|
||||||
"size": 58140
|
"size": 58159
|
||||||
},
|
},
|
||||||
"th_02_core.js": {
|
"th_02_core.js": {
|
||||||
"sha256": "3c5c498d200e961d48fc9ca3f885475e770ecb32b83ec6a89d23df3f88aed1c9",
|
"sha256": "3c5c498d200e961d48fc9ca3f885475e770ecb32b83ec6a89d23df3f88aed1c9",
|
||||||
@@ -58,8 +58,8 @@
|
|||||||
"size": 304993
|
"size": 304993
|
||||||
},
|
},
|
||||||
"th_15_extra.js": {
|
"th_15_extra.js": {
|
||||||
"sha256": "8ef8f3b48c324426f9f6926e7e4fbee8cea6f15b6e465c1dad6982bbb00c3af3",
|
"sha256": "037d6721289f615a9022994717f09a4cd30e0d09a5fb573d23606220faacd84b",
|
||||||
"size": 130833
|
"size": 128762
|
||||||
},
|
},
|
||||||
"th_16_entry.js": {
|
"th_16_entry.js": {
|
||||||
"sha256": "6c59d9891cd010647f84c3db93f1cf95c7bbfb758470ea21044bf72eb8ff73d1",
|
"sha256": "6c59d9891cd010647f84c3db93f1cf95c7bbfb758470ea21044bf72eb8ff73d1",
|
||||||
@@ -68,5 +68,5 @@
|
|||||||
},
|
},
|
||||||
"keyId": "toolhub-targets-2026-rsa3072",
|
"keyId": "toolhub-targets-2026-rsa3072",
|
||||||
"schema": 2,
|
"schema": 2,
|
||||||
"version": 20260522044045
|
"version": 20260522045519
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
d31WnUYPRd99BgqOnWKrh+xaCDIjlON13cKvM9s+T4xno3g11qoenoFo9rBI4Mcu63R783cIYS9PtfZ8ii1hlaB2DMNqebzGXFTi+9u/Yd56D5pV84Jd/SjL1yN6hTwXT9t/bHrS3E9npyyFVLVeponFagKHecgk/3yEe5GSmLAp1QX0o7ecca2L0rO534rMHa4Ml/dkrsGCwPAfWzuru/xpO8KV0zvQ4leSU7YT+ZxgU4o8L+scvXKDEp3wnaldqqy6ekIhk75m4qmVAPw4dsp+b5CtEcWNfgy6SgvkXz+PawvHOmWz67TQa5G4jCDP7EWynHFcF26U8xuO1x4x4bpNLdzImis/Dg14/HavNID0Yc72+3uJEGHL6RyCyGhic8+mG/25vSkB+brfy8qZK5K8stqZLIC1wJ/0IL0ppkx2LoDTyuwfk+vshzJDmiLBaJCgOuiR24ya3sFeDFD0OWLxbgQiXg1MoYNb1FP69h+i0f2ziea9zja2qEQ8aN81
|
l5dcsFyTm1d4MbDQ7XbMk8Swk4xdvIgu9yjUfupJbJBcSGmt43D4AR/VcAqypQc1BUeslBSpr2YWq8cnVO+9PFVNX2/NPY/hRjjD2HPJZ+jjcNUcSawDXkalcjzeMq7TcxhEadoLj3Hq6dimf7HzYklP+asLOZJfmVxw+2LfroIE+EnlhYhzVyeyWrYMXzpeuhZoO4eazVB3vfjn5gFgESU7yLjSymaUsYNgjx11kBA3Yhc6YdAe4wSf5KbX0prmHQ1pB7gs1YV720E9ECCGonD7nLvnpBMD7zuUb8wcgcq+v/qPCHhdDdaBPCrRQxormZ+gFdrzmoZemMpeYVNpRldAMZ2vwzWc6uQIrAoyujgDn2xcjv8ulY+/m6xM7qT/63kNLCcwN/vVrH7G9Ur/L3bpHyg14UbFmUhMuLpjAJ7HIYjJKORSRXE9JCy/LXV8vo7cy1fR9pBaxM1D+o25TwWU/uYS8sEp4skGetZvaxd0GAfhiprhUW+Xmd2cEar2
|
||||||
|
|||||||
Reference in New Issue
Block a user