]> git.saurik.com Git - android/aapt.git/commitdiff
am 8b569c8d: am 42f90ca5: Merge "Fix aapt dump badging to support xlarge screens...
authorDianne Hackborn <hackbod@google.com>
Tue, 24 Aug 2010 16:02:43 +0000 (09:02 -0700)
committerAndroid Git Automerger <android-git-automerger@android.com>
Tue, 24 Aug 2010 16:02:43 +0000 (09:02 -0700)
Merge commit '8b569c8d49924d849793513a5418ef0350320962'

* commit '8b569c8d49924d849793513a5418ef0350320962':
  Fix aapt dump badging to support xlarge screens.

1  2 
Command.cpp

diff --combined Command.cpp
index c40af80d744ee58682db68a37806dbef39f5bb56,35124aad19ea5089672b864bc4b084745d5b3071..abccf9be9d0c57a3af2df8ecefe37cb7913c5b61
@@@ -197,10 -197,8 +197,10 @@@ int doList(Bundle* bundle
          if (&res == NULL) {
              printf("\nNo resource table found.\n");
          } else {
 +#ifndef HAVE_ANDROID_OS
              printf("\nResource table:\n");
              res.print(false);
 +#endif
          }
  
          Asset* manifestAsset = assets.openNonAsset("AndroidManifest.xml",
@@@ -338,6 -336,7 +338,7 @@@ enum 
      SMALL_SCREEN_ATTR = 0x01010284,
      NORMAL_SCREEN_ATTR = 0x01010285,
      LARGE_SCREEN_ATTR = 0x01010286,
+     XLARGE_SCREEN_ATTR = 0x010102bf,
      REQUIRED_ATTR = 0x0101028e,
  };
  
@@@ -390,9 -389,8 +391,9 @@@ int doDump(Bundle* bundle
      }
  
      if (strcmp("resources", option) == 0) {
 +#ifndef HAVE_ANDROID_OS
          res.print(bundle->getValues());
 -
 +#endif
      } else if (strcmp("xmltree", option) == 0) {
          if (bundle->getFileSpecCount() < 3) {
              fprintf(stderr, "ERROR: no dump xmltree resource file specified\n");
              int smallScreen = 1;
              int normalScreen = 1;
              int largeScreen = 1;
+             int xlargeScreen = 1;
              String8 pkg;
              String8 activityName;
              String8 activityLabel;
                                  NORMAL_SCREEN_ATTR, NULL, 1);
                          largeScreen = getIntegerAttribute(tree,
                                  LARGE_SCREEN_ATTR, NULL, 1);
+                         xlargeScreen = getIntegerAttribute(tree,
+                                 XLARGE_SCREEN_ATTR, NULL, 1);
                      } else if (tag == "uses-feature") {
                          String8 name = getAttribute(tree, NAME_ATTR, &error);
  
              if (largeScreen > 0) {
                  largeScreen = targetSdk >= 4 ? -1 : 0;
              }
+             if (xlargeScreen > 0) {
+                 // Introduced in Honeycomb.
+                 xlargeScreen = targetSdk >= 10 ? -1 : 0;
+             }
              printf("supports-screens:");
              if (smallScreen != 0) printf(" 'small'");
              if (normalScreen != 0) printf(" 'normal'");
              if (largeScreen != 0) printf(" 'large'");
+             if (xlargeScreen != 0) printf(" 'xlarge'");
              printf("\n");
  
              printf("locales:");