Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Unified Diff: ui/gfx/android/java_bitmap.cc

Issue 23597042: Android: Remove JNIEnv::NewStringUTF call. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/android/java_bitmap.cc
diff --git a/ui/gfx/android/java_bitmap.cc b/ui/gfx/android/java_bitmap.cc
index 83d4a46518203edb5ecafd2efdc7d3b253a32806..c3cd94d62131029885db0172e46ff3342fe79702 100644
--- a/ui/gfx/android/java_bitmap.cc
+++ b/ui/gfx/android/java_bitmap.cc
@@ -6,6 +6,7 @@
#include <android/bitmap.h>
+#include "base/android/jni_string.h"
#include "base/logging.h"
#include "jni/BitmapHelper_jni.h"
#include "skia/ext/image_operations.h"
@@ -64,7 +65,8 @@ ScopedJavaLocalRef<jobject> ConvertToJavaBitmap(const SkBitmap* skbitmap) {
static ScopedJavaLocalRef<jobject> CreateJavaBitmapFromResource(
const char* name, gfx::Size requested_size) {
JNIEnv* env = AttachCurrentThread();
- ScopedJavaLocalRef<jstring> jname(env, env->NewStringUTF(name));
+ ScopedJavaLocalRef<jstring> jname(
+ base::android::ConvertUTF8ToJavaString(env, name));
return ui::Java_BitmapHelper_decodeDrawableResource(env,
jname.obj(),
requested_size.width(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698