diff options
| author | 2011-05-27 14:23:11 -0700 | |
|---|---|---|
| committer | 2011-05-27 14:23:11 -0700 | |
| commit | 528c49f112dce5f9687f30a9751e783196eca0c6 (patch) | |
| tree | 807d1c0d75a0190752a306c79cfb73dbb2aac39a | |
| parent | c058d38602a1ffe00e14b4ab32c876c252eabe6d (diff) | |
| parent | b96cbbd11c4590bec846212c33361e02293f18b5 (diff) | |
am b96cbbd1: Add "tv" density for 720p screens.
* commit 'b96cbbd11c4590bec846212c33361e02293f18b5':
Add "tv" density for 720p screens.
| -rw-r--r-- | api/current.xml | 11 | ||||
| -rw-r--r-- | core/java/android/util/DisplayMetrics.java | 9 | ||||
| -rw-r--r-- | include/utils/ResourceTypes.h | 1 | ||||
| -rw-r--r-- | native/include/android/configuration.h | 1 | ||||
| -rw-r--r-- | tools/aapt/AaptAssets.cpp | 5 |
5 files changed, 27 insertions, 0 deletions
diff --git a/api/current.xml b/api/current.xml index efcde72d173d..7670bc935193 100644 --- a/api/current.xml +++ b/api/current.xml @@ -206019,6 +206019,17 @@ visibility="public" > </field> +<field name="DENSITY_TV" + type="int" + transient="false" + volatile="false" + value="213" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> <field name="DENSITY_XHIGH" type="int" transient="false" diff --git a/core/java/android/util/DisplayMetrics.java b/core/java/android/util/DisplayMetrics.java index 60a4ef21c440..d594567d09d2 100644 --- a/core/java/android/util/DisplayMetrics.java +++ b/core/java/android/util/DisplayMetrics.java @@ -38,6 +38,15 @@ public class DisplayMetrics { public static final int DENSITY_MEDIUM = 160; /** + * Standard quantized DPI for 720p TV screens. Applications should + * generally not worry about this density, instead targeting + * {@link #DENSITY_XHIGH} for 1080p TV screens. For situations where + * output is needed for a 720p screen, the UI elements can be scaled + * automatically by the platform. + */ + public static final int DENSITY_TV = 213; + + /** * Standard quantized DPI for high-density screens. */ public static final int DENSITY_HIGH = 240; diff --git a/include/utils/ResourceTypes.h b/include/utils/ResourceTypes.h index 884a3e1f4d22..d1d98447436d 100644 --- a/include/utils/ResourceTypes.h +++ b/include/utils/ResourceTypes.h @@ -841,6 +841,7 @@ struct ResTable_config DENSITY_DEFAULT = ACONFIGURATION_DENSITY_DEFAULT, DENSITY_LOW = ACONFIGURATION_DENSITY_LOW, DENSITY_MEDIUM = ACONFIGURATION_DENSITY_MEDIUM, + DENSITY_TV = ACONFIGURATION_DENSITY_TV, DENSITY_HIGH = ACONFIGURATION_DENSITY_HIGH, DENSITY_NONE = ACONFIGURATION_DENSITY_NONE }; diff --git a/native/include/android/configuration.h b/native/include/android/configuration.h index 39fef21ba0cb..2444c4bbda6d 100644 --- a/native/include/android/configuration.h +++ b/native/include/android/configuration.h @@ -40,6 +40,7 @@ enum { ACONFIGURATION_DENSITY_DEFAULT = 0, ACONFIGURATION_DENSITY_LOW = 120, ACONFIGURATION_DENSITY_MEDIUM = 160, + ACONFIGURATION_DENSITY_TV = 213, ACONFIGURATION_DENSITY_HIGH = 240, ACONFIGURATION_DENSITY_NONE = 0xffff, diff --git a/tools/aapt/AaptAssets.cpp b/tools/aapt/AaptAssets.cpp index 48941961ccb9..29d2b872eadd 100644 --- a/tools/aapt/AaptAssets.cpp +++ b/tools/aapt/AaptAssets.cpp @@ -969,6 +969,11 @@ bool AaptGroupEntry::getDensityName(const char* name, return true; } + if (strcmp(name, "tvdpi") == 0) { + if (out) out->density = ResTable_config::DENSITY_TV; + return true; + } + if (strcmp(name, "hdpi") == 0) { if (out) out->density = ResTable_config::DENSITY_HIGH; return true; |