From 0fb89bc480e23614a6bc787d6fe86255d99fba49 Mon Sep 17 00:00:00 2001 From: Rachel Lee Date: Thu, 22 Aug 2024 19:07:44 -0700 Subject: [PATCH] Make Display.Mode.isSynthetic TestApi To use in CTS (FrameRateOverrideTest) for vrr device with synthetic modes. Bug: 353142444 Flag: TEST_ONLY Test: atest FrameRateOverrideTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:62fb8f943b0251ecec710f14b63e562ac63ce0dd) Merged-In: Ic28956ac65f9642b9a78a31fff0111e28c6a69e0 Change-Id: Ic28956ac65f9642b9a78a31fff0111e28c6a69e0 --- core/api/test-current.txt | 1 + core/java/android/view/Display.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/core/api/test-current.txt b/core/api/test-current.txt index c2f960f85c73..79c4fb653542 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -3633,6 +3633,7 @@ package android.view { public static final class Display.Mode implements android.os.Parcelable { ctor public Display.Mode(int, int, float); + method public boolean isSynthetic(); method public boolean matches(int, int, float); } diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java index 15b0c13de524..1f7ed8be357c 100644 --- a/core/java/android/view/Display.java +++ b/core/java/android/view/Display.java @@ -2344,6 +2344,8 @@ public float getVsyncRate() { * SurfaceControl.DisplayMode * @hide */ + @SuppressWarnings("UnflaggedApi") // For testing only + @TestApi public boolean isSynthetic() { return mIsSynthetic; }