Fixed: screen time out during streaming in mediacodec mode.

Also, print log to indicate if the device is provisioned or not.

Change-Id: I674e2fe4531cc79b4bf307939c4b08ba19207244
related-to-bug: 6821614
This commit is contained in:
Edwin Wong
2012-08-04 23:02:20 -07:00
parent e9f5431e78
commit c4d88be1fb
2 changed files with 12 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ import android.widget.Button;
import android.view.Display;
import android.view.Gravity;
import android.view.View;
import android.view.WindowManager;
import android.content.Context;
import android.view.SurfaceHolder;
@@ -62,6 +63,8 @@ public class VideoPlayerView extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Display display = getWindowManager().getDefaultDisplay();
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
height = display.getHeight();
width = display.getWidth();
context = this;

View File

@@ -130,7 +130,15 @@ public class WidevineDrm {
}
public boolean isProvisionedDevice() {
logMessage("mWVDrmInfoRequestStatusKey = " + mWVDrmInfoRequestStatusKey + "\n");
if (mWVDrmInfoRequestStatusKey == DEVICE_IS_PROVISIONED)
logMessage("Device is provisioined\n");
else if (mWVDrmInfoRequestStatusKey == DEVICE_IS_PROVISIONED_SD_ONLY)
logMessage("Device is provisioined SD only\n");
else if (mWVDrmInfoRequestStatusKey == DEVICE_IS_NOT_PROVISIONED)
logMessage("Device is not provisioined\n");
else
logMessage("Invalid provisioned status=" + mWVDrmInfoRequestStatusKey +"\n");
return ((mWVDrmInfoRequestStatusKey == DEVICE_IS_PROVISIONED) ||
(mWVDrmInfoRequestStatusKey == DEVICE_IS_PROVISIONED_SD_ONLY));