Commit 91c52a47 by olly Committed by Oliver Woodman

Suppress logging for BufferLengthLogAction

It's really spammy. Decided not to document tag as also
being nullable in case we ever use it for anything else
in the base action class.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183632944
parent f6541b49
......@@ -16,6 +16,7 @@
package com.google.android.exoplayer2.testutil;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.util.Log;
import android.view.Surface;
import com.google.android.exoplayer2.C;
......@@ -40,13 +41,14 @@ import com.google.android.exoplayer2.util.HandlerWrapper;
public abstract class Action {
private final String tag;
private final String description;
private final @Nullable String description;
/**
* @param tag A tag to use for logging.
* @param description A description to be logged when the action is executed.
* @param description A description to be logged when the action is executed, or null if no
* logging is required.
*/
public Action(String tag, String description) {
public Action(String tag, @Nullable String description) {
this.tag = tag;
this.description = description;
}
......@@ -66,7 +68,9 @@ public abstract class Action {
Surface surface,
HandlerWrapper handler,
ActionNode nextAction) {
Log.i(tag, description);
if (description != null) {
Log.i(tag, description);
}
doActionAndScheduleNextImpl(player, trackSelector, surface, handler, nextAction);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment