Skip to content

Display and control your Android device

Accept failure in rotation or fold registration

Romain Vimont0ffcfa0f5c44
diff --git a/server/src/main/java/com/genymobile/scrcpy/wrappers/WindowManager.java b/server/src/main/java/com/genymobile/scrcpy/wrappers/WindowManager.java
index dde26e82..ce748855 100644
--- a/server/src/main/java/com/genymobile/scrcpy/wrappers/WindowManager.java
+++ b/server/src/main/java/com/genymobile/scrcpy/wrappers/WindowManager.java
@@ -107,7 +107,7 @@ public final class WindowManager {
cls.getMethod("watchRotation", IRotationWatcher.class).invoke(manager, rotationWatcher);
}
} catch (Exception e) {
- throw new AssertionError(e);
+ Ln.e("Could not register rotation watcher", e);
}
}
@@ -117,7 +117,7 @@ public final class WindowManager {
Class<?> cls = manager.getClass();
cls.getMethod("registerDisplayFoldListener", IDisplayFoldListener.class).invoke(manager, foldListener);
} catch (Exception e) {
- throw new AssertionError(e);
+ Ln.e("Could not register display fold listener", e);
}
}
}