From e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Mon, 13 Jun 2011 19:33:22 -0700 Subject: [PATCH] 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 --- api/current.xml | 22 +++ .../android/content/pm/PackageManager.java | 20 +++ core/java/android/os/Build.java | 20 +++ data/etc/handheld_core_hardware.xml | 2 + data/etc/tablet_core_hardware.xml | 2 + tools/aapt/Command.cpp | 156 +++++++++++++++--- 6 files changed, 200 insertions(+), 22 deletions(-) diff --git a/api/current.xml b/api/current.xml index a9f3e856c0383..f49098e478f44 100644 --- a/api/current.xml +++ b/api/current.xml @@ -61821,6 +61821,28 @@ visibility="public" > + + + + + * + *

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.

+ * + *

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.

*/ public static final int HONEYCOMB_MR2 = 13; } diff --git a/data/etc/handheld_core_hardware.xml b/data/etc/handheld_core_hardware.xml index 7f87b7923d86d..9d2a0cbb60e9e 100644 --- a/data/etc/handheld_core_hardware.xml +++ b/data/etc/handheld_core_hardware.xml @@ -31,6 +31,8 @@ + +