]> git.saurik.com Git - android/aapt.git/commitdiff
Add "nodpi" density, and expose a bunch of density-related APIs.
authorDianne Hackborn <hackbod@google.com>
Fri, 17 Jul 2009 18:13:48 +0000 (11:13 -0700)
committerDianne Hackborn <hackbod@google.com>
Fri, 17 Jul 2009 23:59:08 +0000 (16:59 -0700)
Also update the DpiTest app to use nodpi images, and try to have a mode
where it turns off compatibility though it's not quite working.

AaptAssets.cpp

index 67af116d372dc5e67dff6bc01cba8e13d053fb2e..14cad2f0b8b9c461a8614db34511d2e064de9d78 100644 (file)
@@ -654,9 +654,15 @@ bool AaptGroupEntry::getDensityName(const char* name,
                                     ResTable_config* out)
 {
     if (strcmp(name, kWildcardName) == 0) {
                                     ResTable_config* out)
 {
     if (strcmp(name, kWildcardName) == 0) {
-        if (out) out->density = 0;
+        if (out) out->density = ResTable_config::DENSITY_DEFAULT;
         return true;
     }
         return true;
     }
+    
+    if (strcmp(name, "nodpi") == 0) {
+        if (out) out->density = ResTable_config::DENSITY_NONE;
+        return true;
+    }
+    
     char* c = (char*)name;
     while (*c >= '0' && *c <= '9') {
         c++;
     char* c = (char*)name;
     while (*c >= '0' && *c <= '9') {
         c++;