summaryrefslogtreecommitdiffstats
path: root/core/java/android/content/pm/ApplicationInfo.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-06-01 21:27:05 -0700
committerDianne Hackborn <hackbod@google.com>2011-06-01 22:20:38 -0700
commit2762ff3dc864018352362f6d103de471f9529ba6 (patch)
tree336a610d1901f4e3ccb526057bed4d0de8ae674a /core/java/android/content/pm/ApplicationInfo.java
parente66763516a9c27c192adaba417616371a1c3c9bf (diff)
downloadframeworks_base-2762ff3dc864018352362f6d103de471f9529ba6.zip
frameworks_base-2762ff3dc864018352362f6d103de471f9529ba6.tar.gz
frameworks_base-2762ff3dc864018352362f6d103de471f9529ba6.tar.bz2
Add new supports-screen API to set maximum allowed size.
Change-Id: I0a7cd4ba73a4c18558e6daee28963d5fd12c7978
Diffstat (limited to 'core/java/android/content/pm/ApplicationInfo.java')
-rw-r--r--core/java/android/content/pm/ApplicationInfo.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index ab31865..2bd632d 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -337,6 +337,14 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
public int compatibleWidthLimitDp = 0;
/**
+ * The maximum smallest screen width the application will work on. If 0,
+ * nothing has been specified. Comes from
+ * {@link android.R.styleable#AndroidManifestSupportsScreens_largestWidthLimitDp
+ * android:largestWidthLimitDp} attribute of the &lt;supports-screens&gt; tag.
+ */
+ public int largestWidthLimitDp = 0;
+
+ /**
* Full path to the location of this package.
*/
public String sourceDir;
@@ -418,7 +426,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
pw.println(prefix + "uid=" + uid + " flags=0x" + Integer.toHexString(flags)
+ " theme=0x" + Integer.toHexString(theme));
pw.println(prefix + "requiresSmallestWidthDp=" + requiresSmallestWidthDp
- + " compatibleWidthLimitDp=" + compatibleWidthLimitDp);
+ + " compatibleWidthLimitDp=" + compatibleWidthLimitDp
+ + " largestWidthLimitDp=" + largestWidthLimitDp);
pw.println(prefix + "sourceDir=" + sourceDir);
if (sourceDir == null) {
if (publicSourceDir != null) {
@@ -480,6 +489,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
flags = orig.flags;
requiresSmallestWidthDp = orig.requiresSmallestWidthDp;
compatibleWidthLimitDp = orig.compatibleWidthLimitDp;
+ largestWidthLimitDp = orig.largestWidthLimitDp;
sourceDir = orig.sourceDir;
publicSourceDir = orig.publicSourceDir;
nativeLibraryDir = orig.nativeLibraryDir;
@@ -515,6 +525,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
dest.writeInt(flags);
dest.writeInt(requiresSmallestWidthDp);
dest.writeInt(compatibleWidthLimitDp);
+ dest.writeInt(largestWidthLimitDp);
dest.writeString(sourceDir);
dest.writeString(publicSourceDir);
dest.writeString(nativeLibraryDir);
@@ -550,6 +561,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
flags = source.readInt();
requiresSmallestWidthDp = source.readInt();
compatibleWidthLimitDp = source.readInt();
+ largestWidthLimitDp = source.readInt();
sourceDir = source.readString();
publicSourceDir = source.readString();
nativeLibraryDir = source.readString();