Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f931dcaa authored by Shubang Lu's avatar Shubang Lu Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE of extras in media metrics" into sc-dev

parents 39665ed5 af960d00
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -113,10 +113,11 @@ public final class NetworkEvent extends Event implements Parcelable {
     *
     * @hide
     */
    public NetworkEvent(@NetworkType int type, long timeSinceCreatedMillis, Bundle extras) {
    public NetworkEvent(@NetworkType int type, long timeSinceCreatedMillis,
            @Nullable Bundle extras) {
        this.mNetworkType = type;
        this.mTimeSinceCreatedMillis = timeSinceCreatedMillis;
        this.mExtras = extras.deepCopy();
        this.mExtras = extras == null ? null : extras.deepCopy();
    }

    /**
+2 −2
Original line number Diff line number Diff line
@@ -65,12 +65,12 @@ public final class PlaybackErrorEvent extends Event implements Parcelable {
            int errorCode,
            int subErrorCode,
            long timeSinceCreatedMillis,
            Bundle extras) {
            @Nullable Bundle extras) {
        this.mExceptionStack = exceptionStack;
        this.mErrorCode = errorCode;
        this.mSubErrorCode = subErrorCode;
        this.mTimeSinceCreatedMillis = timeSinceCreatedMillis;
        this.mExtras = extras.deepCopy();
        this.mExtras = extras == null ? null : extras.deepCopy();
    }

    /** @hide */
+2 −2
Original line number Diff line number Diff line
@@ -194,7 +194,7 @@ public final class PlaybackMetrics implements Parcelable {
            long localBytesRead,
            long networkTransferDurationMillis,
            byte[] drmSessionId,
            Bundle extras) {
            @Nullable Bundle extras) {
        this.mMediaDurationMillis = mediaDurationMillis;
        this.mStreamSource = streamSource;
        this.mStreamType = streamType;
@@ -212,7 +212,7 @@ public final class PlaybackMetrics implements Parcelable {
        this.mLocalBytesRead = localBytesRead;
        this.mNetworkTransferDurationMillis = networkTransferDurationMillis;
        this.mDrmSessionId = drmSessionId;
        this.mExtras = extras.deepCopy();
        this.mExtras = extras == null ? null : extras.deepCopy();
    }

    /**
+2 −2
Original line number Diff line number Diff line
@@ -138,10 +138,10 @@ public final class PlaybackStateEvent extends Event implements Parcelable {
    public PlaybackStateEvent(
            int state,
            long timeSinceCreatedMillis,
            Bundle extras) {
            @Nullable Bundle extras) {
        this.mTimeSinceCreatedMillis = timeSinceCreatedMillis;
        this.mState = state;
        this.mExtras = extras.deepCopy();
        this.mExtras = extras == null ? null : extras.deepCopy();
    }

    /**
+1 −1
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ public final class TrackChangeEvent extends Event implements Parcelable {
        this.mWidth = width;
        this.mHeight = height;
        this.mVideoFrameRate = videoFrameRate;
        this.mExtras = extras.deepCopy();
        this.mExtras = extras == null ? null : extras.deepCopy();
    }

    /**