summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzachh <zachh@google.com>2018-01-17 15:32:03 -0800
committerCopybara-Service <copybara-piper@google.com>2018-01-17 16:36:12 -0800
commitb494ce8c015cf54a28a47f44791dc95ea6c25aad (patch)
tree619cd5e73fd860732eb0adce52a990941558e515
parent73c65793a6fc191d5124739d7b37c41d5f61c671 (diff)
Support deleting PhoneLookupHistory rows with empty phone numbers.
Test: unit PiperOrigin-RevId: 182280850 Change-Id: I51a89f50d56af344425d5f67c6bcaa3928b457e9
-rw-r--r--java/com/android/dialer/phonelookup/database/PhoneLookupHistoryContentProvider.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/java/com/android/dialer/phonelookup/database/PhoneLookupHistoryContentProvider.java b/java/com/android/dialer/phonelookup/database/PhoneLookupHistoryContentProvider.java
index e20e81369..1c20b10e9 100644
--- a/java/com/android/dialer/phonelookup/database/PhoneLookupHistoryContentProvider.java
+++ b/java/com/android/dialer/phonelookup/database/PhoneLookupHistoryContentProvider.java
@@ -30,7 +30,6 @@ import android.net.Uri;
import android.support.annotation.IntDef;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
-import android.text.TextUtils;
import com.android.dialer.common.Assert;
import com.android.dialer.common.LogUtil;
import com.android.dialer.phonelookup.database.contract.PhoneLookupHistoryContract;
@@ -190,7 +189,8 @@ public class PhoneLookupHistoryContentProvider extends ContentProvider {
Assert.checkArgument(
selectionArgs == null, "Do not specify selection args when deleting by number");
String number = Uri.decode(uri.getQueryParameter(PhoneLookupHistory.NUMBER_QUERY_PARAM));
- Assert.checkArgument(!TextUtils.isEmpty(number), "error parsing number from uri: %s", uri);
+ Assert.checkArgument(
+ number != null, "error parsing number from uri: %s", LogUtil.sanitizePii(uri));
selection = PhoneLookupHistory.NORMALIZED_NUMBER + "= ?";
selectionArgs = new String[] {number};
break;