Skip to content

armgit / andee

Public Imported from GitHub
0

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(marker): draw the tap ring where the tap landed, not a status bar below it

booboosuiaaf325a53867
diff --git a/app/src/main/java/net/kuafuai/andee/ui/TapMarkerUi.kt b/app/src/main/java/net/kuafuai/andee/ui/TapMarkerUi.kt
index 3eb26fc..bfb2033 100644
--- a/app/src/main/java/net/kuafuai/andee/ui/TapMarkerUi.kt
+++ b/app/src/main/java/net/kuafuai/andee/ui/TapMarkerUi.kt
@@ -102,12 +102,19 @@ class TapMarkerUi(private val context: Context) {
or WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
// Without this the box is clamped inside the display and a tap
// near an edge would be marked somewhere it did not happen.
- or WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
+ or WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
+ or WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,
PixelFormat.TRANSLUCENT,
).apply {
gravity = Gravity.TOP or Gravity.START
x = 0; y = 0
alpha = 0f
+ // p.x/p.y are display pixels (the gesture's own), so the window must not
+ // be offset by the system bars: by default an API 30+ window fits them,
+ // and the mark was drawn a status bar's height below the real tap.
+ fitInsetsTypes = 0
+ layoutInDisplayCutoutMode =
+ WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS
}
return try {
v.hideFromAccessibility()