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
c3531512
authored
May 27, 2021
by
aquilescanta
Committed by
Oliver Woodman
May 27, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add errorCode to the EventLogger
PiperOrigin-RevId: 376126959
parent
0fb5fa75
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
library/common/src/main/java/com/google/android/exoplayer2/PlaybackException.java
library/core/src/main/java/com/google/android/exoplayer2/util/EventLogger.java
library/common/src/main/java/com/google/android/exoplayer2/PlaybackException.java
View file @
c3531512
...
...
@@ -243,6 +243,14 @@ public class PlaybackException extends Exception implements Bundleable {
}
}
/**
* Equivalent to {@link PlaybackException#getErrorCodeName(int)
* PlaybackException.getErrorCodeName(this.errorCode)}.
*/
public
final
String
getErrorCodeName
()
{
return
getErrorCodeName
(
errorCode
);
}
/** An error code which identifies the cause of the playback failure. */
@ErrorCode
public
final
int
errorCode
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/util/EventLogger.java
View file @
c3531512
...
...
@@ -24,6 +24,7 @@ import com.google.android.exoplayer2.C;
import
com.google.android.exoplayer2.ExoPlaybackException
;
import
com.google.android.exoplayer2.Format
;
import
com.google.android.exoplayer2.MediaItem
;
import
com.google.android.exoplayer2.PlaybackException
;
import
com.google.android.exoplayer2.PlaybackParameters
;
import
com.google.android.exoplayer2.Player
;
import
com.google.android.exoplayer2.Player.PlaybackSuppressionReason
;
...
...
@@ -598,6 +599,9 @@ public class EventLogger implements AnalyticsListener {
@Nullable
String
eventDescription
,
@Nullable
Throwable
throwable
)
{
String
eventString
=
eventName
+
" ["
+
getEventTimeString
(
eventTime
);
if
(
throwable
instanceof
PlaybackException
)
{
eventString
+=
", errorCode="
+
((
PlaybackException
)
throwable
).
getErrorCodeName
();
}
if
(
eventDescription
!=
null
)
{
eventString
+=
", "
+
eventDescription
;
}
...
...
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