summaryrefslogtreecommitdiffstats
path: root/core/java/android/content/pm/ApplicationInfo.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-05-26 14:20:23 -0700
committerDianne Hackborn <hackbod@google.com>2011-05-26 14:48:04 -0700
commitdf6e980e3f63eb0f6f9eb437fa925d5009cd9c44 (patch)
tree5440eeb979427cf2d0be09e067b0dd5c0d62a943 /core/java/android/content/pm/ApplicationInfo.java
parent7a09f72b8850ec22e4ca7fd50aba20ead7666f67 (diff)
downloadframeworks_base-df6e980e3f63eb0f6f9eb437fa925d5009cd9c44.zip
frameworks_base-df6e980e3f63eb0f6f9eb437fa925d5009cd9c44.tar.gz
frameworks_base-df6e980e3f63eb0f6f9eb437fa925d5009cd9c44.tar.bz2
Add new supports-screens attributes for declaring the compatible screens.
Change-Id: I40d57e4354e48accc1027c9f90916ea73eb5190d android:requiresSmallestWidthDp provides the smallest supported width. android:compatibleWidthLimitDp provides the largest compatible width.
Diffstat (limited to 'core/java/android/content/pm/ApplicationInfo.java')
-rw-r--r--core/java/android/content/pm/ApplicationInfo.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 92b2c3b..ab31865 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -321,6 +321,22 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
public int flags = 0;
/**
+ * The required smallest screen width the application can run on. If 0,
+ * nothing has been specified. Comes from
+ * {@link android.R.styleable#AndroidManifestSupportsScreens_requiresSmallestWidthDp
+ * android:requiresSmallestWidthDp} attribute of the &lt;supports-screens&gt; tag.
+ */
+ public int requiresSmallestWidthDp = 0;
+
+ /**
+ * The maximum smallest screen width the application is designed for. If 0,
+ * nothing has been specified. Comes from
+ * {@link android.R.styleable#AndroidManifestSupportsScreens_compatibleWidthLimitDp
+ * android:compatibleWidthLimitDp} attribute of the &lt;supports-screens&gt; tag.
+ */
+ public int compatibleWidthLimitDp = 0;
+
+ /**
* Full path to the location of this package.
*/
public String sourceDir;
@@ -401,6 +417,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
pw.println(prefix + "taskAffinity=" + taskAffinity);
pw.println(prefix + "uid=" + uid + " flags=0x" + Integer.toHexString(flags)
+ " theme=0x" + Integer.toHexString(theme));
+ pw.println(prefix + "requiresSmallestWidthDp=" + requiresSmallestWidthDp
+ + " compatibleWidthLimitDp=" + compatibleWidthLimitDp);
pw.println(prefix + "sourceDir=" + sourceDir);
if (sourceDir == null) {
if (publicSourceDir != null) {
@@ -460,6 +478,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
className = orig.className;
theme = orig.theme;
flags = orig.flags;
+ requiresSmallestWidthDp = orig.requiresSmallestWidthDp;
+ compatibleWidthLimitDp = orig.compatibleWidthLimitDp;
sourceDir = orig.sourceDir;
publicSourceDir = orig.publicSourceDir;
nativeLibraryDir = orig.nativeLibraryDir;
@@ -493,6 +513,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
dest.writeString(className);
dest.writeInt(theme);
dest.writeInt(flags);
+ dest.writeInt(requiresSmallestWidthDp);
+ dest.writeInt(compatibleWidthLimitDp);
dest.writeString(sourceDir);
dest.writeString(publicSourceDir);
dest.writeString(nativeLibraryDir);
@@ -526,6 +548,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
className = source.readString();
theme = source.readInt();
flags = source.readInt();
+ requiresSmallestWidthDp = source.readInt();
+ compatibleWidthLimitDp = source.readInt();
sourceDir = source.readString();
publicSourceDir = source.readString();
nativeLibraryDir = source.readString();