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

Commit 30363a22 authored by Gary Mai's avatar Gary Mai
Browse files

Fix ContactEditorActivity aliases

This manifested as a bug where ContactSaveService wouldn't notify
the editor activity since the alias component name wouldn't match
the actual class name of the activity.
This is already fixed in master-dev by the work to change from
callback intents to local broadcast manager.

Test: Manually verified creating a new contact using
Dialer's static shortcut actually saves the contact
and opens QuickContact like the Contacts version does.

Bug: 34154706
Change-Id: Ib8416836b88cfd8ae9dafd4c65a817540e07dbc3
(cherry picked from commit 8ad86750)
parent d6c58b89
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.contacts.activities;

import android.app.Dialog;
import android.app.FragmentTransaction;
import android.content.ComponentName;
import android.content.ContentValues;
import android.content.Intent;
import android.net.Uri;
@@ -318,6 +319,11 @@ public class ContactEditorActivity extends AppCompatContactsActivity implements
        final Intent intent = getIntent();
        final String action = intent.getAction();

        // Update the component name of our intent to be this class to clear out any activity
        // aliases. Otherwise ContactSaveService won't notify this activity once a save is finished.
        // See b/34154706 for more info.
        intent.setComponent(new ComponentName(this, ContactEditorActivity.class));

        // Determine whether or not this activity should be finished after the user is done
        // editing the contact or if this activity should launch another activity to view the
        // contact's details.