Skip to content

Commit

Permalink
Simplify rotation watcher call
Browse files Browse the repository at this point in the history
Remove unnecessary private method (which was wrongly public).
  • Loading branch information
rom1v committed May 23, 2020
1 parent ac4c8b4 commit e1cd757
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions server/src/main/java/com/genymobile/scrcpy/Device.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public Device(Options options) {
screenInfo = ScreenInfo.computeScreenInfo(displayInfo, options.getCrop(), options.getMaxSize(), options.getLockedVideoOrientation());
layerStack = displayInfo.getLayerStack();

registerRotationWatcher(new IRotationWatcher.Stub() {
serviceManager.getWindowManager().registerRotationWatcher(new IRotationWatcher.Stub() {
@Override
public void onRotationChanged(int rotation) throws RemoteException {
synchronized (Device.this) {
Expand Down Expand Up @@ -134,10 +134,6 @@ public boolean isScreenOn() {
return serviceManager.getPowerManager().isScreenOn();
}

public void registerRotationWatcher(IRotationWatcher rotationWatcher, int displayId) {
serviceManager.getWindowManager().registerRotationWatcher(rotationWatcher, displayId);
}

public synchronized void setRotationListener(RotationListener rotationListener) {
this.rotationListener = rotationListener;
}
Expand Down

0 comments on commit e1cd757

Please sign in to comment.