mirror of
https://github.com/Genymobile/scrcpy
synced 2024-11-11 01:10:32 +00:00
Do not use DisplayControl on Honor with Android 14
Some honor devices with Android 14 behave like Android 13 here. Refs #4943 <https://github.com/Genymobile/scrcpy/issues/4943>
This commit is contained in:
parent
b20e22d018
commit
c19c688e0c
@ -328,6 +328,13 @@ public final class Device {
|
||||
boolean useDisplayControl =
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE && !SurfaceControl.hasGetPhysicalDisplayIdsMethod();
|
||||
|
||||
if (useDisplayControl && Build.BRAND.equalsIgnoreCase("honor")) {
|
||||
// Workaround for Honor devices with Android 14:
|
||||
// - <https://github.com/Genymobile/scrcpy/issues/4823>
|
||||
// - <https://github.com/Genymobile/scrcpy/issues/4943>
|
||||
useDisplayControl = false;
|
||||
}
|
||||
|
||||
// Change the power mode for all physical displays
|
||||
long[] physicalDisplayIds = useDisplayControl ? DisplayControl.getPhysicalDisplayIds() : SurfaceControl.getPhysicalDisplayIds();
|
||||
if (physicalDisplayIds == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user