summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-06-13 19:33:22 -0700
committerDianne Hackborn <hackbod@google.com>2011-06-14 11:23:52 -0700
commite289bff0ec2b1af4ba773e0c8d49d5fd46eb9921 (patch)
tree4103ae9dc1838be1f61c0562fadbff9039949b50 /core
parentfd63814abe8e81d5e1e0eb75b5a5a18034e9b4c6 (diff)
downloadframeworks_base-e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921.zip
frameworks_base-e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921.tar.gz
frameworks_base-e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921.tar.bz2
Add new landscape and portrait orientation features.
Updates aapt to know about these. Also updates aapt badging to: - No longer crash due to the change to how we match unspecified configuration resources. - Report the new "smallest screen" supported screen configs. - Infer old screen size buckets based on new smallest width attrs. - Report all of the different labels and icons in an app. Change-Id: I7376042b817391bd070f549cebbc7f03be4635c8
Diffstat (limited to 'core')
-rw-r--r--core/java/android/content/pm/PackageManager.java20
-rw-r--r--core/java/android/os/Build.java20
2 files changed, 40 insertions, 0 deletions
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index bb4a5ce..64dea4c 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -920,6 +920,26 @@ public abstract class PackageManager {
/**
* Feature for {@link #getSystemAvailableFeatures} and
+ * {@link #hasSystemFeature}: The device supports portrait orientation
+ * screens. For backwards compatibility, you can assume that if neither
+ * this nor {@link #FEATURE_SCREEN_LANDSCAPE} is set then the device supports
+ * both portrait and landscape.
+ */
+ @SdkConstant(SdkConstantType.FEATURE)
+ public static final String FEATURE_SCREEN_PORTRAIT = "android.hardware.screen.portrait";
+
+ /**
+ * Feature for {@link #getSystemAvailableFeatures} and
+ * {@link #hasSystemFeature}: The device supports landscape orientation
+ * screens. For backwards compatibility, you can assume that if neither
+ * this nor {@link #FEATURE_SCREEN_PORTRAIT} is set then the device supports
+ * both portrait and landscape.
+ */
+ @SdkConstant(SdkConstantType.FEATURE)
+ public static final String FEATURE_SCREEN_LANDSCAPE = "android.hardware.screen.landscape";
+
+ /**
+ * Feature for {@link #getSystemAvailableFeatures} and
* {@link #hasSystemFeature}: The device supports live wallpapers.
*/
@SdkConstant(SdkConstantType.FEATURE)
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 6257e95..93c8715 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -243,6 +243,26 @@ public class Build {
* later. Applications that don't support a screen size at least as
* large as the current screen will provide the user with a UI to
* switch them in to screen size compatibility mode.</p>
+ *
+ * <p>This version introduces new screen size resource qualifiers
+ * based on the screen size in dp: see
+ * {@link android.content.res.Configuration#screenWidthDp},
+ * {@link android.content.res.Configuration#screenHeightDp}, and
+ * {@link android.content.res.Configuration#smallestScreenWidthDp}.
+ * Supplying these in &lt;supports-screens&gt; as per
+ * {@link android.content.pm.ApplicationInfo#requiresSmallestWidthDp},
+ * {@link android.content.pm.ApplicationInfo#compatibleWidthLimitDp}, and
+ * {@link android.content.pm.ApplicationInfo#largestWidthLimitDp} is
+ * preferred over the older screen size buckets and for older devices
+ * the appropriate buckets will be inferred from them.</p>
+ *
+ * <p>New {@link android.content.pm.PackageManager#FEATURE_SCREEN_PORTRAIT}
+ * and {@link android.content.pm.PackageManager#FEATURE_SCREEN_LANDSCAPE}
+ * features are introduced in this release. Applications that target
+ * previous platform versions are assumed to require both portrait and
+ * landscape support in the device; when targeting Honeycomb MR1 or
+ * greater the application is responsible for specifying any specific
+ * orientation it requires.</p>
*/
public static final int HONEYCOMB_MR2 = 13;
}