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

Commit 3ff9c116 authored by Yorke Lee's avatar Yorke Lee Committed by Android (Google) Code Review
Browse files

Merge "Fix ANR in UndemoteOutgoingCallReceiver"

parents ae9815fc ab9ae646
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -41,18 +41,18 @@ public class UndemoteOutgoingCallReceiver extends BroadcastReceiver {
            if (TextUtils.isEmpty(number)) {
                return;
            }
            final long id = getContactIdFromPhoneNumber(context, number);
            if (id != NO_CONTACT_FOUND) {
            final Thread thread = new Thread() {
                @Override
                public void run() {
                    final long id = getContactIdFromPhoneNumber(context, number);
                    if (id != NO_CONTACT_FOUND) {
                        undemoteContactWithId(context, id);
                    }
                }
            };
            thread.start();
        }
    }
    }

    private void undemoteContactWithId(Context context, long id) {
        final ContentValues cv = new ContentValues(1);