Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementFragment.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementFragment.java |
| index ba266bae2b81c78ac3892f06795557bd2edf56fc..d9b9b88be3265225182620af56d8786174b80fe9 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementFragment.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementFragment.java |
| @@ -51,6 +51,7 @@ import org.chromium.chrome.browser.profiles.ProfileAccountManagementMetrics; |
| import org.chromium.chrome.browser.profiles.ProfileDownloader; |
| import org.chromium.chrome.browser.signin.SignOutDialogFragment.SignOutDialogListener; |
| import org.chromium.chrome.browser.signin.SigninManager.SignInStateObserver; |
| +import org.chromium.chrome.browser.sync.GoogleServiceAuthError; |
| import org.chromium.chrome.browser.sync.ProfileSyncService; |
| import org.chromium.chrome.browser.sync.ProfileSyncService.SyncStateChangedListener; |
| import org.chromium.chrome.browser.sync.ui.SyncCustomizationFragment; |
| @@ -253,13 +254,17 @@ public class AccountManagementFragment extends PreferenceFragment |
| private void configureSyncSettings() { |
| SyncPreference pref = (SyncPreference) findPreference(PREF_SYNC_SETTINGS); |
| - // Sets preference icon and tints it to blue. |
| - Drawable icon = ApiCompatibilityUtils.getDrawable( |
| - getResources(), R.drawable.permission_background_sync); |
| - icon.setColorFilter( |
| - ApiCompatibilityUtils.getColor(getResources(), R.color.light_active_color), |
| - PorterDuff.Mode.SRC_IN); |
| - pref.setIcon(icon); |
| + if (ProfileSyncService.get().getAuthError() == GoogleServiceAuthError.State.NONE) { |
|
Bernhard Bauer
2016/05/09 13:58:07
Would it make sense to move all of this to SyncPre
gogerald1
2016/05/09 16:51:59
May not, since our design is to indicate sync erro
Bernhard Bauer
2016/05/10 09:12:45
Not really? I'm talking about the SyncPreference c
gogerald1
2016/05/11 15:09:24
Sorry, misunderstood :), done
|
| + // Sets preference icon and tints it to blue. |
| + Drawable icon = ApiCompatibilityUtils.getDrawable( |
| + getResources(), R.drawable.permission_background_sync); |
| + icon.setColorFilter( |
| + ApiCompatibilityUtils.getColor(getResources(), R.color.light_active_color), |
| + PorterDuff.Mode.SRC_IN); |
| + pref.setIcon(icon); |
| + } else { |
| + pref.setIcon(ApiCompatibilityUtils.getDrawable(getResources(), R.drawable.sync_error)); |
| + } |
| final Preferences preferences = (Preferences) getActivity(); |
| final Account account = ChromeSigninController.get(getActivity()).getSignedInUser(); |