diff options
author | Ben Murdoch <benm@google.com> | 2010-11-30 11:46:24 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-11-30 11:46:24 -0800 |
commit | d2607118edf7a5204181dd118dd2f64d1d5b12c4 (patch) | |
tree | 732efecf8213d35a388f4053d9e68e207ecdf926 | |
parent | c41b27e2748ee19620636a14721a1dc14c3b418c (diff) | |
parent | 27e728f22d954caa7252be6c19a67a9277e1db3b (diff) | |
download | frameworks_base-d2607118edf7a5204181dd118dd2f64d1d5b12c4.zip frameworks_base-d2607118edf7a5204181dd118dd2f64d1d5b12c4.tar.gz frameworks_base-d2607118edf7a5204181dd118dd2f64d1d5b12c4.tar.bz2 |
am 27e728f2: Merge "Hide plugin views when we start playing HTML5 video" into gingerbread
* commit '27e728f22d954caa7252be6c19a67a9277e1db3b':
Hide plugin views when we start playing HTML5 video
-rw-r--r-- | core/java/android/webkit/HTML5VideoViewProxy.java | 11 | ||||
-rw-r--r-- | core/java/android/webkit/WebView.java | 4 |
2 files changed, 15 insertions, 0 deletions
diff --git a/core/java/android/webkit/HTML5VideoViewProxy.java b/core/java/android/webkit/HTML5VideoViewProxy.java index 6769563..85bff4f 100644 --- a/core/java/android/webkit/HTML5VideoViewProxy.java +++ b/core/java/android/webkit/HTML5VideoViewProxy.java @@ -138,6 +138,10 @@ class HTML5VideoViewProxy extends Handler mCurrentProxy.dispatchOnEnded(); else mCurrentProxy.dispatchOnPaused(); + + // Re enable plugin views. + mCurrentProxy.getWebView().getViewManager().showAll(); + isVideoSelfEnded = false; mCurrentProxy = null; mLayout.removeView(mVideoView); @@ -199,6 +203,9 @@ class HTML5VideoViewProxy extends Handler mTimer = new Timer(); mVideoView.start(); client.onShowCustomView(mLayout, mCallback); + // Plugins like Flash will draw over the video so hide + // them while we're playing. + mCurrentProxy.getWebView().getViewManager().hideAll(); } public static boolean isPlaying(HTML5VideoViewProxy proxy) { @@ -599,6 +606,10 @@ class HTML5VideoViewProxy extends Handler return new HTML5VideoViewProxy(webViewCore.getWebView(), nativePtr); } + /* package */ WebView getWebView() { + return mWebView; + } + private native void nativeOnPrepared(int duration, int width, int height, int nativePointer); private native void nativeOnEnded(int nativePointer); private native void nativeOnPaused(int nativePointer); diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 88516ce..7f7a25e 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -7865,6 +7865,10 @@ public class WebView extends AbsoluteLayout nativeUpdateCachedTextfield(updatedText, mTextGeneration); } + /* package */ ViewManager getViewManager() { + return mViewManager; + } + private native int nativeCacheHitFramePointer(); private native Rect nativeCacheHitNodeBounds(); private native int nativeCacheHitNodePointer(); |