Merge "Removed vsync offset check from display info equality" into main
diff --git a/core/java/android/view/DisplayInfo.java b/core/java/android/view/DisplayInfo.java
index e75b1b0..ecdbaa3 100644
--- a/core/java/android/view/DisplayInfo.java
+++ b/core/java/android/view/DisplayInfo.java
@@ -493,8 +493,6 @@
                 && logicalDensityDpi == other.logicalDensityDpi
                 && physicalXDpi == other.physicalXDpi
                 && physicalYDpi == other.physicalYDpi
-                && appVsyncOffsetNanos == other.appVsyncOffsetNanos
-                && presentationDeadlineNanos == other.presentationDeadlineNanos
                 && state == other.state
                 && committedState == other.committedState
                 && ownerUid == other.ownerUid
@@ -517,6 +515,8 @@
         if (compareRefreshRate) {
             return isEqualWithoutRefreshRate
                     && (getRefreshRate() == other.getRefreshRate())
+                    && appVsyncOffsetNanos == other.appVsyncOffsetNanos
+                    && presentationDeadlineNanos == other.presentationDeadlineNanos
                     && (modeId == other.modeId);
         }
         return isEqualWithoutRefreshRate;