fix: handle system gestures for ToolHub panels

This commit is contained in:
7015725
2026-05-12 10:24:30 +08:00
parent 5c95d04fab
commit 7b7fbdf9cf
8 changed files with 124 additions and 140 deletions

View File

@@ -245,6 +245,17 @@ FloatBallAppWM.prototype.startAsync = function(entryProcInfo, closeRule) {
);
if (cfgRcv) this.state.receivers.push(cfgRcv);
var sysDlgRcv = registerReceiverOnMain("android.intent.action.CLOSE_SYSTEM_DIALOGS", function(ctx, intent) {
try {
var reason = "";
try { reason = String(intent.getStringExtra("reason") || ""); } catch (eReason) { reason = ""; }
h.post(new JavaAdapter(java.lang.Runnable, {
run: function() { try { self.handleSystemUiDismiss(reason); } catch (eSysDlg) {} }
}));
} catch (eSysDlgOuter) {}
});
if (sysDlgRcv) this.state.receivers.push(sysDlgRcv);
var startBox = { ok: false, err: "启动确认超时", added: false };
var startLatch = new java.util.concurrent.CountDownLatch(1);
var posted = false;