]> git.saurik.com Git - android/aapt.git/commitdiff
am 46a282f3: am 0ed2e845: Merge "DO NOT MERGE. Integrate add new screen width/height...
authorDianne Hackborn <hackbod@google.com>
Fri, 13 May 2011 18:21:26 +0000 (11:21 -0700)
committerAndroid Git Automerger <android-git-automerger@android.com>
Fri, 13 May 2011 18:21:26 +0000 (11:21 -0700)
* commit '46a282f323bc05606e4fe1eba795bd9ac7c99819':
  DO NOT MERGE.  Integrate add new screen width/height in "dp" configs.

1  2 
ResourceTable.cpp

diff --combined ResourceTable.cpp
index 6d5fcc257e78c267d68e6a61a9642dff05f560ad,3dcc0939985073dc8e0f1def80721ba0c5fa3c7f..a88476e9b544eac3e908b859b634ed9ba4561350
@@@ -2607,6 -2607,15 +2607,15 @@@ ResourceFilter::match(const ResTable_co
      if (!match(AXIS_SCREENSIZE, config.screenSize)) {
          return false;
      }
+     if (!match(AXIS_SCREENWIDTHDP, config.screenWidthDp)) {
+         return false;
+     }
+     if (!match(AXIS_SCREENHEIGHTDP, config.screenHeightDp)) {
+         return false;
+     }
+     if (!match(AXIS_SCREENLAYOUTSIZE, config.screenLayout&ResTable_config::MASK_SCREENSIZE)) {
+         return false;
+     }
      if (!match(AXIS_VERSION, config.version)) {
          return false;
      }
@@@ -2800,7 -2809,7 +2809,7 @@@ status_t ResourceTable::flatten(Bundle
                  ConfigDescription config = t->getUniqueConfigs().itemAt(ci);
  
                  NOISY(printf("Writing config %d config: imsi:%d/%d lang:%c%c cnt:%c%c "
-                      "orien:%d ui:%d touch:%d density:%d key:%d inp:%d nav:%d w:%d h:%d\n",
+                      "orien:%d ui:%d touch:%d density:%d key:%d inp:%d nav:%d sz:%dx%d %ddp x %ddp\n",
                        ti+1,
                        config.mcc, config.mnc,
                        config.language[0] ? config.language[0] : '-',
                        config.inputFlags,
                        config.navigation,
                        config.screenWidth,
-                       config.screenHeight));
+                       config.screenHeight,
+                       config.screenWidthDp,
+                       config.screenHeightDp));
                        
                  if (filterable && !filter.match(config)) {
                      continue;
                  tHeader->entriesStart = htodl(typeSize);
                  tHeader->config = config;
                  NOISY(printf("Writing type %d config: imsi:%d/%d lang:%c%c cnt:%c%c "
-                      "orien:%d ui:%d touch:%d density:%d key:%d inp:%d nav:%d w:%d h:%d\n",
+                      "orien:%d ui:%d touch:%d density:%d key:%d inp:%d nav:%d sz:%dx%d %ddp x %ddp\n",
                        ti+1,
                        tHeader->config.mcc, tHeader->config.mnc,
                        tHeader->config.language[0] ? tHeader->config.language[0] : '-',
                        tHeader->config.inputFlags,
                        tHeader->config.navigation,
                        tHeader->config.screenWidth,
-                       tHeader->config.screenHeight));
+                       tHeader->config.screenHeight,
+                       tHeader->config.screenWidthDp,
+                       tHeader->config.screenHeightDp));
                  tHeader->config.swapHtoD();
  
                  // Build the entries inside of this type.
@@@ -3435,7 -3448,7 +3448,7 @@@ sp<ResourceTable::Entry> ResourceTable:
      if (e == NULL) {
          if (config != NULL) {
              NOISY(printf("New entry at %s:%d: imsi:%d/%d lang:%c%c cnt:%c%c "
-                     "orien:%d touch:%d density:%d key:%d inp:%d nav:%d w:%d h:%d\n",
+                     "orien:%d touch:%d density:%d key:%d inp:%d nav:%d sz:%dx%d %ddp x %ddp\n",
                        sourcePos.file.string(), sourcePos.line,
                        config->mcc, config->mnc,
                        config->language[0] ? config->language[0] : '-',
                        config->inputFlags,
                        config->navigation,
                        config->screenWidth,
-                       config->screenHeight));
+                       config->screenHeight,
+                       config->screenWidthDp,
+                       config->screenHeightDp));
          } else {
              NOISY(printf("New entry at %s:%d: NULL config\n",
                        sourcePos.file.string(), sourcePos.line));
@@@ -3681,9 -3696,7 +3696,9 @@@ sp<ResourceTable::Package> ResourceTabl
  {
      sp<Package> p = mPackages.valueFor(package);
      if (p == NULL) {
 -        if (mIsAppPackage) {
 +        if (mBundle->getIsOverlayPackage()) {
 +            p = new Package(package, 0x00);
 +        } else if (mIsAppPackage) {
              if (mHaveAppPackage) {
                  fprintf(stderr, "Adding multiple application package resources; only one is allowed.\n"
                                  "Use -x to create extended resources.\n");