summaryrefslogtreecommitdiff
path: root/runtime/sdk_checker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/sdk_checker.cc')
-rw-r--r--runtime/sdk_checker.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/runtime/sdk_checker.cc b/runtime/sdk_checker.cc
index 1dbe39c32e..9097dc62a2 100644
--- a/runtime/sdk_checker.cc
+++ b/runtime/sdk_checker.cc
@@ -30,16 +30,13 @@ SdkChecker* SdkChecker::Create(
std::vector<std::string> dex_file_paths;
Split(public_sdk, ':', &dex_file_paths);
- ArtDexFileLoader dex_loader;
-
std::unique_ptr<SdkChecker> sdk_checker(new SdkChecker());
for (const std::string& path : dex_file_paths) {
- if (!dex_loader.Open(path.c_str(),
- path,
- /*verify=*/ true,
- /*verify_checksum*/ false,
- error_msg,
- &sdk_checker->sdk_dex_files_)) {
+ DexFileLoader dex_file_loader(path);
+ if (!dex_file_loader.Open(/*verify=*/true,
+ /*verify_checksum*/ false,
+ error_msg,
+ &sdk_checker->sdk_dex_files_)) {
return nullptr;
}
}