Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80c0dee0 authored by Alexandre Elias's avatar Alexandre Elias
Browse files

Update DisplayMetrics.densityDpi Javadoc to refer to all DENSITY_ constants

The immediate motive for getting around to updating this is the text
"may be backported".  According to Dianne's recollection, "we had in the
past allowed OEMs to use new densities we have defined on platform
versions prior to when they were introduced": this documents that
possibility and clarifies that this might happen again.

See related change aosp/2579165 "Backport DENSITY_520 to
android13-tests-dev"

Test: N/A
Bug: 274567391

Change-Id: I3bc25630eab0208c83837b74c53facea637169d6
parent 4bd93e8b
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -275,8 +275,12 @@ public class DisplayMetrics {
     */
     */
    public float density;
    public float density;
    /**
    /**
     * The screen density expressed as dots-per-inch.  May be either
     * The screen density expressed as dots-per-inch. May be any one of the
     * {@link #DENSITY_LOW}, {@link #DENSITY_MEDIUM}, or {@link #DENSITY_HIGH}.
     * {@code DENSITY_} constants defined above.
     *
     * New constants are frequently added, and constants added on new Android
     * versions may be backported to previous Android versions, so applications
     * should not strongly rely on density matching one of the enum constants.
     */
     */
    public int densityDpi;
    public int densityDpi;
    /**
    /**