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

Method loadBaseConfig

native/events/Preference.cpp:523–548  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

521#define ListenMode "max.listenMode"
522
523 void Preference::loadBaseConfig() {
524 LOGI("pref init checking curr packageName is offset: %s", Preference::PackageName.c_str());
525 std::string configContent = loadFileContent(BaseConfigFilePath);
526 BLOG("max.config:\n %s", configContent.c_str());
527 std::vector<std::string> lines;
528 splitString(configContent, lines, '\n');
529 for (const std::string &line: lines) {
530 std::vector<std::string> key_value;
531 splitString(line, key_value, '=');
532 if (key_value.size() < 2)
533 continue;
534 trimString(key_value[0]);
535 trimString(key_value[1]);
536 BDLOG("base config key:-%s- value:-%s-", key_value[0].c_str(), key_value[1].c_str());
537 if (MaxRandomPickSTR == key_value[0]) {
538 BDLOG("set %s", MaxRandomPickSTR);
539 this->_randomInputText = ("true" == key_value[1]);
540 } else if (InputFuzzSTR == key_value[0]) {
541 BDLOG("set %s", InputFuzzSTR);
542 this->_doInputFuzzing = ("true" == key_value[1]);
543 } else if (ListenMode == key_value[0]) {
544 BDLOG("set %s", ListenMode);
545 this->setListenMode("true" == key_value[1]);
546 }
547 }
548 }
549
550#define PageTextsMaxCount 300
551

Callers

nothing calls this directly

Calls 5

setListenModeMethod · 0.95
splitStringFunction · 0.85
trimStringFunction · 0.85
c_strMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected