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
diff --git a/src/com/android/contacts/editor/CompactRawContactsEditorView.java b/src/com/android/contacts/editor/CompactRawContactsEditorView.java
index f43d974..40f670a 100644
--- a/src/com/android/contacts/editor/CompactRawContactsEditorView.java
+++ b/src/com/android/contacts/editor/CompactRawContactsEditorView.java
@@ -632,7 +632,7 @@
         mIsUserProfile = isUserProfile;
         mPrimaryAccount = primaryAccount;
         if (mPrimaryAccount == null) {
-            mPrimaryAccount = ContactEditorUtils.getInstance(getContext()).getDefaultAccount();
+            mPrimaryAccount = ContactEditorUtils.create(getContext()).getOnlyOrDefaultAccount();
         }
         vlog("state: primary " + mPrimaryAccount);