summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
eca7446)
Final added check (I think) for
1585775 - not letting overlays add
resources.
modified: ResourceTable.cpp
modified: ResourceTable.h
String8(value).string());
}
#endif
String8(value).string());
}
#endif
-
- sp<Entry> e = getEntry(package, type, name, sourcePos, params, doSetIndex);
+
+ sp<Entry> e = getEntry(package, type, name, sourcePos, overwrite,
+ params, doSetIndex);
if (e == NULL) {
return UNKNOWN_ERROR;
}
if (e == NULL) {
return UNKNOWN_ERROR;
}
String8(name).string());
return UNKNOWN_ERROR;
}
String8(name).string());
return UNKNOWN_ERROR;
}
-
- sp<Entry> e = getEntry(package, type, name, sourcePos, params);
+ sp<Entry> e = getEntry(package, type, name, sourcePos, overlay, params);
if (e == NULL) {
return UNKNOWN_ERROR;
}
if (e == NULL) {
return UNKNOWN_ERROR;
}
sourcePos.file.striing(), sourcePos.line, String8(type).string());
}
#endif
sourcePos.file.striing(), sourcePos.line, String8(type).string());
}
#endif
-
- sp<Entry> e = getEntry(package, type, name, sourcePos, params);
+ sp<Entry> e = getEntry(package, type, name, sourcePos, replace, params);
if (e == NULL) {
return UNKNOWN_ERROR;
}
if (e == NULL) {
return UNKNOWN_ERROR;
}
mItem.sourcePos.file.string(), mItem.sourcePos.line);
return UNKNOWN_ERROR;
}
mItem.sourcePos.file.string(), mItem.sourcePos.line);
return UNKNOWN_ERROR;
}
mType = TYPE_ITEM;
mItem = item;
mItemFormat = format;
mType = TYPE_ITEM;
mItem = item;
mItemFormat = format;
sp<ResourceTable::Entry> ResourceTable::Type::getEntry(const String16& entry,
const SourcePos& sourcePos,
const ResTable_config* config,
sp<ResourceTable::Entry> ResourceTable::Type::getEntry(const String16& entry,
const SourcePos& sourcePos,
const ResTable_config* config,
+ bool doSetIndex,
+ bool overlay)
{
int pos = -1;
sp<ConfigList> c = mConfigs.valueFor(entry);
if (c == NULL) {
{
int pos = -1;
sp<ConfigList> c = mConfigs.valueFor(entry);
if (c == NULL) {
+ if (overlay == true) {
+ sourcePos.error("Resource %s appears in overlay but not"
+ " in the base package.\n", String8(entry).string());
+ return NULL;
+ }
c = new ConfigList(entry, sourcePos);
mConfigs.add(entry, c);
pos = (int)mOrderedConfigs.size();
c = new ConfigList(entry, sourcePos);
mConfigs.add(entry, c);
pos = (int)mOrderedConfigs.size();
const String16& type,
const String16& name,
const SourcePos& sourcePos,
const String16& type,
const String16& name,
const SourcePos& sourcePos,
const ResTable_config* config,
bool doSetIndex)
{
const ResTable_config* config,
bool doSetIndex)
{
if (t == NULL) {
return NULL;
}
if (t == NULL) {
return NULL;
}
- return t->getEntry(name, sourcePos, config, doSetIndex);
+ return t->getEntry(name, sourcePos, config, doSetIndex, overlay);
}
sp<const ResourceTable::Entry> ResourceTable::getEntry(uint32_t resID,
}
sp<const ResourceTable::Entry> ResourceTable::getEntry(uint32_t resID,
sp<Entry> getEntry(const String16& entry,
const SourcePos& pos,
const ResTable_config* config = NULL,
sp<Entry> getEntry(const String16& entry,
const SourcePos& pos,
const ResTable_config* config = NULL,
- bool doSetIndex = false);
+ bool doSetIndex = false,
+ bool overlay = false);
const SourcePos& getFirstPublicSourcePos() const { return *mFirstPublicSourcePos; }
const SourcePos& getFirstPublicSourcePos() const { return *mFirstPublicSourcePos; }
const String16& type,
const String16& name,
const SourcePos& pos,
const String16& type,
const String16& name,
const SourcePos& pos,
const ResTable_config* config = NULL,
bool doSetIndex = false);
sp<const Entry> getEntry(uint32_t resID,
const ResTable_config* config = NULL,
bool doSetIndex = false);
sp<const Entry> getEntry(uint32_t resID,