am 3950d733: am c06a2da3: Merge change I4c7be8c7 into eclair-mr2
Merge commit '3950d733fad2f7cfd127ea26bf9c7a2a66623c33'
* commit '3950d733fad2f7cfd127ea26bf9c7a2a66623c33':
Notify the WebView that its customView is not being displayed instead of failing silently.
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 50cf1fd..7a43e14 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -2662,8 +2662,11 @@
}
void onShowCustomView(View view, WebChromeClient.CustomViewCallback callback) {
- if (mCustomView != null)
+ // if a view already exists then immediately terminate the new one
+ if (mCustomView != null) {
+ callback.onCustomViewHidden();
return;
+ }
// Add the custom view to its container.
mCustomViewContainer.addView(view, COVER_SCREEN_GRAVITY_CENTER);