Move footer logic to a separate flag.
Bug: 294830092
Bug: 294347738
Test: manual
Flag: com.android.systemui.notification_footer_background_tint_optimization
Change-Id: I9898efb8aa82cc6abfee98248e1dc5bcc9d75b22
diff --git a/packages/SystemUI/aconfig/systemui.aconfig b/packages/SystemUI/aconfig/systemui.aconfig
index aff86e8a1..bb09644 100644
--- a/packages/SystemUI/aconfig/systemui.aconfig
+++ b/packages/SystemUI/aconfig/systemui.aconfig
@@ -204,7 +204,16 @@
description: "Re-enable the codepath that removed tinting of notifications when the"
" standard background color is desired. This was the behavior before we discovered"
" a resources threading issue, which we worked around by tinting the notification"
- " backgrounds and footer buttons."
+ " backgrounds."
+ bug: "294830092"
+}
+
+flag {
+ name: "notification_footer_background_tint_optimization"
+ namespace: "systemui"
+ description: "Remove duplicative tinting of notification footer buttons. This was the behavior"
+ " before we discovered a resources threading issue, which we worked around by applying the"
+ " same color as a tint to the background drawable of footer buttons."
bug: "294830092"
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterView.java
index 968b591..5a616df 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterView.java
@@ -18,7 +18,7 @@
import static android.graphics.PorterDuff.Mode.SRC_ATOP;
-import static com.android.systemui.Flags.notificationBackgroundTintOptimization;
+import static com.android.systemui.Flags.notificationFooterBackgroundTintOptimization;
import static com.android.systemui.util.ColorUtilKt.hexColorString;
import android.annotation.ColorInt;
@@ -407,7 +407,7 @@
final Drawable clearAllBg = theme.getDrawable(R.drawable.notif_footer_btn_background);
final Drawable manageBg = theme.getDrawable(R.drawable.notif_footer_btn_background);
final @ColorInt int scHigh;
- if (!notificationBackgroundTintOptimization()) {
+ if (!notificationFooterBackgroundTintOptimization()) {
scHigh = Utils.getColorAttrDefaultColor(mContext,
com.android.internal.R.attr.materialColorSurfaceContainerHigh);
if (scHigh != 0) {