summaryrefslogtreecommitdiff
path: root/dex2oat
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2024-11-06 17:33:14 +0000
committer Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-11-11 11:08:09 +0000
commita202343b6dd492bea383f9babc427dfa2e274b7d (patch)
tree98cf212e927aec26a85de79eba31a7e367f089e4 /dex2oat
parent01df4b3a9bb31f21f451452f0ce47632dd8916ad (diff)
Consolidate the use of some constants.
Bug: 377474232 Test: atest ArtServiceTests Test: atest art_standalone_artd_tests Test: atest art_standalone_odrefresh_tests Test: atest art_standalone_libartbase_tests Test: atest art_standalone_runtime_tests Test: atest art_standalone_dex2oat_tests Change-Id: I66a29ea85176c6c6d676537fe6e4e64152360acc
Diffstat (limited to 'dex2oat')
-rw-r--r--dex2oat/dex2oat.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index 09dd6bc6e3..a8d3d9346c 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -1276,9 +1276,9 @@ class Dex2Oat final {
}
DCHECK_EQ(output_vdex_fd_, -1);
- std::string vdex_filename = output_vdex_.empty()
- ? ReplaceFileExtension(oat_filename, "vdex")
- : output_vdex_;
+ std::string vdex_filename = output_vdex_.empty() ?
+ ReplaceFileExtension(oat_filename, kVdexExtension) :
+ output_vdex_;
if (vdex_filename == input_vdex_ && output_vdex_.empty()) {
use_existing_vdex_ = true;
std::unique_ptr<File> vdex_file(OS::OpenFileForReading(vdex_filename.c_str()));
@@ -1333,7 +1333,7 @@ class Dex2Oat final {
}
DCHECK_NE(output_vdex_fd_, -1);
- std::string vdex_location = ReplaceFileExtension(oat_location_, "vdex");
+ std::string vdex_location = ReplaceFileExtension(oat_location_, kVdexExtension);
if (input_vdex_file_ != nullptr && output_vdex_fd_ == input_vdex_fd_) {
use_existing_vdex_ = true;
}