diff options
Diffstat (limited to 'java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java')
-rw-r--r-- | java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java b/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java index dca992789..30461a4be 100644 --- a/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java +++ b/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java @@ -21,7 +21,6 @@ import android.content.ContentValues; import android.content.Context; import android.content.OperationApplicationException; import android.database.Cursor; -import android.net.Uri; import android.os.RemoteException; import android.support.annotation.MainThread; import android.support.annotation.WorkerThread; @@ -268,12 +267,16 @@ public final class PhoneLookupDataSource contentValues.put(PhoneLookupHistory.PHONE_LOOKUP_INFO, phoneLookupInfo.toByteArray()); contentValues.put(PhoneLookupHistory.LAST_MODIFIED, currentTimestamp); operations.add( - ContentProviderOperation.newUpdate(numberUri(normalizedNumber)) + ContentProviderOperation.newUpdate( + PhoneLookupHistory.contentUriForNumber(normalizedNumber)) .withValues(contentValues) .build()); } for (String normalizedNumber : phoneLookupHistoryRowsToDelete) { - operations.add(ContentProviderOperation.newDelete(numberUri(normalizedNumber)).build()); + operations.add( + ContentProviderOperation.newDelete( + PhoneLookupHistory.contentUriForNumber(normalizedNumber)) + .build()); } appContext.getContentResolver().applyBatch(PhoneLookupHistoryContract.AUTHORITY, operations); return null; @@ -596,8 +599,4 @@ public final class PhoneLookupDataSource contentValues.put( AnnotatedCallLog.CP2_INFO_INCOMPLETE, phoneLookupInfo.getCp2LocalInfo().getIsIncomplete()); } - - private static Uri numberUri(String number) { - return PhoneLookupHistory.CONTENT_URI.buildUpon().appendEncodedPath(number).build(); - } } |