diff options
| author | John Reck <jreck@google.com> | 2011-05-06 11:41:55 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-05-06 11:41:55 -0700 |
| commit | 4cfc029725815362f98851122dd0599e99e753be (patch) | |
| tree | 4fee5663010c919aeef7459c48cd59d545e58627 /src | |
| parent | 86138446b4f7c922a650e8bffe62b36adf5210ff (diff) | |
| parent | 72d77529cc146e2eb8e36247d448e416b56c865d (diff) | |
| download | packages_apps_Browser-4cfc029725815362f98851122dd0599e99e753be.tar.gz packages_apps_Browser-4cfc029725815362f98851122dd0599e99e753be.tar.bz2 packages_apps_Browser-4cfc029725815362f98851122dd0599e99e753be.zip | |
Merge "Fix AutoFill"
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 d91c7ff7b..b6b237d95 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() { |
