Loading tools/aapt/Resource.cpp +13 −13 Original line number Diff line number Diff line Loading @@ -2929,19 +2929,8 @@ writeProguardForAndroidManifest(ProguardKeepSet* keep, const sp<AaptAssets>& ass if (!keepTag && inApplication && depth == 3) { if (tag == "activity" || tag == "service" || tag == "receiver" || tag == "provider") { keepTag = true; } } if (keepTag) { String8 name = AaptXml::getAttribute(tree, "http://schemas.android.com/apk/res/android", "name", &error); if (error != "") { fprintf(stderr, "ERROR: %s\n", error.string()); return -1; } keepTag = name.length() > 0; if (keepTag && mainDex) { if (mainDex) { String8 componentProcess = AaptXml::getAttribute(tree, "http://schemas.android.com/apk/res/android", "process", &error); if (error != "") { Loading @@ -2953,6 +2942,17 @@ writeProguardForAndroidManifest(ProguardKeepSet* keep, const sp<AaptAssets>& ass componentProcess.length() > 0 ? componentProcess : defaultProcess; keepTag = process.length() > 0 && process.find(":") != 0; } } } if (keepTag) { String8 name = AaptXml::getAttribute(tree, "http://schemas.android.com/apk/res/android", "name", &error); if (error != "") { fprintf(stderr, "ERROR: %s\n", error.string()); return -1; } keepTag = name.length() > 0; if (keepTag) { addProguardKeepRule(keep, name, pkg.string(), Loading tools/aapt2/java/ProguardRules.cpp +9 −8 Original line number Diff line number Diff line Loading @@ -170,16 +170,10 @@ struct ManifestVisitor : public BaseVisitor { } } } else if (node->name == "activity" || node->name == "service" || node->name == "receiver" || node->name == "provider" || node->name == "instrumentation") { node->name == "receiver" || node->name == "provider") { getName = true; } if (getName) { xml::Attribute* attr = node->findAttribute(xml::kSchemaAndroid, "name"); getName = attr != nullptr; if (getName && mMainDexOnly) { if (mMainDexOnly) { xml::Attribute* componentProcess = node->findAttribute(xml::kSchemaAndroid, "process"); Loading @@ -187,6 +181,13 @@ struct ManifestVisitor : public BaseVisitor { : mDefaultProcess; getName = !process.empty() && process[0] != ':'; } } else if (node-> name == "instrumentation") { getName = true; } if (getName) { xml::Attribute* attr = node->findAttribute(xml::kSchemaAndroid, "name"); getName = attr != nullptr; if (getName) { Maybe<std::string> result = util::getFullyQualifiedClassName(mPackage, Loading Loading
tools/aapt/Resource.cpp +13 −13 Original line number Diff line number Diff line Loading @@ -2929,19 +2929,8 @@ writeProguardForAndroidManifest(ProguardKeepSet* keep, const sp<AaptAssets>& ass if (!keepTag && inApplication && depth == 3) { if (tag == "activity" || tag == "service" || tag == "receiver" || tag == "provider") { keepTag = true; } } if (keepTag) { String8 name = AaptXml::getAttribute(tree, "http://schemas.android.com/apk/res/android", "name", &error); if (error != "") { fprintf(stderr, "ERROR: %s\n", error.string()); return -1; } keepTag = name.length() > 0; if (keepTag && mainDex) { if (mainDex) { String8 componentProcess = AaptXml::getAttribute(tree, "http://schemas.android.com/apk/res/android", "process", &error); if (error != "") { Loading @@ -2953,6 +2942,17 @@ writeProguardForAndroidManifest(ProguardKeepSet* keep, const sp<AaptAssets>& ass componentProcess.length() > 0 ? componentProcess : defaultProcess; keepTag = process.length() > 0 && process.find(":") != 0; } } } if (keepTag) { String8 name = AaptXml::getAttribute(tree, "http://schemas.android.com/apk/res/android", "name", &error); if (error != "") { fprintf(stderr, "ERROR: %s\n", error.string()); return -1; } keepTag = name.length() > 0; if (keepTag) { addProguardKeepRule(keep, name, pkg.string(), Loading
tools/aapt2/java/ProguardRules.cpp +9 −8 Original line number Diff line number Diff line Loading @@ -170,16 +170,10 @@ struct ManifestVisitor : public BaseVisitor { } } } else if (node->name == "activity" || node->name == "service" || node->name == "receiver" || node->name == "provider" || node->name == "instrumentation") { node->name == "receiver" || node->name == "provider") { getName = true; } if (getName) { xml::Attribute* attr = node->findAttribute(xml::kSchemaAndroid, "name"); getName = attr != nullptr; if (getName && mMainDexOnly) { if (mMainDexOnly) { xml::Attribute* componentProcess = node->findAttribute(xml::kSchemaAndroid, "process"); Loading @@ -187,6 +181,13 @@ struct ManifestVisitor : public BaseVisitor { : mDefaultProcess; getName = !process.empty() && process[0] != ':'; } } else if (node-> name == "instrumentation") { getName = true; } if (getName) { xml::Attribute* attr = node->findAttribute(xml::kSchemaAndroid, "name"); getName = attr != nullptr; if (getName) { Maybe<std::string> result = util::getFullyQualifiedClassName(mPackage, Loading