Adding MSDL history to Launcher's dump information.
The history displays the latest tokens played. Useful for testing and debugging. Test: presubmit Flag: NONE MSDL playback is flagged case by case. Bug: 377496684 Change-Id: I163889ade9fe4dee7f02459d2d9d81b94197bea1
This commit is contained in:
@@ -30,6 +30,7 @@ import com.google.android.msdl.domain.InteractionProperties;
|
||||
import com.google.android.msdl.domain.MSDLPlayer;
|
||||
import com.google.android.msdl.logging.MSDLEvent;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
@@ -65,4 +66,13 @@ public class MSDLPlayerWrapper {
|
||||
public List<MSDLEvent> getHistory() {
|
||||
return mMSDLPlayer.getHistory();
|
||||
}
|
||||
|
||||
/** Print the latest history of MSDL tokens played */
|
||||
public void dump(String prefix, PrintWriter writer) {
|
||||
writer.println(prefix + "MSDLPlayerWrapper history of latest events:");
|
||||
List<MSDLEvent> events = getHistory();
|
||||
for (MSDLEvent event: events) {
|
||||
writer.println(prefix + "\t" + event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user