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
27707e9c
authored
Oct 30, 2020
by
andrewlewis
Committed by
Oliver Woodman
Nov 02, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Clean up deprecated ad tag handling
PiperOrigin-RevId: 339890695
parent
df19725d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaAdsLoader.java
extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaAdsLoader.java
View file @
27707e9c
...
...
@@ -487,8 +487,7 @@ public final class ImaAdsLoader
private
final
ImaUtil
.
Configuration
configuration
;
private
final
Context
context
;
private
final
ImaUtil
.
ImaFactory
imaFactory
;
@Nullable
private
final
Uri
adTagUri
;
@Nullable
private
final
String
adsResponse
;
@Nullable
private
final
DataSpec
deprecatedAdTagDataSpec
;
private
final
ImaSdkSettings
imaSdkSettings
;
private
final
Timeline
.
Period
period
;
private
final
Handler
handler
;
...
...
@@ -605,8 +604,12 @@ public final class ImaAdsLoader
this
.
context
=
context
.
getApplicationContext
();
this
.
configuration
=
configuration
;
this
.
imaFactory
=
imaFactory
;
this
.
adTagUri
=
adTagUri
;
this
.
adsResponse
=
adsResponse
;
deprecatedAdTagDataSpec
=
adTagUri
!=
null
?
new
DataSpec
(
adTagUri
)
:
adsResponse
!=
null
?
new
DataSpec
(
Util
.
getDataUriForString
(
adsResponse
,
"text/xml"
))
:
null
;
@Nullable
ImaSdkSettings
imaSdkSettings
=
configuration
.
imaSdkSettings
;
if
(
imaSdkSettings
==
null
)
{
imaSdkSettings
=
imaFactory
.
createImaSdkSettings
();
...
...
@@ -701,14 +704,7 @@ public final class ImaAdsLoader
}
if
(
EMPTY_AD_TAG_DATA_SPEC
.
equals
(
adTagDataSpec
))
{
// Handle deprecated ways of specifying the ad tag.
if
(
adTagUri
!=
null
)
{
adTagDataSpec
=
new
DataSpec
(
adTagUri
);
}
else
if
(
adsResponse
!=
null
)
{
adTagDataSpec
=
new
DataSpec
(
Util
.
getDataUriForString
(
adsResponse
,
"text/xml"
));
}
else
{
throw
new
IllegalStateException
();
}
adTagDataSpec
=
checkNotNull
(
deprecatedAdTagDataSpec
);
}
AdsRequest
request
;
...
...
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