Skip to content

Commit

Permalink
Accept failure in rotation or fold registration
Browse files Browse the repository at this point in the history
Do not make scrcpy fail if rotation or display fold listeners could not
be registered.
  • Loading branch information
rom1v committed Jun 21, 2023
1 parent c0f3c08 commit 0ffcfa0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void registerRotationWatcher(IRotationWatcher rotationWatcher, int displa
cls.getMethod("watchRotation", IRotationWatcher.class).invoke(manager, rotationWatcher);
}
} catch (Exception e) {
throw new AssertionError(e);
Ln.e("Could not register rotation watcher", e);
}
}

Expand All @@ -117,7 +117,7 @@ public void registerDisplayFoldListener(IDisplayFoldListener foldListener) {
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);
}
}
}

0 comments on commit 0ffcfa0

Please sign in to comment.