DO NOT MERGE Fix issues during backport
Fix issues related to I219accd5db0c8a0e64b8aab3b049a8cee7dc168f. Change-Id: Iacf72a9c618d59601c373de948a3f7cbfcbd7038
This commit is contained in:
@@ -75,6 +75,7 @@ class BrowserFrame extends Handler {
|
|||||||
private final CallbackProxy mCallbackProxy;
|
private final CallbackProxy mCallbackProxy;
|
||||||
private final WebSettingsClassic mSettings;
|
private final WebSettingsClassic mSettings;
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
|
private final WebViewDatabaseClassic mDatabase;
|
||||||
private final WebViewCore mWebViewCore;
|
private final WebViewCore mWebViewCore;
|
||||||
/* package */ boolean mLoadInitFromJava;
|
/* package */ boolean mLoadInitFromJava;
|
||||||
private int mLoadType;
|
private int mLoadType;
|
||||||
@@ -252,6 +253,7 @@ class BrowserFrame extends Handler {
|
|||||||
mSettings = settings;
|
mSettings = settings;
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mCallbackProxy = proxy;
|
mCallbackProxy = proxy;
|
||||||
|
mDatabase = WebViewDatabaseClassic.getInstance(appContext);
|
||||||
mWebViewCore = w;
|
mWebViewCore = w;
|
||||||
|
|
||||||
mSearchBox = new SearchBoxImpl(mWebViewCore, mCallbackProxy);
|
mSearchBox = new SearchBoxImpl(mWebViewCore, mCallbackProxy);
|
||||||
@@ -830,10 +832,9 @@ class BrowserFrame extends Handler {
|
|||||||
// the post data (there could be another form on the
|
// the post data (there could be another form on the
|
||||||
// page and that was posted instead.
|
// page and that was posted instead.
|
||||||
String postString = new String(postData);
|
String postString = new String(postData);
|
||||||
WebViewDatabaseClassic db = WebViewDatabaseClassic.getInstance(mContext);
|
|
||||||
if (postString.contains(URLEncoder.encode(username)) &&
|
if (postString.contains(URLEncoder.encode(username)) &&
|
||||||
postString.contains(URLEncoder.encode(password))) {
|
postString.contains(URLEncoder.encode(password))) {
|
||||||
String[] saved = db.getUsernamePassword(schemePlusHost);
|
String[] saved = mDatabase.getUsernamePassword(schemePlusHost);
|
||||||
if (saved != null) {
|
if (saved != null) {
|
||||||
// null username implies that user has chosen not to
|
// null username implies that user has chosen not to
|
||||||
// save password
|
// save password
|
||||||
@@ -841,7 +842,7 @@ class BrowserFrame extends Handler {
|
|||||||
// non-null username implies that user has
|
// non-null username implies that user has
|
||||||
// chosen to save password, so update the
|
// chosen to save password, so update the
|
||||||
// recorded password
|
// recorded password
|
||||||
db.setUsernamePassword(schemePlusHost, username,
|
mDatabase.setUsernamePassword(schemePlusHost, username,
|
||||||
password);
|
password);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user