Skip to content

Commit

Permalink
Make Display.Mode.isSynthetic TestApi
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Rachel Lee authored and NurKeinNeid committed Dec 11, 2024
1 parent f361996 commit 0fb89bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/api/test-current.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 2 additions & 0 deletions core/java/android/view/Display.java
Original file line number Diff line number Diff line change
Expand Up @@ -2344,6 +2344,8 @@ public float getVsyncRate() {
* SurfaceControl.DisplayMode
* @hide
*/
@SuppressWarnings("UnflaggedApi") // For testing only
@TestApi
public boolean isSynthetic() {
return mIsSynthetic;
}
Expand Down

0 comments on commit 0fb89bc

Please sign in to comment.