Andee lives on your phone or Mac and uses any app like you do—no integrations, no root, any model; memory and passwords never leave your device | Andee 住进你的手机或 Mac,像你一样操作任何 App——无需集成、无需 Root、支持任意模型,记忆和密码绝不离开设备。
fix(check): put the overlay row first, and drop a note that said nothing
booboosui87a1626fce43
diff --git a/app/src/main/java/net/kuafuai/andee/device/SelfCheck.kt b/app/src/main/java/net/kuafuai/andee/device/SelfCheck.ktindex b3b94ec..543b45d 100644--- a/app/src/main/java/net/kuafuai/andee/device/SelfCheck.kt+++ b/app/src/main/java/net/kuafuai/andee/device/SelfCheck.kt@@ -178,8 +178,15 @@ object SelfCheck {val online = isOnline(context)val a11yIme = imeChannelOpen()return listOf(- accessibility(context),+ // Overlay first, ahead of the service itself. Both are hard gates,+ // but they fail in opposite directions: no accessibility service and+ // the app is visibly inert (nothing to run), no overlay grant and+ // the app *looks* broken instead — the service is running fine and+ // silently cannot draw, so tapping the icon appears to do nothing.+ // That is the failure users misread as "the app is dead", and it is+ // the one worth putting in front of them first.overlay(context),+ accessibility(context),network(online),brain(context),backend(context, probe, online),diff --git a/app/src/main/java/net/kuafuai/andee/ui/SelfCheckUi.kt b/app/src/main/java/net/kuafuai/andee/ui/SelfCheckUi.ktindex 556d50e..50d0803 100644--- a/app/src/main/java/net/kuafuai/andee/ui/SelfCheckUi.kt+++ b/app/src/main/java/net/kuafuai/andee/ui/SelfCheckUi.kt@@ -350,13 +350,6 @@ class SelfCheckUi(hero?.removeAllViews()hero?.addView(summary(attention.size))- // The one case where the card has to say it cannot help: our sheet is an- // overlay either way, so with the overlay grant missing there is nowhere- // for 打开设置 to go. Say that instead of showing a button that would do- // nothing — and note the row itself has no button either, see- // [fixButton]. Only reachable in host mode: the window host is already- // drawing overlays, so if it is drawing this at all the grant is there.- if (!canOpenSettings) hero?.addView(note(lctx.getString(R.string.check_page_no_overlay)))rows?.removeAllViews()attention.forEach { rows?.addView(row(it)) }@@ -693,9 +686,9 @@ class SelfCheckUi(* colour is this app's established "this is tappable" mark.*/private fun fixButton(f: SelfCheck.Finding): TextView? {- // Ours, and unreachable: see [canOpenSettings]. The note above the list- // has already said so, and a button that does nothing is worse than no- // button — it is the exact failure this list exists to avoid.+ // Ours, and unreachable while the overlay grant is missing: see+ // [canOpenSettings]. Better no button than one that does nothing — that+ // is the exact failure this list exists to avoid.if (f.fix is SelfCheck.Fix.OurSettings && !canOpenSettings) return nullval label = when (val fix = f.fix) {// Zero means "the action's own word"; a fix instance gets to@@ -904,15 +897,6 @@ class SelfCheckUi(setPadding(0, dp(4), 0, dp(8))}- private fun note(text: String): TextView = TextView(context).apply {- this.text = text- setTextColor(Color.parseColor(Glass.SECONDARY))- setTextSize(TypedValue.COMPLEX_UNIT_SP, Glass.Type.BODY)- background = Glass.panel(context, dp(12))- setPadding(dp(14), dp(12), dp(14), dp(12))- layoutParams = LinearLayout.LayoutParams(MATCH, WRAP).apply { topMargin = dp(10) }- }-private fun matchWrap() = LinearLayout.LayoutParams(MATCH, WRAP)private fun dp(v: Int): Int = Glass.dp(context, v)diff --git a/app/src/main/res/values-en/strings.xml b/app/src/main/res/values-en/strings.xmlindex 140151a..fb07209 100644--- a/app/src/main/res/values-en/strings.xml+++ b/app/src/main/res/values-en/strings.xml@@ -401,7 +401,7 @@<string name="check_title_disk">Storage</string><string name="check_detail_accessibility_on">On. The ball and every screen action are running.</string>- <string name="check_detail_accessibility_off">Off. No ball, no voice, no tapping or swiping — with this one off, the rest of this list does not matter yet. The switch lives under "Downloaded apps" in the accessibility settings, not on the first screen.</string>+ <string name="check_detail_accessibility_off">Off. No ball, no voice, no tapping or swiping — with this one off, nothing else here matters either. The switch lives under "Downloaded apps" in the accessibility settings, not on the first screen.</string><string name="check_detail_overlay_on">Allowed. The ball can be drawn.</string><string name="check_detail_overlay_off">Off. Neither the ball nor any card can be drawn, while the service runs perfectly well in the background — which is why it looks like nothing happened at all.</string><string name="check_detail_network_on">Online.</string>@@ -477,7 +477,6 @@<string name="check_page_done">Done</string><string name="check_page_issues">%1$d to sort out</string><string name="check_page_notes_lead">The rest is just for reference and changes nothing.</string>- <string name="check_page_no_overlay">The settings sheet is drawn as a floating window — turn on “Draw over other apps” below first, then come back and fill these in.</string><string name="check_card_title">%1$d thing(s) need attention</string><string name="check_card_open">Fix it</string><string name="check_card_ack">Got it</string>diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xmlindex 6f8dd06..6b85169 100644--- a/app/src/main/res/values/strings.xml+++ b/app/src/main/res/values/strings.xml@@ -477,7 +477,7 @@<string name="check_title_disk">存储空间</string><string name="check_detail_accessibility_on">已开启,球和屏幕操作都在跑。</string>- <string name="check_detail_accessibility_off">没开。球、语音、点按滑动全都不存在 —— 这条不开,后面几条都不用看。开关在无障碍设置的「已下载的应用」里,不在第一屏上。</string>+ <string name="check_detail_accessibility_off">没开。球、语音、点按滑动全都不存在 —— 这条不开,其他都不用看。开关在无障碍设置的「已下载的应用」里,不在第一屏上。</string><string name="check_detail_overlay_on">已允许,球能画出来。</string><string name="check_detail_overlay_off">没开。球和卡片都画不出来,而服务在后台其实跑得好好的 —— 所以看起来像「什么都没发生」。</string><string name="check_detail_network_on">已联网。</string>@@ -551,7 +551,6 @@<string name="check_page_done">完成</string><string name="check_page_issues">%1$d 项需要处理</string><string name="check_page_notes_lead">下面几条仅供参考,不影响使用。</string>- <string name="check_page_no_overlay">设置面板是一张悬浮窗画出来的 —— 先把下面那条「悬浮窗」开起来,再回来填。</string><string name="check_card_title">有 %1$d 项需要处理</string><string name="check_card_open">去处理</string><string name="check_card_ack">知道了</string>