Add More Logging to Sample Player

Because the Widevine Sample Play is frequently used to report bugs, it is
helpful to have users' actions logged.  This change prints to the android log
whenever the user changes settings, clicks play, full screen, acquire rights,
etc.

This code does not change the build and is not delivered to customers.  It is
delivered to vendors.

Change-Id: I62c34c2f1683af881a3c326a48f039b463ca3e8e
This commit is contained in:
Fred Gylys-Colwell
2012-09-14 14:03:37 -07:00
parent 8ab3b10971
commit b8ff509887
4 changed files with 40 additions and 9 deletions

View File

@@ -8,6 +8,7 @@ import java.io.FileDescriptor;
import java.io.FileInputStream;
import java.util.EventListener;
import java.util.Set;
import android.util.Log;
import android.content.ContentValues;
import android.content.Context;
@@ -22,6 +23,8 @@ import android.drm.DrmStore;
public class WidevineDrm {
public static final String TAG = "WVM Sample Player";
interface WidevineDrmLogEventListener extends EventListener {
public void logUpdated();
}
@@ -304,6 +307,7 @@ public class WidevineDrm {
}
private void logMessage(String message) {
Log.d(TAG, message);
logBuffer.append(message);
if (logEventListener != null) {