summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-06-14 11:40:06 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-06-14 11:40:06 -0700
commit77fc8b8066709a1d09a159901fd65c49b5e6eaa5 (patch)
tree5a7b35359f2f30947331667e5acbddab9140d558 /core/java
parentaabe5f46846a45163be874dca2d19910ce38c232 (diff)
parent6c0533f994e7991b3bd60cab48362e8e2e6d86f0 (diff)
downloadframeworks_base-77fc8b8066709a1d09a159901fd65c49b5e6eaa5.zip
frameworks_base-77fc8b8066709a1d09a159901fd65c49b5e6eaa5.tar.gz
frameworks_base-77fc8b8066709a1d09a159901fd65c49b5e6eaa5.tar.bz2
am 6c0533f9: am c5193c62: Merge "Add new landscape and portrait orientation features." into honeycomb-mr2
* commit '6c0533f994e7991b3bd60cab48362e8e2e6d86f0': Add new landscape and portrait orientation features.
Diffstat (limited to 'core/java')
-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;
}