summaryrefslogtreecommitdiffstats
path: root/src/com/android/contacts/editor/ContactEditorFragment.java
diff options
context:
space:
mode:
authorWalter Jang <wjang@google.com>2015-02-11 20:09:05 -0800
committerWalter Jang <wjang@google.com>2015-02-13 17:56:09 -0800
commit49ed2033f83005f92c30068ae33c3138d75e1825 (patch)
treeb99881b1170bb6c38b08bd9f10f91485ad9d9566 /src/com/android/contacts/editor/ContactEditorFragment.java
parent3918c3178b882c42cc41d3245ef61527200fb15b (diff)
downloadpackages_apps_Contacts-49ed2033f83005f92c30068ae33c3138d75e1825.tar.gz
packages_apps_Contacts-49ed2033f83005f92c30068ae33c3138d75e1825.tar.bz2
packages_apps_Contacts-49ed2033f83005f92c30068ae33c3138d75e1825.zip
Wire up saving edits using the compact contact editor
Also fix refreshing the edit activity data after joining Bug 19124091 Change-Id: I161e38d9eaea89e3d090986d2b52cb6f8ee85422
Diffstat (limited to 'src/com/android/contacts/editor/ContactEditorFragment.java')
-rw-r--r--src/com/android/contacts/editor/ContactEditorFragment.java32
1 files changed, 8 insertions, 24 deletions
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java
index f30360c3d..236c977a8 100644
--- a/src/com/android/contacts/editor/ContactEditorFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorFragment.java
@@ -35,11 +35,9 @@ import android.widget.ListPopupWindow;
import com.android.contacts.ContactSaveService;
import com.android.contacts.R;
import com.android.contacts.activities.ContactEditorActivity;
-import com.android.contacts.activities.ContactEditorBaseActivity.ContactEditor;
import com.android.contacts.common.model.AccountTypeManager;
import com.android.contacts.common.model.RawContactDelta;
import com.android.contacts.common.model.RawContactDeltaList;
-import com.android.contacts.common.model.RawContactModifier;
import com.android.contacts.common.model.ValuesDelta;
import com.android.contacts.common.model.account.AccountType;
import com.android.contacts.common.model.account.AccountWithDataSet;
@@ -62,7 +60,6 @@ import java.util.List;
* Contact editor with all fields displayed.
*/
public class ContactEditorFragment extends ContactEditorBaseFragment implements
- ContactEditor, SplitContactConfirmationDialogFragment.Listener,
RawContactReadOnlyEditorView.Listener {
private static final String KEY_EXPANDED_EDITORS = "expandedEditors";
@@ -379,27 +376,6 @@ public class ContactEditorFragment extends ContactEditorBaseFragment implements
}
}
- private void saveDefaultAccountIfNecessary() {
- // Verify that this is a newly created contact, that the contact is composed of only
- // 1 raw contact, and that the contact is not a user profile.
- if (!Intent.ACTION_INSERT.equals(mAction) && mState.size() == 1 &&
- !isEditingUserProfile()) {
- return;
- }
-
- // Find the associated account for this contact (retrieve it here because there are
- // multiple paths to creating a contact and this ensures we always have the correct
- // account).
- final RawContactDelta rawContactDelta = mState.get(0);
- String name = rawContactDelta.getAccountName();
- String type = rawContactDelta.getAccountType();
- String dataSet = rawContactDelta.getDataSet();
-
- AccountWithDataSet account = (name == null || type == null) ? null :
- new AccountWithDataSet(name, type, dataSet);
- mEditorUtils.saveDefaultAndAllAccounts(account);
- }
-
private void addAccountSwitcher(
final RawContactDelta currentState, BaseRawContactEditorView editor) {
final AccountWithDataSet currentAccount = new AccountWithDataSet(
@@ -482,6 +458,14 @@ public class ContactEditorFragment extends ContactEditorBaseFragment implements
super.onActivityResult(requestCode, resultCode, data);
}
+ @Override
+ protected void joinAggregate(final long contactId) {
+ final Intent intent = ContactSaveService.createJoinContactsIntent(
+ mContext, mContactIdForJoin, contactId, mContactWritableForJoin,
+ ContactEditorActivity.class, ContactEditorActivity.ACTION_JOIN_COMPLETED);
+ mContext.startService(intent);
+ }
+
/**
* Sets the photo stored in mPhoto and writes it to the RawContact with the given id
*/