diff options
author | Xavier Ducrohet <xav@android.com> | 2012-02-10 13:59:54 -0800 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2012-03-16 09:59:45 -0700 |
commit | 45a6d2d3883b33a3a8391c0c491b9d6476b0d2e2 (patch) | |
tree | bf30b0044422cf1e339ea7d0a49606318fe44381 /common | |
parent | 564ecd801263c48f1fe05af0349ff4898c7f45c7 (diff) | |
download | sdk-45a6d2d3883b33a3a8391c0c491b9d6476b0d2e2.zip sdk-45a6d2d3883b33a3a8391c0c491b9d6476b0d2e2.tar.gz sdk-45a6d2d3883b33a3a8391c0c491b9d6476b0d2e2.tar.bz2 |
Add info about when qualifiers were added to the platform.
This is a first step where we setup the info. Next step
is to actually use the info when calling
ResourceRepository.getConfiguredResources
Change-Id: I03c20ad0ec7a53ec8219316cc4af7a59155ef34a
Diffstat (limited to 'common')
-rw-r--r-- | common/src/com/android/resources/Density.java | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/common/src/com/android/resources/Density.java b/common/src/com/android/resources/Density.java index 610789a..0584166 100644 --- a/common/src/com/android/resources/Density.java +++ b/common/src/com/android/resources/Density.java @@ -23,23 +23,25 @@ package com.android.resources; * as well as other places needing to know the density values. */ public enum Density implements ResourceEnum { - XHIGH("xhdpi", "X-High Density", 320), //$NON-NLS-1$ - HIGH("hdpi", "High Density", 240), //$NON-NLS-1$ - TV("tvdpi", "TV Density", 213), //$NON-NLS-1$ - MEDIUM("mdpi", "Medium Density", 160), //$NON-NLS-1$ - LOW("ldpi", "Low Density", 120), //$NON-NLS-1$ - NODPI("nodpi", "No Density", 0); //$NON-NLS-1$ + XHIGH("xhdpi", "X-High Density", 320, 8), //$NON-NLS-1$ + HIGH("hdpi", "High Density", 240, 4), //$NON-NLS-1$ + TV("tvdpi", "TV Density", 213, 13), //$NON-NLS-1$ + MEDIUM("mdpi", "Medium Density", 160, 4), //$NON-NLS-1$ + LOW("ldpi", "Low Density", 120, 4), //$NON-NLS-1$ + NODPI("nodpi", "No Density", 0, 4); //$NON-NLS-1$ public final static int DEFAULT_DENSITY = 160; private final String mValue; private final String mDisplayValue; private final int mDensity; + private final int mSince; - private Density(String value, String displayValue, int density) { + private Density(String value, String displayValue, int density, int since) { mValue = value; mDisplayValue = displayValue; mDensity = density; + mSince = since; } /** @@ -81,6 +83,10 @@ public enum Density implements ResourceEnum { return mDensity; } + public int since() { + return mSince; + } + public String getLegacyValue() { if (this != NODPI) { return String.format("%1$ddpi", getDpiValue()); |