Simplify density compatibility to a boolean.

Instead of a list, we now just have a single boolean indicating whether an
application is density aware, and this set set to true by default as of
Donut.
This commit is contained in:
Dianne Hackborn
2009-07-21 20:03:02 -07:00
parent 59c25cbaf0
commit 11b822d2a9
11 changed files with 104 additions and 195 deletions

View File

@ -4902,26 +4902,40 @@ class PackageManagerService extends IPackageManager.Stub {
if (ps.pkg != null) {
pw.print(" dataDir="); pw.println(ps.pkg.applicationInfo.dataDir);
pw.print(" targetSdk="); pw.println(ps.pkg.applicationInfo.targetSdkVersion);
pw.print(" densities="); pw.println(ps.pkg.supportsDensityList);
ArrayList<String> screens = new ArrayList<String>();
pw.print(" supportsScreens=[");
boolean first = true;
if ((ps.pkg.applicationInfo.flags &
ApplicationInfo.FLAG_SUPPORTS_NORMAL_SCREENS) != 0) {
screens.add("medium");
if (!first) pw.print(", ");
first = false;
pw.print("medium");
}
if ((ps.pkg.applicationInfo.flags &
ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS) != 0) {
screens.add("large");
if (!first) pw.print(", ");
first = false;
pw.print("large");
}
if ((ps.pkg.applicationInfo.flags &
ApplicationInfo.FLAG_SUPPORTS_SMALL_SCREENS) != 0) {
screens.add("small,");
if (!first) pw.print(", ");
first = false;
pw.print("small");
}
if ((ps.pkg.applicationInfo.flags &
ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS) != 0) {
screens.add("resizeable,");
if (!first) pw.print(", ");
first = false;
pw.print("resizeable");
}
if ((ps.pkg.applicationInfo.flags &
ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES) != 0) {
if (!first) pw.print(", ");
first = false;
pw.print("anyDensity");
}
pw.print(" supportsScreens="); pw.println(screens);
}
pw.println("]");
pw.print(" timeStamp="); pw.println(ps.getTimeStampStr());
pw.print(" signatures="); pw.println(ps.signatures);
pw.print(" permissionsFixed="); pw.print(ps.permissionsFixed);