diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-06-14 11:36:05 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-06-14 11:36:05 -0700 |
commit | 6c0533f994e7991b3bd60cab48362e8e2e6d86f0 (patch) | |
tree | b76a68e9573c6857c24cdee95d7ff65fbc8febfe /core/java | |
parent | 49572479a9cb479f2b323f011c1a9f8142ec1a46 (diff) | |
parent | c5193c6285d7094fb86dcb5cd56f44a3788af7c2 (diff) | |
download | frameworks_base-6c0533f994e7991b3bd60cab48362e8e2e6d86f0.zip frameworks_base-6c0533f994e7991b3bd60cab48362e8e2e6d86f0.tar.gz frameworks_base-6c0533f994e7991b3bd60cab48362e8e2e6d86f0.tar.bz2 |
am c5193c62: Merge "Add new landscape and portrait orientation features." into honeycomb-mr2
* commit 'c5193c6285d7094fb86dcb5cd56f44a3788af7c2':
Add new landscape and portrait orientation features.
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/content/pm/PackageManager.java | 20 | ||||
-rw-r--r-- | core/java/android/os/Build.java | 20 |
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 <supports-screens> 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; } |