OSDN Git Service

Hide the custom view when we get onPause() DO NOT MERGE
authorBen Murdoch <benm@google.com>
Tue, 30 Nov 2010 20:48:15 +0000 (20:48 +0000)
committerBen Murdoch <benm@google.com>
Tue, 30 Nov 2010 21:25:31 +0000 (21:25 +0000)
When we run onPause, be sure to hide any custom views (such as
the HTML5 video view) so that when the activity restores we don't
have anything overlaying the page.

Bug: 3240426
Change-Id: Ic93286eab40cda814682bc023f3648b502545256

src/com/android/browser/BrowserActivity.java

index a30bf83..793f689 100644 (file)
@@ -942,6 +942,10 @@ public class BrowserActivity extends Activity
         // unregister network state listener
         unregisterReceiver(mNetworkStateIntentReceiver);
         WebView.disablePlatformNotifications();
+
+        if (mCustomView != null) {
+            mTabControl.getCurrentWebView().getWebChromeClient().onHideCustomView();
+        }
     }
 
     @Override
@@ -2768,7 +2772,6 @@ public class BrowserActivity extends Activity
     void onHideCustomView() {
         if (mCustomView == null)
             return;
-
         // Hide the custom view.
         mCustomView.setVisibility(View.GONE);
         // Remove the custom view from its container.