diff options
Diffstat (limited to 'runtime/native/dalvik_system_VMRuntime.cc')
-rw-r--r-- | runtime/native/dalvik_system_VMRuntime.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/runtime/native/dalvik_system_VMRuntime.cc b/runtime/native/dalvik_system_VMRuntime.cc index d46a36fd25..842590408d 100644 --- a/runtime/native/dalvik_system_VMRuntime.cc +++ b/runtime/native/dalvik_system_VMRuntime.cc @@ -370,11 +370,11 @@ static void VMRuntime_preloadDexCaches(JNIEnv* env ATTRIBUTE_UNUSED, jobject) { */ static void VMRuntime_registerAppInfo(JNIEnv* env, jclass clazz ATTRIBUTE_UNUSED, - jstring package_name ATTRIBUTE_UNUSED, + jstring package_name, jstring cur_profile_file, jstring ref_profile_file, jobjectArray code_paths, - jint code_path_type ATTRIBUTE_UNUSED) { + jint code_path_type) { std::vector<std::string> code_paths_vec; int code_paths_length = env->GetArrayLength(code_paths); for (int i = 0; i < code_paths_length; i++) { @@ -392,7 +392,16 @@ static void VMRuntime_registerAppInfo(JNIEnv* env, std::string ref_profile_file_str(raw_ref_profile_file); env->ReleaseStringUTFChars(ref_profile_file, raw_ref_profile_file); - Runtime::Current()->RegisterAppInfo(code_paths_vec, cur_profile_file_str, ref_profile_file_str); + const char* raw_package_name = env->GetStringUTFChars(package_name, nullptr); + std::string package_name_str(raw_package_name); + env->ReleaseStringUTFChars(package_name, raw_package_name); + + Runtime::Current()->RegisterAppInfo( + package_name_str, + code_paths_vec, + cur_profile_file_str, + ref_profile_file_str, + static_cast<int32_t>(code_path_type)); } static jboolean VMRuntime_isBootClassPathOnDisk(JNIEnv* env, jclass, jstring java_instruction_set) { |