myAppResources = mResourceProvider.getAppResources();
if (myAppResources == null) {
return null;
}
}
ResourceValue item = myAppResources.getConfiguredValue(resType, resName,
mConfiguration);
if (item != null) {
if (mLookupChain != null) {
mLookupChain.add(item);
}
return item;
}
} else {
if (mFrameworkResources == null) {
assert mResourceProvider != null;
mFrameworkResources = mResourceProvider.getFrameworkResources();
if (mFrameworkResources == null) {
return null;
}
}
// now search in the framework resources.
if (mFrameworkResources.hasResourceItem(resType, resName)) {
ResourceItem item = mFrameworkResources.getResourceItem(resType, resName);
ResourceValue value = item.getResourceValue(resType, mConfiguration, true);
if (value != null && mLookupChain != null) {
mLookupChain.add(value);
}
return value;
}
}
// didn't find the resource anywhere.
if (mLogger != null) {
mLogger.warning(LayoutLog.TAG_RESOURCES_RESOLVE,
"Couldn't resolve resource @" +
(framework ? "android:" : "") + resType + "/" + resName,
new ResourceValue(resType, resName, framework));
}
return null;
}