Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
71f7ab1c
authored
Nov 08, 2019
by
tonihei
Committed by
Oliver Woodman
Nov 15, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Workaround for pre-M platform bug when instantiating CaptioningManager.
PiperOrigin-RevId: 279286802
parent
a9ef9c46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
library/core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionParameters.java
library/core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionParameters.java
View file @
71f7ab1c
...
...
@@ -17,6 +17,7 @@ package com.google.android.exoplayer2.trackselection;
import
android.annotation.TargetApi
;
import
android.content.Context
;
import
android.os.Looper
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
android.text.TextUtils
;
...
...
@@ -171,6 +172,11 @@ public class TrackSelectionParameters implements Parcelable {
@TargetApi
(
19
)
private
void
setPreferredTextLanguageAndRoleFlagsToCaptioningManagerSettingsV19
(
Context
context
)
{
if
(
Util
.
SDK_INT
<
23
&&
Looper
.
myLooper
()
==
null
)
{
// Android platform bug (pre-Marshmallow) that causes RuntimeExceptions when
// CaptioningService is instantiated from a non-Looper thread. See [internal: b/143779904].
return
;
}
CaptioningManager
captioningManager
=
(
CaptioningManager
)
context
.
getSystemService
(
Context
.
CAPTIONING_SERVICE
);
if
(
captioningManager
==
null
||
!
captioningManager
.
isEnabled
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment