Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5dd65949 authored by Wei Jia's avatar Wei Jia
Browse files

VideoView2Impl: add Context for MediaPlayer2Impl ctor

Test: compiles
Bug: 112549021
Change-Id: I5327607b7f03b3f9f522f9f3690831dc1bca1537
parent 2503f1a7
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -715,13 +715,14 @@ public class VideoView2Impl extends BaseLayout
        }

        try {
            final Context context = mInstance.getContext();

            Log.d(TAG, "openVideo(): creating new MediaPlayer2 instance.");
            mMediaPlayer = new MediaPlayer2Impl();
            mMediaPlayer = new MediaPlayer2Impl(context);
            mSurfaceView.setMediaPlayer(mMediaPlayer);
            mTextureView.setMediaPlayer(mMediaPlayer);
            mCurrentView.assignSurfaceToMediaPlayer(mMediaPlayer);

            final Context context = mInstance.getContext();
            // TODO: Add timely firing logic for more accurate sync between CC and video frame
            mSubtitleController = new SubtitleController(context);
            mSubtitleController.registerRenderer(new ClosedCaptionRenderer(context));