diff options
Diffstat (limited to 'java/com/android/dialer/calllog')
-rw-r--r-- | java/com/android/dialer/calllog/database/MutationApplier.java | 6 | ||||
-rw-r--r-- | java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java | 13 |
2 files changed, 9 insertions, 10 deletions
diff --git a/java/com/android/dialer/calllog/database/MutationApplier.java b/java/com/android/dialer/calllog/database/MutationApplier.java index eee810eb8..2fb52558e 100644 --- a/java/com/android/dialer/calllog/database/MutationApplier.java +++ b/java/com/android/dialer/calllog/database/MutationApplier.java @@ -68,7 +68,7 @@ public class MutationApplier { if (!mutations.getInserts().isEmpty()) { LogUtil.i( - "CallLogMutations.applyToDatabase", "inserting %d rows", mutations.getInserts().size()); + "MutationApplier.applyToDatabase", "inserting %d rows", mutations.getInserts().size()); for (Entry<Long, ContentValues> entry : mutations.getInserts().entrySet()) { long id = entry.getKey(); ContentValues contentValues = entry.getValue(); @@ -82,7 +82,7 @@ public class MutationApplier { if (!mutations.getUpdates().isEmpty()) { LogUtil.i( - "CallLogMutations.applyToDatabase", "updating %d rows", mutations.getUpdates().size()); + "MutationApplier.applyToDatabase", "updating %d rows", mutations.getUpdates().size()); for (Entry<Long, ContentValues> entry : mutations.getUpdates().entrySet()) { long id = entry.getKey(); ContentValues contentValues = entry.getValue(); @@ -96,7 +96,7 @@ public class MutationApplier { if (!mutations.getDeletes().isEmpty()) { LogUtil.i( - "CallLogMutations.applyToDatabase", "deleting %d rows", mutations.getDeletes().size()); + "MutationApplier.applyToDatabase", "deleting %d rows", mutations.getDeletes().size()); String[] questionMarks = new String[mutations.getDeletes().size()]; Arrays.fill(questionMarks, "?"); 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(); - } } |