MCPcopy Create free account
hub / github.com/CyanogenMod/android_frameworks_base / hasBagOrEntry

Method hasBagOrEntry

tools/aapt/ResourceTable.cpp:1930–1953  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1928}
1929
1930bool ResourceTable::hasBagOrEntry(const String16& package,
1931 const String16& type,
1932 const String16& name) const
1933{
1934 // First look for this in the included resources...
1935 uint32_t rid = mAssets->getIncludedResources()
1936 .identifierForName(name.string(), name.size(),
1937 type.string(), type.size(),
1938 package.string(), package.size());
1939 if (rid != 0) {
1940 return true;
1941 }
1942
1943 sp<Package> p = mPackages.valueFor(package);
1944 if (p != NULL) {
1945 sp<Type> t = p->getTypes().valueFor(type);
1946 if (t != NULL) {
1947 sp<ConfigList> c = t->getConfigs().valueFor(name);
1948 if (c != NULL) return true;
1949 }
1950 }
1951
1952 return false;
1953}
1954
1955bool ResourceTable::hasBagOrEntry(const String16& package,
1956 const String16& type,

Callers 5

createIfNeededMethod · 0.80
compileAttributeFunction · 0.80
parseAndAddEntryFunction · 0.80
compileResourceFileFunction · 0.80
generateAttributesMethod · 0.80

Calls 4

identifierForNameMethod · 0.80
stringMethod · 0.80
sizeMethod · 0.65
getEntriesMethod · 0.45

Tested by

no test coverage detected