From 1bcb35bf87cc2f7ef6c8a26238910ca9b88ea73d Mon Sep 17 00:00:00 2001 From: Hao Li Date: Thu, 25 Jun 2015 14:31:56 +1200 Subject: [PATCH] Installd: Fix delete_code_cache() clearing the wrong cache dir Fix a typo in delete_code_cache() introduced by commit c03de09, which causes the function to empty /data/data//cache/ rather than /data/data//code_cache/. The following CTS test case should now pass: com.android.cts.appsecurity.SplitTests#testClearCodeCache Change-Id: I2d9452d70ed39b3ea29ad65fb35e788c2fef5100 Signed-off-by: Hao Li Signed-off-by: Yu Ning --- cmds/installd/commands.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds/installd/commands.cpp b/cmds/installd/commands.cpp index ca04b49ca..8e42cda48 100644 --- a/cmds/installd/commands.cpp +++ b/cmds/installd/commands.cpp @@ -299,7 +299,7 @@ int delete_cache(const char *uuid, const char *pkgname, userid_t userid) int delete_code_cache(const char *uuid, const char *pkgname, userid_t userid) { std::string _codecachedir( - create_package_data_path(uuid, pkgname, userid) + CACHE_DIR_POSTFIX); + create_package_data_path(uuid, pkgname, userid) + CODE_CACHE_DIR_POSTFIX); const char* codecachedir = _codecachedir.c_str(); struct stat s;