From e1cd75792c3b6a014043b82a4089c6d34fcf78fb Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Thu, 21 May 2020 00:20:44 +0200 Subject: [PATCH] Simplify rotation watcher call Remove unnecessary private method (which was wrongly public). --- server/src/main/java/com/genymobile/scrcpy/Device.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/src/main/java/com/genymobile/scrcpy/Device.java b/server/src/main/java/com/genymobile/scrcpy/Device.java index 6aa339a1..aff04fd0 100644 --- a/server/src/main/java/com/genymobile/scrcpy/Device.java +++ b/server/src/main/java/com/genymobile/scrcpy/Device.java @@ -52,7 +52,7 @@ public final class Device { 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) { @@ -134,10 +134,6 @@ public final class Device { 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; }