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:
@@ -17,6 +17,7 @@ import android.graphics.BitmapFactory;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.util.Log;
|
||||
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
@@ -25,6 +26,8 @@ import android.widget.Button;
|
||||
|
||||
public abstract class AssetActivity extends Activity {
|
||||
|
||||
public static final String TAG = "WVM Sample Player";
|
||||
|
||||
private int currentPage;
|
||||
protected ArrayList<AssetsPage> pages;
|
||||
private Context context;
|
||||
@@ -128,6 +131,7 @@ public abstract class AssetActivity extends Activity {
|
||||
|
||||
public void onClick(View v) {
|
||||
currentPage++;
|
||||
Log.d(TAG, "Click next page: " + currentPage);
|
||||
if (currentPage >= pages.size()) {
|
||||
currentPage = 0;
|
||||
}
|
||||
@@ -146,6 +150,7 @@ public abstract class AssetActivity extends Activity {
|
||||
public void onClick(View v) {
|
||||
|
||||
currentPage--;
|
||||
Log.d(TAG, "Click prev page: " + currentPage);
|
||||
if (currentPage < 0) {
|
||||
currentPage = pages.size() - 1;
|
||||
}
|
||||
@@ -211,6 +216,7 @@ public abstract class AssetActivity extends Activity {
|
||||
clip.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
public void onClick(View v) {
|
||||
Log.d(TAG, "Click Asset path: " + assetPath);
|
||||
Intent intent = new Intent(context, VideoPlayerView.class);
|
||||
intent.putExtra("com.widevine.demo.Path", assetPath);
|
||||
context.startActivity(intent);
|
||||
|
||||
Reference in New Issue
Block a user