Loading core/jni/android_util_AssetManager.cpp +9 −6 Original line number Diff line number Diff line Loading @@ -1296,6 +1296,10 @@ static void NativeThemeRebase(JNIEnv* env, jclass /*clazz*/, jlong ptr, jlong th } else { CHECK(style_count == 0) << "style_ids is null while style_count is non-zero"; } auto style_id_args_copy = std::vector<uint32_t>{style_id_args, style_id_args + style_count}; if (style_ids != nullptr) { env->ReleasePrimitiveArrayCritical(style_ids, style_id_args, JNI_ABORT); } jboolean* force_args = nullptr; if (force != nullptr) { Loading @@ -1308,15 +1312,14 @@ static void NativeThemeRebase(JNIEnv* env, jclass /*clazz*/, jlong ptr, jlong th } else { CHECK(style_count == 0) << "force is null while style_count is non-zero"; } auto theme = reinterpret_cast<Theme*>(theme_ptr); theme->Rebase(&(*assetmanager), style_id_args, force_args, static_cast<size_t>(style_count)); if (style_ids != nullptr) { env->ReleasePrimitiveArrayCritical(style_ids, style_id_args, JNI_ABORT); } auto force_args_copy = std::vector<jboolean>{force_args, force_args + style_count}; if (force != nullptr) { env->ReleasePrimitiveArrayCritical(force, force_args, JNI_ABORT); } auto theme = reinterpret_cast<Theme*>(theme_ptr); theme->Rebase(&(*assetmanager), style_id_args_copy.data(), force_args_copy.data(), static_cast<size_t>(style_count)); } static void NativeThemeCopy(JNIEnv* env, jclass /*clazz*/, jlong dst_asset_manager_ptr, Loading Loading
core/jni/android_util_AssetManager.cpp +9 −6 Original line number Diff line number Diff line Loading @@ -1296,6 +1296,10 @@ static void NativeThemeRebase(JNIEnv* env, jclass /*clazz*/, jlong ptr, jlong th } else { CHECK(style_count == 0) << "style_ids is null while style_count is non-zero"; } auto style_id_args_copy = std::vector<uint32_t>{style_id_args, style_id_args + style_count}; if (style_ids != nullptr) { env->ReleasePrimitiveArrayCritical(style_ids, style_id_args, JNI_ABORT); } jboolean* force_args = nullptr; if (force != nullptr) { Loading @@ -1308,15 +1312,14 @@ static void NativeThemeRebase(JNIEnv* env, jclass /*clazz*/, jlong ptr, jlong th } else { CHECK(style_count == 0) << "force is null while style_count is non-zero"; } auto theme = reinterpret_cast<Theme*>(theme_ptr); theme->Rebase(&(*assetmanager), style_id_args, force_args, static_cast<size_t>(style_count)); if (style_ids != nullptr) { env->ReleasePrimitiveArrayCritical(style_ids, style_id_args, JNI_ABORT); } auto force_args_copy = std::vector<jboolean>{force_args, force_args + style_count}; if (force != nullptr) { env->ReleasePrimitiveArrayCritical(force, force_args, JNI_ABORT); } auto theme = reinterpret_cast<Theme*>(theme_ptr); theme->Rebase(&(*assetmanager), style_id_args_copy.data(), force_args_copy.data(), static_cast<size_t>(style_count)); } static void NativeThemeCopy(JNIEnv* env, jclass /*clazz*/, jlong dst_asset_manager_ptr, Loading