summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-08-19 09:18:56 -0700
committerYorke Lee <yorkelee@google.com>2013-08-19 09:18:56 -0700
commite2f52619318af486a4fef2bca86c8237c46603f6 (patch)
tree4b2169e213afd4b7710b24cb5e4d1c431727fbaf
parentd79227c12c925806fe2a40b3d7ac5a6a53096701 (diff)
Don't undemote if number of outgoing call is empty
Bug: 10387346 Change-Id: I3276afe4d7f0e5541432f0b937d76bbd63e3a9b9
-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);