]> git.saurik.com Git - android/aapt.git/commitdiff
am fa888784: am 89fef418: Merge "Avoid pre-processing images when they won\'t be...
authorXavier Ducrohet <xav@android.com>
Fri, 10 Sep 2010 22:01:56 +0000 (15:01 -0700)
committerAndroid Git Automerger <android-git-automerger@android.com>
Fri, 10 Sep 2010 22:01:56 +0000 (15:01 -0700)
Merge commit 'fa8887848e2877dd96e853dfcd52086f1b66c26b'

* commit 'fa8887848e2877dd96e853dfcd52086f1b66c26b':
  Avoid pre-processing images when they won't be used

1  2 
Resource.cpp

diff --combined Resource.cpp
index 01728a17477e1752280acf66ad6ebc613d2fcc5d,c8ba9048f8670a0dcd723c14e7567d0341939883..822262eda8bed411255ff816291d0cca9fd3ccc1
@@@ -542,11 -542,11 +542,11 @@@ static bool applyFileOverlay(Bundle *bu
                          DefaultKeyedVector<AaptGroupEntry, sp<AaptFile> > baseFiles =
                                  baseGroup->getFiles();
                          for (size_t i=0; i < baseFiles.size(); i++) {
 -                            printf("baseFile %ld has flavor %s\n", i,
 +                            printf("baseFile %d has flavor %s\n", i,
                                      baseFiles.keyAt(i).toString().string());
                          }
                          for (size_t i=0; i < overlayFiles.size(); i++) {
 -                            printf("overlayFile %ld has flavor %s\n", i,
 +                            printf("overlayFile %d has flavor %s\n", i,
                                      overlayFiles.keyAt(i).toString().string());
                          }
                      }
                                  keyAt(overlayGroupIndex));
                          if(baseFileIndex < UNKNOWN_ERROR) {
                              if (bundle->getVerbose()) {
 -                                printf("found a match (%ld) for overlay file %s, for flavor %s\n",
 +                                printf("found a match (%d) for overlay file %s, for flavor %s\n",
                                          baseFileIndex,
                                          overlayGroup->getLeaf().string(),
                                          overlayFiles.keyAt(overlayGroupIndex).toString().string());
@@@ -835,7 -835,9 +835,9 @@@ status_t buildResources(Bundle* bundle
      bool hasErrors = false;
  
      if (drawables != NULL) {
-         err = preProcessImages(bundle, assets, drawables);
+         if (bundle->getOutputAPKFile() != NULL) {
+             err = preProcessImages(bundle, assets, drawables);
+         }
          if (err == NO_ERROR) {
              err = makeFileResources(bundle, assets, &table, drawables, "drawable");
              if (err != NO_ERROR) {
@@@ -2081,13 -2083,12 +2083,13 @@@ writeProguardForLayouts(ProguardKeepSet
      // tag:attribute pairs that should be checked in layout files.
      KeyedVector<String8, NamespaceAttributePair> kLayoutTagAttrPairs;
      addTagAttrPair(&kLayoutTagAttrPairs, "view", NULL, "class");
 +    addTagAttrPair(&kLayoutTagAttrPairs, "fragment", NULL, "class");
      addTagAttrPair(&kLayoutTagAttrPairs, "fragment", RESOURCES_ANDROID_NAMESPACE, "name");
  
      // tag:attribute pairs that should be checked in xml files.
      KeyedVector<String8, NamespaceAttributePair> kXmlTagAttrPairs;
      addTagAttrPair(&kXmlTagAttrPairs, "PreferenceScreen", RESOURCES_ANDROID_NAMESPACE, "fragment");
 -    addTagAttrPair(&kXmlTagAttrPairs, "Header", RESOURCES_ANDROID_NAMESPACE, "fragment");
 +    addTagAttrPair(&kXmlTagAttrPairs, "header", RESOURCES_ANDROID_NAMESPACE, "fragment");
  
      const Vector<sp<AaptDir> >& dirs = assets->resDirs();
      const size_t K = dirs.size();