]> git.saurik.com Git - android/aapt.git/commitdiff
am 31103928: am 192b56d4: Merge "Implement #2964234: Add support for <uses-package...
authorDianne Hackborn <hackbod@google.com>
Fri, 3 Sep 2010 00:59:51 +0000 (17:59 -0700)
committerAndroid Git Automerger <android-git-automerger@android.com>
Fri, 3 Sep 2010 00:59:51 +0000 (17:59 -0700)
Merge commit '31103928ed5b9091bcd7de74c8a49675d10c87e7'

* commit '31103928ed5b9091bcd7de74c8a49675d10c87e7':
  Implement #2964234: Add support for <uses-package> element to aapt

1  2 
Command.cpp

diff --combined Command.cpp
index b50a393adad5db44b9347951b283749721814ef7,f71ebb98344f289a7801ddc1058269c4f76cb2a2..eaff0f407f056982219159db75701a63651c8428
@@@ -198,10 -198,8 +198,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",
@@@ -392,9 -390,8 +392,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");
                                      error.string());
                              goto bail;
                          }
+                     } else if (tag == "uses-package") {
+                         String8 name = getAttribute(tree, NAME_ATTR, &error);
+                         if (name != "" && error == "") {
+                             printf("uses-package:'%s'\n", name.string());
+                         } else {
+                             fprintf(stderr, "ERROR getting 'android:name' attribute: %s\n",
+                                     error.string());
+                                 goto bail;
+                         }
                      } else if (tag == "original-package") {
                          String8 name = getAttribute(tree, NAME_ATTR, &error);
                          if (name != "" && error == "") {