…lines 1–123 unchanged (123 lines)
124 private static void scrcpy(Options options) throws IOException, ConfigurationException {
125 if (Build.VERSION.SDK_INT < AndroidVersions.API_31_ANDROID_12 && options.getVideoSource() == VideoSource.CAMERA) {
126 Ln.e("Camera mirroring is not supported before Android 12");
127 throw new ConfigurationException("Camera mirroring is not supported");
128 }
129
130 if (Build.VERSION.SDK_INT < AndroidVersions.API_29_ANDROID_10 && options.getNewDisplay() != null) {
131 Ln.e("New virtual display is not supported before Android 10");
132 throw new ConfigurationException("New virtual display is not supported");
133 }
134
135 CleanUp cleanUp = null;
136 Thread initThread = null;
137
138 NewDisplay newDisplay = options.getNewDisplay();
139 int displayId = newDisplay == null ? options.getDisplayId() : Device.DISPLAY_ID_NONE;
…lines 140–306 unchanged (167 lines)