summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-08-20 16:47:40 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-20 16:47:40 +0000
commit296b40baee914b149a496db0abe706a6c042d97e (patch)
tree12e04dc7421d6803b55a0efac959a34ef811f649
parent54a973981115c8af2c96fab24e6520c39b9972ab (diff)
parente2f52619318af486a4fef2bca86c8237c46603f6 (diff)
Merge "Don't undemote if number of outgoing call is empty" into klp-dev
-rw-r--r--src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java b/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java
index 8782ce426..d32e39ff9 100644
--- a/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java
+++ b/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java
@@ -24,6 +24,7 @@ import android.database.Cursor;
import android.net.Uri;
import android.provider.ContactsContract.PhoneLookup;
import android.provider.ContactsContract.PinnedPositions;
+import android.text.TextUtils;
/**
* This broadcast receiver is used to listen to outgoing calls and undemote formerly demoted
@@ -37,6 +38,9 @@ public class UndemoteOutgoingCallReceiver extends BroadcastReceiver {
public void onReceive(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)) {
+ return;
+ }
final long id = getContactIdFromPhoneNumber(context, number);
if (id != NO_CONTACT_FOUND) {
undemoteContactWithId(context, id);