Home
last modified time | relevance | path

Searched refs:Account (Results 1 – 25 of 274) sorted by relevance

1234567891011

/packages/apps/Email/tests/src/com/android/email/
DSecurityPolicyTests.java30 import com.android.emailcommon.provider.Account;
142 Account a3 = ProviderTestUtils.setupAccount("sec-3", true, mMockContext); in testAggregator()
168 Account a4 = ProviderTestUtils.setupAccount("sec-4", true, mMockContext); in testAggregator()
194 Account a5 = ProviderTestUtils.setupAccount("sec-5", true, mMockContext); in testAggregator()
211 Account account = Account.restoreAccountWithId(mMockContext, accountId); in assertAccountPolicyConsistent()
235 Account account = ProviderTestUtils.setupAccount("testaccount", true, mMockContext); in testSettingAccountPolicy()
250 mMockContext, Account.restoreAccountWithId(mMockContext, accountId)); in testSettingAccountPolicy()
278 Account a2 = ProviderTestUtils.setupAccount("holdflag-2", false, mMockContext); in testSetClearHoldFlag()
279 a2.mFlags = Account.FLAGS_SYNC_DISABLED | Account.FLAGS_SECURITY_HOLD; in testSetClearHoldFlag()
283 Account a2a = Account.restoreAccountWithId(mMockContext, a2.mId); in testSetClearHoldFlag()
[all …]
DAccountTestCase.java29 import com.android.emailcommon.provider.Account;
50 protected android.accounts.Account[] getExchangeAccounts() { in getExchangeAccounts()
54 protected android.accounts.Account makeAccountManagerAccount(String username) { in makeAccountManagerAccount()
55 return new android.accounts.Account(username, TEST_ACCOUNT_TYPE); in makeAccountManagerAccount()
59 final android.accounts.Account account = makeAccountManagerAccount(username); in createAccountManagerAccount()
63 protected Account setupProviderAndAccountManagerAccount(String username) { in setupProviderAndAccountManagerAccount()
70 protected ArrayList<Account> makeExchangeServiceAccountList() { in makeExchangeServiceAccountList()
71 ArrayList<Account> accountList = new ArrayList<Account>(); in makeExchangeServiceAccountList()
72 Cursor c = getMockContext().getContentResolver().query(Account.CONTENT_URI, in makeExchangeServiceAccountList()
73 Account.CONTENT_PROJECTION, null, null, null); in makeExchangeServiceAccountList()
[all …]
/packages/apps/Email/tests/src/com/android/email/provider/
DProviderTests.java38 import com.android.emailcommon.provider.Account;
192 Account account1 = ProviderTestUtils.setupAccount("account-save", true, mMockContext); in testAccountSave()
195 Account account2 = Account.restoreAccountWithId(mMockContext, account1Id); in testAccountSave()
205 Account account1 = ProviderTestUtils.setupAccount("account-hostauth", false, mMockContext); in testAccountSaveHostAuth()
215 Account account1get = Account.restoreAccountWithId(mMockContext, account1Id); in testAccountSaveHostAuth()
230 Account account = ProviderTestUtils.setupAccount("account-hostauth", false, mMockContext); in testAccountGetHostAuthSend()
264 Account account = ProviderTestUtils.setupAccount("account-hostauth", false, mMockContext); in testAccountGetHostAuthRecv()
302 Account account1 = ProviderTestUtils.setupAccount("parcel", false, mMockContext); in testAccountParcel()
308 Bundle b2 = new Bundle(Account.class.getClassLoader()); in testAccountParcel()
310 Account account2 = (Account) b2.getParcelable("account"); in testAccountParcel()
[all …]
DAccountBackupRestoreTests.java26 import com.android.emailcommon.provider.Account;
60 public static void assertRestoredAccountEqual(Account expect, Account actual) { in assertRestoredAccountEqual()
83 Account saved1 = in testBackupAndRestore()
90 Account saved2 = in testBackupAndRestore()
98 assertEquals(2, EmailContent.count(mMockContext, Account.CONTENT_URI)); in testBackupAndRestore()
106 cr.delete(Account.CONTENT_URI, null, null); in testBackupAndRestore()
110 assertEquals(0, EmailContent.count(mMockContext, Account.CONTENT_URI)); in testBackupAndRestore()
119 assertEquals(2, EmailContent.count(mMockContext, Account.CONTENT_URI)); in testBackupAndRestore()
123 Cursor c = cr.query(Account.CONTENT_URI, Account.CONTENT_PROJECTION, null, null, "_id ASC"); in testBackupAndRestore()
127 Account restored = new Account(); in testBackupAndRestore()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/accounts/
DAccountPreferenceControllerTest.java18 import android.accounts.Account;
96 when(mAccountManager.getAccountsAsUser(anyInt())).thenReturn(new Account[0]); in setUp()
342 Account[] accounts = {new Account("Account1", "com.acct1")}; in onResume_twoAccountsOfSameType_shouldAddThreePreferences()
345 Account[] accountType1 = new Account[2]; in onResume_twoAccountsOfSameType_shouldAddThreePreferences()
346 accountType1[0] = new Account("Account11", "com.acct1"); in onResume_twoAccountsOfSameType_shouldAddThreePreferences()
347 accountType1[1] = new Account("Account12", "com.acct1"); in onResume_twoAccountsOfSameType_shouldAddThreePreferences()
377 final Account[] accountType1 = new Account[2]; in onResume_twoAccountsOfSameName_shouldAddFivePreferences()
378 accountType1[0] = new Account("Account1", "com.acct1"); in onResume_twoAccountsOfSameName_shouldAddFivePreferences()
379 accountType1[1] = new Account("Account2", "com.acct1"); in onResume_twoAccountsOfSameName_shouldAddFivePreferences()
380 final Account[] accountType2 = new Account[2]; in onResume_twoAccountsOfSameName_shouldAddFivePreferences()
[all …]
/packages/apps/Email/src/com/android/email/activity/setup/
DAccountCreationFragment.java34 import com.android.emailcommon.provider.Account;
72 void setAccount(Account account); in setAccount()
79 public static AccountCreationFragment newInstance(Account account, boolean syncEmail, in newInstance()
167 final Account account = args.getParcelable(ACCOUNT_TAG); in onCreateLoader()
183 account.mFlags |= Account.FLAGS_INCOMPLETE; in onCreateLoader()
211 account.mFlags &= ~Account.FLAGS_INCOMPLETE; in onCreateLoader()
247 private class RefreshAccountCallbacks implements LoaderManager.LoaderCallbacks<Account> {
250 public Loader<Account> onCreateLoader(int id, Bundle args) {
251 final Account account = args.getParcelable(ACCOUNT_TAG);
252 return new MailAsyncTaskLoader<Account>(mAppContext) {
[all …]
DAccountSettingsFragment.java55 import com.android.emailcommon.provider.Account;
132 private Account mAccount;
133 private com.android.mail.providers.Account mUiAccount;
345 final android.accounts.Account androidAcct = new android.accounts.Account( in onPreferenceChange()
347 if (Integer.parseInt(summary) == Account.CHECK_INTERVAL_NEVER) { in onPreferenceChange()
366 final android.accounts.Account androidAcct = new android.accounts.Account( in onPreferenceChange()
372 final android.accounts.Account androidAcct = new android.accounts.Account( in onPreferenceChange()
378 final android.accounts.Account androidAcct = new android.accounts.Account( in onPreferenceChange()
384 int newFlags = mAccount.getFlags() & ~(Account.FLAGS_BACKGROUND_ATTACHMENTS); in onPreferenceChange()
387 Account.FLAGS_BACKGROUND_ATTACHMENTS : 0; in onPreferenceChange()
[all …]
/packages/apps/Email/emailcommon/src/com/android/emailcommon/provider/
DAccount.java43 public final class Account extends EmailContent implements Parcelable { class
199 public Account() { in Account() method in Account
209 public static Account restoreAccountWithId(Context context, long id) { in restoreAccountWithId()
213 public static Account restoreAccountWithId(Context context, long id, ContentObserver observer) { in restoreAccountWithId()
214 return EmailContent.restoreContentWithId(context, Account.class, in restoreAccountWithId()
215 Account.CONTENT_URI, Account.CONTENT_PROJECTION, id, observer); in restoreAccountWithId()
218 public static Account restoreAccountWithAddress(Context context, String emailAddress) { in restoreAccountWithAddress()
222 public static Account restoreAccountWithAddress(Context context, String emailAddress, in restoreAccountWithAddress()
243 return Account.CONTENT_URI; in getContentNotificationUri()
251 Cursor c = context.getContentResolver().query(getUri(), Account.CONTENT_PROJECTION, in refresh()
[all …]
/packages/apps/UnifiedEmail/src/com/android/mail/utils/
DAccountUtils.java18 import com.android.mail.providers.Account;
41 public static List<Account> mergeAccountLists(List<Account> inList, Account[] accounts, in mergeAccountLists()
44 List<Account> newAccountList = new ArrayList<Account>(); in mergeAccountLists()
47 for (Account account : inList) { in mergeAccountLists()
70 public static Account[] getSyncingAccounts(Context context) { in getSyncingAccounts()
73 final List<Account> accounts = Lists.newArrayList(); in getSyncingAccounts()
74 Account account; in getSyncingAccounts()
80 account = Account.builder().buildFrom(accountsCursor); in getSyncingAccounts()
91 return accounts.toArray(new Account[accounts.size()]); in getSyncingAccounts()
99 public static Account[] getAccounts(Context context) { in getAccounts()
[all …]
/packages/apps/Email/provider_src/com/android/email/provider/
DAccountReconciler.java39 import com.android.emailcommon.provider.Account;
56 private static List<android.accounts.Account> getAllAmAccounts(final Context context) { in getAllAmAccounts()
66 final ImmutableList.Builder<android.accounts.Account> builder = ImmutableList.builder(); in getAllAmAccounts()
68 final android.accounts.Account[] accounts = am.getAccountsByType(type); in getAllAmAccounts()
79 private static List<Account> getAllEmailProviderAccounts(final Context context) { in getAllEmailProviderAccounts()
80 final Cursor c = context.getContentResolver().query(Account.CONTENT_URI, in getAllEmailProviderAccounts()
81 Account.CONTENT_PROJECTION, null, null, null); in getAllEmailProviderAccounts()
86 final ImmutableList.Builder<Account> builder = ImmutableList.builder(); in getAllEmailProviderAccounts()
89 final Account account = new Account(); in getAllEmailProviderAccounts()
113 final List<android.accounts.Account> amAccounts = getAllAmAccounts(context); in reconcileAccounts()
[all …]
DDBHelper.java37 import com.android.emailcommon.provider.Account;
93 "create trigger account_delete before delete on " + Account.TABLE_NAME +
284 + HostAuth.TABLE_NAME + "," + Account.TABLE_NAME in createDeleteDuplicateMessagesTrigger()
286 + "=" + Account.TABLE_NAME + "." + AccountColumns._ID in createDeleteDuplicateMessagesTrigger()
287 + " and " + Account.TABLE_NAME + "." + AccountColumns.HOST_AUTH_KEY_RECV in createDeleteDuplicateMessagesTrigger()
460 + Account.TABLE_NAME + " for each row begin delete from " + tableName in createMessageChangeLogTableTriggers()
521 db.execSQL("create table " + Account.TABLE_NAME + s); in createAccountTable()
528 db.execSQL("drop table " + Account.TABLE_NAME); in resetAccountTable()
874 android.accounts.Account[] accounts = AccountManager.get(mContext) in onUpgrade()
876 for (android.accounts.Account account: accounts) { in onUpgrade()
[all …]
DWidgetProvider.java25 import com.android.emailcommon.provider.Account;
60 protected com.android.mail.providers.Account getAccountObject( in getAccountObject()
71 protected boolean isAccountValid(Context context, com.android.mail.providers.Account account) { in isAccountValid()
95 if (accountId == Account.NO_ACCOUNT || mailboxId == Mailbox.NO_MAILBOX) { in migrateLegacyWidgetInformation()
105 final com.android.mail.providers.Account uiAccount = getAccount(context, accountId); in migrateLegacyWidgetInformation()
123 if (accountId == Account.ACCOUNT_ID_COMBINED_VIEW) { in migrateLegacyWidgetAccountId()
142 private static com.android.mail.providers.Account getAccount(Context context, long accountId) { in getAccount()
147 com.android.mail.providers.Account uiAccount = getPopulatedAccountObject(ac); in getAccount()
152 private static com.android.mail.providers.Account getPopulatedAccountObject( in getPopulatedAccountObject()
159 com.android.mail.providers.Account uiAccount = null; in getPopulatedAccountObject()
[all …]
DFolderPickerActivity.java32 import com.android.emailcommon.provider.Account;
56 final com.android.mail.providers.Account uiAccount; in onCreate()
83 Account account = Account.restoreAccountWithId(this, mAccountId); in onCreate()
90 if ((account.mFlags & Account.FLAGS_INITIAL_FOLDER_LIST_LOADED) != 0) { in onCreate()
137 Account account = Account.restoreAccountWithId(mContext, mAccountId); in onChange()
139 if ((account.mFlags & Account.FLAGS_INITIAL_FOLDER_LIST_LOADED) != 0 && in onChange()
164 Uri uri = ContentUris.withAppendedId(Account.CONTENT_URI, mAccountId); in waitForFolders()
205 Account account = Account.restoreAccountWithId(this, mAccountId); in select()
208 ContentUris.withAppendedId(Account.CONTENT_URI, account.mId), values, in select()
/packages/apps/Email/src/com/android/email/
DEmailNotificationController.java43 import com.android.emailcommon.provider.Account;
153 Account account = Account.restoreAccountWithId(mContext, accountId); in createBaseAccountNotificationBuilder()
195 registerMessageNotification(Account.ACCOUNT_ID_COMBINED_VIEW); in watchForMessages()
200 resolver.registerContentObserver(Account.NOTIFIER_URI, true, mAccountObserver); in watchForMessages()
265 if (accountId == Account.ACCOUNT_ID_COMBINED_VIEW) { in registerMessageNotification()
267 Account.CONTENT_URI, EmailContent.ID_PROJECTION, in registerMessageNotification()
300 if (accountId == Account.ACCOUNT_ID_COMBINED_VIEW) { in unregisterMessageNotification()
322 NotificationCompat.Builder builder, Account account) { in setupSoundAndVibration()
330 com.android.mail.providers.Account uiAccount = null; in setupSoundAndVibration()
333 uiAccount = com.android.mail.providers.Account.builder().buildFrom(accountCursor); in setupSoundAndVibration()
[all …]
/packages/apps/UnifiedEmail/src/com/android/mail/providers/
DAccount.java49 public class Account implements Parcelable { class
81 private android.accounts.Account amAccount;
311 public Account buildFrom(Cursor cursor) { in buildFrom()
312 return new Account(cursor); in buildFrom()
315 public Account buildFrom(JSONObject json) throws JSONException { in buildFrom()
316 return new Account(json); in buildFrom()
319 public Account buildFrom(Parcel in, ClassLoader loader) { in buildFrom()
320 return new Account(in, loader); in buildFrom()
355 public static Account newInstance(String serializedAccount) { in newInstance()
378 protected Account(JSONObject json) throws JSONException { in Account() method in Account
[all …]
/packages/apps/Email/provider_src/com/android/email/
DSecurityPolicy.java42 import com.android.emailcommon.provider.Account;
459 Account account = Account.restoreAccountWithId(context, accountId); in setAccountHoldFlag()
479 public static void setAccountHoldFlag(Context context, Account account, boolean newState) { in setAccountHoldFlag()
481 account.mFlags |= Account.FLAGS_SECURITY_HOLD; in setAccountHoldFlag()
483 account.mFlags &= ~Account.FLAGS_SECURITY_HOLD; in setAccountHoldFlag()
499 Account account = Account.restoreAccountWithId(mContext, accountId); in policiesRequired()
522 public static void clearAccountPolicy(Context context, Account account) { in clearAccountPolicy()
536 public static void setAccountPolicy(Context context, Account account, Policy policy, in setAccountPolicy()
548 ContentUris.withAppendedId(Account.CONTENT_URI, account.mId)) in setAccountPolicy()
554 ContentUris.withAppendedId(Account.CONTENT_URI, account.mId)) in setAccountPolicy()
[all …]
/packages/apps/TV/src/com/android/tv/util/
DAccountHelper.java19 import android.accounts.Account;
42 private Account mSelectedAccount;
53 public Account getSelectedAccount() { in getSelectedAccount()
60 for (Account account : getEligibleAccounts()) { in getSelectedAccount()
73 private Account[] getEligibleAccounts() { in getEligibleAccounts()
74 return new Account[0]; in getEligibleAccounts()
83 public Account selectFirstAccount() { in selectFirstAccount()
84 Account account = getFirstEligibleAccount(); in selectFirstAccount()
97 public Account getFirstEligibleAccount() { in getFirstEligibleAccount()
98 Account[] accounts = getEligibleAccounts(); in getFirstEligibleAccount()
[all …]
/packages/apps/Email/provider_src/com/android/email/service/
DEmailBroadcastProcessorService.java43 import com.android.emailcommon.provider.Account;
158 final android.accounts.Account[] amAccounts = in updateAccountManagerAccountsOfType()
161 for (android.accounts.Account amAccount: amAccounts) { in updateAccountManagerAccountsOfType()
171 private static void removePeriodicSyncs(final android.accounts.Account amAccount, in removePeriodicSyncs()
187 final android.accounts.Account[] amAccounts = in fixPeriodicSyncs()
189 for (android.accounts.Account amAccount : amAccounts) { in fixPeriodicSyncs()
218 final Cursor c = getContentResolver().query(Account.CONTENT_URI, in getSyncIntervals()
344 Cursor c = resolver.query(Account.CONTENT_URI, Account.CONTENT_PROJECTION, in setImapDeletePolicy()
348 long recvAuthKey = c.getLong(Account.CONTENT_HOST_AUTH_KEY_RECV_COLUMN); in setImapDeletePolicy()
352 int flags = c.getInt(Account.CONTENT_FLAGS_COLUMN); in setImapDeletePolicy()
[all …]
/packages/apps/UnifiedEmail/src/com/android/mail/ui/
DAccountLoadCallbacks.java14 import com.android.mail.providers.Account;
20 public class AccountLoadCallbacks implements LoaderManager.LoaderCallbacks<ObjectCursor<Account>> {
23 void onAccountLoadCallbackFinished(ObjectCursor<Account> data); in onAccountLoadCallbackFinished()
38 public Loader<ObjectCursor<Account>> onCreateLoader(int id, Bundle args) { in onCreateLoader()
40 final CursorCreator<Account> factory = Account.FACTORY; in onCreateLoader()
41 return new ObjectCursorLoader<Account>(mContext, mAccountUri, projection, factory); in onCreateLoader()
45 public void onLoadFinished(Loader<ObjectCursor<Account>> loader, in onLoadFinished()
46 ObjectCursor<Account> data) { in onLoadFinished()
51 public void onLoaderReset(Loader<ObjectCursor<Account>> loader) { in onLoaderReset()
DMailboxSelectionActivity.java20 import com.android.mail.providers.Account;
240 selectAccount(Account.builder().buildFrom(accounts)); in updateAccountList()
260 final Account account = Account.builder().buildFrom((Cursor) getItem(position)); in updateAccountList()
271 selectAccount(Account.builder().buildFrom((Cursor) mAdapter.getItem(position))); in onItemClick()
274 private void selectAccount(Account account) { in selectAccount()
325 private void showWaitFragment(Account account) { in showWaitFragment()
368 Account account; in onLoadFinished()
369 ArrayList<Account> accounts = new ArrayList<Account>(); in onLoadFinished()
370 ArrayList<Account> initializedAccounts = new ArrayList<Account>(); in onLoadFinished()
372 account = Account.builder().buildFrom(data); in onLoadFinished()
/packages/apps/Email/src/com/android/email/preferences/
DEmailPreferenceMigrator.java29 import com.android.mail.providers.Account;
46 final List<Account> accounts = new ArrayList<Account>(); in migrate()
60 accounts.add(Account.builder().buildFrom(accountCursor)); in migrate()
72 final List<Account> accounts) { in migrate()
92 for (final Account account : accounts) { in migrate()
95 com.android.emailcommon.provider.Account.CONTENT_URI, in migrate()
96 com.android.emailcommon.provider.Account.CONTENT_PROJECTION, in migrate()
100 final com.android.emailcommon.provider.Account ecAccount = in migrate()
101 new com.android.emailcommon.provider.Account(); in migrate()
154 & com.android.emailcommon.provider.Account.FLAGS_NOTIFY_NEW_MAIL) != 0; in migrate()
[all …]
/packages/apps/UnifiedEmail/tests/src/com/android/mail/browse/
DSendersFormattingTests.java24 import com.android.mail.providers.Account;
50 final Account account = createAccount(); in testMeFromNullName()
62 final Account account = createAccount(); in testMeFromEmptyName()
75 final Account account = createAccount(); in testMeFromDuplicateEmptyNames()
90 final Account account = createAccount(); in testDuplicates()
138 final Account account = createAccount(); in testSenderAvatarIsSenderOfFirstUnreadMessage()
158 final Account account = createAccount(); in testSenderAvatarDoesNotChooseEmptyEmailAddress()
178 final Account account = createAccount(); in testSenderAvatarIsLastSenderIfAllMessagesAreRead()
198 final Account account = createAccount(); in testSenderAvatarIsLastSenderWithValidEmailAddressIfAllMessagesAreRead()
219 final Account account = createAccount(); in testSenderAvatarIsLastSenderThatIsNotTheCurrentAccountIfAllMessagesAreRead()
[all …]
/packages/apps/Email/provider_src/com/android/email/activity/setup/
DAccountSecurity.java40 import com.android.emailcommon.provider.Account;
83 private Account mAccount;
229 implements LoaderManager.LoaderCallbacks<Account> {
231 public Loader<Account> onCreateLoader(final int id, final Bundle args) { in onCreateLoader()
244 public void onLoadFinished(final Loader<Account> loader, final Account account) { in onLoadFinished()
271 public void onLoaderReset(Loader<Account> loader) {} in onLoaderReset()
274 private static class AccountAndPolicyLoader extends MailAsyncTaskLoader<Account> {
294 public Account loadInBackground() { in loadInBackground()
295 final Account account = Account.restoreAccountWithId(mContext, mAccountId); in loadInBackground()
311 protected void onDiscardResult(Account result) {} in onDiscardResult()
[all …]
/packages/apps/Contacts/tests/src/com/android/contacts/tests/
DAccountsTestHelper.java21 import android.accounts.Account;
47 private List<Account> mAddedAccounts;
63 Account newAccount = new Account(account.name, account.type); in addTestAccount()
90 final Account remove = account.getAccountOrNull(); in removeTestAccount()
101 final List<Account> accounts = Arrays.asList( in hasTestAccount()
103 return accounts.contains(new Account(name, TEST_ACCOUNT_TYPE)); in hasTestAccount()
120 for (Account account : mAddedAccounts) { in cleanup()
130 final Account[] accounts = accountManager.getAccountsByType(TEST_ACCOUNT_TYPE); in removeAccountsWithPrefix()
131 for (Account account : accounts) { in removeAccountsWithPrefix()
/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/
DSupportItemAdapterTest.java19 import android.accounts.Account;
55 private final Account USER_1 = new Account("user1", ACCOUNT_TYPE);
56 private final Account USER_2 = new Account("user2", ACCOUNT_TYPE);
57 private final Account TWO_ACCOUNTS[] = {USER_1, USER_2};
58 private final Account ONE_ACCOUNT[] = {USER_1};
59 private final Account ZERO_ACCOUNT[] = {};
160 Account accounts[]) { in testBindAccountPickerInner()
181 Account accounts[]) { in bindAccountPickerInner()

1234567891011