summaryrefslogtreecommitdiffstats
path: root/java/com/android/incallui/PhoneLookupHistoryRecorder.java
diff options
context:
space:
mode:
authorzachh <zachh@google.com>2018-01-11 14:05:10 -0800
committerCopybara-Service <copybara-piper@google.com>2018-01-11 14:23:40 -0800
commit4ee24a9492c7c83952f59ecc54071c31aa68fa86 (patch)
tree88259dfd2edf1eefdbb367cd93bc7dfd6a7db548 /java/com/android/incallui/PhoneLookupHistoryRecorder.java
parent5dd30438fd3e4384b57cef3c7606ec20fad9b50d (diff)
downloadandroid_packages_apps_Dialer-4ee24a9492c7c83952f59ecc54071c31aa68fa86.tar.gz
android_packages_apps_Dialer-4ee24a9492c7c83952f59ecc54071c31aa68fa86.tar.bz2
android_packages_apps_Dialer-4ee24a9492c7c83952f59ecc54071c31aa68fa86.zip
Fixed bug in handling of empty numbers in new call log.
Empty numbers were not being inserted into PhoneLookupHistory because the URI "content://.../PhoneLookupHistory/" is treated the same as "content://.../PhoneLookupHistory" (w/o the trailing slash). This caused the update (i.e. replace) operation to incorrectly update all rows in the table when it should have updated a single row. The fix for this was to switch to a query parameter, so the empty number URI now looks like "content://.../PhoneLookupHistory?number=" Also improved some logging while debugging this problem. Bug: 71866050 Test: unit and manual PiperOrigin-RevId: 181659081 Change-Id: Idec4fb77e74920cd5485620b0a997db03aa8ff9b
Diffstat (limited to 'java/com/android/incallui/PhoneLookupHistoryRecorder.java')
-rw-r--r--java/com/android/incallui/PhoneLookupHistoryRecorder.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/java/com/android/incallui/PhoneLookupHistoryRecorder.java b/java/com/android/incallui/PhoneLookupHistoryRecorder.java
index 667c0d1cc..8517deb65 100644
--- a/java/com/android/incallui/PhoneLookupHistoryRecorder.java
+++ b/java/com/android/incallui/PhoneLookupHistoryRecorder.java
@@ -66,10 +66,7 @@ final class PhoneLookupHistoryRecorder {
appContext
.getContentResolver()
.update(
- PhoneLookupHistory.CONTENT_URI
- .buildUpon()
- .appendEncodedPath(normalizedNumber.get())
- .build(),
+ PhoneLookupHistory.contentUriForNumber(normalizedNumber.get()),
contentValues,
null,
null);