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

Commit 56a2301c authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Implement issue #6646859: 4K!!!! 4K!!!! 4K!!!!

Change-Id: Ib05a2eb6a03db50074805a437a3639a7d10684a0
parent b41af58f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -23278,6 +23278,7 @@ package android.util {
    field public static final int DENSITY_TV = 213; // 0xd5
    field public static final int DENSITY_XHIGH = 320; // 0x140
    field public static final int DENSITY_XXHIGH = 480; // 0x1e0
    field public static final int DENSITY_XXXHIGH = 640; // 0x280
    field public float density;
    field public int densityDpi;
    field public int heightPixels;
+9 −0
Original line number Diff line number Diff line
@@ -73,6 +73,15 @@ public class DisplayMetrics {
     */
    public static final int DENSITY_XXHIGH = 480;

    /**
     * Standard quantized DPI for extra-extra-extra-high-density screens.  Applications
     * should not generally worry about this density; relying on XHIGH graphics
     * being scaled up to it should be sufficient for almost all cases.  A typical
     * use of this density would be 4K television screens -- 3840x2160, which
     * is 2x a traditional HD 1920x1080 screen which runs at DENSITY_XHIGH.
     */
    public static final int DENSITY_XXXHIGH = 640;

    /**
     * The reference density used throughout the system.
     */
+1 −0
Original line number Diff line number Diff line
@@ -855,6 +855,7 @@ struct ResTable_config
        DENSITY_HIGH = ACONFIGURATION_DENSITY_HIGH,
        DENSITY_XHIGH = ACONFIGURATION_DENSITY_XHIGH,
        DENSITY_XXHIGH = ACONFIGURATION_DENSITY_XXHIGH,
        DENSITY_XXXHIGH = ACONFIGURATION_DENSITY_XXXHIGH,
        DENSITY_NONE = ACONFIGURATION_DENSITY_NONE
    };
    
+5 −0
Original line number Diff line number Diff line
@@ -1185,6 +1185,11 @@ bool AaptGroupEntry::getDensityName(const char* name,
        return true;
    }

    if (strcmp(name, "xxxhdpi") == 0) {
        if (out) out->density = ResTable_config::DENSITY_XXXHIGH;
        return true;
    }

    char* c = (char*)name;
    while (*c >= '0' && *c <= '9') {
        c++;