diff options
author | 2016-12-12 14:28:21 -0800 | |
---|---|---|
committer | 2016-12-13 11:43:48 -0800 | |
commit | 9186ced255f2e7402646b5b286deebb540640734 (patch) | |
tree | 833c25fd3bbb47749265947705b4fc0f0c1ba796 /patchoat/patchoat.cc | |
parent | aa2657d6d9dda2e44c6452e5f5901db78ef9b3cc (diff) |
ART: Clean up utils.h
Remove functionality provided by libbase. Move some single-use
functions to their respective users.
Test: m test-art-host
Change-Id: I75594035fa975200d638cc29bb9f31bc6e6cb29f
Diffstat (limited to 'patchoat/patchoat.cc')
-rw-r--r-- | patchoat/patchoat.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/patchoat/patchoat.cc b/patchoat/patchoat.cc index cb5a79068a..62d1ddff75 100644 --- a/patchoat/patchoat.cc +++ b/patchoat/patchoat.cc @@ -24,6 +24,8 @@ #include <string> #include <vector> +#include "android-base/strings.h" + #include "art_field-inl.h" #include "art_method-inl.h" #include "base/dumpable.h" @@ -286,8 +288,8 @@ bool PatchOat::Patch(const std::string& image_location, std::string converted_image_filename = space->GetImageLocation(); std::replace(converted_image_filename.begin() + 1, converted_image_filename.end(), '/', '@'); std::string output_image_filename = output_directory + - (StartsWith(converted_image_filename, "/") ? "" : "/") + - converted_image_filename; + (android::base::StartsWith(converted_image_filename, "/") ? "" : "/") + + converted_image_filename; std::string output_vdex_filename = ImageHeader::GetVdexLocationFromImageLocation(output_image_filename); std::string output_oat_filename = @@ -343,8 +345,8 @@ bool PatchOat::Patch(const std::string& image_location, std::string converted_image_filename = space->GetImageLocation(); std::replace(converted_image_filename.begin() + 1, converted_image_filename.end(), '/', '@'); std::string output_image_filename = output_directory + - (StartsWith(converted_image_filename, "/") ? "" : "/") + - converted_image_filename; + (android::base::StartsWith(converted_image_filename, "/") ? "" : "/") + + converted_image_filename; bool new_oat_out; std::unique_ptr<File> output_image_file(CreateOrOpen(output_image_filename.c_str(), &new_oat_out)); @@ -932,7 +934,7 @@ static std::string CommandLine() { for (int i = 0; i < orig_argc; ++i) { command.push_back(orig_argv[i]); } - return Join(command, ' '); + return android::base::Join(command, ' '); } static void UsageErrorV(const char* fmt, va_list ap) { |