ohhh I see what you mean now.. The flag doesn't block AI, it just blocks the screenshots. The AI is still running over other things, like keyboards, cameras, pictures saved in the device, etc.
Discussion
Yes, it is my understanding from the official Android documentation that:
"FLAG_SECURE is a Window flag that tells Android not to allow screenshots or to display the window view on a non-secure display"
And for HIDE_OVERLAY_WINDOWS: "your app can opt-out of having application overlays drawn over it... essentially allowing your app to block overlays from third-party apps."
These protections directly impact Gemini since it works by "activating an overlay experience that tells Gemini what is on their screen."
When FLAG_SECURE is enabled, the system prevents any screen content capture—which effectively blocks AI assistants from analyzing protected screens.
These protections are designed to work regardless of how integrated Gemini is with Android.
It's worth noting that while FLAG_SECURE/HIDE_OVERLAY_WINDOWS block standard Gemini access, technically sophisticated users could grant Gemini elevated privileges (e.g., accessibility services). However, this requires manual user action, not automatic integration.
The keyboard/camera concerns are separate issues that don't negate these protections for actual screen content.