bool onlyPublic) const
{
String16 package, type, name;
+ bool refOnlyPublic = true;
if (!ResTable::expandResourceRef(
ref.string(), ref.size(), &package, &type, &name,
defType, defPackage ? defPackage:&mAssetsPackage,
- outErrorMsg)) {
+ outErrorMsg, &refOnlyPublic)) {
NOISY(printf("Expanding resource: ref=%s\n",
String8(ref).string()));
NOISY(printf("Expanding resource: defType=%s\n",
String8(name).string()));
return 0;
}
- uint32_t res = getResId(package, type, name, onlyPublic);
+ uint32_t res = getResId(package, type, name, onlyPublic && refOnlyPublic);
NOISY(printf("Expanded resource: p=%s, t=%s, n=%s, res=%d\n",
String8(package).string(), String8(type).string(),
String8(name).string(), res));
if (!match(AXIS_SCREENSIZE, config.screenSize)) {
return false;
}
+ if (!match(AXIS_SMALLESTSCREENWIDTHDP, config.smallestScreenWidthDp)) {
+ return false;
+ }
if (!match(AXIS_SCREENWIDTHDP, config.screenWidthDp)) {
return false;
}
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 sz:%dx%d %ddp x %ddp\n",
+ "orien:%d ui:%d touch:%d density:%d key:%d inp:%d nav:%d sz:%dx%d "
+ "sw%ddp w%ddp h%ddp\n",
ti+1,
config.mcc, config.mnc,
config.language[0] ? config.language[0] : '-',
config.navigation,
config.screenWidth,
config.screenHeight,
+ config.smallestScreenWidthDp,
config.screenWidthDp,
config.screenHeightDp));
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 sz:%dx%d %ddp x %ddp\n",
+ "orien:%d ui:%d touch:%d density:%d key:%d inp:%d nav:%d sz:%dx%d "
+ "sw%ddp w%ddp h%ddp\n",
ti+1,
tHeader->config.mcc, tHeader->config.mnc,
tHeader->config.language[0] ? tHeader->config.language[0] : '-',
tHeader->config.navigation,
tHeader->config.screenWidth,
tHeader->config.screenHeight,
+ tHeader->config.smallestScreenWidthDp,
tHeader->config.screenWidthDp,
tHeader->config.screenHeightDp));
tHeader->config.swapHtoD();
const String16 id16("id");
mParentId = 0;
if (mParent.size() > 0) {
- mParentId = table->getResId(mParent, &style16, NULL, &errorMsg);
+ mParentId = table->getResId(mParent, &style16, NULL, &errorMsg, false);
if (mParentId == 0) {
mPos.error("Error retrieving parent for item: %s '%s'.\n",
errorMsg, String8(mParent).string());
const String16& key = mBag.keyAt(i);
Item& it = mBag.editValueAt(i);
it.bagKeyId = table->getResId(key,
- it.isId ? &id16 : &attr16, NULL, &errorMsg);
+ it.isId ? &id16 : &attr16, NULL, &errorMsg, false);
//printf("Bag key of %s: #%08x\n", String8(key).string(), it.bagKeyId);
if (it.bagKeyId == 0) {
it.sourcePos.error("Error: %s: %s '%s'.\n", errorMsg,
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 sz:%dx%d %ddp x %ddp\n",
+ "orien:%d touch:%d density:%d key:%d inp:%d nav:%d sz:%dx%d "
+ "sw%ddp w%ddp h%ddp\n",
sourcePos.file.string(), sourcePos.line,
config->mcc, config->mnc,
config->language[0] ? config->language[0] : '-',
config->navigation,
config->screenWidth,
config->screenHeight,
+ config->smallestScreenWidthDp,
config->screenWidthDp,
config->screenHeightDp));
} else {