Loading media/java/android/media/MediaPlayer2.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -242,8 +242,8 @@ public abstract class MediaPlayer2 implements SubtitleController.Listener * * * @return A MediaPlayer2 object created * @return A MediaPlayer2 object created */ */ public static final MediaPlayer2 create() { public static final MediaPlayer2 create(Context context) { return new MediaPlayer2Impl(); return new MediaPlayer2Impl(context); } } private static final String[] decodeMediaPlayer2Uri(String location) { private static final String[] decodeMediaPlayer2Uri(String location) { Loading media/java/android/media/MediaPlayer2Impl.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -93,6 +93,8 @@ public final class MediaPlayer2Impl extends MediaPlayer2 { private final static String TAG = "MediaPlayer2Impl"; private final static String TAG = "MediaPlayer2Impl"; private Context mContext; private long mNativeContext; // accessed by native methods private long mNativeContext; // accessed by native methods private long mNativeSurfaceTexture; // accessed by native methods private long mNativeSurfaceTexture; // accessed by native methods private int mListenerContext; // accessed by native methods private int mListenerContext; // accessed by native methods Loading Loading @@ -149,7 +151,8 @@ public final class MediaPlayer2Impl extends MediaPlayer2 { * to free the resources. If not released, too many MediaPlayer2Impl instances may * to free the resources. If not released, too many MediaPlayer2Impl instances may * result in an exception.</p> * result in an exception.</p> */ */ public MediaPlayer2Impl() { public MediaPlayer2Impl(Context context) { mContext = context; mHandlerThread = new HandlerThread("MediaPlayer2TaskThread"); mHandlerThread = new HandlerThread("MediaPlayer2TaskThread"); mHandlerThread.start(); mHandlerThread.start(); Looper looper = mHandlerThread.getLooper(); Looper looper = mHandlerThread.getLooper(); Loading Loading
media/java/android/media/MediaPlayer2.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -242,8 +242,8 @@ public abstract class MediaPlayer2 implements SubtitleController.Listener * * * @return A MediaPlayer2 object created * @return A MediaPlayer2 object created */ */ public static final MediaPlayer2 create() { public static final MediaPlayer2 create(Context context) { return new MediaPlayer2Impl(); return new MediaPlayer2Impl(context); } } private static final String[] decodeMediaPlayer2Uri(String location) { private static final String[] decodeMediaPlayer2Uri(String location) { Loading
media/java/android/media/MediaPlayer2Impl.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -93,6 +93,8 @@ public final class MediaPlayer2Impl extends MediaPlayer2 { private final static String TAG = "MediaPlayer2Impl"; private final static String TAG = "MediaPlayer2Impl"; private Context mContext; private long mNativeContext; // accessed by native methods private long mNativeContext; // accessed by native methods private long mNativeSurfaceTexture; // accessed by native methods private long mNativeSurfaceTexture; // accessed by native methods private int mListenerContext; // accessed by native methods private int mListenerContext; // accessed by native methods Loading Loading @@ -149,7 +151,8 @@ public final class MediaPlayer2Impl extends MediaPlayer2 { * to free the resources. If not released, too many MediaPlayer2Impl instances may * to free the resources. If not released, too many MediaPlayer2Impl instances may * result in an exception.</p> * result in an exception.</p> */ */ public MediaPlayer2Impl() { public MediaPlayer2Impl(Context context) { mContext = context; mHandlerThread = new HandlerThread("MediaPlayer2TaskThread"); mHandlerThread = new HandlerThread("MediaPlayer2TaskThread"); mHandlerThread.start(); mHandlerThread.start(); Looper looper = mHandlerThread.getLooper(); Looper looper = mHandlerThread.getLooper(); Loading