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

Commit 034b7106 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Store conversation requirement in a setting" into rvc-dev am:...

Merge "Store conversation requirement in a setting" into rvc-dev am: 5eb9c8fa am: fb7f470b am: a2ce73bd am: 958fd975

Change-Id: I7daa6a63311bc1fd03f937abe031bd1ed8e9cee0
parents e21391ec 958fd975
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -4714,7 +4714,6 @@ package android.util {
    field public static final String FFLAG_OVERRIDE_PREFIX = "sys.fflag.override.";
    field public static final String FFLAG_PREFIX = "sys.fflag.";
    field public static final String HEARING_AID_SETTINGS = "settings_bluetooth_hearing_aid";
    field public static final String NOTIF_CONVO_BYPASS_SHORTCUT_REQ = "settings_notif_convo_bypass_shortcut_req";
    field public static final String PERSIST_PREFIX = "persist.sys.fflag.override.";
    field public static final String SCREENRECORD_LONG_PRESS = "settings_screenrecord_long_press";
    field public static final String SEAMLESS_TRANSFER = "settings_seamless_transfer";
+10 −0
Original line number Diff line number Diff line
@@ -13798,6 +13798,16 @@ public final class Settings {
        public static final String SHOW_NOTIFICATION_CHANNEL_WARNINGS =
                "show_notification_channel_warnings";
        /**
         * When enabled, requires all notifications in the conversation section to be backed
         * by a long-lived sharing shortcut
         *
         * The value 1 - require a shortcut, 0 - do not require a shortcut
         * @hide
         */
        public static final String REQUIRE_SHORTCUTS_FOR_CONVERSATIONS =
                "require_shortcuts_for_conversations";
        /**
         * Whether cell is enabled/disabled
         * @hide
+5 −5
Original line number Diff line number Diff line
@@ -17,8 +17,6 @@
package android.service.notification;

import static android.app.NotificationChannel.PLACEHOLDER_CONVERSATION_ID;
import static android.util.FeatureFlagUtils.NOTIF_CONVO_BYPASS_SHORTCUT_REQ;
import static android.util.FeatureFlagUtils.isEnabled;

import android.annotation.NonNull;
import android.app.Notification;
@@ -33,6 +31,7 @@ import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.UserHandle;
import android.provider.Settings;
import android.text.TextUtils;

import com.android.internal.logging.InstanceId;
@@ -477,9 +476,10 @@ public class StatusBarNotification implements Parcelable {
     */
    public String getShortcutId(Context context) {
        String conversationId = getNotification().getShortcutId();
        if (isEnabled(context,  NOTIF_CONVO_BYPASS_SHORTCUT_REQ)
                && getNotification().getNotificationStyle() == Notification.MessagingStyle.class
                && TextUtils.isEmpty(conversationId)) {
        if (TextUtils.isEmpty(conversationId)
                && (Settings.Global.getInt(context.getContentResolver(),
                Settings.Global.REQUIRE_SHORTCUTS_FOR_CONVERSATIONS, 0) == 0)
                && getNotification().getNotificationStyle() == Notification.MessagingStyle.class) {
            conversationId = getId() + getTag() + PLACEHOLDER_CONVERSATION_ID;
        }
        return conversationId;
+0 −3
Original line number Diff line number Diff line
@@ -42,8 +42,6 @@ public class FeatureFlagUtils {
    public static final String DYNAMIC_SYSTEM = "settings_dynamic_system";
    public static final String SETTINGS_WIFITRACKER2 = "settings_wifitracker2";
    public static final String SETTINGS_FUSE_FLAG = "settings_fuse";
    public static final String NOTIF_CONVO_BYPASS_SHORTCUT_REQ =
            "settings_notif_convo_bypass_shortcut_req";
    /** @hide */
    public static final String SETTINGS_DO_NOT_RESTORE_PRESERVED =
            "settings_do_not_restore_preserved";
@@ -66,7 +64,6 @@ public class FeatureFlagUtils {
        DEFAULT_FLAGS.put(SETTINGS_WIFITRACKER2, "true");
        DEFAULT_FLAGS.put("settings_controller_loading_enhancement", "false");
        DEFAULT_FLAGS.put("settings_conditionals", "false");
        DEFAULT_FLAGS.put(NOTIF_CONVO_BYPASS_SHORTCUT_REQ, "true");
        // This flags guards a feature introduced in R and will be removed in the next release
        // (b/148367230).
        DEFAULT_FLAGS.put(SETTINGS_DO_NOT_RESTORE_PRESERVED, "true");
+6 −2
Original line number Diff line number Diff line
@@ -928,11 +928,15 @@
    <!-- UI debug setting: show all ANRs summary [CHAR LIMIT=100] -->
    <string name="show_all_anrs_summary">Display App Not Responding dialog for background apps</string>

    <!-- UI debug setting: show all ANRs? [CHAR LIMIT=25] -->
    <!-- UI debug setting: show missing channel toasts? [CHAR LIMIT=25] -->
    <string name="show_notification_channel_warnings">Show notification channel warnings</string>
    <!-- UI debug setting: show all ANRs summary [CHAR LIMIT=50] -->
    <!-- UI debug setting: show missing channel toasts summary [CHAR LIMIT=50] -->
    <string name="show_notification_channel_warnings_summary">Displays on-screen warning when an app posts a notification without a valid channel</string>

    <!-- UI debug setting: enforce shortcut requirements for conversation space [CHAR LIMIT=25] -->
    <string name="enforce_shortcuts_for_conversations">Enforce shortcuts for conversation notifications</string>
    <!-- UI debug setting: enforce shortcut requirements for conversation space summary [CHAR LIMIT=50] -->
    <string name="enforce_shortcuts_for_conversations_summary">Require notifications to be backed by a long-lived sharing shortcut in order to appear in the conversation section</string>

    <!-- UI debug setting: force allow apps on external storage [CHAR LIMIT=50] -->
    <string name="force_allow_on_external">Force allow apps on external</string>
Loading