Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8deacfc9 authored by Walter Jang's avatar Walter Jang Committed by Android (Google) Code Review
Browse files

Merge "Merge base and compact editor fragments"

parents a8c5e77f 7b0970fd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ import com.android.contacts.common.util.AccountsListAdapter.AccountListFilter;
import com.android.contacts.common.util.DeviceAccountPresentationValues;
import com.android.contacts.common.util.ImplicitIntentsUtil;
import com.android.contacts.common.util.ViewUtil;
import com.android.contacts.editor.ContactEditorBaseFragment;
import com.android.contacts.editor.CompactContactEditorFragment;
import com.android.contacts.editor.SelectAccountDialogFragment;
import com.android.contacts.group.GroupListItem;
import com.android.contacts.group.GroupMembersFragment;
@@ -575,7 +575,7 @@ public abstract class ContactsDrawerActivity extends AppCompatContactsActivity i
    private Intent createPreferenceIntent() {
        final Intent intent = new Intent(this, ContactsPreferenceActivity.class);
        intent.putExtra(ContactsPreferenceActivity.EXTRA_NEW_LOCAL_PROFILE,
                ContactEditorBaseFragment.INTENT_EXTRA_NEW_LOCAL_PROFILE);
                CompactContactEditorFragment.INTENT_EXTRA_NEW_LOCAL_PROFILE);
        intent.putExtra(ContactsPreferenceActivity.EXTRA_MODE_FULLY_EXPANDED,
                QuickContactActivity.MODE_FULLY_EXPANDED);
        intent.putExtra(ContactsPreferenceActivity.EXTRA_PREVIOUS_SCREEN_TYPE,
+5 −6
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ import com.android.contacts.common.util.ImplicitIntentsUtil;
import com.android.contacts.detail.PhotoSelectionHandler;
import com.android.contacts.editor.CompactContactEditorFragment;
import com.android.contacts.editor.CompactPhotoSelectionFragment;
import com.android.contacts.editor.ContactEditorBaseFragment;
import com.android.contacts.editor.EditorIntents;
import com.android.contacts.editor.PhotoSourceDialogFragment;
import com.android.contacts.interactions.ContactDeletionInteraction;
@@ -154,7 +153,7 @@ public class CompactContactEditorActivity extends ContactsActivity implements
        /**
         * Sets the hosting Activity that will receive callbacks from the contact editor.
         */
        void setListener(ContactEditorBaseFragment.Listener listener);
        void setListener(CompactContactEditorFragment.Listener listener);

        /**
         * Initialize the contact editor.
@@ -273,8 +272,8 @@ public class CompactContactEditorActivity extends ContactsActivity implements
    private int mPhotoMode;
    private boolean mIsPhotoSelection;

    private final ContactEditorBaseFragment.Listener  mFragmentListener =
            new ContactEditorBaseFragment.Listener() {
    private final CompactContactEditorFragment.Listener  mFragmentListener =
            new CompactContactEditorFragment.Listener() {

                @Override
                public void onDeleteRequested(Uri contactUri) {
@@ -481,11 +480,11 @@ public class CompactContactEditorActivity extends ContactsActivity implements
            mFragment.setIntentExtras(intent.getExtras());
        } else if (ACTION_SAVE_COMPLETED.equals(action)) {
            mFragment.onSaveCompleted(true,
                    intent.getIntExtra(ContactEditorBaseFragment.SAVE_MODE_EXTRA_KEY,
                    intent.getIntExtra(CompactContactEditorFragment.SAVE_MODE_EXTRA_KEY,
                            ContactEditor.SaveMode.CLOSE),
                    intent.getBooleanExtra(ContactSaveService.EXTRA_SAVE_SUCCEEDED, false),
                    intent.getData(),
                    intent.getLongExtra(ContactEditorBaseFragment.JOIN_CONTACT_ID_EXTRA_KEY, -1));
                    intent.getLongExtra(CompactContactEditorFragment.JOIN_CONTACT_ID_EXTRA_KEY, -1));
        } else if (ACTION_JOIN_COMPLETED.equals(action)) {
            mFragment.onJoinCompleted(intent.getData());
        }
+1 −1
Original line number Diff line number Diff line
@@ -694,7 +694,7 @@ public class RawContactModifier {
                final Integer type = values.getAsInteger(Phone.TYPE);
                // If the provided phone number provides a custom phone type but not a label,
                // replace it with mobile (by default) to avoid the "Enter custom label" from
                // popping up immediately upon entering the ContactEditorBaseFragment
                // popping up immediately upon entering the CompactContactEditorFragment
                if (type != null && type == Phone.TYPE_CUSTOM &&
                        TextUtils.isEmpty(values.getAsString(Phone.LABEL))) {
                    values.put(Phone.TYPE, Phone.TYPE_MOBILE);
+2 −2
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ public class CancelEditDialogFragment extends DialogFragment {
     * Shows a {@link CancelEditDialogFragment} after setting the given Fragment as the
     * target of the dialog.
     */
    public static void show(ContactEditorBaseFragment fragment) {
    public static void show(CompactContactEditorFragment fragment) {
        final CancelEditDialogFragment dialog = new CancelEditDialogFragment();
        dialog.setTargetFragment(fragment, 0);
        dialog.show(fragment.getFragmentManager(), TAG);
+1637 −13

File changed.

Preview size limit exceeded, changes collapsed.

Loading