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

Commit c31ed856 authored by Jay Shrauner's avatar Jay Shrauner Committed by Android Git Automerger
Browse files

am 5aadb11c: am fa526431: Merge "Fix ANR in UndemoteOutgoingCallReceiver" into klp-dev

* commit '5aadb11c':
  Fix ANR in UndemoteOutgoingCallReceiver
parents f83fc5a5 5aadb11c
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);