Fix method name

The method indicates whether GetPhysicalDisplayIds() exists. The "Get"
was missing.
This commit is contained in:
Romain Vimont 2024-07-17 18:02:26 +02:00
parent bbcd763612
commit e0cdc2ace3
2 changed files with 2 additions and 2 deletions

View File

@ -326,7 +326,7 @@ public final class Device {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
// On Android 14, these internal methods have been moved to DisplayControl // On Android 14, these internal methods have been moved to DisplayControl
boolean useDisplayControl = boolean useDisplayControl =
Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE && !SurfaceControl.hasPhysicalDisplayIdsMethod(); Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE && !SurfaceControl.hasGetPhysicalDisplayIdsMethod();
// Change the power mode for all physical displays // Change the power mode for all physical displays
long[] physicalDisplayIds = useDisplayControl ? DisplayControl.getPhysicalDisplayIds() : SurfaceControl.getPhysicalDisplayIds(); long[] physicalDisplayIds = useDisplayControl ? DisplayControl.getPhysicalDisplayIds() : SurfaceControl.getPhysicalDisplayIds();

View File

@ -134,7 +134,7 @@ public final class SurfaceControl {
return getPhysicalDisplayIdsMethod; return getPhysicalDisplayIdsMethod;
} }
public static boolean hasPhysicalDisplayIdsMethod() { public static boolean hasGetPhysicalDisplayIdsMethod() {
try { try {
getGetPhysicalDisplayIdsMethod(); getGetPhysicalDisplayIdsMethod();
return true; return true;