diff options
| author | 2024-11-13 10:43:28 -0500 | |
|---|---|---|
| committer | 2024-11-13 10:44:31 -0500 | |
| commit | 8ba6a2c49820753182a2cd31645fe51587e1272c (patch) | |
| tree | f2cf21783b53bf246980a090678b5ef1548bc2b2 | |
| parent | 4fe0c9b80dff17eb8704e9708deb5dc2c5444a5b (diff) | |
Add some API docs for common confusions
Bug: n/a
Test: doc only
Flag: EXEMPT doc only change
Change-Id: I08ea07e91cebc77dfd1bce15d051553e6e062578
| -rw-r--r-- | core/java/android/content/pm/ActivityInfo.java | 7 | ||||
| -rw-r--r-- | core/java/android/view/SurfaceView.java | 7 | ||||
| -rw-r--r-- | core/java/android/view/Window.java | 6 |
3 files changed, 19 insertions, 1 deletions
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java index 4f062090ca40..0113129f5203 100644 --- a/core/java/android/content/pm/ActivityInfo.java +++ b/core/java/android/content/pm/ActivityInfo.java @@ -451,6 +451,13 @@ public class ActivityInfo extends ComponentInfo implements Parcelable { * Value of {@link #colorMode} indicating that the activity should use a * high dynamic range if the presentation display supports it. * + * <p>Note: This does not impact SurfaceViews or SurfaceControls, as those have their own + * independent HDR support.</p> + * + * <p><b>Important:</b> Although this value was added in API 26, it is strongly recommended + * to avoid using it until API 34 which is when HDR support for the UI toolkit was officially + * added.</p> + * * @see android.R.attr#colorMode */ public static final int COLOR_MODE_HDR = 2; diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java index 1d70d18ac4c8..455e680e0bbc 100644 --- a/core/java/android/view/SurfaceView.java +++ b/core/java/android/view/SurfaceView.java @@ -830,7 +830,8 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall /** * Sets the desired amount of HDR headroom to be used when HDR content is presented on this - * SurfaceView. + * SurfaceView. This is expressed as the ratio of maximum HDR white point over the SDR + * white point, not as absolute nits. * * <p>By default the system will choose an amount of HDR headroom that is appropriate * for the underlying device capabilities & bit-depth of the panel. However, for some types @@ -844,6 +845,10 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall * See {@link Display#getHdrSdrRatio()} for more information as well as how to query the * current value.</p> * + * <p>Note: This API operates independently of both the + * {@link Window#setColorMode Widow color mode} and the + * {@link Window#setDesiredHdrHeadroom Window desiredHdrHeadroom}</p> + * * @param desiredHeadroom The amount of HDR headroom that is desired. Must be >= 1.0 (no HDR) * and <= 10,000.0. Passing 0.0 will reset to the default, automatically * chosen value. diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java index 0582afe6655d..cbee56365606 100644 --- a/core/java/android/view/Window.java +++ b/core/java/android/view/Window.java @@ -1334,6 +1334,9 @@ public abstract class Window { * <p>The requested color mode is not guaranteed to be honored. Please refer to * {@link #getColorMode()} for more information.</p> * + * <p>Note: This does not impact SurfaceViews or SurfaceControls, as those have their own + * independent color mode and HDR parameters.</p> + * * @see #getColorMode() * @see Display#isWideColorGamut() * @see Configuration#isScreenWideColorGamut() @@ -1361,6 +1364,9 @@ public abstract class Window { * See {@link Display#getHdrSdrRatio()} for more information as well as how to query the * current value.</p> * + * <p>Note: This does not impact SurfaceViews or SurfaceControls, as those have their own + * independent desired HDR headroom and HDR capabilities.</p> + * * @param desiredHeadroom The amount of HDR headroom that is desired. Must be >= 1.0 (no HDR) * and <= 10,000.0. Passing 0.0 will reset to the default, automatically * chosen value. |