mobile: temporarily disable FLAG_SECURE (debug toggle)

Gated the expo-screen-capture preventScreenCaptureAsync call behind
SCREEN_CAPTURE_PROTECTION (currently false) so screenshots / screen recording
work during emulator debugging — FLAG_SECURE makes every screencap black, which
blocks on-device playback verification. Single-user phase; flip back to true
before wider distribution.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
jtrzupek 2026-06-02 21:45:13 +02:00
parent 58b355b6b5
commit 5e74195878

View file

@ -138,7 +138,12 @@ export default function App() {
}, []); }, []);
// FLAG_SECURE — blocks screenshots and hides app preview from app switcher. // FLAG_SECURE — blocks screenshots and hides app preview from app switcher.
// TEMP 2026-06-02: wyłączone żeby umożliwić debug na emulatorze (screencap +
// playback verification — FLAG_SECURE czyni screenshoty czarnymi). Jan jest na
// razie jedynym userem. PRZYWRÓCIĆ `true` przed szerszą dystrybucją.
const SCREEN_CAPTURE_PROTECTION = false;
useEffect(() => { useEffect(() => {
if (!SCREEN_CAPTURE_PROTECTION) return;
ScreenCapture.preventScreenCaptureAsync('goon-applock').catch(() => {}); ScreenCapture.preventScreenCaptureAsync('goon-applock').catch(() => {});
return () => { return () => {
ScreenCapture.allowScreenCaptureAsync('goon-applock').catch(() => {}); ScreenCapture.allowScreenCaptureAsync('goon-applock').catch(() => {});