Your phone, on your command. Gotcha is world's first fully on-device AI copilot for Android that turns natural language into real device actions — safely.
ui: make the screen-read pulse clearly visible and drop diagnostics
Durganshu Mishrad56ff7df9c9a
diff --git a/app/src/main/java/com/gotcha/service/CallSessionController.kt b/app/src/main/java/com/gotcha/service/CallSessionController.ktindex a53f9ff..2084aaa 100644--- a/app/src/main/java/com/gotcha/service/CallSessionController.kt+++ b/app/src/main/java/com/gotcha/service/CallSessionController.kt@@ -325,6 +325,11 @@ class CallSessionController(screenshot = ScreenSnapshot.captureScreenBase64()screenText = ScreenSnapshot.captureScreenText()onCaptureChrome(false)+ // The model reads the screen from this per-turn capture on every+ // voice turn and usually answers without calling the read_screen+ // tool, so this — not the engine's inject path — is the screen read+ // the user actually sees. Flash the same "screen was read" pulse.+ onScreenReadDone()}val userText = buildString {if (!screenText.isNullOrBlank()) {diff --git a/app/src/main/java/com/gotcha/ui/ScreenReadFlashOverlay.kt b/app/src/main/java/com/gotcha/ui/ScreenReadFlashOverlay.ktindex a4496c4..01cb45b 100644--- a/app/src/main/java/com/gotcha/ui/ScreenReadFlashOverlay.kt+++ b/app/src/main/java/com/gotcha/ui/ScreenReadFlashOverlay.kt@@ -96,6 +96,6 @@ class ScreenReadFlashOverlay(context: Context) {}private companion object {- const val PULSE_MS = 400L+ const val PULSE_MS = 650L}}diff --git a/app/src/main/java/com/gotcha/ui/ScreenReadFlashView.kt b/app/src/main/java/com/gotcha/ui/ScreenReadFlashView.ktindex bda02e3..061707d 100644--- a/app/src/main/java/com/gotcha/ui/ScreenReadFlashView.kt+++ b/app/src/main/java/com/gotcha/ui/ScreenReadFlashView.kt@@ -8,6 +8,7 @@ import android.graphics.RectFimport android.view.Viewimport androidx.core.graphics.ColorUtilsimport com.gotcha.ui.theme.OverlaySkin+import kotlin.math.pow/*** One-shot "the screen was read" pulse: an accent rounded-rect border with a@@ -49,8 +50,12 @@ class ScreenReadFlashView(if (progress <= 0f || progress >= 1f) returnval inset = glowPaint.strokeWidth / 2f + 1fborderRect.set(inset, inset, width - inset, height - inset)- // Rise quickly, fall slowly (like a pulse), then vanish.- val alpha = (kotlin.math.sin(progress * kotlin.math.PI) * 255).toInt().coerceIn(0, 255)+ // Rise fast and hold near peak so the pulse reads as a clear flash rather+ // than a flicker: the sin wave alone only sits at full brightness for a+ // fraction of the duration. Raising it to ^0.4 keeps it bright across+ // most of the middle of the animation.+ val wave = kotlin.math.sin(progress * kotlin.math.PI)+ val alpha = (wave.pow(0.4) * 255).toInt().coerceIn(0, 255)borderPaint.alpha = alphaglowPaint.alpha = alphaval radius = colors.cardRadiusDp * resources.displayMetrics.density@@ -65,9 +70,9 @@ class ScreenReadFlashView(internal fun glowColor(): Int = ColorUtils.setAlphaComponent(colors.accent, GLOW_ALPHA)private companion object {- const val BORDER_DP = 3f- const val GLOW_DP = 10f- const val GLOW_BLUR_DP = 18f+ const val BORDER_DP = 6f+ const val GLOW_DP = 14f+ const val GLOW_BLUR_DP = 26fconst val BORDER_ALPHA = 0xB0const val GLOW_ALPHA = 0x66}