summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-04-23 17:51:26 -0700
committerDianne Hackborn <hackbod@google.com>2010-04-28 16:51:52 -0700
commit14cee9f688c32d63d8521188e7422811629bb7c2 (patch)
tree16c2f2356519a2552bb3b7e2b1de6735793c4b1a /services
parent3fd6419fe542c4ecb8e838d1754a83ce8591b288 (diff)
downloadframeworks_base-14cee9f688c32d63d8521188e7422811629bb7c2.zip
frameworks_base-14cee9f688c32d63d8521188e7422811629bb7c2.tar.gz
frameworks_base-14cee9f688c32d63d8521188e7422811629bb7c2.tar.bz2
New xlarge screen size.
Not complete, only for experimentation at this point. This includes a reworking of how screen size configurations are matched, so that if you are on a larger screen we can select configurations for smaller screens if there aren't any exactly matching the current screen. The screen size at which we switch to xlarge has been arbitrarily chosen; the compatibility behavior has not yet been defined. Change-Id: I1a33b3818eeb51a68fb72397568c39ab040a07f5
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/PackageManagerService.java10
-rw-r--r--services/java/com/android/server/WindowManagerService.java8
2 files changed, 14 insertions, 4 deletions
diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java
index 7f49c6a..0d489b2 100644
--- a/services/java/com/android/server/PackageManagerService.java
+++ b/services/java/com/android/server/PackageManagerService.java
@@ -7108,6 +7108,12 @@ class PackageManagerService extends IPackageManager.Stub {
pw.print(" supportsScreens=[");
boolean first = true;
if ((ps.pkg.applicationInfo.flags &
+ ApplicationInfo.FLAG_SUPPORTS_SMALL_SCREENS) != 0) {
+ if (!first) pw.print(", ");
+ first = false;
+ pw.print("small");
+ }
+ if ((ps.pkg.applicationInfo.flags &
ApplicationInfo.FLAG_SUPPORTS_NORMAL_SCREENS) != 0) {
if (!first) pw.print(", ");
first = false;
@@ -7120,10 +7126,10 @@ class PackageManagerService extends IPackageManager.Stub {
pw.print("large");
}
if ((ps.pkg.applicationInfo.flags &
- ApplicationInfo.FLAG_SUPPORTS_SMALL_SCREENS) != 0) {
+ ApplicationInfo.FLAG_SUPPORTS_XLARGE_SCREENS) != 0) {
if (!first) pw.print(", ");
first = false;
- pw.print("small");
+ pw.print("xlarge");
}
if ((ps.pkg.applicationInfo.flags &
ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS) != 0) {
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index 205e308..f1c67d2 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -4900,8 +4900,12 @@ public class WindowManagerService extends IWindowManager.Stub
mScreenLayout = Configuration.SCREENLAYOUT_SIZE_SMALL
| Configuration.SCREENLAYOUT_LONG_NO;
} else {
- // Is this a large screen?
- if (longSize > 640 && shortSize >= 480) {
+ // What size is this screen screen?
+ if (longSize >= 800 && shortSize >= 600) {
+ // SVGA or larger screens at medium density are the point
+ // at which we consider it to be an extra large screen.
+ mScreenLayout = Configuration.SCREENLAYOUT_SIZE_XLARGE;
+ } else if (longSize >= 640 && shortSize >= 480) {
// VGA or larger screens at medium density are the point
// at which we consider it to be a large screen.
mScreenLayout = Configuration.SCREENLAYOUT_SIZE_LARGE;