Accept failure in rotation or fold registration
Do not make scrcpy fail if rotation or display fold listeners could not be registered.
This commit is contained in:
parent
c0f3c080b6
commit
0ffcfa0f5c
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue