Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 651212d3 authored by Flavio Lerda's avatar Flavio Lerda
Browse files

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
parent ab45c768
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -183,6 +183,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.
         *
+6 −0
Original line number Diff line number Diff line
@@ -127,6 +127,12 @@ public class VoicemailContract {
         * <P>Type: INTEGER (boolean)</P>
         */
        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},