diff options
-rw-r--r-- | src/com/android/browser/BrowserActivity.java | 2 | ||||
-rw-r--r-- | src/com/android/browser/Tab.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java index 84f165c..17c66c5 100644 --- a/src/com/android/browser/BrowserActivity.java +++ b/src/com/android/browser/BrowserActivity.java @@ -3363,7 +3363,7 @@ public class BrowserActivity extends Activity public void setHttpAuthUsernamePassword(String host, String realm, String username, String password) { - WebView w = mTabControl.getCurrentWebView(); + WebView w = getTopWindow(); if (w != null) { w.setHttpAuthUsernamePassword(host, realm, username, password); } diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java index d450b50..07b17a9 100644 --- a/src/com/android/browser/Tab.java +++ b/src/com/android/browser/Tab.java @@ -770,8 +770,8 @@ class Tab { boolean reuseHttpAuthUsernamePassword = handler .useHttpAuthUsernamePassword(); - if (reuseHttpAuthUsernamePassword && mMainView != null) { - String[] credentials = mMainView.getHttpAuthUsernamePassword( + if (reuseHttpAuthUsernamePassword && view != null) { + String[] credentials = view.getHttpAuthUsernamePassword( host, realm); if (credentials != null && credentials.length == 2) { username = credentials[0]; |