Merge "Fix a dead lock for SubtitleTrack"
This commit is contained in:
committed by
Android (Google) Code Review
commit
012281c792
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user