Commit 35920d0f authored by Junjie Hu's avatar Junjie Hu
Browse files

Fix CTS android.provider package...

Fix CTS android.provider package testAccountRemovalWithMergedContact_doesNotDeleteContactAndTimestampUpdated seldom fail issue

After calling mAccountManager.addAccountExplicitly(ACCT_1, null, null),
if broadcast process of account manager delays some time,  onaccountsupdate()
 interface of ContactsProvider will delete contact data of account2 as
 non-system account added by calling createAndAssertMergedContact(ACCT_1, ACCT_2), so the function createAndAssertMergedContact() will fail.

The fix suggestion is:  call addAccountExplicity(ACCT_2,null,null) function to
add account2, so that "account2" will not be deleted in onaccountsupdate()
 function as system account, although these broadcast delay. Also to remove
 account2 by calling mAccountManager.removeAccount(ACCT_2, null, null) at the
 end of the case.

Change-Id: I59e1a9a0e2c98b3f132c9265ade59981a3ebc9b0
parent 1e4c926e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment