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

Commit fd6992bd authored by Chloris Kuo's avatar Chloris Kuo Committed by Automerger Merge Worker
Browse files

Merge "Conversation Blocklist" into sc-dev am: b3a5d74f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13436492

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie7cc21e6a9aecf17da1f1a35e5769096088d4226
parents c03a7861 b3a5d74f
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -62,6 +62,11 @@ public final class SystemUiDeviceConfigFlags {
     */
     */
    public static final String ENABLE_NAS_FEEDBACK = "enable_nas_feedback";
    public static final String ENABLE_NAS_FEEDBACK = "enable_nas_feedback";


    /**
     * Whether the Notification Assistant can label a notification not a conversation
     */
    public static final String ENABLE_NAS_NOT_CONVERSATION = "enable_nas_not_conversation";

    // Flags related to screenshot intelligence
    // Flags related to screenshot intelligence


    /**
    /**
+9 −1
Original line number Original line Diff line number Diff line
@@ -377,7 +377,8 @@ public class NotificationManagerService extends SystemService {


    static final String[] DEFAULT_ALLOWED_ADJUSTMENTS = new String[] {
    static final String[] DEFAULT_ALLOWED_ADJUSTMENTS = new String[] {
            Adjustment.KEY_CONTEXTUAL_ACTIONS,
            Adjustment.KEY_CONTEXTUAL_ACTIONS,
            Adjustment.KEY_TEXT_REPLIES};
            Adjustment.KEY_TEXT_REPLIES,
            Adjustment.KEY_NOT_CONVERSATION};


    static final String[] NON_BLOCKABLE_DEFAULT_ROLES = new String[] {
    static final String[] NON_BLOCKABLE_DEFAULT_ROLES = new String[] {
            RoleManager.ROLE_DIALER,
            RoleManager.ROLE_DIALER,
@@ -2313,6 +2314,13 @@ public class NotificationManagerService extends SystemService {
                    } else if ("false".equals(value)) {
                    } else if ("false".equals(value)) {
                        mAssistants.disallowAdjustmentType(Adjustment.KEY_RANKING_SCORE);
                        mAssistants.disallowAdjustmentType(Adjustment.KEY_RANKING_SCORE);
                    }
                    }
                } else if (SystemUiDeviceConfigFlags.ENABLE_NAS_NOT_CONVERSATION.equals(name)) {
                    String value = properties.getString(name, null);
                    if ("true".equals(value)) {
                        mAssistants.allowAdjustmentType(Adjustment.KEY_NOT_CONVERSATION);
                    } else if ("false".equals(value)) {
                        mAssistants.disallowAdjustmentType(Adjustment.KEY_NOT_CONVERSATION);
                    }
                }
                }
            }
            }
        };
        };