diff options
author | Yorke Lee <yorkelee@google.com> | 2013-09-05 16:58:04 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-09-05 16:58:04 -0700 |
commit | be9f607e90c6d3def6b930e025567dd17ff7d2fa (patch) | |
tree | b61c284d93f5803da0a7870ec6d132746b8d341e | |
parent | ce1abbc31525b5af1d634aaf140a989f3c9e212d (diff) | |
parent | 6276f093cf16a4797f43d53a76e3a8e5a279ea22 (diff) |
am 6276f093: Merge "Don\'t undemote contact on UI thread" into klp-dev
* commit '6276f093cf16a4797f43d53a76e3a8e5a279ea22':
Don't undemote contact on UI thread
-rw-r--r-- | src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java b/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java index d32e39ff9..30d01d2f8 100644 --- a/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java +++ b/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java @@ -35,7 +35,7 @@ public class UndemoteOutgoingCallReceiver extends BroadcastReceiver { private static final long NO_CONTACT_FOUND = -1; @Override - public void onReceive(Context context, Intent intent) { + public void onReceive(final Context context, Intent intent) { if (intent != null && Intent.ACTION_NEW_OUTGOING_CALL.equals(intent.getAction())) { final String number = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER); if (TextUtils.isEmpty(number)) { @@ -43,7 +43,13 @@ public class UndemoteOutgoingCallReceiver extends BroadcastReceiver { } final long id = getContactIdFromPhoneNumber(context, number); if (id != NO_CONTACT_FOUND) { - undemoteContactWithId(context, id); + final Thread thread = new Thread() { + @Override + public void run() { + undemoteContactWithId(context, id); + } + }; + thread.start(); } } } |