NativeDriver: replace .indexOf() with .contains()

This commit is contained in:
Sean Gilligan 2022-12-09 17:33:32 -08:00
parent e2af1a2615
commit dcb4aaac21
1 changed files with 2 additions and 2 deletions

View File

@ -15,9 +15,9 @@ public class NativeDriver implements WebcamDriver {
public NativeDriver() {
final String os = System.getProperty("os.name", "generic").toLowerCase(Locale.ENGLISH);
if ((os.indexOf("mac") >= 0) || (os.indexOf("darwin") >= 0)) {
if ((os.contains("mac")) || (os.contains("darwin"))) {
this.driver = new AVFDriver();
} else if (os.indexOf("win") >= 0) {
} else if (os.contains("win")) {
this.driver = new CaptureManagerDriver();
} else {
throw new IllegalStateException("Unsupported OS = " + os);