From: Dianne Hackborn Date: Fri, 17 Jul 2009 18:13:48 +0000 (-0700) Subject: Add "nodpi" density, and expose a bunch of density-related APIs. X-Git-Url: https://git.saurik.com/android/aapt.git/commitdiff_plain/41ff305db164a1dd96476d5857b5829946d5193c?ds=sidebyside Add "nodpi" density, and expose a bunch of density-related APIs. 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. --- diff --git a/AaptAssets.cpp b/AaptAssets.cpp index 67af116..14cad2f 100644 --- a/AaptAssets.cpp +++ b/AaptAssets.cpp @@ -654,9 +654,15 @@ bool AaptGroupEntry::getDensityName(const char* name, ResTable_config* out) { if (strcmp(name, kWildcardName) == 0) { - if (out) out->density = 0; + if (out) out->density = ResTable_config::DENSITY_DEFAULT; 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++;