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

Commit 012281c7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix a dead lock for SubtitleTrack"

parents dbd04bb6 6aee256d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2645,6 +2645,7 @@ public class MediaPlayer extends PlayerBase
     */
    private synchronized void setSubtitleAnchor() {
        if ((mSubtitleController == null) && (ActivityThread.currentApplication() != null)) {
            getMediaTimeProvider();
            final HandlerThread thread = new HandlerThread("SetSubtitleAnchorThread");
            thread.start();
            Handler handler = new Handler(thread.getLooper());
@@ -2660,7 +2661,7 @@ public class MediaPlayer extends PlayerBase

                        @Override
                        public Looper getSubtitleLooper() {
                            return Looper.getMainLooper();
                            return mTimeProvider.mEventHandler.getLooper();
                        }
                    });
                    thread.getLooper().quitSafely();