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

Commit 12026857 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi Committed by Android (Google) Code Review
Browse files

Merge "MediaPlayer: do not crash when there is no context"

parents 7429c4fe 791c4845
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2291,7 +2291,7 @@ public class MediaPlayer extends PlayerBase
     * {@link #setSubtitleAnchor(SubtitleController, Anchor)} (e.g. {@link VideoView} provides one).
     */
    private synchronized void setSubtitleAnchor() {
        if (mSubtitleController == null) {
        if ((mSubtitleController == null) && (ActivityThread.currentApplication() != null)) {
            final HandlerThread thread = new HandlerThread("SetSubtitleAnchorThread");
            thread.start();
            Handler handler = new Handler(thread.getLooper());