OSDN Git Service

Delete vdex file in delete_odex.
authorNicolas Geoffray <ngeoffray@google.com>
Thu, 25 May 2017 12:58:06 +0000 (13:58 +0100)
committerAndreas Gampe <agampe@google.com>
Thu, 1 Jun 2017 15:40:54 +0000 (08:40 -0700)
(cherry picked from commit 192fb9662ce8b2a60da2b280d8000283fb3b6f6b)

bug: 38513395
Test: unfortunately no unit test here, so after discussing
      with agampe@ just relied on build.

Change-Id: I305ddaadc813673fb55473f5e8ca357f39cf98f3

cmds/installd/dexopt.cpp

index b20a807..fea7b0d 100644 (file)
@@ -1880,8 +1880,11 @@ bool delete_odex(const char* apk_path, const char* instruction_set, const char*
     // Derive and delete the app image.
     bool return_value_art = unlink_and_check(create_image_filename(out_path).c_str());
 
+    // Derive and delete the vdex file.
+    bool return_value_vdex = unlink_and_check(create_vdex_filename(out_path).c_str());
+
     // Report success.
-    return return_value_oat && return_value_art;
+    return return_value_oat && return_value_art && return_value_vdex;
 }
 
 }  // namespace installd