| Index: content/browser/android/surface_texture_peer_browser_impl.cc
|
| diff --git a/content/browser/android/surface_texture_peer_browser_impl.cc b/content/browser/android/surface_texture_peer_browser_impl.cc
|
| index 4a412592e1a15d9e6a52400e844a6481c93ebafa..70dcf1a7ba83d71115b92719e488cd6d6d6c9d25 100644
|
| --- a/content/browser/android/surface_texture_peer_browser_impl.cc
|
| +++ b/content/browser/android/surface_texture_peer_browser_impl.cc
|
| @@ -12,6 +12,8 @@
|
| #include "jni/BrowserProcessSurfaceTexture_jni.h"
|
| #include "media/base/android/media_player_bridge.h"
|
|
|
| +using base::android::MethodID;
|
| +
|
| namespace content {
|
|
|
| // Pass a java surface object to the MediaPlayerBridge object
|
| @@ -43,11 +45,12 @@ static void SetSurfacePeer(
|
| player != host->media_player_manager()->GetFullscreenPlayer()) {
|
| base::android::ScopedJavaLocalRef<jclass> cls(
|
| base::android::GetClass(env, "android/view/Surface"));
|
| - jmethodID constructor = GetMethodID(env, cls, "<init>",
|
| - "(Landroid/graphics/SurfaceTexture;)V");
|
| - ScopedJavaLocalRef<jobject> j_surface(env,
|
| - env->NewObject(cls.obj(), constructor,
|
| - surface_texture_bridge->j_surface_texture().obj()));
|
| + jmethodID constructor = MethodID::Get<MethodID::TYPE_INSTANCE>(
|
| + env, cls.obj(), "<init>", "(Landroid/graphics/SurfaceTexture;)V");
|
| + ScopedJavaLocalRef<jobject> j_surface(
|
| + env, env->NewObject(
|
| + cls.obj(), constructor,
|
| + surface_texture_bridge->j_surface_texture().obj()));
|
| player->SetVideoSurface(j_surface.obj());
|
| ReleaseSurface(j_surface.obj());
|
| }
|
|
|