diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/browser/Controller.java | 3 | ||||
-rw-r--r-- | src/com/android/browser/PageDialogsHandler.java | 25 |
2 files changed, 18 insertions, 10 deletions
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java index 9a015b2..7abda69 100644 --- a/src/com/android/browser/Controller.java +++ b/src/com/android/browser/Controller.java @@ -1694,8 +1694,7 @@ public class Controller break; case R.id.page_info_menu_id: - mPageDialogsHandler.showPageInfo(mTabControl.getCurrentTab(), - false); + mPageDialogsHandler.showPageInfo(mTabControl.getCurrentTab(), false, null); break; case R.id.classic_history_menu_id: diff --git a/src/com/android/browser/PageDialogsHandler.java b/src/com/android/browser/PageDialogsHandler.java index 2dbddf3..b9e0859 100644 --- a/src/com/android/browser/PageDialogsHandler.java +++ b/src/com/android/browser/PageDialogsHandler.java @@ -42,6 +42,7 @@ public class PageDialogsHandler { private Context mContext; private Controller mController; private boolean mPageInfoFromShowSSLCertificateOnError; + private String mUrlCertificateOnError; private Tab mPageInfoView; private AlertDialog mPageInfoDialog; @@ -66,7 +67,9 @@ public class PageDialogsHandler { public void onConfigurationChanged(Configuration config) { if (mPageInfoDialog != null) { mPageInfoDialog.dismiss(); - showPageInfo(mPageInfoView, mPageInfoFromShowSSLCertificateOnError); + showPageInfo(mPageInfoView, + mPageInfoFromShowSSLCertificateOnError, + mUrlCertificateOnError); } if (mSSLCertificateDialog != null) { mSSLCertificateDialog.dismiss(); @@ -74,8 +77,9 @@ public class PageDialogsHandler { } if (mSSLCertificateOnErrorDialog != null) { mSSLCertificateOnErrorDialog.dismiss(); - showSSLCertificateOnError(mSSLCertificateOnErrorView, mSSLCertificateOnErrorHandler, - mSSLCertificateOnErrorError); + showSSLCertificateOnError(mSSLCertificateOnErrorView, + mSSLCertificateOnErrorHandler, + mSSLCertificateOnErrorError); } if (mHttpAuthenticationDialog != null) { mHttpAuthenticationDialog.reshow(); @@ -129,16 +133,19 @@ public class PageDialogsHandler { * this dialog was opened from the SSL-certificate-on-error dialog or * not. This is important, since we need to know whether to return to * the parent dialog or simply dismiss. + * @param urlCertificateOnError The URL that invokes SSLCertificateError. + * Null when fromShowSSLCertificateOnError is false. */ void showPageInfo(final Tab tab, - final boolean fromShowSSLCertificateOnError) { + final boolean fromShowSSLCertificateOnError, + final String urlCertificateOnError) { final LayoutInflater factory = LayoutInflater.from(mContext); final View pageInfoView = factory.inflate(R.layout.page_info, null); final WebView view = tab.getWebView(); - String url = tab.getUrl(); + String url = fromShowSSLCertificateOnError ? urlCertificateOnError : tab.getUrl(); String title = tab.getTitle(); if (url == null) { @@ -153,6 +160,7 @@ public class PageDialogsHandler { mPageInfoView = tab; mPageInfoFromShowSSLCertificateOnError = fromShowSSLCertificateOnError; + mUrlCertificateOnError = urlCertificateOnError; AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(mContext) @@ -263,7 +271,7 @@ public class PageDialogsHandler { mSSLCertificateDialog = null; mSSLCertificateView = null; - showPageInfo(tab, false); + showPageInfo(tab, false, null); } }) .setOnCancelListener( @@ -272,7 +280,7 @@ public class PageDialogsHandler { mSSLCertificateDialog = null; mSSLCertificateView = null; - showPageInfo(tab, false); + showPageInfo(tab, false, null); } }) .show(); @@ -361,7 +369,8 @@ public class PageDialogsHandler { showPageInfo(mController.getTabControl() .getTabFromView(view), - true); + true, + error.getUrl()); } }) .setOnCancelListener( |