From e2f52619318af486a4fef2bca86c8237c46603f6 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Mon, 19 Aug 2013 09:18:56 -0700 Subject: Don't undemote if number of outgoing call is empty Bug: 10387346 Change-Id: I3276afe4d7f0e5541432f0b937d76bbd63e3a9b9 --- src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit v1.2.3