diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 7222e8650a088..8167622ff13c4 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -9439,11 +9439,16 @@ public class Notification implements Parcelable
}
private void bindCallerVerification(RemoteViews contentView, StandardTemplateParams p) {
+ String iconContentDescription = null;
+ boolean showDivider = true;
if (mVerificationIcon != null) {
contentView.setImageViewIcon(R.id.verification_icon, mVerificationIcon);
contentView.setDrawableTint(R.id.verification_icon, false /* targetBackground */,
mBuilder.getSecondaryTextColor(p), PorterDuff.Mode.SRC_ATOP);
contentView.setViewVisibility(R.id.verification_icon, View.VISIBLE);
+ iconContentDescription = mBuilder.mContext.getString(
+ R.string.notification_verified_content_description);
+ showDivider = false; // the icon replaces the divider
} else {
contentView.setViewVisibility(R.id.verification_icon, View.GONE);
}
@@ -9451,8 +9456,17 @@ public class Notification implements Parcelable
contentView.setTextViewText(R.id.verification_text, mVerificationText);
mBuilder.setTextViewColorSecondary(contentView, R.id.verification_text, p);
contentView.setViewVisibility(R.id.verification_text, View.VISIBLE);
+ iconContentDescription = null; // let the app's text take precedence
} else {
contentView.setViewVisibility(R.id.verification_text, View.GONE);
+ showDivider = false; // no divider if no text
+ }
+ contentView.setContentDescription(R.id.verification_icon, iconContentDescription);
+ if (showDivider) {
+ contentView.setViewVisibility(R.id.verification_divider, View.VISIBLE);
+ mBuilder.setTextViewColorSecondary(contentView, R.id.verification_divider, p);
+ } else {
+ contentView.setViewVisibility(R.id.verification_divider, View.GONE);
}
}
diff --git a/core/res/res/layout/notification_template_conversation_header.xml b/core/res/res/layout/notification_template_conversation_header.xml
index 302a388cf1b21..e01d8035fe350 100644
--- a/core/res/res/layout/notification_template_conversation_header.xml
+++ b/core/res/res/layout/notification_template_conversation_header.xml
@@ -99,13 +99,26 @@
android:visibility="gone"
/>
+
+
Alerted
+
+ Verified
+
Expand
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index a4dec227ad9ab..dbb584dfe293a 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -3110,8 +3110,10 @@
+
+
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/InflatedSmartReplyViewHolder.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/InflatedSmartReplyViewHolder.kt
index 4f69cd6a13676..4e5c461b9643c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/InflatedSmartReplyViewHolder.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/InflatedSmartReplyViewHolder.kt
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.