summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2020-01-14 03:50:40 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-01-14 03:50:40 +0000
commit9b10a80412a92cae47ead93f0d3774c7a911b4d4 (patch)
treeb9238914507c233b209d5bbc9bf6686640599812
parent63b67c0efa545aa7e4c43d9465775c0f544829be (diff)
parentb8cede42e1f2e19b6c7f9e0764756b6d009895c0 (diff)
Merge "Flag to bypass shortcut req for "convo" notifs"
-rw-r--r--api/test-current.txt1
-rw-r--r--core/java/android/util/FeatureFlagUtils.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/people/PeopleNotificationIdentifier.kt12
3 files changed, 14 insertions, 2 deletions
diff --git a/api/test-current.txt b/api/test-current.txt
index 8c73255bd387..1db4c9b82343 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -4279,6 +4279,7 @@ 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";
diff --git a/core/java/android/util/FeatureFlagUtils.java b/core/java/android/util/FeatureFlagUtils.java
index 1b2db36c1335..9d22d304ad00 100644
--- a/core/java/android/util/FeatureFlagUtils.java
+++ b/core/java/android/util/FeatureFlagUtils.java
@@ -42,6 +42,8 @@ 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";
private static final Map<String, String> DEFAULT_FLAGS;
@@ -60,6 +62,7 @@ public class FeatureFlagUtils {
DEFAULT_FLAGS.put("settings_work_profile", "true");
DEFAULT_FLAGS.put("settings_controller_loading_enhancement", "false");
DEFAULT_FLAGS.put("settings_conditionals", "false");
+ DEFAULT_FLAGS.put(NOTIF_CONVO_BYPASS_SHORTCUT_REQ, "false");
}
/**
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/people/PeopleNotificationIdentifier.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/people/PeopleNotificationIdentifier.kt
index 78eaf3ee10a4..452d1eb95aab 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/people/PeopleNotificationIdentifier.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/people/PeopleNotificationIdentifier.kt
@@ -17,7 +17,9 @@
package com.android.systemui.statusbar.notification.people
import android.app.Notification
+import android.content.Context
import android.service.notification.StatusBarNotification
+import android.util.FeatureFlagUtils
import javax.inject.Inject
import javax.inject.Singleton
@@ -27,10 +29,16 @@ interface PeopleNotificationIdentifier {
@Singleton
class PeopleNotificationIdentifierImpl @Inject constructor(
- private val personExtractor: NotificationPersonExtractor
+ private val personExtractor: NotificationPersonExtractor,
+ private val context: Context
) : PeopleNotificationIdentifier {
override fun isPeopleNotification(sbn: StatusBarNotification) =
- sbn.notification.notificationStyle == Notification.MessagingStyle::class.java ||
+ (sbn.notification.notificationStyle == Notification.MessagingStyle::class.java &&
+ (sbn.notification.shortcutId != null ||
+ FeatureFlagUtils.isEnabled(
+ context,
+ FeatureFlagUtils.NOTIF_CONVO_BYPASS_SHORTCUT_REQ
+ ))) ||
personExtractor.isPersonNotification(sbn)
} \ No newline at end of file