diff --git a/server/src/main/java/com/genymobile/scrcpy/device/Device.java b/server/src/main/java/com/genymobile/scrcpy/device/Device.java index 5a1083fded..46657a0591 100644 --- a/server/src/main/java/com/genymobile/scrcpy/device/Device.java +++ b/server/src/main/java/com/genymobile/scrcpy/device/Device.java @@ -323,19 +323,7 @@ public boolean setClipboardText(String text) { * @param mode one of the {@code POWER_MODE_*} constants */ public static boolean setScreenPowerMode(int mode) { - boolean applyToMultiPhysicalDisplays = Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q; - - if (applyToMultiPhysicalDisplays - && Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE - && Build.BRAND.equalsIgnoreCase("honor") - && SurfaceControl.hasGetBuildInDisplayMethod()) { - // Workaround for Honor devices with Android 14: - // - - // - - applyToMultiPhysicalDisplays = false; - } - - if (applyToMultiPhysicalDisplays) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { // On Android 14, these internal methods have been moved to DisplayControl boolean useDisplayControl = Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE && !SurfaceControl.hasGetPhysicalDisplayIdsMethod(); diff --git a/server/src/main/java/com/genymobile/scrcpy/wrappers/SurfaceControl.java b/server/src/main/java/com/genymobile/scrcpy/wrappers/SurfaceControl.java index 038e7ca052..2f24f2d27c 100644 --- a/server/src/main/java/com/genymobile/scrcpy/wrappers/SurfaceControl.java +++ b/server/src/main/java/com/genymobile/scrcpy/wrappers/SurfaceControl.java @@ -94,15 +94,6 @@ private static Method getGetBuiltInDisplayMethod() throws NoSuchMethodException return getBuiltInDisplayMethod; } - public static boolean hasGetBuildInDisplayMethod() { - try { - getGetBuiltInDisplayMethod(); - return true; - } catch (NoSuchMethodException e) { - return false; - } - } - public static IBinder getBuiltInDisplay() { try { Method method = getGetBuiltInDisplayMethod();