Add documentation for LayoutParams.preferredRefreshRate

Adding documentation to clarify when should the applications use LayoutParams.preferredRefreshRate
over LayoutParams.preferredDisplayModeId

Bug: 227781356
Test: built locally
Change-Id: I75f10f7ea2c3386f8382af3012241316e540bd83
This commit is contained in:
Rupesh Bansal
2022-04-26 14:02:27 +00:00
parent 747806ddf8
commit 1bc58a37f5

View File

@@ -3100,10 +3100,14 @@ public interface WindowManager extends ViewManager {
/**
* The preferred refresh rate for the window.
*
* <p>
* This must be one of the supported refresh rates obtained for the display(s) the window
* is on. The selected refresh rate will be applied to the display's default mode.
*
* <p>
* This should be used in favor of {@link LayoutParams#preferredDisplayModeId} for
* applications that want to specify the refresh rate, but do not want to specify a
* preference for any other displayMode properties (e.g., resolution).
* <p>
* This value is ignored if {@link #preferredDisplayModeId} is set.
*
* @see Display#getSupportedRefreshRates()