fix: 回归——islandSettings 只判空未判开关,岛关也挂 focus.param 导致所有进度通知被吞(v24 行为回归)

This commit is contained in:
cbb
2026-10-12 02:17:54 +08:00
parent 5d2944ac26
commit 2e745e0ecd
2 changed files with 6 additions and 4 deletions
+2 -2
View File
@@ -13,8 +13,8 @@ android {
applicationId = "com.smbfast.app" applicationId = "com.smbfast.app"
minSdk = 26 minSdk = 26
targetSdk = 35 targetSdk = 35
versionCode = 27 versionCode = 28
versionName = "1.22.0" versionName = "1.22.1"
} }
signingConfigs { signingConfigs {
@@ -132,7 +132,9 @@ object Notifier {
b.addAction(NotificationCompat.Action(android.R.drawable.ic_delete, "全部停止", stopIntent)) b.addAction(NotificationCompat.Action(android.R.drawable.ic_delete, "全部停止", stopIntent))
} }
val isl = islandSettings(ctx) val isl = islandSettings(ctx)
if (isl != null && isl.second != MODE_MINIMAL) { // 回归教训:必须检查 isl.first(岛开关)。v25 重构时漏判开关导致岛关也挂
// focus.param,所有进度通知被 HyperOS 焦点系统吃掉(v24 行为是对的)
if (isl != null && isl.first && isl.second != MODE_MINIMAL) {
runCatching { runCatching {
val extras = Bundle() val extras = Bundle()
extras.putBundle("miui.focus.pics", islandPics(ctx)) extras.putBundle("miui.focus.pics", islandPics(ctx))
@@ -140,7 +142,7 @@ object Notifier {
} }
} }
val n = b.build() val n = b.build()
if (isl != null) { if (isl != null && isl.first) {
// 小米 HyperOS 焦点通知/超级岛:客户端本地上岛(官方 extras 协议)。 // 小米 HyperOS 焦点通知/超级岛:客户端本地上岛(官方 extras 协议)。
// 注意:HyperOS 对焦点通知有系统级白名单,侧载应用携带岛参数时可能被 // 注意:HyperOS 对焦点通知有系统级白名单,侧载应用携带岛参数时可能被
// 系统整体过滤(岛和通知都不显示)——在设置里关岛开关即可恢复普通通知。 // 系统整体过滤(岛和通知都不显示)——在设置里关岛开关即可恢复普通通知。