| 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 95ecedc80bba7536588bef4d30ba7c2457a981a3..10542092a70c7bfd95c4496526888c29c9578fd9 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;
|
| @@ -230,7 +228,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;
|
| }
|
| @@ -367,16 +365,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);
|
|
|