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
Loading
Please sign in to comment