diff options
| author | 2024-05-07 19:53:14 +0000 | |
|---|---|---|
| committer | 2024-05-07 19:53:14 +0000 | |
| commit | 0c34af9be49219c15abb133b794d71854449606c (patch) | |
| tree | 55f51428c50b440a8b95aaef476ca04b05ef1b4b | |
| parent | 4a28ebe84c6bee92eeef29225fdb146c40053d8f (diff) | |
| parent | ca9e91020088b8ab71713b05c1c148ff7422ecbb (diff) | |
Merge "aapt2: fix dangling reference to diag" into main am: 681514f345 am: ca9e910200
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3073205
Change-Id: Ib261c830e29b994c23482b1cf5462b83442d3241
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | tools/aapt2/link/ManifestFixer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/aapt2/link/ManifestFixer.cpp b/tools/aapt2/link/ManifestFixer.cpp index f1e4ead03314..669cddb9af5a 100644 --- a/tools/aapt2/link/ManifestFixer.cpp +++ b/tools/aapt2/link/ManifestFixer.cpp @@ -443,7 +443,7 @@ bool ManifestFixer::BuildRules(xml::XmlActionExecutor* executor, android::IDiagn manifest_action.Action(AutoGenerateIsSplitRequired); manifest_action.Action(VerifyManifest); manifest_action.Action(FixCoreAppAttribute); - manifest_action.Action([&](xml::Element* el) -> bool { + manifest_action.Action([this, diag](xml::Element* el) -> bool { EnsureNamespaceIsDeclared("android", xml::kSchemaAndroid, &el->namespace_decls); if (options_.version_name_default) { @@ -506,7 +506,7 @@ bool ManifestFixer::BuildRules(xml::XmlActionExecutor* executor, android::IDiagn manifest_action["eat-comment"]; // Uses-sdk actions. - manifest_action["uses-sdk"].Action([&](xml::Element* el) -> bool { + manifest_action["uses-sdk"].Action([this](xml::Element* el) -> bool { if (options_.min_sdk_version_default && el->FindAttribute(xml::kSchemaAndroid, "minSdkVersion") == nullptr) { // There was no minSdkVersion defined and we have a default to assign. @@ -528,7 +528,7 @@ bool ManifestFixer::BuildRules(xml::XmlActionExecutor* executor, android::IDiagn // Instrumentation actions. manifest_action["instrumentation"].Action(RequiredNameIsJavaClassName); - manifest_action["instrumentation"].Action([&](xml::Element* el) -> bool { + manifest_action["instrumentation"].Action([this](xml::Element* el) -> bool { if (!options_.rename_instrumentation_target_package) { return true; } @@ -544,7 +544,7 @@ bool ManifestFixer::BuildRules(xml::XmlActionExecutor* executor, android::IDiagn manifest_action["attribution"]; manifest_action["attribution"]["inherit-from"]; manifest_action["original-package"]; - manifest_action["overlay"].Action([&](xml::Element* el) -> bool { + manifest_action["overlay"].Action([this](xml::Element* el) -> bool { if (options_.rename_overlay_target_package) { if (xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "targetPackage")) { attr->value = options_.rename_overlay_target_package.value(); @@ -625,7 +625,7 @@ bool ManifestFixer::BuildRules(xml::XmlActionExecutor* executor, android::IDiagn uses_package_action["additional-certificate"]; if (options_.debug_mode) { - application_action.Action([&](xml::Element* el) -> bool { + application_action.Action([](xml::Element* el) -> bool { xml::Attribute *attr = el->FindOrCreateAttribute(xml::kSchemaAndroid, "debuggable"); attr->value = "true"; return true; |