Prevent device default account from sticking.
When a Google account is added and the default is the null device account then
the default should be cleared.
Test
ran unit tests:
$ adb shell am instrument -w com.android.contacts.tests/android.test.InstrumentationTestRunner
Manual test
* Setup nexus phone with no Google account but one outlook account
* Set default to "Device"
* Create new contact and verify that editor shows "Device"
* Add Google Account
* Create new contact and verify that default account chooser is displayed
* Choose the Google account
* verify that editor shows Google Account
* Remove Google account
* verify that default account chooser is shown again when creating new contact
* Set default to Outlook account
* Add Google account
* Create new contact
* verify that account picker is not shown and editor shows outlook
Bug 31603714
Change-Id: I46c87107727a8b50117e70066a4ef4d162970e84
17 files changed