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

Commit 9674eee8 authored by Marcus Hagerott's avatar Marcus Hagerott Committed by Android (Google) Code Review
Browse files

Merge "Prevent editor from closing after account is added" into ub-contactsdialer-i-dev

parents 12d0cf18 80ab7ea6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -366,7 +366,8 @@ public class AttachPhotoActivity extends ContactsActivity {

        final List<AccountWithDataSet> accounts = AccountInfo.extractAccounts(accountInfos);
        if (editorUtils.shouldShowAccountChangedNotification(accounts)) {
            Intent intent = new Intent(this, ContactEditorAccountsChangedActivity.class);
            Intent intent = new Intent(this, ContactEditorAccountsChangedActivity.class)
                    .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
            startActivityForResult(intent, REQUEST_PICK_DEFAULT_ACCOUNT_FOR_NEW_CONTACT);
        } else {
            // Otherwise, there should be a default account. Then either create a null contact
+0 −4
Original line number Diff line number Diff line
@@ -18,10 +18,8 @@ package com.android.contacts.activities;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.LoaderManager;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.Loader;
import android.os.Bundle;
import android.provider.ContactsContract.Intents;
import android.view.View;
@@ -36,13 +34,11 @@ import com.android.contacts.R;
import com.android.contacts.editor.ContactEditorUtils;
import com.android.contacts.model.AccountTypeManager;
import com.android.contacts.model.account.AccountInfo;
import com.android.contacts.model.account.AccountType;
import com.android.contacts.model.account.AccountWithDataSet;
import com.android.contacts.model.account.AccountsLoader;
import com.android.contacts.util.AccountsListAdapter;
import com.android.contacts.util.AccountsListAdapter.AccountListFilter;
import com.android.contacts.util.ImplicitIntentsUtil;
import com.google.common.util.concurrent.Futures;

import java.util.List;

+1 −1
Original line number Diff line number Diff line
@@ -1016,7 +1016,7 @@ public class ContactEditorFragment extends Fragment implements
        if (mEditorUtils.shouldShowAccountChangedNotification(accounts)) {
            Intent intent = new Intent(mContext, ContactEditorAccountsChangedActivity.class);
            // Prevent a second instance from being started on rotates
            intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
            intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
            mStatus = Status.SUB_ACTIVITY;
            startActivityForResult(intent, REQUEST_CODE_ACCOUNTS_CHANGED);
        } else {