diff options
author | twyen <twyen@google.com> | 2017-08-01 17:23:38 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-08-02 06:45:23 -0700 |
commit | b9fd26e9c61745126ea19f5067406a5d26ea7133 (patch) | |
tree | 974c887c02498a750de29abafef2e963d2d961d4 /java/com | |
parent | aaf6b45229a8734685614d39379502de249f9656 (diff) |
Prevent new voicemail notifications from being cleared if a voicemail is expanded
Binding a view holder to an expanded voicemail will attempt to mark the voicemail as read and all voicemails as old. If a new voicemail is received when a voicemail is expanded, the new voicemail will cause a rebind and the notification will be canceled right away.
In this CL, voicemails will only be marked as old if the expanded voicemail was not already read.
Bug: 64211487
Test: CallLogAsyncTaskUtilTest
PiperOrigin-RevId: 163912108
Change-Id: Ibe82fe85984d84aad1a674219ca984fdd10c6d89
Diffstat (limited to 'java/com')
-rw-r--r-- | java/com/android/dialer/app/calllog/CallLogAsyncTaskUtil.java | 3 | ||||
-rw-r--r-- | java/com/android/dialer/app/calllog/CallLogNotificationsService.java | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/java/com/android/dialer/app/calllog/CallLogAsyncTaskUtil.java b/java/com/android/dialer/app/calllog/CallLogAsyncTaskUtil.java index b1ad0d9a2..78ec7a695 100644 --- a/java/com/android/dialer/app/calllog/CallLogAsyncTaskUtil.java +++ b/java/com/android/dialer/app/calllog/CallLogAsyncTaskUtil.java @@ -66,9 +66,8 @@ public class CallLogAsyncTaskUtil { .update(voicemailUri, values, Voicemails.IS_READ + " = 0", null) > 0) { uploadVoicemailLocalChangesToServer(context); + CallLogNotificationsService.markAllNewVoicemailsAsOld(context); } - - CallLogNotificationsService.markAllNewVoicemailsAsOld(context); return null; } }); diff --git a/java/com/android/dialer/app/calllog/CallLogNotificationsService.java b/java/com/android/dialer/app/calllog/CallLogNotificationsService.java index 536255a2a..0490b9932 100644 --- a/java/com/android/dialer/app/calllog/CallLogNotificationsService.java +++ b/java/com/android/dialer/app/calllog/CallLogNotificationsService.java @@ -50,7 +50,8 @@ import com.android.dialer.util.PermissionsUtil; */ public class CallLogNotificationsService extends IntentService { - private static final String ACTION_MARK_ALL_NEW_VOICEMAILS_AS_OLD = + @VisibleForTesting + static final String ACTION_MARK_ALL_NEW_VOICEMAILS_AS_OLD = "com.android.dialer.calllog.ACTION_MARK_ALL_NEW_VOICEMAILS_AS_OLD"; private static final String ACTION_MARK_SINGLE_NEW_VOICEMAIL_AS_OLD = |