diff options
author | Nancy Chen <nancychen@google.com> | 2015-05-06 19:29:56 -0700 |
---|---|---|
committer | Nancy Chen <nancychen@google.com> | 2015-05-07 16:18:23 -0700 |
commit | f153bf42918a16e010f0d756c8ee6434440dc3ea (patch) | |
tree | 8a819d8674b316cad878f8ca02598454b964655f /src/com/android/dialer/CallDetailActivity.java | |
parent | d10eef28fc67aea0e4f4f49813b802ce1df5f7c7 (diff) |
Mark voicemails as old after they are read.
Currently when voicemails are marked as read, they are not also marked
as old ("new" set to 0). This means that when the phone is restarted,
the voicemails come back in the notifications bar even if they have been
read.
Also ensure the voicemail notification is dismissed when the
"play" button is pressed. Currently the voicemail is marked as old, but
the notifications are not immediately updated so there's no instant
feedback.
I split the markNewVoicemailsAsOld method from CallLogQueryHandler out
into a separate handler (VoicemailQueryHandler) because the
markNewVoicemailsAsOld method did not share any notable logic with
CallLogQueryHandler and would otherwise require creating two extra
constructors.
Bug: 20117483
Change-Id: I0f475e1a1489f1b45c8654f5ca882ccd857466e8
Diffstat (limited to 'src/com/android/dialer/CallDetailActivity.java')
-rw-r--r-- | src/com/android/dialer/CallDetailActivity.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/dialer/CallDetailActivity.java b/src/com/android/dialer/CallDetailActivity.java index dbcfa64af..7a23944a0 100644 --- a/src/com/android/dialer/CallDetailActivity.java +++ b/src/com/android/dialer/CallDetailActivity.java @@ -55,6 +55,7 @@ import com.android.contacts.common.ContactPhotoManager.DefaultImageRequest; import com.android.contacts.common.GeoUtil; import com.android.contacts.common.CallUtil; import com.android.dialer.calllog.CallDetailHistoryAdapter; +import com.android.dialer.calllog.CallLogNotificationsService; import com.android.dialer.calllog.CallTypeHelper; import com.android.dialer.calllog.ContactInfo; import com.android.dialer.calllog.ContactInfoHelper; @@ -280,6 +281,9 @@ public class CallDetailActivity extends Activity implements ProximitySensorAware values.put(Voicemails.IS_READ, true); getContentResolver().update(voicemailUri, values, Voicemails.IS_READ + " = 0", null); + Intent intent = new Intent(getBaseContext(), CallLogNotificationsService.class); + intent.setAction(CallLogNotificationsService.ACTION_MARK_NEW_VOICEMAILS_AS_OLD); + getBaseContext().startService(intent); return null; } }); |