diff options
author | 2013-02-12 15:41:49 -0800 | |
---|---|---|
committer | 2013-02-12 15:41:49 -0800 | |
commit | 56a2301c7a1169a0692cadaeb48b9a6385d700f5 (patch) | |
tree | 7dfa8ab456c4e2915c095383d37847caa0d013be | |
parent | b41af58f49d371cedf041443d20a1893f7f6c840 (diff) |
Implement issue #6646859: 4K!!!! 4K!!!! 4K!!!!
Change-Id: Ib05a2eb6a03db50074805a437a3639a7d10684a0
-rw-r--r-- | api/current.txt | 1 | ||||
-rw-r--r-- | core/java/android/util/DisplayMetrics.java | 9 | ||||
-rw-r--r-- | include/androidfw/ResourceTypes.h | 1 | ||||
-rw-r--r-- | tools/aapt/AaptAssets.cpp | 5 |
4 files changed, 16 insertions, 0 deletions
diff --git a/api/current.txt b/api/current.txt index c8f999fd2403..3f1d1a7c7cbd 100644 --- a/api/current.txt +++ b/api/current.txt @@ -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; diff --git a/core/java/android/util/DisplayMetrics.java b/core/java/android/util/DisplayMetrics.java index e856501e54bb..dae47b88c4e2 100644 --- a/core/java/android/util/DisplayMetrics.java +++ b/core/java/android/util/DisplayMetrics.java @@ -74,6 +74,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. */ public static final int DENSITY_DEFAULT = DENSITY_MEDIUM; diff --git a/include/androidfw/ResourceTypes.h b/include/androidfw/ResourceTypes.h index 48f5bf3ec162..5b45d708726c 100644 --- a/include/androidfw/ResourceTypes.h +++ b/include/androidfw/ResourceTypes.h @@ -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 }; diff --git a/tools/aapt/AaptAssets.cpp b/tools/aapt/AaptAssets.cpp index 5b71adc81cbe..2149190b10be 100644 --- a/tools/aapt/AaptAssets.cpp +++ b/tools/aapt/AaptAssets.cpp @@ -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++; |