Skip to content

Commit

Permalink
Fix method name
Browse files Browse the repository at this point in the history
The method indicates whether GetPhysicalDisplayIds() exists. The "Get"
was missing.
  • Loading branch information
rom1v authored and Gottox committed Sep 29, 2024
1 parent 6af3d5d commit 90ae845
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ public static boolean setScreenPowerMode(int mode) {
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.hasPhysicalDisplayIdsMethod();
Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE && !SurfaceControl.hasGetPhysicalDisplayIdsMethod();

// Change the power mode for all physical displays
long[] physicalDisplayIds = useDisplayControl ? DisplayControl.getPhysicalDisplayIds() : SurfaceControl.getPhysicalDisplayIds();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private static Method getGetPhysicalDisplayIdsMethod() throws NoSuchMethodExcept
return getPhysicalDisplayIdsMethod;
}

public static boolean hasPhysicalDisplayIdsMethod() {
public static boolean hasGetPhysicalDisplayIdsMethod() {
try {
getGetPhysicalDisplayIdsMethod();
return true;
Expand Down

0 comments on commit 90ae845

Please sign in to comment.