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
5d7641c6
authored
Jan 26, 2022
by
olly
Committed by
Andrew Lewis
Jan 28, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix some lint warnings
PiperOrigin-RevId: 424383900
parent
e58ffc06
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
28 additions
and
24 deletions
demos/surface/src/main/AndroidManifest.xml
extensions/cast/build.gradle
extensions/cronet/build.gradle
extensions/ima/build.gradle
extensions/media2/src/androidTest/java/com/google/android/exoplayer2/ext/media2/SessionPlayerConnectorTest.java
library/common/src/main/java/com/google/android/exoplayer2/HeartRating.java
library/common/src/main/java/com/google/android/exoplayer2/PercentageRating.java
library/common/src/main/java/com/google/android/exoplayer2/Rating.java
library/common/src/main/java/com/google/android/exoplayer2/StarRating.java
library/common/src/main/java/com/google/android/exoplayer2/ThumbRating.java
library/common/src/main/java/com/google/android/exoplayer2/util/Util.java
library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DownloadManagerDashTest.java
library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DownloadServiceDashTest.java
library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java
demos/surface/src/main/AndroidManifest.xml
View file @
5d7641c6
...
...
@@ -22,12 +22,14 @@
<uses-sdk/>
<application
android:allowBackup=
"false"
android:icon=
"@mipmap/ic_launcher"
android:label=
"@string/application_name"
android:exported=
"true"
>
<activity
android:name=
".MainActivity"
>
android:allowBackup=
"false"
android:icon=
"@mipmap/ic_launcher"
android:label=
"@string/application_name"
android:exported=
"true"
>
<activity
android:name=
".MainActivity"
android:exported=
"true"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
...
...
extensions/cast/build.gradle
View file @
5d7641c6
...
...
@@ -14,7 +14,7 @@
apply
from:
"$gradle.ext.exoplayerSettingsDir/common_library_config.gradle"
dependencies
{
api
'com.google.android.gms:play-services-cast-framework:2
0.1.0
'
api
'com.google.android.gms:play-services-cast-framework:2
1.0.1
'
implementation
'androidx.annotation:annotation:'
+
androidxAnnotationVersion
implementation
project
(
modulePrefix
+
'library-common'
)
compileOnly
'org.checkerframework:checker-qual:'
+
checkerframeworkVersion
...
...
extensions/cronet/build.gradle
View file @
5d7641c6
...
...
@@ -20,7 +20,7 @@ android {
}
dependencies
{
api
"com.google.android.gms:play-services-cronet:1
7
.0.1"
api
"com.google.android.gms:play-services-cronet:1
8
.0.1"
implementation
project
(
modulePrefix
+
'library-common'
)
implementation
project
(
modulePrefix
+
'library-datasource'
)
implementation
'androidx.annotation:annotation:'
+
androidxAnnotationVersion
...
...
extensions/ima/build.gradle
View file @
5d7641c6
...
...
@@ -25,7 +25,7 @@ android {
}
dependencies
{
api
'com.google.ads.interactivemedia.v3:interactivemedia:3.2
5.1
'
api
'com.google.ads.interactivemedia.v3:interactivemedia:3.2
6.0
'
implementation
project
(
modulePrefix
+
'library-core'
)
implementation
'androidx.annotation:annotation:'
+
androidxAnnotationVersion
compileOnly
'org.checkerframework:checker-qual:'
+
checkerframeworkVersion
...
...
extensions/media2/src/androidTest/java/com/google/android/exoplayer2/ext/media2/SessionPlayerConnectorTest.java
View file @
5d7641c6
...
...
@@ -924,8 +924,7 @@ public class SessionPlayerConnectorTest {
assertThat
(
onPlaylistChangedLatch
.
getCount
()).
isEqualTo
(
1
);
}
// TODO(b/168860979): De-flake and re-enable.
@Ignore
@Ignore
(
"Internal ref: b/168860979"
)
@Test
@LargeTest
public
void
replacePlaylistItem_calledOnlyOnce_notifiesPlaylistChangeOnlyOnce
()
throws
Exception
{
...
...
library/common/src/main/java/com/google/android/exoplayer2/HeartRating.java
View file @
5d7641c6
...
...
@@ -100,7 +100,7 @@ public final class HeartRating extends Rating {
private
static
HeartRating
fromBundle
(
Bundle
bundle
)
{
checkArgument
(
bundle
.
getInt
(
keyForField
(
FIELD_RATING_TYPE
),
/* defaultValue= */
RATING_TYPE_
DEFAUL
T
)
bundle
.
getInt
(
keyForField
(
FIELD_RATING_TYPE
),
/* defaultValue= */
RATING_TYPE_
UNSE
T
)
==
TYPE
);
boolean
isRated
=
bundle
.
getBoolean
(
keyForField
(
FIELD_RATED
),
/* defaultValue= */
false
);
return
isRated
...
...
library/common/src/main/java/com/google/android/exoplayer2/PercentageRating.java
View file @
5d7641c6
...
...
@@ -96,7 +96,7 @@ public final class PercentageRating extends Rating {
private
static
PercentageRating
fromBundle
(
Bundle
bundle
)
{
checkArgument
(
bundle
.
getInt
(
keyForField
(
FIELD_RATING_TYPE
),
/* defaultValue= */
RATING_TYPE_
DEFAUL
T
)
bundle
.
getInt
(
keyForField
(
FIELD_RATING_TYPE
),
/* defaultValue= */
RATING_TYPE_
UNSE
T
)
==
TYPE
);
float
percent
=
bundle
.
getFloat
(
keyForField
(
FIELD_PERCENT
),
/* defaultValue= */
RATING_UNSET
);
return
percent
==
RATING_UNSET
?
new
PercentageRating
()
:
new
PercentageRating
(
percent
);
...
...
library/common/src/main/java/com/google/android/exoplayer2/Rating.java
View file @
5d7641c6
...
...
@@ -41,7 +41,7 @@ public abstract class Rating implements Bundleable {
@Documented
@Retention
(
RetentionPolicy
.
SOURCE
)
@IntDef
({
RATING_TYPE_
DEFAUL
T
,
RATING_TYPE_
UNSE
T
,
RATING_TYPE_HEART
,
RATING_TYPE_PERCENTAGE
,
RATING_TYPE_STAR
,
...
...
@@ -49,7 +49,7 @@ public abstract class Rating implements Bundleable {
})
/* package */
@interface
RatingType
{}
/* package */
static
final
int
RATING_TYPE_
DEFAUL
T
=
-
1
;
/* package */
static
final
int
RATING_TYPE_
UNSE
T
=
-
1
;
/* package */
static
final
int
RATING_TYPE_HEART
=
0
;
/* package */
static
final
int
RATING_TYPE_PERCENTAGE
=
1
;
/* package */
static
final
int
RATING_TYPE_STAR
=
2
;
...
...
@@ -68,7 +68,7 @@ public abstract class Rating implements Bundleable {
private
static
Rating
fromBundle
(
Bundle
bundle
)
{
@RatingType
int
ratingType
=
bundle
.
getInt
(
keyForField
(
FIELD_RATING_TYPE
),
/* defaultValue= */
RATING_TYPE_
DEFAUL
T
);
bundle
.
getInt
(
keyForField
(
FIELD_RATING_TYPE
),
/* defaultValue= */
RATING_TYPE_
UNSE
T
);
switch
(
ratingType
)
{
case
RATING_TYPE_HEART:
return
HeartRating
.
CREATOR
.
fromBundle
(
bundle
);
...
...
@@ -78,8 +78,9 @@ public abstract class Rating implements Bundleable {
return
StarRating
.
CREATOR
.
fromBundle
(
bundle
);
case
RATING_TYPE_THUMB:
return
ThumbRating
.
CREATOR
.
fromBundle
(
bundle
);
case
RATING_TYPE_UNSET:
default
:
throw
new
IllegalArgumentException
(
"
Encountered unknown rating t
ype: "
+
ratingType
);
throw
new
IllegalArgumentException
(
"
Unknown RatingT
ype: "
+
ratingType
);
}
}
...
...
library/common/src/main/java/com/google/android/exoplayer2/StarRating.java
View file @
5d7641c6
...
...
@@ -125,7 +125,7 @@ public final class StarRating extends Rating {
private
static
StarRating
fromBundle
(
Bundle
bundle
)
{
checkArgument
(
bundle
.
getInt
(
keyForField
(
FIELD_RATING_TYPE
),
/* defaultValue= */
RATING_TYPE_
DEFAUL
T
)
bundle
.
getInt
(
keyForField
(
FIELD_RATING_TYPE
),
/* defaultValue= */
RATING_TYPE_
UNSE
T
)
==
TYPE
);
int
maxStars
=
bundle
.
getInt
(
keyForField
(
FIELD_MAX_STARS
),
/* defaultValue= */
MAX_STARS_DEFAULT
);
...
...
library/common/src/main/java/com/google/android/exoplayer2/ThumbRating.java
View file @
5d7641c6
...
...
@@ -97,7 +97,7 @@ public final class ThumbRating extends Rating {
private
static
ThumbRating
fromBundle
(
Bundle
bundle
)
{
checkArgument
(
bundle
.
getInt
(
keyForField
(
FIELD_RATING_TYPE
),
/* defaultValue= */
RATING_TYPE_
DEFAUL
T
)
bundle
.
getInt
(
keyForField
(
FIELD_RATING_TYPE
),
/* defaultValue= */
RATING_TYPE_
UNSE
T
)
==
TYPE
);
boolean
rated
=
bundle
.
getBoolean
(
keyForField
(
FIELD_RATED
),
/* defaultValue= */
false
);
return
rated
...
...
library/common/src/main/java/com/google/android/exoplayer2/util/Util.java
View file @
5d7641c6
...
...
@@ -2405,6 +2405,8 @@ public final class Util {
return
"camera motion"
;
case
C
.
TRACK_TYPE_NONE
:
return
"none"
;
case
C
.
TRACK_TYPE_UNKNOWN
:
return
"unknown"
;
default
:
return
trackType
>=
C
.
TRACK_TYPE_CUSTOM_BASE
?
"custom ("
+
trackType
+
")"
:
"?"
;
}
...
...
library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DownloadManagerDashTest.java
View file @
5d7641c6
...
...
@@ -109,8 +109,7 @@ public class DownloadManagerDashTest {
testThread
.
release
();
}
// Disabled due to flakiness.
@Ignore
@Ignore
(
"Disabled due to flakiness"
)
@Test
public
void
saveAndLoadActionFile
()
throws
Throwable
{
// Configure fakeDataSet to block until interrupted when TEST_MPD is read.
...
...
library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DownloadServiceDashTest.java
View file @
5d7641c6
...
...
@@ -157,7 +157,7 @@ public class DownloadServiceDashTest {
testThread
.
release
();
}
@Ignore
// b/78877092
@Ignore
(
"Internal ref: b/78877092"
)
@Test
public
void
multipleDownloadRequest
()
throws
Throwable
{
downloadKeys
(
fakeStreamKey1
);
...
...
@@ -168,7 +168,7 @@ public class DownloadServiceDashTest {
assertCachedData
(
cache
,
fakeDataSet
);
}
@Ignore
// b/78877092
@Ignore
(
"Internal ref: b/78877092"
)
@Test
public
void
removeAction
()
throws
Throwable
{
downloadKeys
(
fakeStreamKey1
,
fakeStreamKey2
);
...
...
@@ -182,7 +182,7 @@ public class DownloadServiceDashTest {
assertCacheEmpty
(
cache
);
}
@Ignore
// b/78877092
@Ignore
(
"Internal ref: b/78877092"
)
@Test
public
void
removeBeforeDownloadComplete
()
throws
Throwable
{
pauseDownloadCondition
=
new
ConditionVariable
();
...
...
library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java
View file @
5d7641c6
...
...
@@ -1478,6 +1478,7 @@ public class PlayerNotificationManager {
return
actions
;
}
@SuppressWarnings
(
"UnspecifiedImmutableFlag"
)
// Warning is spurious.
private
static
PendingIntent
createBroadcastIntent
(
String
action
,
Context
context
,
int
instanceId
)
{
Intent
intent
=
new
Intent
(
action
).
setPackage
(
context
.
getPackageName
());
...
...
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