diff options
author | LuK1337 <priv.luk@gmail.com> | 2021-02-03 14:26:53 +0100 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2021-10-18 14:33:47 +0200 |
commit | 98033730da5ba29c294540b376d44b35337f3ce6 (patch) | |
tree | d3235ce6fa23152581055d0d60ca2cba64b3014b /java | |
parent | 4b4f5119bf3b6609e3c3f5bf73078571bb85d299 (diff) |
Dialer: Notify content observers upon call log entry deletion
* This change makes call log refresh its data after deleting an entry.
Change-Id: Iaa8a559cd02853be05b69cd2daca1e321679369e
Diffstat (limited to 'java')
4 files changed, 10 insertions, 0 deletions
diff --git a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java index 1d50a82ac..b61fdc80d 100644 --- a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java +++ b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java @@ -1395,6 +1395,9 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder Calls.CONTENT_URI, CallLog.Calls._ID + " IN (" + callIdsStr + ")" /* where */, null /* selectionArgs */); + context + .getContentResolver() + .notifyChange(Calls.CONTENT_URI, null); } return null; diff --git a/java/com/android/dialer/app/calllog/ClearCallLogDialog.java b/java/com/android/dialer/app/calllog/ClearCallLogDialog.java index 197d2dad4..bea06d31a 100644 --- a/java/com/android/dialer/app/calllog/ClearCallLogDialog.java +++ b/java/com/android/dialer/app/calllog/ClearCallLogDialog.java @@ -101,6 +101,7 @@ public class ClearCallLogDialog extends DialogFragment { @Override public Void doInBackground(@Nullable Void unused) throws Throwable { appContext.getContentResolver().delete(Calls.CONTENT_URI, null, null); + appContext.getContentResolver().notifyChange(Calls.CONTENT_URI, null); CachedNumberLookupService cachedNumberLookupService = PhoneNumberCache.get(appContext).getCachedNumberLookupService(); if (cachedNumberLookupService != null) { diff --git a/java/com/android/dialer/calldetails/CallDetailsActivityCommon.java b/java/com/android/dialer/calldetails/CallDetailsActivityCommon.java index 79e761368..808d08cda 100644 --- a/java/com/android/dialer/calldetails/CallDetailsActivityCommon.java +++ b/java/com/android/dialer/calldetails/CallDetailsActivityCommon.java @@ -277,6 +277,9 @@ abstract class CallDetailsActivityCommon extends AppCompatActivity { context .getContentResolver() .delete(Calls.CONTENT_URI, selection.getSelection(), selection.getSelectionArgs()); + context + .getContentResolver() + .notifyChange(Calls.CONTENT_URI, null); return null; } diff --git a/java/com/android/dialer/calllog/ui/menu/DeleteCallLogItemModule.java b/java/com/android/dialer/calllog/ui/menu/DeleteCallLogItemModule.java index a929961d6..c5ade3d36 100644 --- a/java/com/android/dialer/calllog/ui/menu/DeleteCallLogItemModule.java +++ b/java/com/android/dialer/calllog/ui/menu/DeleteCallLogItemModule.java @@ -100,6 +100,9 @@ final class DeleteCallLogItemModule implements HistoryItemActionModule { context .getContentResolver() .delete(Calls.CONTENT_URI, selection.getSelection(), selection.getSelectionArgs()); + context + .getContentResolver() + .notifyChange(Calls.CONTENT_URI, null); if (numRowsDeleted != coalescedIds.getCoalescedIdCount()) { LogUtil.e( |