From 651212d37db9aa6d03b30a8a09a2a44627862eea Mon Sep 17 00:00:00 2001 From: Flavio Lerda Date: Thu, 21 Jul 2011 16:53:59 +0100 Subject: Add IS_READ column in call log and voicemail providers. Initially we had exposed NEW in the voicemail provider instead of the IS_READ field. However, NEW is already used in the call log to represent a missed call for which a notification needs to be shown to the user. On the other hand, voicemail need both be shown in a notification and retain their own read/unread state, which is determined by whether the user has opened the details of the voicemail. This change introduces the IS_READ field for voicemails and exposes it also via the call log content provider. The NEW column in the voicemail content provider will be removed in a follow-up. Bug: 5036195 Change-Id: I2f8c04685a82cbf77f4778cf057ff62c7da1256a --- core/java/android/provider/CallLog.java | 10 ++++++++++ core/java/android/provider/VoicemailContract.java | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/core/java/android/provider/CallLog.java b/core/java/android/provider/CallLog.java index 382fcf3..e23d6f3 100644 --- a/core/java/android/provider/CallLog.java +++ b/core/java/android/provider/CallLog.java @@ -184,6 +184,16 @@ public class CallLog { public static final String VOICEMAIL_URI = "voicemail_uri"; /** + * Whether this item has been read or otherwise consumed by the user. + *

+ * Unlike the {@link #NEW} field, which requires the user to have acknowledged the + * existence of the entry, this implies the user has interacted with the entry. + *

Type: INTEGER (boolean)

+ * @hide + */ + public static final String IS_READ = "is_read"; + + /** * Adds a call to the call log. * * @param ci the CallerInfo object to get the target contact from. Can be null diff --git a/core/java/android/provider/VoicemailContract.java b/core/java/android/provider/VoicemailContract.java index 2ad7395..2e5a495 100644 --- a/core/java/android/provider/VoicemailContract.java +++ b/core/java/android/provider/VoicemailContract.java @@ -128,6 +128,12 @@ public class VoicemailContract { */ public static final String NEW = Calls.NEW; /** + * Whether this item has been read or otherwise consumed by the user. + *

Type: INTEGER (boolean)

+ * @hide + */ + public static final String IS_READ = Calls.IS_READ; + /** * The mail box state of the voicemail. This field is currently not used by the system. *

Possible values: {@link #STATE_INBOX}, {@link #STATE_DELETED}, * {@link #STATE_UNDELETED}. -- cgit v1.1