OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chrome.browser.preferences; | 5 package org.chromium.chrome.browser.preferences; |
6 | 6 |
7 import android.accounts.Account; | 7 import android.accounts.Account; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.preference.ListPreference; | 9 import android.preference.ListPreference; |
10 import android.text.TextUtils; | 10 import android.text.TextUtils; |
11 import android.util.AttributeSet; | 11 import android.util.AttributeSet; |
12 | 12 |
13 import org.chromium.chrome.R; | 13 import org.chromium.chrome.R; |
14 import org.chromium.sync.AndroidSyncSettings; | 14 import org.chromium.components.sync.AndroidSyncSettings; |
15 import org.chromium.sync.signin.AccountManagerHelper; | 15 import org.chromium.components.sync.signin.AccountManagerHelper; |
16 import org.chromium.sync.signin.ChromeSigninController; | 16 import org.chromium.components.sync.signin.ChromeSigninController; |
17 | 17 |
18 /** | 18 /** |
19 * A preference that displays the account currently being synced and allows the
user to choose a new | 19 * A preference that displays the account currently being synced and allows the
user to choose a new |
20 * account to use for syncing. The values used are the account names. | 20 * account to use for syncing. The values used are the account names. |
21 */ | 21 */ |
22 public class SyncedAccountPreference extends ListPreference { | 22 public class SyncedAccountPreference extends ListPreference { |
23 private static final String TAG = "SyncedAccountPreference"; | 23 private static final String TAG = "SyncedAccountPreference"; |
24 | 24 |
25 /** | 25 /** |
26 * Constructor for inflating from XML | 26 * Constructor for inflating from XML |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 setEntryValues(accountValues); | 69 setEntryValues(accountValues); |
70 setValue(signedInSettingsKey); | 70 setValue(signedInSettingsKey); |
71 setSummary(signedInAccountName); | 71 setSummary(signedInAccountName); |
72 } | 72 } |
73 | 73 |
74 @Override | 74 @Override |
75 protected void onDialogClosed(boolean positiveResult) { | 75 protected void onDialogClosed(boolean positiveResult) { |
76 super.onDialogClosed(positiveResult); | 76 super.onDialogClosed(positiveResult); |
77 } | 77 } |
78 } | 78 } |
OLD | NEW |