Skip to content

Commit 81d9382

Browse files
committed
fix(mobile): only set FLAG_SECURE in release builds to allow QA screen mirroring
1 parent 73ee921 commit 81d9382

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

packages/mobile/android/app/src/main/java/org/idpass/datacollectapp/MainActivity.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ public void onCreate(Bundle savedInstanceState) {
1010
registerPlugin(BiometricCapturePlugin.class);
1111
super.onCreate(savedInstanceState);
1212
// Prevent screenshots, screen recording, and the task-switcher snapshot
13-
// from capturing app content. This is the Android-level complement to
14-
// the CSS blur applied in JS (which fires too late for the OS snapshot).
15-
getWindow().setFlags(
16-
WindowManager.LayoutParams.FLAG_SECURE,
17-
WindowManager.LayoutParams.FLAG_SECURE
18-
);
13+
// from capturing app content. Only in release builds so QA can use
14+
// screen mirroring tools (e.g., Vysor) during testing.
15+
if (!BuildConfig.DEBUG) {
16+
getWindow().setFlags(
17+
WindowManager.LayoutParams.FLAG_SECURE,
18+
WindowManager.LayoutParams.FLAG_SECURE
19+
);
20+
}
1921
}
2022
}

0 commit comments

Comments
 (0)