diff options
author | John Reck <jreck@google.com> | 2011-05-06 10:33:16 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-05-06 10:33:16 -0700 |
commit | 72d77529cc146e2eb8e36247d448e416b56c865d (patch) | |
tree | da01d1ec37267dcb8d61dbb0896f925c56a53ab6 /src | |
parent | 503da5b02133380e94642f6e4966ecd8ee2cd76c (diff) | |
download | packages_apps_browser-72d77529cc146e2eb8e36247d448e416b56c865d.zip packages_apps_browser-72d77529cc146e2eb8e36247d448e416b56c865d.tar.gz packages_apps_browser-72d77529cc146e2eb8e36247d448e416b56c865d.tar.bz2 |
Fix AutoFill
Ensure that we sync the new profile data to WebSettings so that
it will get sent to native land.
Change-Id: I825557d9c73e218f0056f6bfd1d3b726ca9f6eef
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/browser/AutofillHandler.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/browser/AutofillHandler.java b/src/com/android/browser/AutofillHandler.java index d91c7ff..b6b237d 100644 --- a/src/com/android/browser/AutofillHandler.java +++ b/src/com/android/browser/AutofillHandler.java @@ -119,18 +119,22 @@ public class AutofillHandler { } public void setAutoFillProfile(AutoFillProfile profile, Message msg) { + int profileId = NO_AUTOFILL_PROFILE_SET; if (profile != null) { - setActiveAutoFillProfileId(profile.getUniqueId()); + profileId = profile.getUniqueId(); // Update the AutoFill DB with the new profile. new SaveProfileToDbTask(msg).execute(profile); } else { // Delete the current profile. if (mAutoFillProfile != null) { new DeleteProfileFromDbTask(msg).execute(mAutoFillProfile.getUniqueId()); - setActiveAutoFillProfileId(NO_AUTOFILL_PROFILE_SET); } } + // Make sure we set mAutoFillProfile before calling setActiveAutoFillProfileId + // Calling setActiveAutoFillProfileId will trigger an update of WebViews + // which will expect a new profile to be set mAutoFillProfile = profile; + setActiveAutoFillProfileId(profileId); } public AutoFillProfile getAutoFillProfile() { |