summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlavio Lerda <flerda@google.com>2011-07-21 16:53:59 +0100
committerFlavio Lerda <flerda@google.com>2011-07-25 02:19:47 +0100
commit651212d37db9aa6d03b30a8a09a2a44627862eea (patch)
tree41022767b02dd1001751a1eca851c533aca1c351
parentab45c768bcfecbabbd664d4962f0c86627b6c76b (diff)
downloadframeworks_base-651212d37db9aa6d03b30a8a09a2a44627862eea.zip
frameworks_base-651212d37db9aa6d03b30a8a09a2a44627862eea.tar.gz
frameworks_base-651212d37db9aa6d03b30a8a09a2a44627862eea.tar.bz2
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
-rw-r--r--core/java/android/provider/CallLog.java10
-rw-r--r--core/java/android/provider/VoicemailContract.java6
2 files changed, 16 insertions, 0 deletions
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.
+ * <p>
+ * 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.
+ * <P>Type: INTEGER (boolean)</P>
+ * @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.
+ * <P>Type: INTEGER (boolean)</P>
+ * @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.
* <P> Possible values: {@link #STATE_INBOX}, {@link #STATE_DELETED},
* {@link #STATE_UNDELETED}.