]> git.saurik.com Git - android/aapt.git/commitdiff
Add screen layout size as one of the resource filtering axes.
authorYing Wang <wangying@google.com>
Mon, 14 Mar 2011 22:53:23 +0000 (15:53 -0700)
committerYing Wang <wangying@google.com>
Mon, 14 Mar 2011 22:53:23 +0000 (15:53 -0700)
So that we can add screen layout size such as
"small/normal/large/xlarge" to PRODUCT_LOCALES to filter unwanted
resources. We already handle screen density this way.
Bug: 4086309

Change-Id: I0867e22a825faea0e100d8a0075f0f5cb7c0c964

ResourceTable.cpp

index 533956620f0ba43b14c2c061593d3917cbabe352..10815a1e04ec86cdb68c7e6e8dfd28a1d79faaae 100644 (file)
@@ -2607,6 +2607,9 @@ ResourceFilter::match(const ResTable_config& config) const
     if (!match(AXIS_SCREENSIZE, config.screenSize)) {
         return false;
     }
+    if (!match(AXIS_SCREENLAYOUTSIZE, config.screenLayout&ResTable_config::MASK_SCREENSIZE)) {
+        return false;
+    }
     if (!match(AXIS_VERSION, config.version)) {
         return false;
     }