Loading cmds/installd/Android.bp +0 −5 Original line number Diff line number Diff line Loading @@ -25,9 +25,6 @@ cc_defaults { "view_compiler.cpp", ":installd_aidl", ], header_libs: [ "dex2oat_headers", ], shared_libs: [ "libbase", "libbinder", Loading Loading @@ -240,8 +237,6 @@ cc_binary { "view_compiler.cpp", ], header_libs: ["dex2oat_headers"], static_libs: [ "libdiskusage", "libotapreoptparameters", Loading cmds/installd/dexopt.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ #include <cutils/fs.h> #include <cutils/properties.h> #include <cutils/sched_policy.h> #include <dex2oat_return_codes.h> #include <log/log.h> // TODO: Move everything to base/logging. #include <openssl/sha.h> #include <private/android_filesystem_config.h> Loading cmds/installd/dexopt_return_codes.h +7 −36 Original line number Diff line number Diff line Loading @@ -14,8 +14,6 @@ * limitations under the License. */ #include <dex2oat_return_codes.h> namespace android { namespace installd { Loading Loading @@ -70,48 +68,21 @@ inline const char* get_installd_return_code_name(DexoptReturnCodes code) { return nullptr; } inline const char* get_dex2oat_return_code_name(art::dex2oat::ReturnCode code) { switch (code) { case art::dex2oat::ReturnCode::kNoFailure: inline const char* get_dex2oat_return_code_name(int code) { if (code == 0) { return "dex2oat success"; case art::dex2oat::ReturnCode::kOther: return "unspecified dex2oat error"; case art::dex2oat::ReturnCode::kCreateRuntime: return "dex2oat failed to create a runtime"; } else { return "dex2oat error"; } return nullptr; } // Get some slightly descriptive string for the return code. Handles both DexoptReturnCodes (local // exit codes) as well as art::dex2oat::ReturnCode. // Get some slightly descriptive string for the return code. inline const char* get_return_code_name(int code) { // Try to enforce non-overlap (see comment on DexoptReturnCodes) // TODO: How could switch-case checks be used to enforce completeness? switch (code) { case kSetGid: case kSetUid: case kCapSet: case kFlock: case kProfmanExec: case kSetSchedPolicy: case kSetPriority: case kDex2oatExec: case kInstructionSetLength: case kHashValidatePath: case kHashOpenPath: case kHashReadDex: case kHashWrite: break; case static_cast<int>(art::dex2oat::ReturnCode::kNoFailure): case static_cast<int>(art::dex2oat::ReturnCode::kOther): case static_cast<int>(art::dex2oat::ReturnCode::kCreateRuntime): break; } const char* value = get_installd_return_code_name(static_cast<DexoptReturnCodes>(code)); if (value != nullptr) { return value; } value = get_dex2oat_return_code_name(static_cast<art::dex2oat::ReturnCode>(code)); value = get_dex2oat_return_code_name(code); return value; } Loading cmds/installd/otapreopt.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,6 @@ #include <android-base/strings.h> #include <cutils/fs.h> #include <cutils/properties.h> #include <dex2oat_return_codes.h> #include <log/log.h> #include <private/android_filesystem_config.h> Loading cmds/installd/tests/installd_dexopt_test.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -663,7 +663,7 @@ TEST_F(DexoptTest, DexoptPrimaryFailedInvalidFilter) { &status); EXPECT_STREQ(status.toString8().c_str(), "Status(-8, EX_SERVICE_SPECIFIC): \'256: Dex2oat invocation for " "/data/app/com.installd.test.dexopt/base.jar failed: unspecified dex2oat error'"); "/data/app/com.installd.test.dexopt/base.jar failed: dex2oat error'"); } TEST_F(DexoptTest, DexoptPrimaryProfileNonPublic) { Loading Loading
cmds/installd/Android.bp +0 −5 Original line number Diff line number Diff line Loading @@ -25,9 +25,6 @@ cc_defaults { "view_compiler.cpp", ":installd_aidl", ], header_libs: [ "dex2oat_headers", ], shared_libs: [ "libbase", "libbinder", Loading Loading @@ -240,8 +237,6 @@ cc_binary { "view_compiler.cpp", ], header_libs: ["dex2oat_headers"], static_libs: [ "libdiskusage", "libotapreoptparameters", Loading
cmds/installd/dexopt.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ #include <cutils/fs.h> #include <cutils/properties.h> #include <cutils/sched_policy.h> #include <dex2oat_return_codes.h> #include <log/log.h> // TODO: Move everything to base/logging. #include <openssl/sha.h> #include <private/android_filesystem_config.h> Loading
cmds/installd/dexopt_return_codes.h +7 −36 Original line number Diff line number Diff line Loading @@ -14,8 +14,6 @@ * limitations under the License. */ #include <dex2oat_return_codes.h> namespace android { namespace installd { Loading Loading @@ -70,48 +68,21 @@ inline const char* get_installd_return_code_name(DexoptReturnCodes code) { return nullptr; } inline const char* get_dex2oat_return_code_name(art::dex2oat::ReturnCode code) { switch (code) { case art::dex2oat::ReturnCode::kNoFailure: inline const char* get_dex2oat_return_code_name(int code) { if (code == 0) { return "dex2oat success"; case art::dex2oat::ReturnCode::kOther: return "unspecified dex2oat error"; case art::dex2oat::ReturnCode::kCreateRuntime: return "dex2oat failed to create a runtime"; } else { return "dex2oat error"; } return nullptr; } // Get some slightly descriptive string for the return code. Handles both DexoptReturnCodes (local // exit codes) as well as art::dex2oat::ReturnCode. // Get some slightly descriptive string for the return code. inline const char* get_return_code_name(int code) { // Try to enforce non-overlap (see comment on DexoptReturnCodes) // TODO: How could switch-case checks be used to enforce completeness? switch (code) { case kSetGid: case kSetUid: case kCapSet: case kFlock: case kProfmanExec: case kSetSchedPolicy: case kSetPriority: case kDex2oatExec: case kInstructionSetLength: case kHashValidatePath: case kHashOpenPath: case kHashReadDex: case kHashWrite: break; case static_cast<int>(art::dex2oat::ReturnCode::kNoFailure): case static_cast<int>(art::dex2oat::ReturnCode::kOther): case static_cast<int>(art::dex2oat::ReturnCode::kCreateRuntime): break; } const char* value = get_installd_return_code_name(static_cast<DexoptReturnCodes>(code)); if (value != nullptr) { return value; } value = get_dex2oat_return_code_name(static_cast<art::dex2oat::ReturnCode>(code)); value = get_dex2oat_return_code_name(code); return value; } Loading
cmds/installd/otapreopt.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,6 @@ #include <android-base/strings.h> #include <cutils/fs.h> #include <cutils/properties.h> #include <dex2oat_return_codes.h> #include <log/log.h> #include <private/android_filesystem_config.h> Loading
cmds/installd/tests/installd_dexopt_test.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -663,7 +663,7 @@ TEST_F(DexoptTest, DexoptPrimaryFailedInvalidFilter) { &status); EXPECT_STREQ(status.toString8().c_str(), "Status(-8, EX_SERVICE_SPECIFIC): \'256: Dex2oat invocation for " "/data/app/com.installd.test.dexopt/base.jar failed: unspecified dex2oat error'"); "/data/app/com.installd.test.dexopt/base.jar failed: dex2oat error'"); } TEST_F(DexoptTest, DexoptPrimaryProfileNonPublic) { Loading