summaryrefslogtreecommitdiff
path: root/src/com/android/browser/BrowserActivity.java
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2009-12-08 15:39:55 -0500
committerDerek Sollenberger <djsollen@google.com>2009-12-14 10:04:48 -0500
commit8ff57db0a8dc8eb659fbcdcd4a856208609e6070 (patch)
tree11e60a0c00a91ddbd3ee5737a32bdf7e16c1b8c3 /src/com/android/browser/BrowserActivity.java
parent531ffb589684e215a683a8ef16fc118b6904053a (diff)
Notify the WebView that its customView is not being displayed instead of failing silently.
Diffstat (limited to 'src/com/android/browser/BrowserActivity.java')
-rw-r--r--src/com/android/browser/BrowserActivity.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index d39d8974..462e434c 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -2582,8 +2582,11 @@ public class BrowserActivity extends Activity
}
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);