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

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

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

* commit 'fa526431':
  Fix ANR in UndemoteOutgoingCallReceiver
parents 9108e3d0 fa526431
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);