summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-09-05 14:13:11 -0700
committerYorke Lee <yorkelee@google.com>2013-09-05 14:13:11 -0700
commita3ce90e2cbab33692837cc01ac12d0b48ab399f0 (patch)
tree30125cd5b3c36433502000e70365088202d2e9de
parent55d46030f7e08c60eb0f8d4d271db1a1329572dc (diff)
Don't undemote contact on UI thread
Bug: 10606244 Change-Id: I2581a499e77eff058a3768280c75c005e2b6cefd
-rw-r--r--src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java10
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();
}
}
}