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

Commit 0ef85393 authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Add some missing conversation log fields"

parents e7b1832d 1785b2ef
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5974,6 +5974,7 @@ package android.app {
    method public long[] getVibrationPattern();
    method public boolean hasUserSetImportance();
    method public boolean hasUserSetSound();
    method public boolean isConversation();
    method public boolean isDemoted();
    method public boolean isImportantConversation();
    method public void setAllowBubbles(boolean);
+8 −1
Original line number Diff line number Diff line
@@ -4280,9 +4280,16 @@ message NotificationChannelModified {
    optional android.stats.sysui.NotificationImportance old_importance = 5;
    // New importance setting
    optional android.stats.sysui.NotificationImportance importance = 6;
    // whether or not this channel represents a conversation
    optional bool is_conversation = 7;
    // Hash of app-assigned notification conversation id
    optional int32 conversation_id_hash = 8;
    // whether or not the user demoted this channel out of the conversation space
    optional bool is_conversation_demoted = 9;
    // whether this conversation is marked as being a priority
    optional bool is_conversation_priority = 10;
}


/**
 * Logs when a biometric acquire event occurs.
 *
+1 −0
Original line number Diff line number Diff line
@@ -5974,6 +5974,7 @@ package android.app {
    method public long[] getVibrationPattern();
    method public boolean hasUserSetImportance();
    method public boolean hasUserSetSound();
    method public boolean isConversation();
    method public boolean isDemoted();
    method public boolean isImportantConversation();
    method public void setAllowBubbles(boolean);
+10 −2
Original line number Diff line number Diff line
@@ -628,13 +628,21 @@ public final class NotificationChannel implements Parcelable {
        return mBypassDnd;
    }

    /**
     * Whether or not this channel represents a conversation.
     */
    public boolean isConversation() {
        return !TextUtils.isEmpty(getConversationId());
    }


    /**
     * Whether or not notifications in this conversation are considered important.
     *
     * <p>Important conversations may get special visual treatment, and might be able to bypass DND.
     *
     * <p>This is only valid for channels that represent conversations, that is, those with a valid
     * {@link #getConversationId() conversation id}.
     * <p>This is only valid for channels that represent conversations, that is,
     * where {@link #isConversation()} is true.
     */
    public boolean isImportantConversation() {
        return mImportantConvo;
+7 −0
Original line number Diff line number Diff line
@@ -214,6 +214,13 @@ public interface NotificationChannelLogger {
        return SmallHash.hash(channel.getId());
    }

    /**
     * @return Small hash of the conversation ID, if present, or 0 otherwise.
     */
    static int getConversationIdHash(@NonNull NotificationChannel channel) {
        return SmallHash.hash(channel.getConversationId());
    }

    /**
     * @return Small hash of the channel ID, if present, or 0 otherwise.
     */
Loading