Loading core/java/android/app/Notification.java +14 −0 Original line number Diff line number Diff line Loading @@ -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); } Loading @@ -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); } } Loading core/res/res/layout/notification_template_conversation_header.xml +14 −1 Original line number Diff line number Diff line Loading @@ -99,13 +99,26 @@ android:visibility="gone" /> <TextView android:id="@+id/verification_divider" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Info" android:layout_marginStart="@dimen/notification_conversation_header_separating_margin" android:layout_marginEnd="@dimen/notification_conversation_header_separating_margin" android:text="@string/notification_header_divider_symbol" android:layout_gravity="center" android:paddingTop="1sp" android:singleLine="true" android:visibility="gone" /> <ImageView android:id="@+id/verification_icon" android:layout_width="@dimen/notification_verification_icon_size" android:layout_height="@dimen/notification_verification_icon_size" android:layout_gravity="center" android:layout_marginStart="4dp" android:contentDescription="@string/notification_alerted_content_description" android:paddingTop="2dp" android:scaleType="fitCenter" android:src="@drawable/ic_notifications_alerted" Loading core/res/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -5011,6 +5011,9 @@ <!-- Content description of the alerting icon in the notification. [CHAR_LIMIT=NONE] --> <string name="notification_alerted_content_description">Alerted</string> <!-- Default content description of the verification icon in the call notification. [CHAR_LIMIT=NONE] --> <string name="notification_verified_content_description">Verified</string> <!-- Content description of the expand button icon in the notification when collaped.--> <string name="expand_button_content_description_collapsed">Expand</string> Loading core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -3110,8 +3110,10 @@ <java-symbol type="dimen" name="call_notification_collapsible_indent"/> <java-symbol type="drawable" name="ic_call_answer" /> <java-symbol type="drawable" name="ic_call_decline" /> <java-symbol type="id" name="verification_divider" /> <java-symbol type="id" name="verification_icon" /> <java-symbol type="id" name="verification_text" /> <java-symbol type="string" name="notification_verified_content_description" /> <!-- Notification handler / dashboard package --> <java-symbol type="string" name="config_notificationHandlerPackage" /> Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/InflatedSmartReplyViewHolder.kt +1 −1 Original line number Diff line number Diff line /* * 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. Loading Loading
core/java/android/app/Notification.java +14 −0 Original line number Diff line number Diff line Loading @@ -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); } Loading @@ -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); } } Loading
core/res/res/layout/notification_template_conversation_header.xml +14 −1 Original line number Diff line number Diff line Loading @@ -99,13 +99,26 @@ android:visibility="gone" /> <TextView android:id="@+id/verification_divider" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Info" android:layout_marginStart="@dimen/notification_conversation_header_separating_margin" android:layout_marginEnd="@dimen/notification_conversation_header_separating_margin" android:text="@string/notification_header_divider_symbol" android:layout_gravity="center" android:paddingTop="1sp" android:singleLine="true" android:visibility="gone" /> <ImageView android:id="@+id/verification_icon" android:layout_width="@dimen/notification_verification_icon_size" android:layout_height="@dimen/notification_verification_icon_size" android:layout_gravity="center" android:layout_marginStart="4dp" android:contentDescription="@string/notification_alerted_content_description" android:paddingTop="2dp" android:scaleType="fitCenter" android:src="@drawable/ic_notifications_alerted" Loading
core/res/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -5011,6 +5011,9 @@ <!-- Content description of the alerting icon in the notification. [CHAR_LIMIT=NONE] --> <string name="notification_alerted_content_description">Alerted</string> <!-- Default content description of the verification icon in the call notification. [CHAR_LIMIT=NONE] --> <string name="notification_verified_content_description">Verified</string> <!-- Content description of the expand button icon in the notification when collaped.--> <string name="expand_button_content_description_collapsed">Expand</string> Loading
core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -3110,8 +3110,10 @@ <java-symbol type="dimen" name="call_notification_collapsible_indent"/> <java-symbol type="drawable" name="ic_call_answer" /> <java-symbol type="drawable" name="ic_call_decline" /> <java-symbol type="id" name="verification_divider" /> <java-symbol type="id" name="verification_icon" /> <java-symbol type="id" name="verification_text" /> <java-symbol type="string" name="notification_verified_content_description" /> <!-- Notification handler / dashboard package --> <java-symbol type="string" name="config_notificationHandlerPackage" /> Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/InflatedSmartReplyViewHolder.kt +1 −1 Original line number Diff line number Diff line /* * 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. Loading