Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2112)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/password/ManageSavedPasswordsPreferences.java

Issue 970023003: Fix divider after switch on Save Passwords screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/preferences/password/ManageSavedPasswordsPreferences.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/ManageSavedPasswordsPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/ManageSavedPasswordsPreferences.java
index bb6bffde6a3e0cfb86624d6760785cf2eb251859..5290cf36ff6aa5931a608d3a81f1a95b1b4c9d3b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/ManageSavedPasswordsPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/ManageSavedPasswordsPreferences.java
@@ -272,7 +272,8 @@ public class ManageSavedPasswordsPreferences extends PreferenceFragment
}
private void displayManageAccountLink() {
- if (PasswordUIView.shouldDisplayManageAccountLink()
+ boolean shouldDisplayLink = PasswordUIView.shouldDisplayManageAccountLink();
+ if (shouldDisplayLink
&& getPreferenceScreen().findPreference(PREF_MANAGE_ACCOUNT_LINK) == null) {
if (mLinkPref == null) {
ForegroundColorSpan colorSpan = new ForegroundColorSpan(
@@ -287,10 +288,9 @@ public class ManageSavedPasswordsPreferences extends PreferenceFragment
mLinkPref.setOrder(ORDER_MANAGE_ACCOUNT_LINK);
}
getPreferenceScreen().addPreference(mLinkPref);
- } else {
- // Draw a divider only if the preference after mSavePasswordsSwitch is not selectable,
- // in which case the ListView itself doesn't draw a divider.
- mSavePasswordsSwitch.setDrawDivider(true);
}
+ // Draw a divider only if the preference after mSavePasswordsSwitch is not selectable,
+ // in which case the ListView itself doesn't draw a divider.
+ mSavePasswordsSwitch.setDrawDivider(!shouldDisplayLink);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698