MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / deMixResMapping

Method deMixResMapping

native/events/Preference.cpp:434–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

432 }
433
434 void Preference::deMixResMapping(const ElementPtr &rootXML) {
435 if (!rootXML || this->_resMixedMapping.empty())
436 return;
437 std::string stringOfResourceID = rootXML->getResourceID();
438 if (!stringOfResourceID.empty()) {
439 auto iterator = this->_resMixedMapping.find(stringOfResourceID);
440 if (iterator != this->_resMixedMapping.end()) {
441 rootXML->reSetResourceID((*iterator).second);
442 BDLOG("de-mixed %s as %s", stringOfResourceID.c_str(), (*iterator).second.c_str());
443 }
444 }
445
446 for (const auto &child: rootXML->getChildren()) {
447 deMixResMapping(child);
448 }
449 }
450
451 void Preference::loadMixResMapping(const std::string &resourceMappingPath) {
452 BLOG("loading resource mapping : %s", resourceMappingPath.c_str());

Callers 1

resolvePageMethod · 0.95

Calls 4

emptyMethod · 0.80
reSetResourceIDMethod · 0.80
endMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected