| Index: content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java b/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java
|
| index 40439888c787ba13f76cd1b42140cde337c1b904..b2d6e0a4f987f2f405e9ad230b7967f7afaf6fe7 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java
|
| @@ -4,10 +4,8 @@
|
|
|
| package org.chromium.content.browser;
|
|
|
| -import android.app.Activity;
|
| import android.app.AlertDialog;
|
| import android.content.Context;
|
| -import android.content.ContextWrapper;
|
| import android.content.DialogInterface;
|
| import android.graphics.Point;
|
| import android.provider.Settings;
|
| @@ -231,7 +229,7 @@ public class ContentVideoView extends FrameLayout
|
|
|
| mCurrentState = STATE_ERROR;
|
|
|
| - if (!isActivityContext(getContext())) {
|
| + if (ContentViewCore.activityFromContext(getContext()) == null) {
|
| Log.w(TAG, "Unable to show alert dialog because it requires an activity context");
|
| return;
|
| }
|
| @@ -424,16 +422,6 @@ public class ContentVideoView extends FrameLayout
|
| return videoView;
|
| }
|
|
|
| - private static boolean isActivityContext(Context context) {
|
| - // Only retrieve the base context if the supplied context is a ContextWrapper but not
|
| - // an Activity, given that Activity is already a subclass of ContextWrapper.
|
| - if (context instanceof ContextWrapper && !(context instanceof Activity)) {
|
| - context = ((ContextWrapper) context).getBaseContext();
|
| - return isActivityContext(context);
|
| - }
|
| - return context instanceof Activity;
|
| - }
|
| -
|
| public void removeSurfaceView() {
|
| removeView(mVideoSurfaceView);
|
| removeView(mProgressView);
|
|
|