From 1fdde490fd2a0b89680a2b5da5e5274192398023 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Wed, 16 Jan 2019 14:00:42 +0100 Subject: [PATCH] Mirror "secure" content Some applications, like Silence, prevent the content of a window from being viewed on non-secure displays: We can mirror it by just creating a "secure" display: --- FAQ.md | 14 -------------- .../java/com/genymobile/scrcpy/ScreenEncoder.java | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/FAQ.md b/FAQ.md index 64002940..76f572ce 100644 --- a/FAQ.md +++ b/FAQ.md @@ -24,20 +24,6 @@ If you still encounter problems, please see [issue 9]. [issue 9]: https://github.com/Genymobile/scrcpy/issues/9 -### I get a black screen for some applications like Silence - -This is expected, they requested to [protect] the screen. - -In [Silence], you can disable it in settings → Privacy → Screen security. - -[protect]: https://developer.android.com/reference/android/view/Display#FLAG_SECURE -[silence]: https://f-droid.org/en/packages/org.smssecure.smssecure/ - -See [issue 36]. - -[issue 36]: https://github.com/Genymobile/scrcpy/issues/36 - - ### Mouse clicks do not work On some devices, you may need to enable an option to allow [simulating input]. diff --git a/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java b/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java index 0419dc52..ec63e81d 100644 --- a/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java +++ b/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java @@ -151,7 +151,7 @@ public class ScreenEncoder implements Device.RotationListener { } private static IBinder createDisplay() { - return SurfaceControl.createDisplay("scrcpy", false); + return SurfaceControl.createDisplay("scrcpy", true); } private static void configure(MediaCodec codec, MediaFormat format) {