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));
uint32_t getResId(const String16& package,
const String16& type,
const String16& name,
- bool onlyPublic = false) const;
+ bool onlyPublic = true) const;
uint32_t getResId(const String16& ref,
const String16* defType = NULL,
const String16* defPackage = NULL,
const char** outErrorMsg = NULL,
- bool onlyPublic = false) const;
+ bool onlyPublic = true) const;
static bool isValidResourceName(const String16& s);