Rename OverlayProperties API.

- Display#getOverlaySupport is non-null, no need to check the object in
  HardwareRenderer side.

Bug: 307552682
Bug: 267234573
Test: builds
Change-Id: I58589fd95de5f9853d758f1e3cc899a634d39eb5
diff --git a/core/api/current.txt b/core/api/current.txt
index eb78d59..dee7dda 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -18174,7 +18174,7 @@
 
   @FlaggedApi("android.hardware.flags.overlayproperties_class_api") public final class OverlayProperties implements android.os.Parcelable {
     method @FlaggedApi("android.hardware.flags.overlayproperties_class_api") public int describeContents();
-    method @FlaggedApi("android.hardware.flags.overlayproperties_class_api") public boolean supportMixedColorSpaces();
+    method @FlaggedApi("android.hardware.flags.overlayproperties_class_api") public boolean isMixedColorSpacesSupported();
     method @FlaggedApi("android.hardware.flags.overlayproperties_class_api") public void writeToParcel(@NonNull android.os.Parcel, int);
     field @FlaggedApi("android.hardware.flags.overlayproperties_class_api") @NonNull public static final android.os.Parcelable.Creator<android.hardware.OverlayProperties> CREATOR;
   }
diff --git a/core/java/android/hardware/OverlayProperties.java b/core/java/android/hardware/OverlayProperties.java
index 014cf6d..72586b2 100644
--- a/core/java/android/hardware/OverlayProperties.java
+++ b/core/java/android/hardware/OverlayProperties.java
@@ -73,7 +73,7 @@
      * @return True if the device can support fp16, false otherwise.
      * @hide
      */
-    public boolean supportFp16ForHdr() {
+    public boolean isFp16SupportedForHdr() {
         if (mNativeObject == 0) {
             return false;
         }
@@ -88,14 +88,13 @@
      *         false if GPU composition fallback is otherwise required.
      */
     @FlaggedApi(Flags.FLAG_OVERLAYPROPERTIES_CLASS_API)
-    public boolean supportMixedColorSpaces() {
+    public boolean isMixedColorSpacesSupported() {
         if (mNativeObject == 0) {
             return false;
         }
         return nSupportMixedColorSpaces(mNativeObject);
     }
 
-
     @FlaggedApi(Flags.FLAG_OVERLAYPROPERTIES_CLASS_API)
     @Override
     public int describeContents() {
diff --git a/graphics/java/android/graphics/HardwareRenderer.java b/graphics/java/android/graphics/HardwareRenderer.java
index 9cde187..8cd262e 100644
--- a/graphics/java/android/graphics/HardwareRenderer.java
+++ b/graphics/java/android/graphics/HardwareRenderer.java
@@ -1390,10 +1390,6 @@
             int largestWidth = activeMode.getPhysicalWidth();
             int largestHeight = activeMode.getPhysicalHeight();
             final OverlayProperties overlayProperties = defaultDisplay.getOverlaySupport();
-            boolean supportFp16ForHdr = overlayProperties != null
-                    ? overlayProperties.supportFp16ForHdr() : false;
-            boolean supportMixedColorSpaces = overlayProperties != null
-                    ? overlayProperties.supportMixedColorSpaces() : false;
 
             for (int i = 0; i < allDisplays.length; i++) {
                 final Display display = allDisplays[i];
@@ -1421,7 +1417,8 @@
             nInitDisplayInfo(largestWidth, largestHeight, defaultDisplay.getRefreshRate(),
                     wideColorDataspace, defaultDisplay.getAppVsyncOffsetNanos(),
                     defaultDisplay.getPresentationDeadlineNanos(),
-                    supportFp16ForHdr, supportMixedColorSpaces);
+                    overlayProperties.isFp16SupportedForHdr(),
+                    overlayProperties.isMixedColorSpacesSupported());
 
             mDisplayInitialized = true;
         }